Multibody Dynamics

Control system co-simulation with multibody and FE models, from MIL to SIL

A controller tuned on a rigid, ideal plant fails where the machine is flexible, sampled and stiff. How a checked closed loop of controller, multibody dynamics and finite element modes, linked by FMI, finds that before the first power-up.

Cutaway of a turbofan engine with glowing blue and green signal lines running along its casing, past a ring of fan blades and three shaft-mounted gear units
Engine cutaway with sensor and signal lines routed along its structure, the plant and the signals that a controller model has to include.

Control system co-simulation runs your controller against a multibody or finite element model of the machine it drives, so that gains, sample times, limits and fault handling are proven in a closed loop before the hardware exists. We build that loop as a checked workflow, from model-in-the-loop to software-in-the-loop, with flexible modes, actuator and sensor dynamics and the exchange step all inside the model.

The controller passed every test at the desk. At first power-up the arm rings, the drive saturates, and the commissioning engineer turns the gains down until the machine is safe and slow. The model had a rigid arm, an ideal motor and a continuous-time controller; the machine has none of those. The programme loses rig time, a software freeze behind mechanical rework, and any claim about how fast the machine can go. Which of these failures could a desk model have shown, and which model?

Why does a controller that works on a rigid model fail on the real machine?

Because the loop contains everything between controller output and measurement. A multibody plant is a set of differential-algebraic equations, M(q)q̈ + ΦqTλ = Q(q, q̇, u, t) with constraints Φ(q, t) = 0, where u is the actuator command. A controller with sample time Ts reads yk at tk = kTs and holds uk = C(yk) until the next sample. Gains are chosen so that the loop gain falls through one at a crossover frequency with phase margin to spare, and every element adds lag there: actuator bandwidth, sensor filtering, sample and hold, and the computation delay of the code.

Flexibility is what the rigid model removes. An elastic link, shaft or frame gives the plant modes, each a lightly damped oscillator in modal coordinates, η̈ + 2ζωη̇ + ω²η = modal force. Whether a mode is harmless depends on where the sensor sits. A collocated pair, sensing where and in the direction the actuator pushes, behaves passively: the mode shows as a resonance then an anti-resonance, and the phase stays bounded. A non-collocated pair lets a mode add up to a half turn of phase at its own frequency, and near or above the crossover the loop can go unstable. A tool-centre sensor on a flexible arm, or a load encoder behind a compliant gearbox, is non-collocated.

Loop gain and phase against frequency: where a flexible mode and the exchange step erode the margin A qualitative two-panel frequency plot with a logarithmic frequency axis. The upper panel shows loop gain: a smooth curve for a rigid plant falls through the line where gain equals one at the crossover frequency, marked by a vertical line. A second curve for the plant with a flexible mode follows the first, then rises to a narrow resonance peak that pokes above the gain-equals-one line, shaded as an instability risk, and falls again. The lower panel shows phase: a falling curve for the loop, and a lower, steeper curve that adds the lag of the sample and communication delay, with the gap between them shaded and growing with frequency. A vertical line at the right marks the frequency that the exchange step can no longer resolve. A bar under the plot spans the time scales from slow rigid-body motion to the fastest flexible mode and marks the plant as stiff. The drawing teaches that margins must be checked on the plant with its flexible modes and at the exchange step that will be run, and that a large spread of time scales needs an implicit solver or small internal steps. No values are shown. LOOP GAIN PHASE FREQUENCY (LOG) → gain = 1 rigid plant 1 flexible mode 2 CROSSOVER 3 step and sample lag 4 NOT RESOLVED 5 SLOW BODY MOTION TO FASTEST MODE: A STIFF PLANT 6
  1. Rigid-plant loop gain. A controller designed on the rigid plant sees a smooth gain falling through one, with comfortable phase. This is the picture a rigid-body model gives.
  2. Flexible mode. A mode from the finite element model adds a narrow resonance. If the peak reaches the gain-one line the loop can go unstable, and a non-collocated sensor lets the mode add up to a half turn of phase there.
  3. Crossover. The frequency where the loop gain is one. Phase margin is read here, and it is the budget that actuator, sensor, sample and exchange lag all draw on.
  4. Step and sample lag. The held command and the computation delay add phase lag that grows with frequency. The gap between the curves is the exchange step and sample time taken out of the margin.
  5. Frequencies the step cannot resolve. Beyond roughly half the exchange rate a co-simulation cannot represent the signals. A mode in or near this region is aliased or ignored, so the loop must not depend on it.
  6. A stiff plant. Slow rigid-body motion and the fastest retained mode span a wide range of time scales. That spread decides the solver: explicit methods need a small step, implicit ones damp what they do not resolve.
