ExamplesΒΆ

Here we show a range of examples utilizing PathSim to simulate different dynamical systems and how to implement them step by step, starting from the system definition.

There is an even more comprehensive collection of example dynamical system simulations availabe in the GitHub repository.

Note

Examples are available as interactive Jupyter notebooks that can be downloaded and executed directly.


Fundamental SystemsΒΆ

Basic examples demonstrating core PathSim concepts with linear and nonlinear systems.

πŸ“ Linear Feedback

First-order linear feedback system demonstrating basic block connections and simulation setup.

Linear Feedback System
🌊 Harmonic Oscillator

Damped spring-mass-damper system with second-order dynamics and exponential decay.

Harmonic Oscillator
βš™οΈ Pendulum

Nonlinear mathematical pendulum demonstrating the sine nonlinearity and oscillatory behavior.

Pendulum
πŸŒ€ Van der Pol Oscillator

Self-oscillating system with nonlinear damping, demonstrating limit cycle behavior.

Van der Pol
πŸ¦‹ Lorenz Attractor

Chaotic system demonstrating sensitive dependence on initial conditions and strange attractors.

Lorenz Attractor

Event-Driven SystemsΒΆ

Hybrid dynamical systems with discrete events and zero-crossing detection.

⚽ Bouncing Ball

Classic hybrid system with zero-crossing events for bounce detection and velocity reversal.

Bouncing Ball
🎯 Bouncing Pendulum

Nonlinear pendulum with ground collisions, featuring automatic differentiation through events.

Bouncing Pendulum
πŸ”€ Switched Bouncing Ball

Advanced event handling with multiple events, conditional logic, and dynamic event switching.

Switched Bouncing Ball
🌑️ Thermostat

Temperature control system with hysteresis and on-off switching events.

Thermostat
πŸ”§ Stick-Slip Friction

Friction model with stick-slip transitions demonstrating state-dependent switching.

Stick Slip

Control SystemsΒΆ

Feedback control examples including PID controllers and cascade architectures.

πŸŽ›οΈ PID Controller

Classical PID feedback control demonstrating proportional, integral, and derivative actions.

PID Controller
πŸ”— Cascade Controller

Two-loop cascade control architecture with nested PID controllers and subsystems.

Cascade Controller

Signal Processing & CommunicationsΒΆ

Examples demonstrating frequency domain analysis, filters, and signal processing systems.

πŸ“‘ FMCW Radar

Frequency-modulated continuous-wave radar system with mixing and frequency analysis.

FMCW Radar
πŸ“Š Spectrum Analysis

Frequency domain analysis using the Spectrum block to recover filter frequency responses.

Spectrum Analysis
πŸ”„ Transfer Function

Linear system representation using poles and residues with complex conjugate dynamics.

Transfer Function

Electronics & Circuit SystemsΒΆ

Analog and mixed-signal circuit simulations including ADCs, nonlinear components and RF networks.

πŸ’‘ Diode Circuit

Nonlinear diode characteristics with implicit solver for stiff circuit dynamics.

Diode Circuit
πŸ“ˆ Delta-Sigma ADC

Oversampling analog-to-digital converter with noise shaping and quantization.

Delta-Sigma ADC
πŸ”’ SAR ADC

Successive approximation register ADC with binary search and comparator logic.

SAR ADC
πŸ“‘ RF Network

RF network with spectrum analysis. Enabled by Scikit-rf integration.

RF Network - One Port

Advanced TopicsΒΆ

Complex systems featuring algebraic loops, subsystems, chemical processes, automatic differentiation, and FMU co-simulation.

πŸ” Algebraic Loop

Implicit system with algebraic constraints requiring iterative solvers.

Algebraic Loop
πŸ§ͺ Chemical Reactor

Chemical reaction kinetics with temperature-dependent rates and nonlinear dynamics.

Chemical Reactor
πŸ“¦ Nested Subsystems

Hierarchical modeling with nested subsystems for modular system design.

Nested Subsystems
πŸŽ“ Automatic Differentiation

Sensitivity analysis and uncertainty quantification using forward-mode automatic differentiation.

Automatic Differentiation
πŸ”Œ FMU Co-Simulation

Integration of Functional Mock-up Units (FMU) as PathSim blocks using FMI standard.

FMU Co-Simulation