Interactive example notebooks for PathSim.

Getting Started

Harmonic Oscillator

Simulation of a damped harmonic oscillator, modeling a spring-mass-damper system.

Harmonic Oscillator
Linear Feedback System

Simulation of a simple linear feedback system with step response.

Linear Feedback System
Pendulum

Simulation of a nonlinear mathematical pendulum.

Pendulum
Van der Pol

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

Van der Pol

Control Systems

Anti-lock Braking System (ABS)

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...

Cascade Controller

Demonstration of a two-loop cascade PID control system with inner and outer loops.

Cascade Controller
DC Motor Speed Control

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.

Kalman Filter

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...

Kalman Filter
PID Controller

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

PID Controller
Thermostat

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

Thermostat

Mechanics

Billards & Collisions

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

Billards & Collisions
Bouncing Ball

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

Bouncing Ball
Bouncing Pendulum

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...

Bouncing Pendulum
Coupled Oscillators

Simulation of two coupled damped harmonic oscillators using ODE blocks.

Coupled Oscillators
Elastic Pendulum

Simulation of an elastic pendulum combining spring and pendulum dynamics.

Elastic Pendulum
Stick Slip

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

Stick Slip
Switched Bouncing Ball

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

Delta-Sigma ADC

Simulation of a first-order delta-sigma analog-to-digital converter.

Delta-Sigma ADC
Diode Circuit

Simulation of a diode circuit demonstrating nonlinear algebraic loop solving.

Diode Circuit
Noisy Amplifier

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

Noisy Amplifier
SAR ADC

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

SAR ADC

Signal Processing

FMCW Radar

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

FMCW Radar
RF Network - One Port

Simulation of a Radio Frequency (RF) network using scikit-rf for state-space conversion.

Spectrum Analysis

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...

Transfer Function

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

Chemical Reactor

Simulation of a continuous stirred tank reactor (CSTR) with consecutive exothermic reactions.

Advanced Topics

Algebraic Loop

Demonstration of PathSim's automatic handling of algebraic loops.

Algebraic Loop
Checkpoints

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.

Lorenz Attractor

Simulation of the famous Lorenz attractor, a chaotic dynamical system.

Nested Subsystems

Demonstration of hierarchical modeling using nested subsystems for a Van der Pol oscillator.

Nested Subsystems
Poincaré Maps

Demonstration of computing Poincaré sections for chaotic dynamical systems using event handling.

FMU Integration

FMU Co-Simulation

Demonstration of integrating Functional Mock-up Units (FMU) as PathSim blocks.

FMU ME: Bouncing Ball

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...

FMU ME: Van der Pol

This example demonstrates Model Exchange FMU integration with a nonlinear oscillator. The Van der Pol equation exhibits self-sustained oscillations: