Digital Twins for Physical Systems – Capstone Lecture
Georgia Institute of Technology
2026-03-11

Felix J. Herrmann
Computational Science and Engineering — Georgia Institute of Technology
Note
This slide deck is derived from Gahlot, Orozco, Yin, et al. (2025b).


Important
We cannot rely on reservoir simulations alone – we need data assimilation with time-lapse monitoring data!
IBM’s definition of a Digital Twin:
A digital twin is a virtual representation of an object or system designed to reflect a physical object accurately. It spans the object’s lifecycle, is updated from real-time data and uses simulation, machine learning and reasoning to help make decisions.
Digital Shadow (Asch 2022):
Key innovations over standard EnKF:
The time-varying state \(\mathbf{x}_k = \bigl(\mathbf{x}_k[S_{\text{CO}_2}],\, \mathbf{x}_k[\delta p]\bigr)\) evolves as:
\[ \mathbf{x}_{k} = \mathcal{M}_k\bigl(\mathbf{x}_{k-1}, \boldsymbol{\kappa}_k\bigr),\quad \boldsymbol{\kappa}_k\sim p(\boldsymbol{\kappa}) \quad \text{for}\quad k=1\cdots K \tag{1}\]
where:
| Symbol | Meaning |
|---|---|
| \(\mathcal{M}_k\) | Dynamics operator (multiphase flow simulator) |
| \(\mathbf{x}_k[S_{\text{CO}_2}]\) | CO2 saturation at timestep \(k\) |
| \(\mathbf{x}_k[\delta p]\) | Pressure perturbation at timestep \(k\) |
| \(\boldsymbol{\kappa}\) | Permeability field – stochastic nuisance parameter |
| \(p(\boldsymbol{\kappa})\) | Prior distribution from baseline seismic (via WISE) |
Note
The permeability \(\boldsymbol{\kappa}\) is drawn anew at each timestep, reflecting our epistemic uncertainty about reservoir properties.
Multimodal time-lapse observations:
\[ \mathbf{y}_k = \mathcal{H}_k(\mathbf{x}_k,\boldsymbol{\epsilon}_k, \mathbf{\bar{m}}_k),\quad \boldsymbol{\epsilon}_k \sim p(\boldsymbol{\epsilon}) \quad\text{for}\quad k=1,2,\cdots,K \tag{2}\]
Two types of observations:
1. Well measurements (direct)
2. Surface seismic (indirect)
The observation operator \(\mathcal{H}_k\) is nonlinear, ill-posed, and computationally expensive.
The goal: recursively compute \(p(\mathbf{x}_k\mid \mathbf{y}_{1:k})\).
Three steps (Asch 2022):
Initialization: Choose prior \(p(\mathbf{x}_0)\)
Prediction (Chapman-Kolmogorov): \[ p(\mathbf{x}_k\mid \mathbf{y}_{1:k-1}) = \mathbb{E}_{\mathbf{x}_{k-1}\sim p(\mathbf{x}_{k-1}\mid\mathbf{y}_{1:k-1})}\bigl[p(\mathbf{x}_{k}\mid\mathbf{x}_{k-1})\bigr] \]
Analysis (Bayes’ rule): \[ p(\mathbf{x}_{k}|\mathbf{y}_{1:k}) \propto p(\mathbf{y}_{k}|\mathbf{x}_{k})\, p(\mathbf{x}_{k}|\mathbf{y}_{1:k-1}) \]
Challenges: No analytical solution for nonlinear, non-Gaussian dynamics + nuisance parameters + high-dimensional state + expensive operators.
Ensemble Kalman Filter propagates \(M\) particles:
\[ \widehat{\mathbf{x}}^{(m)}_k = \mathbf{x}^{(m)}_k - \mathbb{C}\text{ov}_{\mathbf{x}_k, \mathbf{y}_k}\,\mathbb{C}\text{ov}^{-1}_{\mathbf{y}_k, \mathbf{y}_k}\bigl(\mathbf{y}_k^{(m)}-\mathbf{y}_k^{\text{obs}}\bigr) \]
Limitations:
Our approach: Replace the linear mapping with a learned nonlinear prior-to-posterior mapping using Conditional Normalizing Flows (CNFs).
Lifecycle of the Digital Shadow at timestep \(k=1\): Forecast \(\rightarrow\) Training \(\rightarrow\) Analysis
At each timestep \(k\), the Digital Shadow cycles through:
1. Forecast Step
2. Training Step
3. Analysis Step
Tip
The \(\widehat{\quad}\) symbol distinguishes analyzed states (conditioned on field data) from predicted (digital) states.
Challenge: Raw seismic data is high-dimensional, non-uniform, and the mapping to CO2 states is complex.
Solution: Physics-based summary statistics via Reverse-Time Migration (RTM) (Orozco et al. 2023):
\[ \mathbf{y}_k = \Bigl(\mathbf{J}_{\mathcal{F}[\mathbf{v}]}\Bigr|_{\widetilde{\mathbf{v}}_k}\Bigr)_{\text{ic}}^{\top} \Bigl(\mathcal{F}[\mathbf{\bar{m}}_k]-\mathbf{d}_k\Bigr) \]
where:
Key insight: RTM preserves information from shot records (Alsing et al. 2018; Orozco et al. 2023) while mapping to a uniform image domain where the relation to the CO2 plume is simpler.
Patchy saturation model (Avseth et al. 2010) maps CO2 saturation to seismic properties: \[ \mathbf{m}_k = \mathcal{R}(\mathbf{m}_0, \mathbf{x}_k),\quad k=1\cdots K \]
CO2 saturation-induced changes in wavespeed and density
Reference model for each timestep uses ensemble average: \[ \mathbf{\bar{m}}_k = \mathcal{R}(\mathbf{m}_0, \mathbf{\bar{x}}_k) \quad\text{where}\quad \mathbf{\bar{x}}_k = \frac{1}{M}\sum_{m=1}^M \mathbf{x}_k^{(m)} \]
Objective: Train CNF to approximate the posterior by minimizing the forward KL divergence:
\[ \widehat{\boldsymbol{\phi}}_k = \arg\min_{\boldsymbol{\phi}} \frac{1}{M}\sum_{m=1}^M \left(\frac{1}{2}\bigl\|f_{\boldsymbol{\phi}}(\mathbf{x}_k^{(m)};\mathbf{y}_k^{(m)})\bigr\|_2^2 - \log\bigl|\det\bigl(\mathbf{J}^{(m)}_{f_{\boldsymbol{\phi}}}\bigr)\bigr|\right) \tag{3}\]
How it works:
Key property – marginalization:
Starting from the KL divergence between true and approximate posterior (Cranmer et al. 2020; Radev et al. 2020):
\[ \widehat{\boldsymbol{\phi}} = \arg\min_{\boldsymbol{\phi}} \mathbb{E}_{p(\mathbf{y})}\bigl[\mathbb{KL}\bigl(p(\mathbf{x}\mid \mathbf{y})\,\|\,p_{\boldsymbol{\phi}}(\mathbf{x}\mid \mathbf{y})\bigr)\bigr] \]
Expand KL and drop terms independent of \(\boldsymbol{\phi}\): \[= \arg\max_{\boldsymbol{\phi}} \mathbb{E}_{p(\mathbf{x},\mathbf{y})}\bigl[\log p_{\boldsymbol{\phi}}(\mathbf{x}\mid\mathbf{y})\bigr]\]
Apply change-of-variables \(p_{\boldsymbol{\phi}}(\mathbf{x}\mid\mathbf{y}) = p\bigl(\mathbf{z}=f_{\boldsymbol{\phi}}(\mathbf{x};\mathbf{y})\bigr)\bigl|\det(\mathbf{J}_{f_{\boldsymbol{\phi}}})\bigr|\): \[= \arg\max_{\boldsymbol{\phi}} \mathbb{E}_{p(\mathbf{x},\mathbf{y})}\Bigl[\log p\bigl(f_{\boldsymbol{\phi}}(\mathbf{x};\mathbf{y})\bigr) + \log\bigl|\det(\mathbf{J}_{f_{\boldsymbol{\phi}}})\bigr|\Bigr]\]
With \(p(\mathbf{z}) = \mathcal{N}(0,\mathbf{I})\) and Monte Carlo approximation \(\rightarrow\) training loss in Equation 3
After training, samples from the posterior can be drawn:
\[ \widehat{\mathbf{x}}_k^{(m)} = f^{-1}_{\widehat{\boldsymbol{\phi}}_k}(\mathbf{z}_k^{(m)};\,\mathbf{y}_k^{\text{obs}}),\quad \mathbf{z}_k^{(m)} \sim \mathcal{N}(0,\mathbf{I}) \]
But this reference-to-conditional mapping requires ideal training…
Better approach: Joint-to-conditional mapping (Spantini et al. 2022; Ramgraber et al. 2023):
\[ \widehat{\mathbf{x}}_k^{(m)} = f^{-1}_{\widehat{\boldsymbol{\phi}}_k}\Bigl(\underbrace{f_{\widehat{\boldsymbol{\phi}}_k}(\mathbf{x}_k^{(m)};\,\mathbf{y}_k^{(m)})}_{\mathbf{z}_k^{(m)}};\,\mathbf{y}_k^{\text{obs}}\Bigr) \]
This is a nonlinear extension of EnKF’s correction: \[ \widehat{\mathbf{x}}^{(m)}_{k} = {T}^{\text{nonlin}}_{\mathbf{y}_k^{\text{obs}}}(\mathbf{y}_k^{(m)},\,\mathbf{x}_k^{(m)}) = f^{-1}_{\widehat{\boldsymbol{\phi}}_k}\left(f_{\widehat{\boldsymbol{\phi}}_k}(\mathbf{x}_k^{(m)};\,\mathbf{y}^{(m)}_k);\,\mathbf{y}_k^{\text{obs}}\right) \]
\[ \widehat{\mathbf{x}}^{(m)}_k = \mathbf{x}^{(m)}_k - \mathbb{C}\text{ov}_{\mathbf{x}_k,\mathbf{y}_k}\,\mathbb{C}\text{ov}^{-1}_{\mathbf{y}_k,\mathbf{y}_k}(\mathbf{y}_k^{(m)} - \mathbf{y}_k^{\text{obs}}) \]
\[ \widehat{\mathbf{x}}^{(m)}_k = f^{-1}_{\widehat{\boldsymbol{\phi}}_k}\bigl(f_{\widehat{\boldsymbol{\phi}}_k}(\mathbf{x}_k^{(m)};\mathbf{y}_k^{(m)});\,\mathbf{y}_k^{\text{obs}}\bigr) \]
Advantages of joint-to-conditional:
Procedure Forecast(\(p(\boldsymbol{\kappa}), p(\boldsymbol{\epsilon}_k), \{\widehat{\mathbf{x}}_{k-1}^{(m)}\}_{m=1}^M\)):
for \(m = 1\) to \(M\) do
Sample from transition density: \(\mathbf{x}^{(m)}_k\sim p(\cdot\mid \widehat{\mathbf{x}}^{(m)}_{k-1})\) via dynamics simulations
Sample from likelihood: \(\mathbf{y}^{(m)}_k\sim p(\cdot\mid \mathbf{x}^{(m)}_{k})\) via observation simulations
return \(\{(\mathbf{x}_k^{(m)},\mathbf{y}_k^{(m)})\}_{m=1}^{M}\)
Procedure Training(\(\{(\mathbf{x}_k^{(m)},\mathbf{y}_k^{(m)})\}_{m=1}^{M}\)):
\(\displaystyle\widehat{\boldsymbol{\phi}}_k = \arg\min_{\boldsymbol{\phi}} \frac{1}{M}\sum_{m=1}^M \left(\frac{1}{2}\|f_{\boldsymbol{\phi}}(\mathbf{x}_k^{(m)};\mathbf{y}_k^{(m)})\|_2^2 - \log|\det(\mathbf{J}^{(m)}_{f_{\boldsymbol{\phi}}})|\right)\)
return \(\widehat{\boldsymbol{\phi}}_k\)
Procedure Analysis(\(\mathbf{y}^{\text{obs}}_{k}, \widehat{\boldsymbol{\phi}}_k, \{(\mathbf{x}_k^{(m)},\mathbf{y}_k^{(m)})\}_{m=1}^{M}\)):
for \(m = 1\) to \(M\) do
Compute latent variables: \(\mathbf{z}^{(m)}_k = f_{\widehat{\boldsymbol{\phi}}_k}(\mathbf{x}_k^{(m)};\mathbf{y}_k^{(m)})\)
Apply prior-to-posterior map: \(\widehat{\mathbf{x}}_k^{(m)} = f^{-1}_{\widehat{\boldsymbol{\phi}}_k}(\mathbf{z}_k^{(m)};\mathbf{y}_k^{\text{obs}})\)
return \(\{\widehat{\mathbf{x}}^{(m)}_k\}_{m=1}^M\)
Require: Datasets \(\mathbf{y}_k^{\text{obs}}\), collected sequentially at times \(k=1,\ldots,K\)
Output: Estimated ensemble \(\{\widehat{\mathbf{x}}^{(m)}_k\}_{m=1}^M\) for \(k=1,\ldots,K\)
Initialize: For \(m = 1\) to \(M\): sample \(\widehat{\mathbf{x}}^{(m)}_0 \sim p(\mathbf{x}_0)\)
For \(k = 1\) to \(K\):
This procedure implements neural sequential Bayesian inference – the basis of our Digital Shadow.


