Hybrid Physics-ML Digital Twin

Combine a physics-based reduced-order model with ML correction for real-time structural health monitoring

Advanced Digital Twins 8–12 weeks
Last reviewed: March 2026

Overview

A digital twin is a living computational model synchronized with a physical asset through sensor data. Pure physics-based twins are accurate but computationally expensive — they can't run in real time for complex structures. Pure ML twins are fast but physically inconsistent and degrade when operating conditions move outside the training distribution. Hybrid digital twins combine the best of both: a physics-based Reduced Order Model (ROM) provides fast, physics-consistent predictions, while an ML correction layer learns the residual between the ROM and observed reality.

In this project, you'll implement a hybrid twin for a composite wing spar undergoing fatigue loading. In Ansys Mechanical, you'll build a high-fidelity FEA model and use Ansys ROM Builder to create a fast reduced-order model capturing the spar's structural dynamics. In Ansys Twin Builder, you'll deploy the ROM alongside a Python-scripted ML correction model, connect synthetic sensor streams (strain gauges, accelerometers), and implement a Kalman filter to fuse predictions with measurements for real-time state estimation.

This architecture — high-fidelity FEA → ROM → ML correction → sensor fusion — is used by Airbus for wing health monitoring, by GE for gas turbine digital twins, and by NASA for spacecraft structural health monitoring. Twin Builder is the industry-standard platform for deploying these systems, making this project directly applicable to digital twin engineering roles at aerospace OEMs and MRO companies.

What You'll Learn

  • Build a high-fidelity FEA model in Ansys Mechanical and generate a Reduced Order Model using Ansys ROM Builder
  • Configure and deploy the ROM as a runtime component in Ansys Twin Builder
  • Implement a Python ML correction model that learns the ROM-reality residual from historical sensor data
  • Design a Kalman filter for sensor fusion combining ROM predictions with noisy sensor measurements
  • Implement structural health indicators: damage-sensitive features that change predictably as damage accumulates

Step-by-Step Guide

1

Build the FEA Model

In Ansys Mechanical, build a composite wing spar model: 2m span, I-beam cross-section, carbon fiber/epoxy laminate using ACP (Ansys Composite PrepPost). Apply realistic boundary conditions: fixed at root, distributed aerodynamic loads plus a point mass at the tip representing fuel/payload. Define material degradation to simulate fatigue: stiffness reduction as a function of accumulated cycles.

Run static and modal analyses to validate the model: check that natural frequencies and deflections are physically reasonable. Generate the high-fidelity dataset you'll use to train the ML correction: simulate 50 damage states (increasing stiffness reduction from 0% to 30%) and log strain gauge readings at 8 sensor locations plus modal frequencies.

2

Create the Reduced Order Model

Use Ansys ROM Builder to create a Modal ROM: project the FEA solution onto the first 20 structural modes, capturing 99%+ of the response energy with a tiny fraction of the computational cost. The ROM takes inputs (loading conditions, temperature) and outputs responses at sensor locations in microseconds — fast enough for real-time operation.

Validate ROM accuracy: compare ROM vs. full FEA predictions for strain at all 8 sensor locations across all loading conditions. ROM error should be < 2% for the nominal (undamaged) structure. Verify that the ROM updates correctly when you pass it different loading conditions — it must generalize beyond the training snapshots.

3

Deploy in Twin Builder

Import the ROM into Ansys Twin Builder as a Twin Runtime. Create a schematic connecting: sensor data inputs (simulated strain and acceleration channels) → ROM component → ML correction → state estimator → health output signals. Twin Builder handles the data routing and time-stepping automatically.

Set up Twin Builder to call your Python ML correction script via the Python Scripting component. Verify the complete data flow with a simple test: input a known loading condition, confirm the ROM output is correct, and confirm the ML correction is applied. Log all intermediate signals for debugging.

4

Train the ML Correction Model

The ML correction addresses two problems: (1) ROM modeling error at nominal health, and (2) health-dependent deviations from ROM predictions. Train an ensemble of gradient boosted trees (XGBoost) on the 50 damage state simulations: inputs are ROM predictions + loading conditions + sensor readings, output is the residual (sensor measurement - ROM prediction).

The residual is a function of the damage state. A structural health indicator emerges naturally: as damage accumulates, the residual pattern changes in characteristic ways at different sensor locations. Train a second model that maps the learned residual pattern to a damage severity score (0 = healthy, 1 = critical). Cross-validate using leave-one-damage-state-out validation.

5

Implement the Kalman Filter

Implement an Extended Kalman Filter (EKF) that fuses the ROM+ML correction predictions with noisy sensor measurements. State vector: strain at 8 sensor locations + first 3 modal frequencies. Measurement noise covariance R (calibrated from sensor specs). Process noise covariance Q (calibrated to match ROM uncertainty).

The EKF provides: (1) filtered state estimates smoother than raw sensor data, (2) uncertainty bounds (covariance matrix), and (3) innovation signals (measurement - prediction) that are diagnostic of sensor faults or anomalous structural behavior. Implement innovation monitoring: large innovations signal either sensor failure or structural damage outside the model's training range.

6

Simulate a Damage Progression Scenario

Run a 72-hour simulated structural health monitoring scenario: the spar starts at 0% damage, accumulates fatigue damage to 20% by hour 48, then has a discrete damage event (impact) at hour 60 that causes 5% sudden stiffness loss at a specific location. Feed synthetic sensor data (from high-fidelity FEA at each damage state) into the deployed hybrid twin.

Plot: damage indicator vs. time, sensor strain vs. predictions, and innovation signals. The hybrid twin should: (1) track gradual damage accumulation accurately, (2) detect the sudden impact event within 1–2 hours, and (3) localize the damage to within ±15% of the true impact location using the spatial pattern of sensor innovations. Document detection latency and localization accuracy.

Go Further

Extend this hybrid twin toward production deployment:

  • Real sensor hardware — replace the simulated sensor stream with real strain gauges on a test coupon undergoing controlled fatigue loading in a test machine, closing the sim-to-real loop
  • Edge deployment — export the Twin Builder runtime to a Raspberry Pi or industrial PC running on the aircraft, eliminating the need for cloud connectivity during flight
  • Probabilistic damage prognosis — extend from damage detection to damage prognosis: given current damage state and expected loading, estimate the remaining useful life distribution using a particle filter
  • Fleet twin — aggregate health data across a fleet of 10+ identical components, using fleet-level patterns to improve individual component health estimates and detect systematic design weaknesses