Agentic AI For Real-Time Adaptive PID Control of Servo Motor
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
This study explores a novel approach of using large language models (LLMs) in real-time Proportional-Integral-Derivative (PID) control of a physical system, the Quanser QUBE-Servo 2. We investigated whether LLMs, used with an Artificial Intelligence (AI) agent workflow platform, can participate in live tuning of PID parameters through natural language instructions. Two AI agents were developed: a control agent that monitors the system performance and decides if tuning is needed, and an optimizer agent that updates PID gains using either a guided system prompt or a self-directed free approach within a safe parameter range. The LLM integration was implemented through Python programming and Flask-based communication between the AI agents and the hardware system. Experimental results show that both tuning approaches effectively reduced standard error metrics, such as IAE, ISE, MSE, and RMSE. This study presents the first known real-time implementation of servo motor control powered by LLMs, and it has the potential to become a novel alternative to classical control or machine learning and reinforcement learning based control approaches. The results are promising for using agentic AI in heuristic-based tuning and control of complex physical systems.