A loop that looks safe on a rigid plant can cross the gain-one line at a flexible mode, and the exchange lag eats the phase. Illustrative schematic.

How do exchange step size and stiffness break a co-simulation?

In co-simulation the plant and the controller are separate simulators that exchange signals only at communication points. The FMI 3.0.2 specification writes the i-th point as ti and the communication step as hi = ti+1 − ti, and says that between points an FMU must assume its continuous inputs change continuously; a discrete change needs an event. An input held over a step lags the ideal signal by about half a step, so the exchange adds roughly ωh/2 radians of phase lag at frequency ω, besides the controller's own delay. The step size is part of the controller model, and a loop with thin margin can pass at one step and fail at the next.

Stiffness comes from the plant. A flexible machine mixes slow rigid-body motion with fast, lightly damped modes, a wide spread of time scales. An explicit integrator is stable only below a step bound that shrinks as the highest mode frequency rises. An implicit one removes the bound at the cost of a solve per step, and it damps the fast modes it does not resolve, which can remove a mode the controller has to meet. The solver is a modelling decision.

Coupling adds its own limit. With explicit exchange each side extrapolates the other's input over the step, and a loop with direct feedthrough, where an output depends algebraically on an input, can go unstable although both solvers are stable alone. The FMI specification says that without declared dependencies the worst case is assumed, every output depending on every input. Gomes, Thule, Broman, Larsen and Vangheluwe name modular, stable and accurate coupling of simulation units as the main research need in their co-simulation survey, which is why we test it in every project.

A flexible multibody plant and a controller exchanging signals across two FMU boundaries A schematic of a closed-loop co-simulation. A co-simulation master bar runs along the top and sets the communication step. Below it, on the left, a dashed FMU boundary encloses the plant: a motor at a fixed base driving a flexible link that carries a tip mass and sways slightly. On the right, a second dashed FMU boundary encloses the controller as compiled code with a sample clock that pulses. Between them two arrows carry signals: a measurement path from the plant to the controller through a sensor block, and a command path back through an actuator block. A timeline underneath shows many fine internal solver steps of the plant between coarse communication points, and the controller output as a staircase held between those points, lagging the smooth ideal curve drawn dashed. The drawing teaches that the plant and the controller only meet at communication points, so the exchange step, the sensor and actuator dynamics and the flexible modes inside the plant all belong to the closed-loop model. No values are shown. MASTER · COMMUNICATION STEP h · ACCEPT OR ROLL BACK 6 PLANT FMU flexible link 1 CONTROLLER FMU Ts compiled code 3 SENSOR 2 ACTUATOR 4 TIME → h u held between points COMMUNICATION POINTS t plant sub-steps 5
  1. Plant FMU. The multibody model, with flexible parts reduced from finite elements, packaged with its own solver. Inside it the solver takes many small steps; outside it, only the signals at the communication points are visible.
  2. Sensor path. The measurement is not the true state. Filtering, delay, noise and quantisation sit between the plant and the controller, and they add lag at the crossover.
  3. Controller FMU. The controller as a model (MIL) or as compiled production code (SIL), running on its own sample clock. It reads once per sample and holds its command until the next.
  4. Actuator path. The command reaches the plant through drive dynamics, a rate limit, saturation and backlash. The plant feels what the actuator delivers, not what the controller asked for.
  5. Communication points and held command. Fine ticks are the plant solver, bold ticks are the points where signals are exchanged. The held command (solid) lags the ideal one (dashed), so the exchange step h adds phase lag to the loop.
  6. Master. The co-simulation master sets the communication step, orders the exchanges and can reject a step and return to a stored state when an FMU cannot accept it. It is part of the model that has to be verified.
