ControlDESymulation

Symbolic Dynamical Systems Framework for Control Theory

Overview

ControlDESymulation is a comprehensive Python framework for symbolic modeling, simulation, and control of dynamical systems. The source code is available on GitHub.

Key Benefits

  1. Write Once, Run Anywhere: Define systems symbolically, execute on any backend (NumPy/PyTorch/JAX)
  2. No Backend Lock-in: Switch between CPU, GPU, or TPU without changing your code
  3. Gradient-Aware: Automatic differentiation support for learned controllers and neural ODEs
  4. Type-Safe: Comprehensive type hints for better IDE support and fewer bugs
  5. Research to Production: Prototype in NumPy, scale with JAX, integrate with PyTorch models

Features

  • Symbolic Specification: Define systems using SymPy with automatic code generation
  • Multi-Backend Support: Seamlessly switch between NumPy, PyTorch, JAX, and Julia
  • Dual Time Domains: Full support for both continuous-time (ODEs/SDEs) and discrete-time systems
  • Stochastic Systems: First-class support for stochastic differential equations (SDEs)
  • 40+ Integration Methods: Adaptive and fixed-step solvers from scipy, torchdiffeq, diffrax, and DiffEqPy
  • Type Safety: Comprehensive TypedDict definitions with IDE autocomplete support
  • GPU Acceleration: Native PyTorch and JAX support for GPU-based simulations
  • Zero Code Duplication: Clean 4-layer architecture with composition over inheritance
  • Production Ready: Extensive test coverage, comprehensive documentation, CI/CD workflows

Design Principles

  1. Composition Over Inheritance - Delegate to specialized utilities
  2. Backend Agnosticism - Write once, run on NumPy/PyTorch/JAX/Julia
  3. Type-Driven Design - Comprehensive TypedDict definitions
  4. Zero Code Duplication - Shared functionality in base classes
  5. Mathematical Rigor - Proper handling of ODEs, SDEs, difference equations
  6. Performance First - Multi-backend support enables GPU and XLA acceleration

Documentation Structure

Installation