Ground-truth states: saturation (left), pressure perturbation (center), seismic observations (right) for \(k=1\cdots 4\)
Simulation parameters:
Software stack:
Predicted state samples at \(k=1\) showing variability from different permeability realizations
Corrections by the Analysis step at \(k=3\): individual samples and conditional means
Errors and standard deviations before and after the Analysis step at \(k=3\)
Three conditioning scenarios compared:
| Modality | Data used |
|---|---|
| Wells only | Saturation + pressure at well locations |
| Seismic only | Time-lapse migrated seismic images |
| Wells + Seismic | Both modalities combined |
Ensemble parameters:
Posterior mean, errors, and standard deviations at \(k=1\) for four scenarios
Posterior mean, errors, and standard deviations at \(k=2\)
Posterior mean, errors, and standard deviations at \(k=3\)
Posterior mean, errors, and standard deviations at \(k=4\)
Warning
Well-only data fails to capture the critical leftward protruding plume feature that breaches containment!
Unconditioned saturation evolution


Seismic + Wells Conditioned saturation evolution
Unconditioned pressure evolution


Seismic + Wells Conditioned pressure evolution



Key observations:
SSIM-Error: \(1 - \text{SSIM}(\mathbf{x}^\ast_k, \bar{\widehat{\mathbf{x}}}_k)\)
RMSE: \[ \text{RMSE} = \sqrt{\frac{1}{N}\sum_{i=1}^N\bigl(\mathbf{x}^\ast[i] - \bar{\widehat{\mathbf{x}}}[i]\bigr)^2} \]
Relative RMSE: \[ \Delta\text{RMSE}_k = \frac{\text{RMS}(\mathbf{e}_k)}{\text{RMS}(\mathbf{x}^\ast_k)} \]
Mean Standard Deviation: \[ \bar{\sigma} = \frac{1}{N}\sum_{i=1}^N \bar{\widehat{\boldsymbol{\sigma}}}[i] \]
Relative STD: \[ \Delta\text{STD}_k = \frac{\text{mean}(\bar{\widehat{\boldsymbol{\sigma}}}_k)}{\text{RMS}(\bar{\widehat{\mathbf{x}}}_k)} \]
These normalizations account for biases from plume growth over time.



