1. Controlled Pendulum Case Study#
This case study follows a controlled pendulum through progressively richer simulation models. It demonstrates how SysSimX combines heterogeneous components, co-simulation, hybrid events, algebraic loops, and runtime model switching.
1.1. System at a Glance#
The example closes the loop from a reference angle through a sensor and controller to a pendulum plant:
Controlled pendulum system#
Reference:
SineAngleTrajectorygenerates the target angle.Feedback:
AnglePotentiometerADCandAnglePotentiometerDecodermeasure and reconstruct the angle.Control:
PIDContinuouscomputes the drive command.Plant: drive and pendulum components produce the motion, including contact behavior.
Model fidelity: FMU, OpenSim, and FEM variants can be combined or selected at runtime.
1.2. Notebook Roadmap#
Baseline system model - closed-loop FMU model compared with a monolithic reference.
Quantization and sampling - measurement resolution and sampling effects.
Algebraic loop - tightly coupled drive and pendulum dynamics.
Rigid contact - event synchronization and step-size convergence.
Multi-model switching - FMU/OpenSim/FEM model changes near contact.
Start with the baseline notebook, then follow the sequence to see how each added capability changes the simulation.