Plant and controller meet only at communication points: the exchange step, the sensor and actuator paths and the held command are part of the loop. Illustrative schematic.

How do MIL, SIL and FMI fit together in one workflow?

Model-in-the-loop (MIL) runs the controller as a model against the plant model. Software-in-the-loop (SIL) swaps in the compiled production code, so fixed-point arithmetic, saturation order, state machines and scheduling run as they will on the target. Both use the same plant, so the MIL trace is the reference for SIL, and the two must agree to a tolerance you set before either is called verified. Hardware-in-the-loop later runs the controller hardware against a real-time version of the same reduced plant.

The Functional Mock-up Interface connects the pieces. The FMI project describes a free standard that defines a container and an interface to exchange dynamic simulation models as XML files, binaries and C code in a ZIP file, and lists the tools that support it. FMI 3.0 added what controller work needs: virtual electronic control units exported as FMUs, Clocks to control the timing of events and model partitions across FMUs, and early return, an event mode and an intermediate update mode in co-simulation. The System Structure and Parameterization (SSP) standard describes a complete system of FMUs and their parameters in a form tools can exchange.

The plant comes from the tools you already run, such as Simpack, MSC Adams, Ansys or Abaqus, with flexible parts reduced to a modal or Craig-Bampton form; the controller from your own environment or build. We are solver-agnostic and build the harness around them. See our control systems page and the multibody dynamics section.

Which loop answers which question
LoopWhat runs in itWhat it findsWhat it cannot see
MIL, rigid plantController model, rigid multibody plantLogic errors, first gains, actuator sizing, cycle timeFlexible modes, sample timing
MIL, flexible plantController model, plant with modes reduced from FEMargin lost to modes, tip vibration, saturationBehaviour of the production code
SILCompiled code, same plantNumber formats, state-machine paths, scheduling, drift from the modelHardware latency, drivers
FMI co-simulation across toolsPlant and controller as FMUs from different toolsInterface mismatches, exchange errorNothing until the exchange step is studied
HIL on your rigController hardware, real-time reduced plantI/O timing, watchdogs, driver faultsWhat the reduced plant omits

How should a control co-simulation be built and checked?

Each stage gets a check before the next is trusted. First the plant. Flexible parts are reduced from the finite element model, by component mode synthesis, to the modes the loop can see, and those modes are compared with a modal test of the part or the assembly. The retained set must reach above the frequencies where the loop still has gain, and the check is the frequency response of the reduced plant against the full one along the actuator-to-sensor path.

Second, the loop in the frequency domain: the plant linearised with its modes, closed with the controller, actuator, sensor and delays, and the margins read from that. Third, the time domain, where steps, disturbances and faults meet the saturation, rate limit, backlash and quantisation that a frequency plot cannot hold. Fourth, the exchange: the same scenarios at step h, h/2 and h/4 with matched solver tolerances. The closed-loop metrics must stop moving before a step is accepted, and the accepted step is an integer multiple of the sample time. Fifth, SIL against MIL on the same scenarios. Sixth, validation against rig data, with parameters a drawing does not fix, such as payload, joint stiffness and backlash, sampled so that the margin is a spread, not a point.

Quote margins only from the loop you will run

A gain set tuned on a rigid plant, or at a finer exchange step than production uses, carries no margin statement for the machine. Read margins from the loop that contains the flexible modes, the actuator and sensor dynamics, and the exchange step and sample time you will run. Change any one of them and run the check again.

Where does machine learning help control co-simulation, and where does it not?

  • A surrogate plant trained on planned runs of the full multibody and finite element model, so a sweep over gains, payloads and speeds takes minutes. Finalists are re-run in the full co-simulation. See surrogate models for CFD and FEA.
  • Constrained gain tuning by Bayesian optimisation on that surrogate, trading settling, overshoot, energy and actuator effort against margin and saturation limits.
  • Worst-case search: adaptive sampling of disturbances, payloads and parameters that finds the scenario that breaks the loop.
  • Parameter calibration of damping, stiffness and delay from rig data, with a Bayesian fit whose uncertainty the margin then carries. See AI surrogate models you can sign off.

