Discover and explore top open-source AI tools and projects—updated daily.
KINGSTON-115LLM-driven PID auto-tuning CLI tool
Top 78.8% on SourcePulse
This project provides a minimalist, LLM-driven PID auto-tuning system, available as a command-line interface (CLI) tool. It addresses the complexity and trial-and-error inherent in PID controller parameter tuning, offering a streamlined approach for users seeking to optimize control systems like heating elements or motors. The system benefits users by reducing setup time, minimizing tuning errors, and providing a safety net through parameter rollback, making advanced control tuning more accessible.
How It Works
The system operates in two primary modes: a local simulation mode using simulator.py (which can integrate with MATLAB/Simulink) and a real hardware mode. In hardware mode, an MCU or firmware sends serial data (CSV format) containing PID loop states (setpoint, input, error) to the tuner.py script or the standalone .exe. This data is then processed, and API calls are made to a configured Large Language Model (LLM) to analyze the system's response and generate suggested PID parameter adjustments. A key design choice is the inclusion of safety mechanisms, such as rollback to previously stable parameters if new suggestions lead to performance degradation.
Quick Start & Requirements
The most straightforward method for users is to download the pre-compiled llm-pid-tuner.exe from the project's Release page. For hardware integration, a serial-communicating device (e.g., Arduino, ESP32) is required, with an example firmware (firmware.cpp) provided. Upon first run, the tool generates a config.json file that must be populated with essential LLM API details (LLM_API_KEY, LLM_API_BASE_URL, LLM_MODEL_NAME, LLM_PROVIDER) and serial port settings (SERIAL_PORT, BAUD_RATE). Alternatively, dependencies can be installed via pip install -r requirements.txt for source-based execution. Links to Bilibili and YouTube tutorials are available for guided setup.
Highlighted Details
system_id.py utility to perform initial system identification from step response data, providing a baseline for LLM tuning.Maintenance & Community
Community discussion and support are available via a QQ group (1082281492). Detailed video tutorials are provided on Bilibili and YouTube. Internal design documentation is available in PROJECT_DOC.md.
Licensing & Compatibility
The project is licensed under the Apache-2.0 license. This permissive license allows for commercial use and integration into closed-source projects without significant restrictions.
Limitations & Caveats
This tool is not an automated "set-and-forget" solution; it assists rather than replaces the user's judgment. Crucially, when tuning real hardware, especially heating systems, users must implement their own independent hardware-level safety measures (e.g., over-temperature cutoffs, sensor failure detection) as the software does not substitute for essential safety engineering. Correct configuration of LLM API endpoints and serial communication parameters is critical for operation.
2 days ago
Inactive
stochasticai
AlexsJones