Studies of a Two-Wheeled Self-Balancing Mobile Robot Based on a Simulation Viewpoint

Authors

Shariman Abdullah

Fakulti Teknologi dan Kejuruteraan Industri dan Pembuatan (FTKIP), Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka (Malaysia)

Fairul Azni Jafar

Fakulti Teknologi dan Kejuruteraan Industri dan Pembuatan (FTKIP), Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka (Malaysia)

Nur Aidawaty Rafan

Fakulti Teknologi dan Kejuruteraan Industri dan Pembuatan (FTKIP), Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka (Malaysia)

Article Information

DOI: 10.47772/IJRISS.2026.100800706

Subject Category: Computer Science

Volume/Issue: 10/8 | Page No: 10472-10483

Publication Timeline

Submitted: 2026-08-27

Accepted: 2026-09-01

Published: 2026-09-16

Abstract

A two-wheeled mobile robot is not able to keep itself upright without the aid of an active controller, because its structure works in much the same way as an inverted pendulum mounted on a wheel base. This paper presents the design of a Proportional-Integral-Derivative (PID) controller for a two-wheeled self-balancing mobile robot, which was designed and tested through co-simulation instead of deriving a full mathematical dynamic model. A three-dimensional model of the robot, made up of a chassis, coaxial wheels and drive motors, and an elevated battery load that produces the moving centroid needed for the robot to behave like an inverted pendulum, was built in Solid Works and imported into MSC Adams as a virtual prototype. The Adams model was then exported as an adams_sub block into Matlab/Simulink, where a discrete PID controller was designed and manually tuned to control the tilt angle of the robot by adjusting the speed of both wheels. Co-simulation was carried out for three cases: self-balancing while at rest, moving forward at a 1-degree tilt angle on a flat platform, and moving across a 10-degree bump. The results show that a proportional-only controller was already enough to balance the robot at rest, while adding the integral and derivative terms during forward motion reduced the steady-state error to a negligible value and kept the overshoot to about 10.8%. The tuned controller (Kp = 40, Ki = 450, Kd = 0.11) also managed to keep the robot from falling while crossing the bump, although the disturbance caused by the bump was not fully rejected. A weakness noticed during forward motion, where the robot drifted sideways because of an uncontrolled yaw angle, was fixed by adding a second PID loop that drives the two wheels at different speeds, although this introduced some cross-coupled noise between the tilt and yaw loops. These results show that co-simulation between Adams and Matlab is an effective alternative to deriving a full mathematical model, reducing the need for a physical prototype and supporting efficient preliminary validation of controllers for two-wheeled self-balancing robots.

Keywords

two-wheeled self-balancing robot, PID controller, co-simulation, Adams-Matlab, inverted pendulum, mobile robot

Downloads

References

1. An, W., & Li, Y. (2013). Simulation and control of a two-wheeled self-balancing robot. 2013 IEEE International Conference on Robotics and Biomimetics (ROBIO), 456–461. [Google Scholar] [Crossref]

2. https://doi.org/10.1109/ROBIO.2013.6739501 [Google Scholar] [Crossref]

3. Ángel, L., Pérez, M. P., Díaz-Quintero, C., & Mendoza, C. (2012). ADAMS/MATLAB co-simulation: Dynamic systems analysis and control tool. Applied Mechanics and Materials, 232, 527–531. https://doi.org/10.4028/www.scientific.net/AMM.232.527 [Google Scholar] [Crossref]

4. Boschetti, G., & Sinico, T. (2024). Designing digital twins of robots using Simscape Multibody. Robotics, 13(4), 62. https://doi.org/10.3390/robotics13040062 [Google Scholar] [Crossref]

5. Brezina, T., Hadas, Z., & Vetiska, J. (2011). Using of co-simulation ADAMS-SIMULINK for development of mechatronic systems. MECHATRONIKA, 2011 14th International Symposium, 59–64. https://doi.org/10.1109/MECHATRON.2011.5961080 [Google Scholar] [Crossref]

6. Chan, R. P. M., Stol, K. A., & Halkyard, C. R. (2013). Review of modelling and control of two-wheeled robots. Annual Reviews in Control, 37(1), 89–103. https://doi.org/10.1016/j.arcontrol.2013.03.004 [Google Scholar] [Crossref]

7. Chen, Z. (2022). Joint simulation of the kinematics of a gecko-like quadrupedal wall-climbing robot based on SIMULINK and ADAMS. Proceedings of SPIE 12261, International Conference on Mechanical Design and Simulation (MDS 2022), 122610R. https://doi.org/10.1117/12.2638737 [Google Scholar] [Crossref]

8. Emara, M. B., Youssef, A. W., Mashaly, M., Kiefer, J., Shihata, L. A., & Azab, E. (2022). Digital twinning for closed-loop control of a three-wheeled omnidirectional mobile robot. Procedia CIRP, 107, 1245–1250. https://doi.org/10.1016/j.procir.2022.05.139 [Google Scholar] [Crossref]

