Pular para o conteúdo principal

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

ExampleConcepts
Step ResponseTransfer function, tf(), step(), poles, stability

Advanced

ExampleConcepts
Custom Signal InjectionMIL, superposition, simulate(), arbitrary waveforms
SIL + AI ControllerSIL, PlantAgent, ControllerAgent, PyTorch integration, real-time plot
Real-Time Scope (Terminal)Read-only bus monitor, headless display
Real-Time OscilloscopeThree-role architecture, PID, sinusoidal reference, FuncAnimation
Digital TwinVirtual twin, wear injection, divergence metric, anomaly detection

Distributed

ExampleConcepts
Shared MemoryMulti-process IPC, bus ownership, rate decoupling
ZeroMQ NetworkPUB/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