Automated Synthesis of LTI Control Systems using Evolutionary Algorithms.
SmartBode Tuner is a professional web-based CAD platform designed to automate the synthesis of Lead/Lag compensators. It utilizes Differential Evolution algorithms to optimize control parameters (
The project follows a modern Microservices-based Architecture organized in a Monorepo:
- Path:
/frontend-ui - Tech: React, TypeScript, Vite.
- Role: Provides an interactive Single Page Application (SPA) for real-time tuning.
- Key Libraries:
plotly.js(Logarithmic Bode Plots),Material UI(Design System),Axios.
- Path:
/backend-api - Tech: Node.js, Express, MongoDB.
- Role: Acts as an API Gateway, handles user sessions, and manages project persistence.
- Function: Bridges the communication between the React Client and the Python AI Engine.
- Path:
/ai-engine - Tech: Python 3.10+, FastAPI, NumPy, SciPy.
- Role: The mathematical core. It performs the heuristic optimization using the
differential_evolutionalgorithm from SciPy and system analysis via thepython-controllibrary.
SmartBodeTuner/
├── ai-engine/ # Python Microservice (Optimization Logic)
├── backend-api/ # Node.js API Gateway (Data Management)
├── frontend-ui/ # React + TypeScript SPA (Visualization)
├── docs/ # Documentation and diagrams
└── README.md # Project entry point
- Node.js (v18 or higher)
- Python (v3.9 or higher)
- Git
Follow these steps to run the entire stack locally.
cd ai-engine
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start the Microservice (Logic)
uvicorn main:app --reload --port 8000cd backend-api
npm install
# Start the Gateway
npm start
# (Runs on port 3000 by default)cd frontend-ui
npm install
# Start the Development Server
npm run dev
# (Accessible at http://localhost:5173)The project adopts a rigorous testing methodology suitable for critical engineering software:
- Unit Testing:
Vitest+React Testing Libraryfor component logic and isolation. - E2E Testing:
Cypressfor full optimization flow validation. - Static Analysis:
TypeScript(Strict Mode) to ensure type safety for physical quantities.
-
Automatic Tuning: Finds optimal
$K, T, \alpha$ for Lead/Lag networks in seconds. - Interactive Plots: Zoomable, log-scale Bode and Nyquist diagrams.
- Constraint Handling: Automatically rejects unstable closed-loop solutions.
- Project History: Save and compare different tuning versions (stored in MongoDB).
MATTIA FRANCHINI & MICHELE BISIGNANO