Enhancing MG996R Servo Motor Performance Using PSO-Tuned PID and Feedforward Control - Chotikunnan, Phichitphon; Pititheeraphab, Yutthana; Angsuwatanakul, Thanate; Prinyakupt, Jaroonrut; Puttasakul, Tasawan; Chotikunnan, Rawiphon; Thongpance, Nuntachai (Association for Scientific Computing Electronics and Engineering (ASCEE), 2025)
The aim of this research is to improve the precision of factory-locked MG996R servo motors, which are frequently employed in biomedical and robotic applications. These motors are characterized by the absence of inherent feedback channels and adjustable internal settings. The proposed technique proposes a non-invasive control strategy that utilizes externally obtained feedback to enable closed-loop control without requiring any modifications to the interior circuitry. The scientific contribution consists of the development of an outer-loop PID control framework that has been optimized using Particle Swarm Optimization (PSO) and enhanced with feedforward compensation. By utilizing the inherent potentiometer, this method ensures the preservation of hardware integrity and enables real-time angle feedback. A model fit of 96.94% was achieved by establishing a second-order discrete-time model using MATLAB's System Identification Toolbox. Particle Swarm Optimization (PSO) was employed to optimize PID improvements offline by minimizing the Integral of Squared Error (ISE). In both experimental and simulated environments, the controller's effectiveness was assessed using 2 rad/s sine wave inputs and a 10° step. The PSO-PID with feedforward controller achieved optimal results, achieving an RMSE of 0.5313° and an MAE of 0.1630° in simulations, as well as an MAE of 0.8497° in hardware step response. The requirement for gain scaling in embedded systems was underscored by the instability of the standalone PSO-PID controller. This method offers a pragmatic, scalable solution for applications such as assistive robotics, prosthetic joints, and surgical instruments. In order to achieve sub-degree precision in safety-critical environments, future endeavors will entail the implementation of adaptive gain tuning and enhanced resolution sensing.