PID versus LQR Full-State Feedback Control of a Cart–Inverted Pendulum System: Tuning and Robustness under Parameter Variation
Authors
School of Technical Foundation and Diploma Studies, Universiti Teknikal Malaysia Melaka, Melaka, Malaysia (Malaysia)
Faculty of Electrical Technology and Engineering, Universiti Teknikal Malaysia Melaka, Melaka, Malaysia (Malaysia)
School of Technical Foundation and Diploma Studies, Universiti Teknikal Malaysia Melaka, Melaka, Malaysia (Malaysia)
Faculty of Electrical Technology and Engineering, Universiti Teknikal Malaysia Melaka, Melaka, Malaysia (Malaysia)
Faculty of Electrical Technology and Engineering, Universiti Teknikal Malaysia Melaka, Melaka, Malaysia (Malaysia)
Article Information
DOI: 10.47772/IJRISS.2026.101100256
Subject Category: Engineering & Technology
Volume/Issue: 10/11 | Page No: 3654-3666
Publication Timeline
Submitted: 2026-10-28
Accepted: 2026-11-02
Published: 2026-11-26
Abstract
The cart–inverted pendulum is a standard benchmark for unstable, underactuated dynamics, yet published comparisons of PID and LQR control often stop at a single nominal case. This study compares the two controllers on a linearised cart–pendulum model (cart 2 kg, pendulum 0.1 kg, rod 0.25 m) built in MATLAB/Simulink, and asks how each copes when the plant itself changes. The model was derived from Newton’s laws, confirmed to be controllable and observable, and written in state-space form. PID gains were obtained by auto-tuning and by trial and error over eleven combinations, and LQR weights were explored over ten Q and R settings. Every design had to keep cart velocity below 1 m/s, pendulum angle below 10° and angle settling time under 20 s. The best PID controller (Kp = 100, Ki = 90, Kd = 40) settled in 9.48 s with a 0.92° peak angle, whereas the best LQR controller (Q = diag[100, 1, 10, 1], R = 0.008) settled in 3.69 s with a 0.44° peak. Across nine variations in cart mass, pendulum mass and rod length, LQR settled in 3.8–5.4 s every time, while PID needed 9.2–10.7 s and failed to settle when the cart mass rose to 10 kg. All results come from simulation and should be confirmed on hardware.
Keywords
inverted pendulum, linear quadratic regulator, PID control, full-state feedback, robustness, MATLAB/Simulink
Downloads
References
1. Abdullah, M., Amin, A. A., Iqbal, S., & Mahmood-ul-Hasan, K. (2021). Swing up and stabilization control of rotary inverted pendulum based on energy balance, fuzzy logic, and LQR controllers. Measurement and Control, 54(9–10), 1356–1370. https://doi.org/10.1177/00202940211035406 [Google Scholar] [Crossref]
2. Bekkar, B., & Ferkous, K. (2023). Design of online fuzzy tuning LQR controller applied to rotary single inverted pendulum: Experimental validation. Arabian Journal for Science and Engineering, 48(5), 6957–6972. https://doi.org/10.1007/s13369-022-06921-3 [Google Scholar] [Crossref]
3. Bettayeb, M., Boussalem, C., Mansouri, R., & Al-Saggaf, U. M. (2014). Stabilization of an inverted pendulum-cart system by fractional PI-state feedback. ISA Transactions, 53(2), 508–516. https://doi.org/10.1016/j.isatra.2013.11.014 [Google Scholar] [Crossref]
4. Bhourji, R. S., Mozaffari, S., & Alirezaee, S. (2024). Reinforcement learning DDPG–PPO agent-based control system for rotary inverted pendulum. Arabian Journal for Science and Engineering, 49(2), 1683–1696. https://doi.org/10.1007/s13369-023-07934-2 [Google Scholar] [Crossref]
5. Bilgic, H. H., Sen, M. A., & Kalyoncu, M. (2016). Tuning of LQR controller for an experimental inverted pendulum system based on the bees algorithm. Journal of Vibroengineering, 18(6), 3684–3694. https://doi.org/10.21595/jve.2016.16787 [Google Scholar] [Crossref]
6. Chacko, S. J., & Abraham, R. J. (2023). On LQR controller design for an inverted pendulum stabilization. International Journal of Dynamics and Control, 11(4), 1584–1592. https://doi.org/10.1007/s40435-022-01079-0 [Google Scholar] [Crossref]
7. Chacko, S. J., Neeraj, P. C., & Abraham, R. J. (2024). Optimizing LQR controllers: A comparative study. Results in Control and Optimization, 14, 100387. https://doi.org/10.1016/j.rico.2024.100387 [Google Scholar] [Crossref]
8. Dwivedi, P., Pandey, S., & Junghare, A. (2017). Performance analysis and experimental validation of 2-DOF fractional-order controller for underactuated rotary inverted pendulum. Arabian Journal for Science and Engineering, 42(12), 5121–5145. https://doi.org/10.1007/s13369-017-2618-8 [Google Scholar] [Crossref]
9. El-Bardini, M., & El-Nagar, A. M. (2014). Interval type-2 fuzzy PID controller for uncertain nonlinear inverted pendulum system. ISA Transactions, 53(3), 732–743. https://doi.org/10.1016/j.isatra.2014.02.007 [Google Scholar] [Crossref]
10. Hanwate, S., & Hote, Y. V. (2018). Relative stability analysis of perturbed cart inverted pendulum: An experimental approach. IETE Technical Review, 35(6), 640–655. https://doi.org/10.1080/02564602.2017.1370396 [Google Scholar] [Crossref]
11. Hazem, Z. B., Fotuhi, M. J., & Bingül, Z. (2020). Development of a fuzzy-LQR and fuzzy-LQG stability control for a double link rotary inverted pendulum. Journal of the Franklin Institute, 357(15), 10529–10556. https://doi.org/10.1016/j.jfranklin.2020.08.030 [Google Scholar] [Crossref]
12. Maity, S., & Luecke, G. R. (2019). Stabilization and optimization of design parameters for control of inverted pendulum. Journal of Dynamic Systems, Measurement, and Control, 141(8), 081007. https://doi.org/10.1115/1.4042953 [Google Scholar] [Crossref]
13. Okubanjo, A. A., & Oyetola, O. K. (2019). Dynamic mathematical modeling and control algorithms design of an inverted pendulum system. Turkish Journal of Engineering, 3(1), 14–24. https://doi.org/10.31127/tuje.435028 [Google Scholar] [Crossref]
14. Prasad, L. B., Tyagi, B., & Gupta, H. O. (2014). Optimal control of nonlinear inverted pendulum system using PID controller and LQR: Performance analysis without and with disturbance input. International Journal of Automation and Computing, 11(6), 661–670. https://doi.org/10.1007/s11633-014-0818-1 [Google Scholar] [Crossref]
15. Rani, M., & Kamlu, S. S. (2025). Optimal LQG controller design for inverted pendulum systems using a comprehensive approach. Scientific Reports, 15(1), 4692. https://doi.org/10.1038/s41598-025-85581-3 [Google Scholar] [Crossref]
16. Roose, A. I., Yahya, S., & Al-Rizzo, H. (2017). Fuzzy-logic control of an inverted pendulum on a cart. Computers & Electrical Engineering, 61, 31–47. https://doi.org/10.1016/j.compeleceng.2017.05.016 [Google Scholar] [Crossref]
17. Tang, T. F., Chong, S. H., & Pang, K. K. (2020). Stabilisation of a rotary inverted pendulum system with double-PID and LQR control: Experimental verification. International Journal of Automation and Control, 14(1), 18–33. https://doi.org/10.1504/IJAAC.2020.103799 [Google Scholar] [Crossref]
18. Waszak, M., & Langowski, R. (2020). An automatic self-tuning control system design for an inverted pendulum. IEEE Access, 8, 26726–26738. https://doi.org/10.1109/ACCESS.2020.2971788 [Google Scholar] [Crossref]
19. Zaborniak, D., Patan, K., & Witczak, M. (2024). Design, implementation, and control of a wheel-based inverted pendulum. Electronics, 13(3), 514. https://doi.org/10.3390/electronics13030514 [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- The Impact Of UI/UX Design on User Trust and Task Completion in Civic Tech Platforms
- Solar Cell Photovoltaic Model Shell Sp 75
- Development of an Intelligent Traffic Management System to Address Visibility Obstruction at Urban Intersections: A Case Study of Ibadan Metropolis
- Optimum Placement of Facts Devices on an Interconnected Power Systems Using Particle Swarm Optimisation Technique
- Assessing Construction Transformation and Implication on Future Production Flow System