Digital Twins in Mechatronics Explained
Digital Twins in Mechatronics Explained
MECHATRONICS
Introduction to Digital Twins
• Origin of Digital Twin
• The concept of the Digital Twin dates back to NASA's Apollo program in the 1960s.
NASA created identical physical twins of space systems on Earth to simulate and
monitor conditions during missions, especially for diagnostics and support during Apollo
13.
• The formal terminology “Digital Twin” was coined by Dr. Michael Grieves at the
University of Michigan around 2002 in the context of product lifecycle management
(PLM). Since then, it has evolved into a powerful tool in Industry 4.0, enabling real-time
monitoring, simulation, and predictive analytics.
What is a Digital Twin?
• A Digital Twin is a virtual replica of a physical system that is continuously updated with
real-time data and simulates the behavior and performance of its real-world counterpart.
• It integrates IoT (Internet of Things), data analytics, and AI/ML to provide insights
throughout the design, operation, and maintenance phases.
Core Components of a Digital Twin
Physical Entity
•The actual object or system (e.g., motor, robot arm, aircraft engine).
•Embedded with sensors for collecting operational data.
Layer Description
Recommends actions to fix
4D – Prescriptive
or optimize the system
Automatically takes
5D – Autonomous
corrective actions
A digital twin of a smart factory conveyor:
Real-time Monitoring
Predictive Analytics
Recommendations
Autonomous Control
• Why Data-Driven?
• Suitable when:
• Physical laws are too complex or hard to model (e.g., corrosion, wear).
• Real-time performance is needed (fast inference).
• Rich sensor data is available (IoT environments).
Data-Driven Modeling
Challenges
Benefits of Data-Driven Models
Challenge Example
Advantage Detail Poor or missing sensor
Data Quality data leads to poor
Once trained, models
models
Fast execution are very fast (ideal
for real-time twins) Models may memorize
Overfitting training data but fail in
Can learn patterns
new conditions
Adaptable not captured by
physics Harder to explain than
Interpretability
physics-based models
Can handle real-
Works with noisy
world sensor noise Cannot predict outside
data
with proper training No extrapolation training range (unlike
physical models)
Degradation Modeling
• Degradation Modeling
• Degradation modeling is the process of predicting how a system or component deteriorates over
time due to wear, fatigue, corrosion, usage, etc. It’s central to predictive maintenance and
reliability estimation in Digital Twins.
Method Description Example
Use fatigue, wear, corrosion Crack propagation in metal
Physics-based
models under stress
Battery capacity
Use historical failure and
Data-driven degradation prediction
usage data
using ML
Probabilistic modeling (e.g., Estimate remaining useful
Stochastic Models
Wiener, Gamma process) life (RUL) with uncertainty
Convert sensor data into a Turbine vibration health
Health Index Models
“health score” over time degradation index
Jet engine degradation modeled using flight hours + sensor data (temperature, vibration) → RUL prediction →
maintenance alerts.
Surrogate Modeling
• Surrogate models (aka metamodels or emulators) are simplified models that
approximate the behavior of complex, expensive, or high-fidelity models (like CFD or
FEA), enabling faster simulation and optimization.
Method Description Example
Fit a curve to known data Approximating heat
Polynomial Regression
points transfer function
Probabilistic surrogate with Wind turbine performance
Gaussian Process (Kriging)
confidence bounds prediction
Aerofoil lift simulation
Neural Networks Learn complex mappings
under various angles
Compress high-
Reduced Order Models Simulating vehicle crash
dimensional simulation
(ROM) with 1% of original cost
data
Instead of running a full CFD simulation for each engine design variant, a neural net surrogate
model predicts temperature distribution in milliseconds.
Dynamic System Identification
• System identification involves creating mathematical models of dynamic systems based
on measured input-output data — without explicitly knowing the system’s internal
physics.
Steps in System ID
[Link]: Apply known input (e.g., voltage) and record output (e.g., motor speed)
[Link] Selection: Choose ARX, state space, etc.
[Link] Estimation: Fit model to data (least squares, Kalman filter)
[Link]: Simulate and compare with test data
Comparison
Why?
• Many real-world systems have scarce data but well-known physics.
• Pure ML may overfit or be unphysical.
• Physics-based models are interpretable but slow or incomplete. (PIML bridges the gap.)
Physics-Informed Machine Learning (PIML)
Categories & Approaches of PIML
Instead of just training on temperature data, the NN is forced to satisfy the heat equation ∂T/∂t =
α∇²T during training.
Physics-Informed Machine Learning (PIML)
Categories & Approaches of PIML
Example: Learning a pendulum trajectory with a neural net, while penalizing deviations from
energy conservation (i.e., total energy should remain constant).
Physics-Informed Machine Learning (PIML)
Categories & Approaches of PIML
Example: Generate fluid flow data from CFD simulations to train a neural network that can
generalize to new shapes or conditions.
Physics-Informed Machine Learning (PIML)
Categories & Approaches of PIML
• Learning Residuals
Feature Description
Use physics-based model for coarse prediction
Key Idea and train an ML model to learn the error
(residual) between model output and real data.
“Model discrepancy correction” or “delta
Also Called
learning”
Example: A thermodynamic simulator predicts engine temperature with 90% accuracy. A neural
network learns the 10% residual from real-world sensor data.
Physics-Informed Machine Learning (PIML)
Transfer Learning
• Transfer learning is the process of reusing knowledge (like model weights or features) from one
task or domain to accelerate learning in another, related task — especially useful when target data
is scarce.
Benefit Description
Combines physics-based realism with data-
Accuracy
driven flexibility
Data Efficiency Learns well even from small datasets
Generalization Better extrapolation to unseen scenarios
Interpretability Models remain grounded in physical reality
• Physics: F = mg - kv
• Neural network learns velocity over time
• PINN enforces that the learned function satisfies Newton's 2nd law throughout the training
domain
System modeling
• System modeling involves the representation of the functional and structural relationships
between various components of a complex system — such as machines, sensors, control systems,
and humans — using standardized modeling languages or conceptual frameworks.
• Unlike geometry (shape) or physics-based (behavior) models, system models define how different
parts interact, their information flow, dependencies, and logic — often without detailed math or
geometry.
Feature Description
Type Extension of UML for systems engineering
Model structure, behavior, requirements,
Purpose
and constraints of physical systems
Block Definition Diagram (BDD), Internal
Popular Diagrams
Block Diagram (IBD), Parametric Diagram
• Example: In an autonomous car system, SysML is used to define sensors, controller logic,
communication with actuators, and environmental constraints.
System modeling
Ontology-Based Modeling
Used for semantic modeling and defining relationships in terms of concepts and logic rather than
behavior.
Feature Description
Knowledge
Type
modeling
Define taxonomy
Purpose and semantic
relationships
Healthcare DTs,
Application smart cities, IoT
networks
• Example: A hospital twin uses ontologies to relate patients, equipment, procedures, and locations
meaningfully for queries like “Which ICU beds are suitable for a patient with infection?”
System modeling
Why System Modeling Is Important in Digital Twins
Subtypes Example
In smart factories, IoT-based location data
a. Motion/Position Updating updates digital models of machine
movements.
Real sensor data drives simulations, e.g.,
b. Physics-based Input using in-flight data for aircraft structure
risk analysis.
Physical-to-virtual (P2V) twinning enabling technologies
Probabilistic Model Updating
• Description: Use uncertainty-aware methods (like Bayesian filters) to update internal digital states
which are not directly observable.
• Digital State: Internal parameters like resistance, stress, temperature that evolve over time and
require estimation.
Kalman Filter
• The Kalman Filter is an algorithm used to estimate the state of a system over time —
especially when the measurements are noisy or uncertain. It’s widely used in applications
like navigation, tracking, and robotics.
Basic Idea:
• A particle is just a guess of where the car might be.
• You simulate hundreds or thousands of particles.
• Each particle has:
• A position
• A weight (how likely it is to be correct)
Particle Filter Steps
• Initialize:
Generate a bunch of particles with random positions.
• Predict (Motion Update):
Move each particle based on the car's motion (e.g. speed + noise).
• Update (Measurement Update):
For each particle, compare its position to the GPS measurement.
Give it a higher weight if it matches well (i.e. it's close to the GPS).
• Resample:
Select particles with higher weights to create the next generation of particles.
Discard particles with low weights.
• Estimate:
The estimated position is the weighted average of all particles.
• Repeat for every second.
Particle Filter
Physical-to-virtual (P2V) twinning enabling technologies
• ML Model Updating
Description: Update or adapt data-driven models (like neural networks) based on new incoming
data.
Method Use
Adapting turbine RUL models or anomaly
Online learning, Transfer learning
detectors on-the-fly
Advantage: Keeps ML models aligned with time-varying system behavior (e.g., drift, sensor wear).
Diagnostics: Prognostics:
Example: In a factory, ontologies track which machines are connected, what data they produce, and how
they are linked, even when reconfigured.
P2V Method Purpose Example
GPS, pressure sensors in smart
1. Physical Measurements Real-time model input
cities
2. Probabilistic Updating Estimate hidden states Battery degradation state
3. ML Model Updating Adapt to new data Update NN after sensor drift
4. Fault Diagnostics/Prognostics Predict and prevent failures Turbine failure prediction
Factory reconfiguration,
5. Ontology Reasoning Semantic logic and structure
component linking
Virtual-to-Physical (V2P) Twinning Enabling Technologies
• These technologies enable a Digital Twin to influence its physical counterpart, closing
the feedback loop by sending optimized actions, maintenance schedules, or control
commands from the virtual model to the real system.
Virtual-to-Physical (V2P) Twinning Enabling Technologies
Model Predictive Control (MPC)
Objective:
• Predict future temperature based on current heater setting
• Choose the best sequence of heater inputs (e.g., on/off levels) over a prediction horizon
• Apply only the first control action, then repeat at next step
Virtual-to-Physical (V2P) Twinning Enabling Technologies
Temperature Control with MPC
A simple thermal model: 𝑻𝒌+𝟏 = 𝑻𝒌 + 𝝈. 𝝁𝒌 − 𝑻𝒌 − 𝑻𝒂𝒎𝒃𝒊𝒆𝒏𝒕
• Example:
In a smart HVAC system, MPC predicts future temperatures and adjusts fan speeds and cooling
intensities in advance to minimize energy consumption and maintain comfort.
• Enhanced with ML:
Future MPCs will likely use deep learning architectures as process models instead of physics-based
models — improving speed and adaptability
Virtual-to-Physical (V2P) Twinning Enabling Technologies
• Predictive Maintenance
• Definition: Predictive Maintenance anticipates when equipment will fail and prescribes timely
maintenance, reducing unplanned downtime.
• Steps:
1. Sensor Deployment (P2V): Vibration, temperature, etc.
2. Health Estimation: Use ML/physics models to evaluate system degradation
3. RUL Prediction: Estimate Remaining Useful Life
4. Action (V2P): Trigger alerts, schedule maintenance just before failure
• Examples:
• Baker Hughes uses a MATLAB-based neural network for pump health monitoring
• ANSYS & PTC ThingWorx predict electric motor failure using sensor data
Predictive Maintenance Demo
Virtual-to-Physical (V2P) Twinning Enabling Technologies
• ML Advantages:
• Near real-time inference from sensor data
• Fast response for time-sensitive systems like autonomous robots or predictive control loops.
• Example:
An ML model predicts how a fire will spread inside a building using current sensor readings. This
informs the building's suppression system in real time
Digital Twin Architecture &
Workflow
Digital Twins for Mechatronics
5-Layer Digital Twin Architecture
- Simulink (co-simulation)-
FMU/FMI (Functional Mock- ANSYS TwinBuilder,
Creating digital replicas FMU metadata headers,
3. Modeling Layer up Interface)- Python APIs COMSOL,
via simulation or ML ONNX model formats
(PyTorch, TensorFlow)- ROS OpenModelica, PyTorch
(for robotics)
• Digital Thread = Seamless flow of data across the lifecycle of a physical asset.
• Key Concepts:
1. Connects design → manufacturing → operation → maintenance → disposal
2. Allows continuous feedback loop between product and model
3. Enables traceability, version control, and decision-making at all stages
• Example: Design updates from simulation directly feed into manufacturing settings or predictive
algorithms.
Cloud Deployment
• Cloud deployment refers to running the Digital Twin’s components — data storage, modeling,
analytics, and visualization — entirely on remote cloud infrastructure provided by platforms like
AWS, Azure, or Google Cloud.
• Key Idea:
• The physical system sends data to the cloud, and all computation (modeling, simulation,
predictions) happens remotely.
• Core Concepts:
❑ Centralized processing: All data, modeling, and visualization happens in remote cloud servers.
❑ Scalable infrastructure: Auto-scaling compute and storage resources.
❑ Global access: Ideal for distributed assets or multi-site systems.
• Example:
• A wind farm sends turbine data to the Azure Cloud, where a Digital Twin simulates blade fatigue
and visualizes performance trends for remote operators.
Cloud Deployment- Technical Specifications
Feature Details
Data flow Sensor data → Gateway → Cloud via MQTT/HTTPS
Storage Cloud databases (e.g., AWS S3, Azure Blob, BigQuery)
AI/ML models on cloud GPUs/CPUs (e.g., SageMaker,
Model Hosting
Vertex AI)
Streaming Apache Kafka, AWS Kinesis, Azure Event Hubs
APIs RESTful APIs, gRPC for microservices
Security TLS encryption, IAM roles, data encryption at rest
Visualization Dashboards via Grafana, Power BI, or custom web UIs
• Network Dependence
1. Requires constant, reliable internet connection.
2. In remote or hostile environments (e.g., oil rigs, rural factories, ships), connectivity is unstable or
expensive.
• Latency in Actuation
• Cloud inference means slow response times for decisions → unsuitable for:
• Collision avoidance
• Instant machine shutdown
• Feedback control loops (<50 ms)
Emergence of Edge Deployment
Challenge Edge Response
Latency Compute locally near the device → faster reaction
Network failures Operates offline or with intermittent sync
Data privacy Keeps sensitive data on-site
Cost Reduces need to send all raw data to the cloud
Control Enables real-time decisions and actuation
Allows operation in isolated, mobile, or dangerous
Autonomy
environments
Autonomous Drone
• Key Idea:
• Instead of sending all data to the cloud, the system processes and reacts to data right at the edge,
enabling fast, offline, or bandwidth-constrained operations.
• Core Concepts:
• Local computing close to the physical system.
• Real-time processing with low latency.
• Reduced cloud dependency, useful in remote or offline environments.
• Example:
• A robot arm runs a real-time twin on a NVIDIA Jetson board, which immediately detects vibration
anomalies and stops the arm if needed — without needing cloud access.
Edge Deployment- Technical Specifications
Feature Details
Data flow Sensor data → Edge processor → Local inference
Industrial gateway, PLC, embedded PC, Raspberry Pi,
Compute device
NVIDIA Jetson
ML Inference TensorRT, OpenVINO, ONNX Runtime on-device
Communication Local MQTT broker, OPC-UA server, BLE/Zigbee
Storage SQLite, flat files, small time-series DBs
Security TPM chips, firewalled LANs, local certificates
Control Direct actuator control via GPIO, CAN, RS-485
[Sensor] → [Edge Device] → [Local Processing + Inference] → [Immediate Action or Optional Cloud
Sync]
Edge Computing Framework (Architecture Overview)
Layer Description
Sensors, embedded systems, or machines (e.g.,
1. Edge Devices
turbine sensors, Raspberry Pi)
Local compute node that runs analytics, filtering,
2. Edge Gateway / Node
ML inference
Optional: Near-edge servers for aggregation,
3. Fog Layer
buffering, orchestration
Central system for heavy storage, training,
4. Cloud
dashboards, and system updates
Edge Computing Framework
Cloud Platform
(model training and
Storage)