Optimal Control for Linear Quadratic Systems Based on MATLAB
Zhang Ping
College of Automation and Electronic Engineering, Qingdao University of Science & Technology, Qingdao, China, 266042
Abstract : In this paper, single-stage inverted pendulum system using LQR optimal control, disturbance by increasing the system itself and the LQR controller, to change the weighting matrix R and Q, comparing simulation results by MATLAB simulation under an experimental environment, have a good control effect.
Key Words: Inverted Pendulum; LQR; Optimal control
0 Introduction
The inverted pendulum system is a nonlinear, strongly coupled, multivariable and naturally unstable system. In the control process, it can effectively reflect problems in control theory such as system stability, controllability, robustness, system convergence speed, follow-up and tracking, and is an ideal model for testing various control theories. The linear quadratic regulator (LQR) problem occupies a very important position in modern control theory. Its advantages are simple control scheme, small overshoot and fast response speed. This method can not only effectively control the single-stage inverted pendulum system, but has also been successfully applied to the control of linear double inverted pendulum [1] and bipedal robot [2] .
This paper focuses on a single-stage inverted pendulum system, completing specific system modeling and MATLAB simulation of LQR control. By increasing the system's own disturbance and changing the weighting matrix R in the LQR controller, the simulation results show good control performance.
1. Modeling a single-stage inverted pendulum
The actual single-stage inverted pendulum system is quite complex. In addition to the nonlinearity of each component, it is also subject to various disturbances. In order to analyze its essence, it is necessary to simplify the actual system [4] . The simplified constraints are as follows:
(1) Consider the pendulum rod as a rigid rod with uniformly distributed mass;
(2) The frictional force of each part is directly proportional to the relative velocity;
(3) The driving force applied to the slider is proportional to the input voltage applied to the power amplifier and is applied to the slider without delay;
(4) There is no slippage between the pulley and the conveyor belt, and the conveyor belt does not extend.
(5) Except for the friction between the slider and the guide rail and the friction of the rocker arm shaft, the effects of other friction and damping are ignored.
The simulation results show that when the weight of the trolley's swing arm angle is selected to a suitable value, as the weight of the trolley's position increases, the overshoot of the trolley displacement system's step response decreases, and the rise time and settling time also increase. However, some oscillations are also introduced.
5.2 Study on the weighting matrix R
From the perspective of prioritizing reducing the energy requirements of the control system, Q is kept constant while R is decreased. At this time, the system feedback gain matrix K obtained by the Riccati equation increases. For example, when R=0.01, the corresponding K=[-175.4699,-46.1765,-10.0000,-20.8841].
The response results after changing the weighting matrix Q are shown in Figure 6, and the control force output curve is shown in Figure 7.
The simulation results show that the settling time and overshoot have decreased, as have the rise time and steady-state error. However, the system stability is very poor, and the timing process is very noisy.
6. Conclusion
This paper presents a mathematical model of an inverted pendulum system and employs the LQR control method in optimal control to locally linearize the system. Simulation experiments demonstrate that this method is feasible and effective for the inverted pendulum system. The influence of the weighting matrices Q and R on the system performance indicators is also analyzed.
References:
[1] Liu Jinheng, Chen Jinrun, Lü Yuqing, et al. Research on optimal control system of first-order linear double inverted pendulum based on LQR [J]. Automation Technology and Application, 2009, 28(5): 11-13.
[2] Huai Chuangfeng, Fang Yuefa. Modeling and control system simulation of a 5-link bipedal robot [J]. Journal of System Simulation, 2008, 20(20): 82-86.
[3] Li Deyi, Du Zi. Artificial Intelligence with Uncertainty [M]. Beijing: National Defense Industry Press, 2005.
[4] Jiang Chunrui. Research on control technology of first-order linear inverted pendulum based on cloud model theory [D]. Harbin Institute of Technology, 2005.
[5] Liu Bao. Modern Control Theory [M]. Beijing: China Machine Press, 2007.
[6] Liu Jinkun. Advanced PID Control and Its MATLAB Simulation [M]. Beijing: Electronic Industry Press, 2003.1.