Self-balancing mobile robots represent an important area of modern robotics, as they offer high maneuverability, compact size, and the ability to operate in confined spaces. Such systems are widely used in service robotics, transport systems, educational platforms, and autonomous mobile devices. The main challenge in the development of such robots lies in ensuring the stability of a dynamic system equivalent to an inverted pendulum, which is inherently unstable. This paper considers the development and study of a stabilization system for a two-wheeled self-balancing robot under changing external conditions, such as external disturbances and variations in platform mass. A control algorithm based on feedback from the tilt angle and angular velocity obtained from the MPU6050 inertial measurement unit is proposed. A complementary filter is used to process sensor data, providing fusion of gyroscope and accelerometer information and improving the accuracy of tilt angle estimation. To analyze the system dynamics, a mathematical model of the balancing robot was developed based on representing the system as an inverted pendulum on a cart. The model was transformed into state-space form, which made it possible to implement and investigate various control algorithms. Two types of controllers were implemented in this study: a classical PID controller and an optimal LQR controller. System simulation was carried out in the MATLAB/Simulink environment. Experimental studies included an analysis of the system response to various types of inputs, including impulse and step disturbances, as well as verification of stability under variations in robot mass. The obtained results showed that both control methods ensure system stability; however, the LQR controller demonstrates higher stabilization accuracy and smaller oscillations. The proposed stabilization algorithm can be used in the development of mobile robotic systems operating under uncertainty and changing external parameters.
Q. Qian, J. Wu, and Z. Wang, "Dynamic Balance Control of Two-Wheeled Self-Balancing Pendulum Robot Based on Adaptive Machine Learning," International Journal of Wavelets, Multiresolution and Information Processing, vol. 18, no. 1, p. 1941002, 2020, [Online]. Available: https://doi.org/10.1142/S0219691319410029.
A. Unluturk and O. Aydogdu, "Machine Learning Based Self-Balancing and Motion Control of the Underactuated Mobile Inverted Pendulum With Variable Load," IEEE Access, vol. 10, pp. 104706-104718, 2022, [Online]. Available: https://doi.org/10.1109/ACCESS.2022.3210540.
J. A. Borja, I. Alvarado, and D. Muñoz De La Peña, "Low Cost Two-Wheels Self-Balancing Robot for Control Education Powered by Stepper Motors," IFAC-PapersOnLine, vol. 53, no. 2, pp. 17518-17523, 2020, [Online]. Available: https://doi.org/10.1016/j.ifacol.2020.12.2660.
M. M. Sayyad, S. Nalawade, J. Palkar, et al., "Structural Analysis of Self-Balancing Robot," International Journal for Research in Applied Science and Engineering Technology, vol. 12, no. 1, 2024, [Online]. Available: https://doi.org/10.22214/ijraset.2024.58066.
Q.-T. Do et al., "Modeling and Optimal Control for Two-Wheeled Self-Balancing Robot," Journal of Fuzzy Systems and Control, vol. 2, no. 1, pp. 22-28, 2024, [Online]. Available: https://doi.org/10.59247/jfsc.v2i1.162.
V. T. Nguyen et al., "Adaptive Nonlinear PD Controller of Two-Wheeled Self-Balancing Robot with External Force," Computers, Materials and Continua, vol. 81, no. 2, pp. 2337-2356, 2024, [Online]. Available: https://doi.org/10.32604/cmc.2024.055412.
L. Guo, S. A. A. Rizvi, and Z. Lin, "Optimal Control of a Two-Wheeled Self-Balancing Robot by Reinforcement Learning," International Journal of Robust and Nonlinear Control, vol. 31, no. 6, pp. 1885-1904, 2020, [Online]. Available: https://doi.org/10.1002/rnc.5058.
Sh. Sultonov, J. Gulyamov, V. Bubnov, Sh. Shukurova, and N. Uralov, "Reliability of the Automatic Electric Heating System for Turnouts," in Lecture Notes in Networks and Systems, vol. 1547, Springer, 2025, pp. 11-17.
J. Han, X. Li, and Q. Qin, "Design of Two-Wheeled Self-Balancing Robot Based on Sensor Fusion Algorithm," International Journal of Automation Technology, vol. 8, no. 2, pp. 216-221, 2014, [Online]. Available: https://doi.org/10.20965/ijat.2014.p0216.
I. Jmel, H. Dimassi, S. Hadj-Said, and F. M'Sahli, "Adaptive Observer-Based Sliding Mode Control for a Two-Wheeled Self-Balancing Robot under Terrain Inclination and Disturbances," Mathematical Problems in Engineering, vol. 2021, no. 1, p. 8853441, 2021, [Online]. Available: https://doi.org/10.1155/2021/8853441.
E. Nordlund, "Railway Turnout Heating Control and Fault Detection in Inductive Heating Systems," Master's thesis, Luleå University of Technology, Sweden, 2023.
R. B. Lakshmi, S. M. Bashir, and G. S. J. Daniel, "Design, Simulation and Optimal Control of Two-Wheel Self-Balancing Robot Using LQR and PID," Tuijin Jishu/Journal of Propulsion Technology, vol. 45, no. 3, 2024.
Y. Olmez, G. Ozmen Koca, and Z. H. Akpolat, "Clonal Selection Algorithm Based Control for Two-Wheeled Self-Balancing Mobile Robot," Simulation Modelling Practice and Theory, vol. 118, p. 102552, 2022, [Online]. Available: https://doi.org/10.1016/j.simpat.2022.102552.
V. P. Bubnov, A. D. Khomonenko, and S. A. Sergeev, "Recursive Method for Generating the Coefficient Matrix of the System of Homogeneous Differential Equations Describing Nonstationary System Maintenance," in 2015 XVIII International Conference on Soft Computing and Measurements (SCM), St. Petersburg, Russia, May 19-21, 2015, id. 25, [Online]. Available: https://doi.org/10.1109/SCM.2015.7190415.
J. L. Vázquez, *The Porous Medium Equation: Mathematical Theory*. Oxford, UK: Oxford University Press, 2006.
R. A. D. D. Dharmasiri and M. K. Jayananda, "A Study of Two-Wheel Self-Balancing Robot Dynamics for Control Systems Learning," Vidyodaya Journal of Science, vol. 27, no. 2, 2024, [Online]. Available: https://doi.org/10.31357/vjs.v27i02.7834.
M. S. Arani, H. E. Orimi, W.-F. Xie, and H. Hong, "Sliding Mode Control Design of a Two-Wheel Inverted Pendulum Robot: Simulation, Design and Experiments," in F. Janabi-Sharifi and W. Melek (eds.), *Advances in Motion Sensing and Control for Robotic Applications*, Lecture Notes in Mechanical Engineering, pp. 93-107, Springer, Cham, 2019, [Online]. Available: https://doi.org/10.1007/978-3-030-17369-2_7.