Interactive example notebooks for PathSim.
Getting Started
Simulation of a damped harmonic oscillator, modeling a spring-mass-damper system.

Simulation of a simple linear feedback system with step response.

Simulation of a nonlinear mathematical pendulum.

Simulation of the Van der Pol oscillator, a classic example of a stiff dynamical system.

Control Systems
This example demonstrates an anti-lock braking system (ABS) using nonlinear tire dynamics and event-driven slip control. The system prevents wheel lockup during braking by modulating brake torque t...
Demonstration of a two-loop cascade PID control system with inner and outer loops.

This example demonstrates multi-domain modeling of a DC motor with PID speed control. The system combines electrical and mechanical dynamics with anti-windup control to handle voltage saturation.
This example demonstrates the Kalman filter in PathSim for optimal state estimation of a linear dynamical system from noisy measurements. The filter recursively estimates the state of a moving obje...

Simulation of a PID controller tracking a step-changing setpoint.

Simulation of a thermostat with threshold-based switching between heater states.

Mechanics
Simulation of a ball bouncing inside a circular boundary using event detection.

Simulation of a bouncing ball using PathSim's event handling system.

This example demonstrates a hybrid system combining continuous pendulum dynamics with discrete bounce events. The pendulum swings until it hits the ground (zero angle), at which point it bounces ba...

Simulation of two coupled damped harmonic oscillators using ODE blocks.

Simulation of an elastic pendulum combining spring and pendulum dynamics.

Simulation of a mechanical system exhibiting stick-slip behavior due to Coulomb friction.

This example demonstrates advanced event handling with multiple simultaneous events, event switching, and conditional event logic. The bouncing ball bounces on a table first, and then drops to the ...
Electronics
Simulation of a first-order delta-sigma analog-to-digital converter.

Simulation of a diode circuit demonstrating nonlinear algebraic loop solving.

Simulation of a nonlinear, noisy, and band-limited amplifier model.

Simulation of a Successive Approximation Register ADC with custom block creation.

Signal Processing
In this example we simulate a simple frequency modulated continuous wave (FMCW) radar system.

Simulation of a Radio Frequency (RF) network using scikit-rf for state-space conversion.
In this example we demonstrate frequency domain analysis using PathSim's spectrum block. We'll examine the frequency response of a Butterworth lowpass filter by analyzing its response to a Gaussian...
In this example we demonstrate how to use transfer functions in PathSim using the Pole-Residue-Constant (PRC) form. This representation is particularly convenient for transfer functions with comple...
Chemical Engineering
Simulation of a continuous stirred tank reactor (CSTR) with consecutive exothermic reactions.
Advanced Topics
Demonstration of PathSim's automatic handling of algebraic loops.

PathSim supports saving and loading simulation state via checkpoints. This allows you to pause a simulation, save its complete state to disk, and resume it later from exactly where you left off.
Simulation of the famous Lorenz attractor, a chaotic dynamical system.
Demonstration of hierarchical modeling using nested subsystems for a Van der Pol oscillator.

Demonstration of computing Poincaré sections for chaotic dynamical systems using event handling.
FMU Integration
Demonstration of integrating Functional Mock-up Units (FMU) as PathSim blocks.
This example demonstrates Model Exchange FMU integration with PathSim. Unlike co-simulation FMUs, Model Exchange FMUs provide only the differential equations. PathSim's solvers perform the numerica...
This example demonstrates Model Exchange FMU integration with a nonlinear oscillator. The Van der Pol equation exhibits self-sustained oscillations: