Design of Linear Quadratic Regulator (LQR) Based on Genetic Algorithm for Inverted Pendulum

  • Tomas Marada
  • Radomil Matousek
  • Daniel Zuth
Keywords: Inverted pendulum, Linear Quadratic regulator (LQR), Genetic algorithm


One of the crucial problems in the dynamics and automatic control theory is balancing of an inverted
pendulum robot by moving a cart along a horizontal path. This task is often used as a benchmark for di erent
method comparison. In the practical use of the LQR method, the key problem is how to choose weight matrices
Q and R correctly. To obtain satisfying results the experiments should be repeated many times with di erent
parameters of weight matrices. These LQR parameters can be tuned by a Genetic Algorithm (GA) technique
for getting better results. In our paper, the LQR parameters weight matrices Q and R which were tuned using
the Genetic Algorithm. The simulations of the control problem are designed using MATLAB script code and
MATLAB Simulink on an inverted pendulum model. The results show that the Genetic Algorithm is suitable
for tuning the parameters to give an optimal response. The control problem of the inverted pendulum was solved


Messner, B., Tilbury D.: Inverted Pendulum: System Modelling,, [Online; accessed 25-April-2017]

Andrew, K.S.: Standup and Stabilization of the Inverted Pendulum, Massachusetts Institute of Technology (1999)

History of the Segway PT (Personal Transporter),, [Online; accessed 25-April-2017]

Astrom, K.J., Murray, R.: Feedback systems: An Introduction for Scientists and Engineers, V2.10b, Princeton University Press (2009)

Norman, S. N.: Control Systems Engineering, 6th edition, John Wiley & Sons (2011)

Mitchel, M.: An Introduction to Genetic Algorithms, fifth printing, MIT Press, Cambridge, Massachusetts (1999)

MathWorks documentation, Genetic Algorithm, Genetic algorithm solver for mixed-integer or continuousvariable optimization, constrained or unconstrained, (2016), [Online; accessed 15-April-2016]

MathWorks documentation, stepinfo, Rise time, settling time and other step response characteristics, (2016), [Online; accessed 15-April-2016]

Marada, T.: PID Controler Parameters Settings Based on Genetic Algorithm for Inverted Pendulum Purpose Stabilization. Mendel Journal series, In Mendel 2016, vol. 22, pp. 31-38. ISSN: 1803-3814 (2016)

Zuth, D.: Using HIL Simulation and Genetic Algorithms for Controller Tuning. Mendel Journal series, In Mendel 2016, vol. 22, pp. 25-20. ISSN: 1803-3814 (2016)

Sabartov´a, Z., and Popela, P.: ˇ Beam design optimization model with FEM based constraints. 18th International Conference on Soft Computing, MENDEL 2012; Brno; Czech Republic, (2012)

Matousek, R., Lang, S., Minar, P., Pivonka, P.: Evolutionary Design of Polynomial Controller. An international Journal of Science, Engineering and Technology, World Academy of Science Engineering and Technology, Vol. 59, pp. 639-644. ISSN: 2010-376X (2011)

How to Cite
Marada, T., Matousek, R. and Zuth, D. 2017. Design of Linear Quadratic Regulator (LQR) Based on Genetic Algorithm for Inverted Pendulum. MENDEL. 23, 1 (Jun. 2017), 149-156. DOI:
Research articles