Calibration test (Guo et al. 2017):
\[ \text{UQ}(B_l) = \frac{1}{|B_l|}\sum_{i \in B_l} \bar{\widehat{\boldsymbol{\sigma}}}[i] \]
\[ \text{MSE}(B_l) = \frac{1}{|B_l|}\sum_{i \in B_l} (\mathbf{x}^\ast[i] - \widehat{\mathbf{x}}[i])^2 \]


\(3.2 \times 3.2 \times 3.2\) km\(^3\) volume, \(128^3\) grid, 16000 receivers, 16 sources (Gahlot, Orozco, & Herrmann 2025)




Unknown high-permeability streak undetected by well-only data, but captured by seismic – critical for containment monitoring
Multimodal data (seismic + wells) produces the best estimates across all metrics and timesteps
Uncertainty calibration: pointwise standard deviation correlates with errors relative to ground truth
Nonlinear mapping via CNFs handles complex non-Gaussian posterior distributions that EnKF cannot capture
Small ensemble size (\(M=128\)) sufficient thanks to joint-to-conditional mapping
Scalable to 3D via physics-based summary statistics (RTM) and memory-efficient invertible networks
All results are fully reproducible:
| Component | Package | Purpose |
|---|---|---|
| Reservoir simulation | JutulDarcy.jl | Multiphase flow |
| Seismic modeling | JUDI.jl | Wave simulations & RTM |
| Neural networks | InvertibleNetworks.jl | Conditional normalizing flows |
| Full pipeline | Twin4GCS.jl | Digital Shadow implementation |
Data available at: doi.org/10.5281/zenodo.15204624 (Gahlot, Orozco, Yin, et al. 2025a)
Introduced an uncertainty-aware Digital Shadow for underground CO2 storage monitoring
Combines high-fidelity simulations with neural data assimilation via Simulation-Based Inference
Nonlinear prior-to-posterior mapping via CNFs extends Ensemble Kalman Filtering to handle:
Multimodal conditioning (seismic + wells) produces the most accurate state estimates
Seismic data is essential for detecting critical flow pathways that wells alone miss
First proof-of-concept for an uncertainty-aware, scalable Digital Shadow for GCS
Lays the foundation for a Digital Twin to optimize underground storage operations
Methodological extensions:
Towards a Digital Twin:
The Digital Shadow provides state estimation. A full Digital Twin adds control and decision-making (Gahlot et al. 2024):
Digital Twin lifecycle: training, inference, and decision-making
Key question: How do we maximize CO2 injectivity while avoiding fracture pressure?
Digital Twin with experimental design: forecasted plumes, synthetic observations, trained inference network with optimal well density, and posterior inference from field data
Solution: Choose monitoring well locations \(\mathbf{d}^\ast\) that maximize the Expected Information Gain (EIG) (Orozco, Gahlot, et al. 2024):
\[ \mathbf{d}^\ast = \arg\max_{\mathbf{d}} \;\mathbb{E}_{p(\mathbf{y} \mid \mathbf{d})}\bigl[\mathbb{KL}\bigl(p(\mathbf{x} \mid \mathbf{y}, \mathbf{d})\,\|\,p(\mathbf{x})\bigr)\bigr] \]
Key insight: Maximizing the expected posterior log-density (our CNF training objective) is equivalent to maximizing the EIG:
\[ \max_{\mathbf{d}}\;\mathbb{E}_{p(\mathbf{x},\mathbf{y} \mid \mathbf{d})}\bigl[\log p_{\boldsymbol{\phi}}(\mathbf{x} \mid \mathbf{y}, \mathbf{d})\bigr] \;\Longleftrightarrow\; \max_{\mathbf{d}}\;\text{EIG}(\mathbf{d}) \]
This means we can jointly optimize the CNF parameters \(\boldsymbol{\phi}\) and the experimental design \(\mathbf{d}\)!