Where it does not help: replacing the stability check. A data-driven plant can match amplitude in the time domain and be wrong in phase near the crossover, and a controller tuned on it looks excellent and fails. The surrogate carries a stated range, its phase is checked against the full model at the crossover and at each flexible mode, and a request outside the range goes back to the full co-simulation. The same runs give the structural loads for durability and fatigue life work.

From one tuning campaign to a control co-simulation capability you keep

The return comes when your own team can change a gain, actuator or payload and read the closed-loop answer, checked the same way every time.

From one simulation study to a permanent workflow A loop of six steps: physics model, validation, automated runs, AI surrogate, decision tool and field data, which feeds back into the physics model. YOUR WORKFLOW Better with every run physics + data + AI, kept in-house 1Physics model 2Validation 3Automated runs 4AI surrogate 5Decision tool 6Field data CFD · FEA TESTS · TRIALS DOE · HPC CLOUD OPTIMISE DECIDE MONITOR RECALIBRATE
  1. Physics model. CFD and FEA set up once, as templates: geometry clean-up, mesh, solver settings and post-processing that every later run reuses.
  2. Validation. Mesh and time-step studies, and comparison with tests or full-scale data, so the model's uncertainty is known before it is trusted.
  3. Automated runs. Scripted runs over the parameters and operating conditions that matter, on your hardware or in the cloud.
  4. AI surrogate. A machine-learning model trained on those runs answers in seconds and says how sure it is; low-confidence questions go back to the solver.
  5. Decision tool. Optimisation, trade-off charts or operating guidance, in a form your engineers and operators use every day.
  6. Field data. Test, trial and monitoring data flow back to recalibrate the model, so it improves with every project instead of being rebuilt.
Physics, validation, automation and AI in one loop that improves with every run. Illustrative schematic.
  • A parameterised plant chain in your existing solvers: flexible parts reduced from FE, joints, actuators and sensors as parameters, exported as an FMU with its dependencies declared.
  • A controller harness for your model or compiled code, with exchange step, sample time and solver settings in one configuration and the step study scripted.
  • A scenario suite: steps, disturbances, payload changes and faults, with pass limits agreed with you, run on every change, and MIL traces compared with SIL.
  • A validation record: modal and frequency-response data from your rig, and the damping, stiffness and delay fitted from them with their uncertainty.
  • A surrogate plant with a stated range for tuning sweeps, and a gate that returns out-of-range requests to the full model.
  • Handover and training, so your engineers extend it themselves. See our training and software development services.

Questions engineers ask about control system co-simulation

What is the difference between MIL and SIL?
In MIL the controller is a model running against a plant model. In SIL it is the compiled production code against the same plant, so number formats, saturation order and scheduling are exercised. The MIL trace is the reference for the SIL run.
What step size should a co-simulation use?
There is no universal value. It follows from the loop bandwidth, the highest mode the controller can excite and the sample time, and we fix it by a convergence study on the real scenarios.
Can a finite element model sit inside a control loop?
Not as a full mesh. We reduce it, by Craig-Bampton or modal reduction, to the modes the loop needs, check it against the full model, and run the reduced plant in the loop.
Does FMI work with Simpack, MSC Adams, Ansys and Abaqus?
FMI is tool-neutral. Export and import support depends on the tool and its version, so we check it at the start and build adapters where needed.
What do you need from us to start?
The controller interface and sample time, or the model or code, the plant model with actuator and sensor data, and any step, frequency-response or modal data from a prototype or rig.

If a controller and a flexible machine are on your desk, send us the sample time and I/O list, the actuator and sensor specifications, the plant model or drawings, and any recorded step or frequency response. We will reply with how we would build the loop, which plant fidelity and exchange step we would check first, which measurements would calibrate it and what the first margin study would let you decide. Start with a conversation.

OLTRION Engineering

CAE, CFD and simulation team

The OLTRION engineering team runs CFD, FEA and multiphysics simulation programmes for aerospace, automotive, energy and industrial clients, and builds the machine-learning tools that speed them up. These articles come from that project work.

Where this applies

Related capabilities

Have a model that will not converge?

Talk to the engineers who wrote this

Send the geometry, the physics and the decision it has to support. We answer with an approach, not a sales call.

Talk to an engineer