9. Khadr, A. (2024). Multibody dynamics modeling and simulation of a three-wheeled mobile robot using a robotic approach. International Journal of Intelligent Unmanned Systems, 12(3), 270–289. https://doi.org/10.1108/IJIUS-12-2023-0192 [Google Scholar] [Crossref]

10. Liu, Z., Jin, B., Dong, J., Zhai, S., & Tang, X. (2022). Design and control of a hydraulic hexapod robot with a two-stage supply pressure hydraulic system. Machines, 10(5), 305. https://doi.org/10.3390/machines10050305 [Google Scholar] [Crossref]

11. Meng, X., Liu, X., He, Y., Li, J., & Zhang, Y. (2012). The design of VSC with disturbance compensation based on two-wheeled unstable vehicle. 2012 24th Chinese Control and Decision Conference (CCDC), 2211–2215. https://doi.org/10.1109/CCDC.2012.6243035 [Google Scholar] [Crossref]

12. Morais, S., Singh, H., & Acharya, A. (2021). Trajectory and gait planning of a quadruped using Adams and Simulink. 2021 4th Biennial International Conference on Nascent Technologies in Engineering (ICNTE), 1–6. https://doi.org/10.1109/ICNTE51185.2021.9487660 [Google Scholar] [Crossref]

13. Moshayedi, A. J., Li, J., Sina, N., Chen, X., Liao, L., Gheisari, M., & Xie, X. (2022). Simulation and validation of optimized PID controller in AGV (automated guided vehicles) model using PSO and BAS algorithms. Computational Intelligence and Neuroscience, 2022, Article 7799654. https://doi.org/10.1155/2022/7799654 [Google Scholar] [Crossref]

14. Nasir, A. N. K., Ahmad, M. A., Ghazali, R., & Pakheri, N. S. (2011). Performance comparison between fuzzy logic controller (FLC) and PID controller for a highly nonlinear two-wheels balancing robot. Informatics and Computational Intelligence (ICI), 2011 First International Conference on, 176–181. https://doi.org/10.1109/ICI.2011.37 [Google Scholar] [Crossref]

15. Nomura, T., Kitsuka, Y., Suemitsu, H., & Matsuo, T. (2009). Adaptive backstepping control for a two-wheeled autonomous robot. Proceedings of ICCAS-SICE 2009, 4687–4692. [Google Scholar] [Crossref]

16. Qian, H., Chen, L., Qiao, W., Li, P., Yang, S., & Liu, Q. (2011). Controling simulation study on two-wheeled self-balancing electrical motorcycle based on ADAMS and MATLAB. Cross Strait Quad-Regional Radio Science and Wireless Technology Conference (CSQRWC), 2011, 1704–1707. https://doi.org/10.1109/CSQRWC.2011.6037305 [Google Scholar] [Crossref]

17. Ribas-Xirgo, L. (2026). Simulator-based digital twin of a robotics laboratory. Machines, 14(3), 273. https://doi.org/10.3390/machines14030273 [Google Scholar] [Crossref]

18. Ruan, X., Wang, X., Zhu, X., Chen, Z., & Sun, R. (2014). Active disturbance rejection control of single wheel robot. Proceeding of the 11th World Congress on Intelligent Control and Automation (WCICA), 4105–4110. https://doi.org/10.1109/WCICA.2014.7053403 [Google Scholar] [Crossref]

19. Siegwart, R., & Nourbakhsh, I. R. (2004). Introduction to autonomous mobile robots. Cambridge, MA: MIT Press. [Google Scholar] [Crossref]

20. Tang, Y., Liu, J., Liang, J., Yang, T., Xu, K., He, J., & Gao, B. (2021). Co-simulation of two-wheel differential spherical robot based on ADAMS and MATLAB. 2021 IEEE 11th Annual International Conference on CYBER Technology in Automation, Control, and Intelligent Systems (CYBER), 533–538. https://doi.org/10.1109/CYBER53097.2021.9588231 [Google Scholar] [Crossref]

21. Wang, X., Chen, S., Chen, T., & Yang, B. (2016). Study on control design of a two-wheeled self-balancing robot based on ADRC. 2016 35th Chinese Control Conference (CCC), 6227–6232. https://doi.org/10.1109/ChiCC.2016.7554335 [Google Scholar] [Crossref]

22. Wu, J., & Zhang, W. (2011). Design of fuzzy logic controller for two-wheeled self-balancing robot. Strategic Technology (IFOST), 2011 6th International Forum on, 1266–1270. https://doi.org/10.1109/IFOST.2011.6021250 [Google Scholar] [Crossref]

23. Yu, C., Fan, D., & Liu, X. (2025). Collaborative optimization control of gravity center and pose of hexapod robot in complex terrains. Machines, 13(9), 871. https://doi.org/10.3390/machines13090871 [Google Scholar] [Crossref]

24. Zhu, D., Qin, J., Zhang, Y., Zhang, H., & Xia, M. (2010). Research on co-simulation using ADAMS and MATLAB for active vibration isolation system. Intelligent Computation Technology and Automation (ICICTA), 2010 International Conference on, 1126–1129. https://doi.org/10.1109/ICICTA.2010.711 [Google Scholar] [Crossref]

Metrics

Views & Downloads

Similar Articles