A Self-adaptive SAC-PID Control Approach based on Reinforcement Learning for Mobile Robots

Xinyi Yu, Yuehai Fan, Siyu Xu, Linlin Ou

Abstract

Traditional Proportional-Integral-Derivative (PID) controllers often struggle in dynamic or unknown environments due to their reliance on static parameters. This paper introduces a hierarchical control architecture that combines the robustness of PID with the adaptive capabilities of Soft Actor-Critic (SAC) reinforcement learning. By using SAC as an upper-level controller to tune PID gains in real-time, the proposed method enables mobile robots to navigate complex paths and intersections without manual tuning. Evaluations in Gazebo simulations and real-world experiments show that the SAC-PID approach achieves superior success rates and computational efficiency compared to conventional fuzzy-PID methods.

Introduction

Proportional-Integral-Derivative (PID) control is a cornerstone of industrial automation due to its simplicity and reliability. However, its performance is highly dependent on precise manual tuning or an accurate mathematical model of the system. In real-world robotics, where environments are unpredictable and system dynamics may change (e.g., varying friction or complex path geometries), static PID controllers often fail to maintain stability.

While adaptive PID methods have been explored, many struggle with high-dimensional state spaces or the requirements of continuous action spaces. This research addresses the challenge of line-following mobile robots navigating complex environments, such as forks and sharp turns, by proposing a self-adaptive control scheme that eliminates the need for expert-driven gain adjustment.

Proposed Methodology

The researchers developed a hierarchical SAC-PID control architecture designed for model-free adaptability.

Hierarchical Architecture

The system consists of two primary layers:

  1. Upper Controller (Soft Actor-Critic): Acting as the "brain," the SAC algorithm optimizes for both reward and entropy. This dual optimization encourages exploration and prevents the system from converging on suboptimal local solutions. The SAC agent processes the robot's state and outputs optimal parameters ($K_p, K_i, K_d$) for the lower-level controller.
  2. Lower Controller (Incremental PID): Acting as the "muscle," an incremental PID algorithm is employed. Unlike standard positional PID, the incremental version focuses on the change in control output, making it more robust against the accumulation of past errors and better suited for discrete computer control.
Hierarchical SAC-PID control architecture showing the interaction between the SAC agent, the PID controllers, and the mobile robot.

State Representation and Fork Detection

To navigate effectively, the robot utilizes a 13-dimensional state vector derived from visual input. This includes normalized coordinates of five key pixels on the detected line, curvature error, and current velocities.

A significant challenge in line-following is handling intersections (forks). The authors implemented a 24-neighborhood threshold method combined with polynomial fitting. This allows the robot to distinguish between standard paths and intersections, ensuring stable navigation even when visual data is ambiguous.

Visual state representation showing the five key pixels used for line detection and the fork pixel identification method for intersections.

Experimental Setup

The approach was validated through both simulation and physical testing:

  • Simulation: Conducted in the Gazebo environment using a Pioneer 3-AT robot model. Four distinct paths were tested, ranging from simple loops to complex tracks with multiple forks.
  • Real-World Validation: A physical Mecanum mobile robot, powered by an NVIDIA Jetson TX2 and an RGB camera, was tested on two real-world tracks to evaluate the "sim-to-real" transferability of the trained model.

Results and Discussion

The SAC-PID approach demonstrated significant improvements over traditional methods:

  • Performance and Efficiency: In complex simulations, SAC-PID achieved a 95% success rate with an average velocity of 0.259 m/s. In comparison, a traditional Fuzzy PID approach only managed a 20% success rate and was slower (0.197 m/s). Furthermore, SAC-PID was computationally more efficient, requiring only 65ms per iteration compared to 670ms for Fuzzy PID.
  • Generalization: Models trained on specific paths successfully navigated unseen tracks, indicating that the controller learned generalizable navigation strategies rather than memorizing specific routes.
  • Real-World Robustness: The system maintained an 80% success rate in physical experiments, proving its resilience to real-world sensor noise and hardware latency.

Conclusion

The integration of SAC reinforcement learning with incremental PID control provides a powerful, model-free solution for mobile robot navigation. By maximizing entropy, the SAC agent ensures robust exploration and adaptability to unknown environments. Future work will focus on reducing the performance gap between simulation and reality caused by hardware latency and extending the hierarchical architecture to more complex systems, such as multi-joint robotic manipulators.

Summary updated

BibTeX
@misc{yu2021self,
  author = {Xinyi Yu and Yuehai Fan and Siyu Xu and Linlin Ou},
  title = {{A Self-adaptive SAC-PID Control Approach based on Reinforcement Learning for Mobile Robots}},
  year = {2021},
  eprint = {2103.10686},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.10686},
}
Figure