Agentic AI for Real-Time Adaptive PID Control of a Servo Motor

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

This study explores a novel approach of using large language models (LLMs) in the 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 the 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 necessary, 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 LLM-based tuning approaches can effectively reduce standard error metrics, such as IAE, ISE, MSE, and RMSE. This study presents one of the first implementations of real-time PID tuning powered by LLMs, and it has the potential to become a novel alternative to classical control, as well as machine learning or reinforcement learning-based approaches. The results are promising for using agentic AI in heuristic-based tuning and the control of complex physical systems, marking the shift toward more human-centered, explainable, and adaptive control engineering.

Article activity feed