Cascade Control of a 2R Planar Robot for Trajectory Tracking Using an Ensemble MLP-Based Inverse Kinematics
Abstract
This article presents the design and implementation of a cascade control scheme applied to a two degree of freedom (2R) planar robot, focused on trajectory tracking. The system architecture integrates three hierarchical loops: current, speed, and position. The current loop was characterized using the Smith two-point method, while the speed and position loops were tuned using the relay method of Åström and Hägglund, thus enabling the tuning of PI controllers. The actuators are DC motors equipped with incremental encoders for position and speed measurement, along with INA219 sensors for current measurement, programmed through the NUCLEO STM32F746ZG board. In addition, the Raspberry Pi 4 was responsible for supervision, trajectory processing, graphical interface, and neural network execution. Inverse kinematics was solved using an ensemble model of Multilayer Perceptrons (MLP) trained with synthetic data, achieving an RMSE of 0,1046° in θ_1 and 0,0533° in θ_2, outperforming individual models. The motors achieved settling times close to 1 s, overshoots below 3%, and steady-state errors under ±0,12°. The system demonstrated precision in contour tracing, obtained through real-time image processing (e.g., the Windows logo), highlighting the feasibility of integrating cascade control and neural networks into low-cost embedded systems, with applications in education, automation, and robotic prototypes.