This paper proposes a dual-layer decoupled gimbal electronic control system for mobile robots. The hardware platform employs the STM32F407IGH6TR microcontroller with a BMI088 IMU and DaMiao J4310 / DJI GM6020 actuators. A three-layer software architecture running under a preemptive real-time kernel maintains a 1 ms attitude estimation loop and 2 ms motion control loops. A velocity coordinate rotation algorithm is derived to eliminate chassis–gimbal directional coupling inherent to the dual-layer Yaw structure. Angle–velocity cascaded PID controllers are implemented for both gimbal layers, incorporating derivative-on-measurement, conditional integration, and velocity feedforward compensation. Experimental results demonstrate that the inner gimbal Yaw step response rise time is approximately 50 ms with steady-state error below 0.3°; feedforward compensation reduces constant-velocity tracking RMS error by approximately 60% compared to pure PID; all control loops meet their timing requirements at a total CPU utilization of approximately 85%.
Medero A, Puig V, 2022, LPV Control and Virtual-Sensor-Based Fault Tolerant Strategies for a Three-Axis Gimbal System. Sensors, 22(17): 6664.
Leblebicioğlu D, Ateşoğlu Ö, Çakmakcı M, 2022, Physics-Informed Disturbance Estimation and Nonlinear Controller Design for a Multi-Axis Gimbal System. IFAC-PapersOnLine, 55(37): 530–535.
Wang D, Gao Y, Wei W, et al., 2024, Sliding Mode Observer-Based Model Predictive Tracking Control for Mecanum-Wheeled Mobile Robot. ISA Transactions, 151: 51–61.
Zhao T, Zou X, Dian S, 2022, Fixed-Time Observer-Based Adaptive Fuzzy Tracking Control for Mecanum-Wheel Mobile Robots with Guaranteed Transient Performance. Nonlinear Dynamics, 107(1): 921–937.
Palacín J, Rubies E, Bitriá R, et al., 2023, Phasor-Like Interpretation of the Angular Velocity of the Wheels of Omnidirectional Mobile Robots. Machines, 11(7): 698.
Yan J, Li J, Chen M, et al., 2026, An Adaptive PID Control Strategy Based on Offline–Online Cooperative Optimization. Electronics, 15(5): 921.
Noordin A, Mohd Basri M, Mohamed Z, 2023, Real-Time Implementation of an Adaptive PID Controller for the Quadrotor MAV Embedded Flight Control System. Aerospace, 10(1): 59.
Arm J, Baštán O, Mihálik O, et al., 2022, Measuring the Performance of FreeRTOS on ESP32 Multi-Core. IFAC-PapersOnLine, 55(4): 292–297.
Liu M, Cai Y, Zhang L, et al., 2021, Attitude Estimation Algorithm of Portable Mobile Robot Based on Complementary Filter. Micromachines, 12(11): 1373.
Sever K, Golušin L, Lončar J, 2023, Optimization of Gradient Descent Parameters in Attitude Estimation Algorithms. Sensors, 23(4): 2298.
Yapp K, Hoo C, Lai C, 2024, New Anti-Windup Proportional-Integral-Derivative for Motor Speed Control. Asian Journal of Control, 26(6): 2854–2866.
Peng D, Huang B, Huang H, 2022, Design of an Anti-Windup PID Algorithm for Differential Torque Steering Systems. Shock and Vibration, 2022: 9973379.