Goal: Maximize cumulative CO2 injection while ensuring reservoir pressure does not exceed fracture pressure \(p_{\text{frac}}\) (Gahlot et al. 2024).
\[ \begin{aligned} \max_{q(t)} \quad & \int_{0}^{T} q(t)\,\mathrm{d}t \\ \text{subject to}\quad & \widehat{\text{POF}}_{\tau}(q) \le \varepsilon \quad \text{or} \quad \widehat{\text{CVaR}}_{\alpha}(\boldsymbol{\mathcal{L}}(q)) \le \gamma, \end{aligned} \]
where either the POF or the CVaR constraint is active (not both simultaneously), \(\varepsilon\) is the maximum allowable exceedance probability, and \(\gamma\) is the maximum allowable tail severity.
Because the subsurface parameters \(\mathbf{Z}\) are random, the constraint \(g(q, \mathbf{Z}) \leq 0\) cannot be enforced deterministically – we need risk measures.
Non-fracture vs. fracture scenarios: safety margin (top), pressure perturbation (middle), and CO2 saturation (bottom) at \(t=480\) days
Relationship between POF, Quantile, and CVaR
The Probability of Failure quantifies the chance that the constraint is violated:
\[ \text{POF}_{\epsilon}(\mathbf{d}) = \mathbb{P}\bigl[g(\mathbf{d}, \mathbf{Z}) > 0\bigr] \leq \epsilon \]
The Quantile (or Value-at-Risk) at level \(\alpha\) is the threshold below which a fraction \(\alpha\) of outcomes fall:
\[ Q_{\alpha}(\mathbf{d}) = \inf\bigl\{t : \mathbb{P}\bigl[g(\mathbf{d}, \mathbf{Z}) \leq t\bigr] \geq \alpha\bigr\} \]
CVaR (also called Expected Shortfall) averages over the worst outcomes beyond the quantile:
\[ \text{CVaR}_{\gamma}(\mathbf{d}) = \mathbb{E}\bigl[g(\mathbf{d}, \mathbf{Z}) \mid g(\mathbf{d}, \mathbf{Z}) \geq Q_{\gamma}(\mathbf{d})\bigr] \]
Empirical CDF of fracture probability vs. injection rate for POF (\(\varepsilon=0.0\), \(\varepsilon=0.01\)) and CVaR (\(\gamma=0.1\), \(\alpha=0.01\)) constraints with bootstrap confidence intervals
Paper: Gahlot, Orozco, Yin, Bruer & Herrmann (2025). “An uncertainty-aware Digital Shadow for underground multimodal CO2 storage monitoring.” Geophysical Journal International, 242(1), ggaf176.
Code: github.com/slimgroup/Twin4GCS.jl
Data: doi.org/10.5281/zenodo.15204624
Group website: slim.gatech.edu
Acknowledgements: