Examples
A curated set of runnable examples that demonstrate the full capability spectrum of Synapsys — from a single step() call to a multi-process Digital Twin with anomaly detection.
Each example lives in its own subfolder under examples/ and includes a detailed README.md.
Basic
| Example | Concepts |
|---|---|
| Step Response | Transfer function, tf(), step(), poles, stability |
Advanced
| Example | Concepts |
|---|---|
| Custom Signal Injection | MIL, superposition, simulate(), arbitrary waveforms |
| SIL + AI Controller | SIL, PlantAgent, ControllerAgent, PyTorch integration, real-time plot |
| Real-Time Scope (Terminal) | Read-only bus monitor, headless display |
| Real-Time Oscilloscope | Three-role architecture, PID, sinusoidal reference, FuncAnimation |
| Digital Twin | Virtual twin, wear injection, divergence metric, anomaly detection |
Distributed
| Example | Concepts |
|---|---|
| Shared Memory | Multi-process IPC, bus ownership, rate decoupling |
| ZeroMQ Network | PUB/SUB, cross-machine simulation, ZOH fallback |
Running any example
All examples use uv:
uv run python examples/<path>/<script>.py
Make sure dev dependencies are installed:
uv sync --extra dev