Pular para o conteúdo principal

Synapsys

Uma biblioteca Python para modelagem, análise e simulação de sistemas de controle linear. Fornece uma API compatível com MATLAB, simulação multiagente e um transporte flexível (memória compartilhada / ZMQ) para fluxos MIL → SIL → HIL.

pippip install synapsys
uvuv add synapsys
devuv sync --extra dev

Visão Geral

O Synapsys cobre toda a esteira de controle — do código de modelagem em tempo contínuo à simulação do loop fechado em tempo discreto real — com a mesma sintaxe constante.

Transfer functions and state-space — synapsys.api
from synapsys.api import tf, ss, step, bode, feedback, c2d

# Transfer function: G(s) = ωn² / (s² + 2ζωnˢ + ωn²)
wn, zeta = 10.0, 0.5
G = tf([wn**2], [1, 2*zeta*wn, wn**2])

# Closed-loop (negative feedback)
T = feedback(G)

# Frequency and time-domain analysis
w, mag, phase = bode(G)
t, y = step(T)

# Zero-order-hold discretisation at 200 Hz
Gd = c2d(G, dt=0.005)

Escada de Fidelidade de Simulação

O Synapsys foi projetado para testes de incremento de fidelidade. Como apenas a camada de transmissão de processos se altera, o algoritmo de controle centraliza-se o mesmo.

MILModel-in-the-LoopSharedMemoryTransport · PlantAgent
SILSoftware-in-the-LoopZMQTransport · processo separado
HILHardware-in-the-LoopHardwareAgent · dispositivo real

Veja o guia HIL / SIL para um exemplo detalhado de migração passo a passo.

Integração Inteligente IA + Controle

O Synapsys é construído para fluxos de pesquisa modernos. Qualquer modelo PyTorch, JAX ou scikit-learn pode ser pareado diretamente a um ControllerAgent por meio de um callback de tipo np.ndarray → np.ndarray — permitindo rodar redes baseadas em física e R.L. em tempo real nos loops HIL/SIL.

Real-time 3D animation of the quadcopter tracking a figure-8 trajectory

PyVista 3D window (50 Hz) — drone mesh, trajectory trail, reference curve and live HUD.

Live telemetry: top-down x-y trajectory, altitude, Euler angles and control inputs

matplotlib telemetry (10 Hz) — x-y position, altitude, Euler angles and control deviations δu.

Residual Neural-LQRδu = −K·e + MLP(e). Output layer zeroed at init → starts as pure LQR. The residual is trained later via RL or imitation learning.
12-State MIMO PlantLinearised hover model (x, y, z, φ, θ, ψ, ẋ, ẏ, ż, p, q, r) built with ss() + c2d(). LQR gain K∈ℝ⁴ˣ¹² from lqr().
PyTorch / Keras ReadyThe controller is a plain Python callable. Swap in any nn.Module — LSTM, Transformer, diffusion policy — without changing the simulation loop.
Distributed & Real-TimePlant and controller can run in separate processes or machines via SharedMemoryTransport or ZMQTransport — same API, zero code changes.

Walkthrough completo: Exemplo SIL + Neural-LQR →

3D Simulation Views

Janelas de simulação 3D prontas para usar — conecte qualquer controlador (LQR, PID, rede neural, agente RL) com uma única linha de código.

Simulação 3D Cart-Pole em tempo real
Cart-Polex = [x, ẋ, θ, θ̇]

Pêndulo invertido sobre carrinho. 4 estados, instável — clássico para LQR e RL.

Simulação 3D Pêndulo Invertido em tempo real
Pêndulo Invertidox = [θ, θ̇]

Pêndulo de 1 elo com base fixa. O sistema instável mais simples para testar qualquer controlador.

Simulação 3D Massa-Mola-Amortecedor em tempo real
Massa-Mola-Amortecedorx = [q, q̇]

Massa-mola-amortecedor com rastreamento de setpoint. LQR com feed-forward de posição.

Passe qualquer callable como controlador — LQR, PID, rede neural ou agente RL: CartPoleView(controller=my_model).run() · Ver exemplos →

Do Blog

Artigos de pesquisa aprofundados e posts práticos sobre controle de sistemas, IA e Synapsys.

Post

Welcome to the Synapsys Blog

· 3 min de leitura

Introducing the Synapsys Blog — a space for tutorials, research insights, and practical guides for control systems engineers and researchers.

Ler artigo completo →
PID with Anti-Windup: Theory, Tuning and Experimental Validation
Artigo

PID with Anti-Windup: Theory, Tuning and Experimental Validation

· 12 min de leitura

A research-oriented deep-dive into discrete PID with back-calculation anti-windup — from the integral windup problem to experimental step-response validation, with Synapsys code throughout.

Ler artigo completo →
Artigo

MIMO Control of a Quadcopter with Neural-LQR

· 15 min de leitura

How to model a 12-state linearised quadrotor, design a MIMO LQR, augment it with a residual MLP, and simulate the closed-loop in 3D — a research-grade case study using Synapsys.

Ler artigo completo →
From Model to Hardware: MIL → SIL → HIL in Three Steps
Post

From Model to Hardware: MIL → SIL → HIL in Three Steps

· 8 min de leitura

A practical guide to the MIL/SIL/HIL development workflow with Synapsys — swap from simulation to real hardware by changing one line, keeping your control algorithm untouched.

Ler artigo completo →
Artigo

Stabilising an Inverted Pendulum with LQR

· 10 min de leitura

A complete walkthrough: derive the linearised state-space model of an inverted pendulum, design an LQR controller, simulate the closed-loop response, and discretise for embedded deployment — all in Python with Synapsys.

Ler artigo completo →
Post

Welcome to the Synapsys Blog

· 3 min de leitura

Introducing the Synapsys Blog — a space for tutorials, research insights, and practical guides for control systems engineers and researchers.

Ler artigo completo →
PID with Anti-Windup: Theory, Tuning and Experimental Validation
Artigo

PID with Anti-Windup: Theory, Tuning and Experimental Validation

· 12 min de leitura

A research-oriented deep-dive into discrete PID with back-calculation anti-windup — from the integral windup problem to experimental step-response validation, with Synapsys code throughout.

Ler artigo completo →
Ver todos os posts →

Mapa Completo da Biblioteca

Nove pacotes focados — da matemática LTI ao hardware em tempo real. Clique em qualquer card para ir à referência da API.

Resumo dos Pacotes

PacoteConteúdoStatus
synapsys.coreFunção de Transferência, Espaço de Estados, discretização ZOHEstável
synapsys.apiCamada compatível com MATLAB: tf(), ss(), step(), bode()Estável
synapsys.algorithmsPID discreto com anti-windup, LQR (resolve ARE)Estável
synapsys.agentsPlantAgent, ControllerAgent, SyncEngineFuncional
synapsys.transportMemória Compartilhada (zero-copy), ZMQ PUB/SUB & REQ/REPFuncional
synapsys.viz3D sim views plug-and-play: CartPoleView, PendulumView, MassSpringDamperViewFuncional
synapsys.hwHardwareInterface, MockHardwareInterface (HIL)Interface
synapsys.mpcControle Preditivo Baseado em Modelo (MPC)Planejado