Swarm-Based Selection of LQR Weighting Matrices for Stabilization and Trajectory Tracking Inverted Pendulum on Cart
DOI:
https://doi.org/10.59247/jfsc.v4i3.437Keywords:
Inverted Pendulum on a Cart, Linear Quadratic Regulator, MATLAB/Simulink, Particle Swarm Optimisation, Trajectory Tracking, Weighting-Matrix TuningAbstract
This study presents a particle-swarm-optimisation (PSO) approach for selecting the weighting matrices of a discrete Linear Quadratic Regulator (LQR) for stabilisation and cart-position trajectory tracking of an inverted pendulum on a cart. The PSO search minimises the sum of squared cart-position tracking errors (SSE) obtained from nonlinear closed-loop simulation; SSE is the sole optimisation objective. Pendulum-angle deviation, control voltage, settling time, and overshoot are not included in the PSO fitness function. They are reported as post-optimisation performance indicators to assess whether a controller with low SSE also provides an acceptable transient response and actuator demand. The nonlinear cart–pendulum model is linearised about the upright equilibrium for LQR gain synthesis, while the candidate controllers are evaluated using the nonlinear MATLAB/Simulink plant. The resulting controller is tested for upright regulation, sinusoidal tracking, staircase tracking, and weight sensitivity. The simulations show the expected trade-off: increasing the cart-position weight can reduce SSE and shorten the cart transient, whereas increasing the input weight reduces the required voltage but degrades tracking speed. The work provides a transparent SSE-based PSO-LQR workflow for nonlinear simulation of the cart–pendulum system; it does not claim experimental validation or hardware feasibility.
References
D.-P. Hoang et al., “A Survey of Experimental LQR for Cart and Pole,” Journal of Fuzzy Systems and Control, vol. 2, no. 2, pp. 97–103, 2024, https://doi.org/10.59247/jfsc.v2i2.211.
L. B. Prasad, B. Tyagi, and H. O. Gupta, “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, vol. 11, no. 6, pp. 661–670, 2014, https://doi.org/10.1007/s11633-014-0818-1.
V. Radisavljevic-Gajic, “Linear–quadratic optimal steady state controllers for engineering students and practicing engineers,” International Journal of Mechanical Engineering Education, vol. 49, no. 4, pp. 316–358, 2021, https://doi.org/10.1177/0306419019876109.
E. Vinodh Kumar and J. Jerome, “Robust LQR controller design for stabilizing and trajectory tracking of inverted pendulum,” Procedia Engineering, vol. 64, pp. 169–178, 2013, https://doi.org/10.1016/j.proeng.2013.09.088.
J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of ICNN’95 - International Conference on Neural Networks, Perth, Australia: IEEE, 2013, pp. 1942–1948, https://doi.org/10.1109/ICNN.1995.488968.
Y. Shi and R. Eberhart, “A modified particle swarm optimizer,” in 1998 IEEE International Conference on Evolutionary Computation Proceedings. IEEE World Congress on Computational Intelligence (Cat. No.98TH8360), Anchorage, AK, USA: IEEE, 1998, pp. 69–73, https://doi.org/10.1109/ICEC.1998.699146.
S. Howimanporn, S. Thanok, S. Chookaew, and W. Sootkaneung, “Design and implementation of PSO based LQR control for inverted pendulum through PLC,” in 2016 IEEE/SICE International Symposium on System Integration (SII), Sapporo, Japan: IEEE, pp. 664–669, 2026, 2016, https://doi.org/10.1109/SII.2016.7844075.
J.-J. Wang, “Simulation studies of inverted pendulum based on PID controllers,” Simulation Modelling Practice and Theory, vol. 19, no. 1, pp. 440–449, 2011, https://doi.org/10.1016/j.simpat.2010.08.003.
A. Kharola, P. Patil, S. Raiwani, and D. Rajput, “A comparison study for control and stabilisation of inverted pendulum on inclined surface (IPIS) using PID and fuzzy controllers,” Perspectives in Science, vol. 8, pp. 187–190, 2016, https://doi.org/10.1016/j.pisc.2016.03.016.
T. Abut, “An Inverted Pendulum System Control with Fuzzy Linear Quadratic Regulator Method: Experimental Validation,” Computers, Materials & Continua, vol. 85, no. 2, pp. 4023–4042, 2025, https://doi.org/10.32604/cmc.2025.066920.
M. Ali and S. Mandal, “Preparation of Papers for IFAC Conferences & Symposia: Kalman Filter Based Control of Inverted Pendulum System,” IFAC-PapersOnLine, vol. 55, no. 1, pp. 58–63, 2022, https://doi.org/10.1016/j.ifacol.2022.04.010.
S. J. Chacko, P. C. Neeraj, and R. J. Abraham, “Optimizing LQR controllers: A comparative study,” Results in Control and Optimization, vol. 14, p. 100387, 2024, https://doi.org/10.1016/j.rico.2024.100387.
Y. Qu, Z. Liu, and L. Cai, “Simultaneous planning and executing (SPAE) control for a fourth-order underactuated inverted pendulum with double-layer asynchronous convergence,” ISA Transactions, vol. 163, pp. 162–171, 2025, https://doi.org/10.1016/j.isatra.2025.05.004.
Q. Zhu, C. Lei, B. Shi, J. Zhang, and J. Wang, “Model-free robust underactuated control of inverted pendulums,” Journal of the Franklin Institute, vol. 362, no. 13, p. 107911, 2025, https://doi.org/10.1016/j.jfranklin.2025.107911.
A. H. Bajodah and U. Ansari, “Rotary Inverted Pendulum Control using Robust Generalized Dynamic Inversion with Adaptive Neural Estimation,” IFAC-PapersOnLine, vol. 56, no. 2, pp. 10570–10575, 2023, https://doi.org/10.1016/j.ifacol.2023.10.675.
Y. E. Bezci et al., “Classical and intelligent methods in model extraction and stabilization of a dual-axis reaction wheel pendulum: A comparative study,” Results in Engineering, vol. 16, p. 100685, 2022, https://doi.org/10.1016/j.rineng.2022.100685.
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Hoang-Linh Le, Dinh-Minh-Hieu Bui, Thanh-Hung Tran, Duc-Quang Tran, Tan-Nhuan Nguyen, Huu-Minh Nguyen, Nhat-Khoa Mai, Ho-Ngoc-Hieu Nguyen, Kim-Lan Doan, Duc-Thinh Le, Nguyen-Dinh-Kha Tran, Hai-Thanh Nguyen, Minh-Tam Pham

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.