KINGSTON-115/llm-pid-tuner
基于 LLM 的极简 PID 自动调参系统 (CLI 版)
What it solves
PID tuning is often a tedious process of trial and error, especially for those without deep control theory experience. This tool leverages Large Language Models (LLMs) to analyze system responses and suggest optimal PID parameters, reducing the time spent on manual tuning and minimizing the risk of unstable system behavior.
How it works
The tool operates in a closed-loop feedback cycle with the controlled system:
- Data Collection: It reads real-time performance data (timestamp, setpoint, current value, PWM, error) via serial port from hardware (like Arduino/ESP32) or via simulation (Python-based thermal system or MATLAB/Simulink).
- Analysis & Suggestion: The data is sent to an LLM (via API) which analyzes the response quality (overshoot, steady-state error, response time) and suggests new PID parameters.
- Execution & Safety: The tool applies the new parameters to the system. It includes safety guardrails, such as parameter limits, fallback strategies, and the ability to roll back to the best-known stable parameters if performance degrades.
- Convergence: The process repeats until the system meets predefined stability and error thresholds.
Who it’s for
- Hardware Developers: Those working with constant temperature control (heating plates, ovens) or motor/actuator closed-loop regulation.
- Control Engineers: Users who want to narrow down the search space for PID parameters quickly using AI.
- Students/Hobbyists: People without mature tuning experience who need a practical tool to stabilize their hardware.
Highlights
- Multi-Mode Support: Works with real hardware via serial, a built-in Python thermal simulator, and MATLAB/Simulink models.
- AI-Driven Tuning: Uses LLMs to interpret system behavior and and suggest adjustments based on natural language preferences (e.g., "make it more aggressive" or "no overshoot").
- Safety First: Features built-in parameter limits, automatic rollback to stable versions, and environment diagnostics.
- Broad LLM Compatibility: Supports OpenAI, Claude, DeepSeek, Ollama, and LM Studio via OpenAI-compatible APIs.
- Easy Deployment: Provided as a standalone Windows
.exefor users who don't want to configure a Python environment.
Related
- Project
- Project
- Project
- Project
- Project