2Department of Electrical and Electronic Engineering, Balikesir University, Balikesir, 10145, Türkiye
Abstract
This paper presents a tutorial-style approach to synthesizing a mechatronic control system from scratch, with a focus on mathematical modeling, real-world verification, model-based control using the Linear Quadratic Regulator (LQR), and rapid control prototyping. The system’s equations of motion are derived through Lagrangian mechanics and subsequently linearized. Unknown parameters are estimated using optimization techniques. An LQR controller is designed and implemented on the STM32F4 microcontroller and its performance is rigorously tested against disturbances using MATLAB/Simulink. The Reaction Wheel Pendulum serves as the case study, demonstrating the successful implementation of the LQR controller, with the derived model verified through experimentation. A recovery angle of 20 degrees is obtained.