Cyber-Physical Systems Series

System Design and Modeling

How engineers describe, simulate, and test a system long before, and long after, it exists in the real world.

Why Model?

A model is a simplified, precise description of a system that a computer can work with. Testing a self-driving car in a blizzard, or a factory line that has not been built yet, is dangerous, slow, or impossible in real life. With a model, it is a simulation run.

Specify

Say exactly what the system must do

Simulate

Try it out safely on a computer

Analyze

Prove properties such as safety and stability

Build

Generate real code directly from the model

A model is only as good as its match to reality. More detail is not always better. The right model is the simplest one that still answers your question correctly.

Modeling in the News

Waymo World Model simulation

Driving through simulated worlds

Waymo's World Model generates realistic camera and lidar views of rare events, such as tornadoes, floods, and an elephant in the road, so its cars can practice situations they may never see in real life.

Waymo, February 2026
BMW Debrecen plant

A factory built twice

BMW planned its Debrecen, Hungary plant as a complete digital twin. Engineers around the world worked out layouts, robots, and material flow virtually before the first real machine was installed.

BMWBLOG, September 2025
Wisk Iron Bird test rig

An aircraft that never flies

Wisk's "Iron Bird" is a ground rig that reproduces its self-flying air taxi's core systems, so real components can be tested together, and failures tried safely, before they go on an aircraft.

Wisk, September 2025

Testing Step by Step

In model-based design, the model is the starting point, and real parts replace it one at a time. Each step tests a little more of the real system. When something breaks, engineers know it was the part they just swapped in.

Four testing stages: model in the loop, software in the loop, processor in the loop, and hardware in the loop, each replacing more of the model with real parts.
The "plant" is the physical system being controlled. Wisk's Iron Bird is a hardware-in-the-loop rig.

Two Kinds of Change

Smooth change: the physical world

Speed, temperature, and position change smoothly over time. Engineers describe them with differential equations, which are rules for how fast each quantity is changing right now.

Sudden jumps: software

Software switches between distinct situations, or states, when something happens. Engineers describe this with state machines: circles for states and arrows for the events that move between them.

A state machine for an automatic door with states Closed, Opening, Open, and Closing, and an obstacle that sends a closing door back to opening.
A state machine for an automatic door. The red arrow is the safety rule: an obstacle reopens a closing door.

Hybrid Systems: Both at Once

Most CPS mix smooth change and sudden jumps: a car shifting gears, a robot touching a part, a thermostat switching the heat on. A model with both is called a hybrid system.

A bouncing ball modeled with two modes, falling and bouncing. Each bounce is smaller, and the model predicts infinitely many bounces before a fixed time.
A bouncing ball falls smoothly, then bounces in an instant. Each bounce is shorter than the last.
A model can be wrong in surprising ways. This simple model predicts an infinite number of bounces in about 9 seconds, which no real ball does. Simulators get stuck at that point. The fix is a better model: add a "resting" state once the bounces become tiny.

Putting the Pieces Together

Real systems are built from many parts, each with its own states. When parts are combined, their states multiply. This is called state explosion, and it is why testing alone can never check every possibility in a large system.

Squares showing how combined states grow from 3 with one part to 81 with four parts and 6,561 with eight parts.
Eight simple parts already produce 6,561 combinations. Real systems have thousands of parts.

Special techniques can check enormous numbers of states without visiting each one. See Formal Methods for Verification and Validation.

Digital Twins

A design model describes how a system should behave. A digital twin follows one real system as it runs, fed by live sensor data, so engineers can watch it, predict problems, and test changes on the twin before touching the real thing.

A physical factory sends live sensor data to its digital twin; the twin is used for what-if tests and sends back tested improvements.
The physical system and its twin stay in sync, and what-if questions are answered on the twin.

Common Modeling Languages and Standards

ModelicaDescribes physical systems (electrical, mechanical, thermal) by connecting parts like real components.
FMIA standard "plug" that lets models built in different tools run together. Used by more than 290 tools.
SysML v2A blueprint language for whole systems: requirements, parts, and behavior. Version 2 was approved in July 2025.
Simulink and StateflowWidely used commercial tools for block-diagram and state-machine models in automotive and aerospace.

Try It Yourself

OMWebbook

Run and change Modelica models of circuits, tanks, and mechanical systems in your browser.

omwebbook.openmodelica.org

OpenModelica

A free desktop tool for building and simulating physical models by dragging and connecting components.

openmodelica.org

CARLA Simulator

An open-source driving simulator for testing self-driving software in virtual cities and weather.

carla.org

FMI Tutorial

For developers: run standard model packages (FMUs) from the command line with the official fmusim tool.

fmusim tutorial

SysML v2

For advanced learners: example models, introductory slides, and a Jupyter notebook kernel for writing SysML v2.

SysML v2 release

Further Reading