LQR CONTROL FOR FIVE-LINK PENDUBOT

Pendubot is a popular inverted pendulum model in control engineering. Usually, two-link pendubot is used due to its simplicity in mechanical structure and its nonlinear characteristic. The challenge of control can be increased by adding more links to system. In this paper, balancing five-link pendubot at TOP position and pulse-tracking this model are tested through simulation. The control algorithm LQR is in survey in this research. The simulation shows that system is stabilized well at working point and it is also control well in tracking a pulse trajectory.


Introduction
Stability for the inverted pendulum is a familiar problem in automatic control. However, most studies only stop at low-order pendulum such as one-order as in [1], two-order as in [5], [6], [7] or three-order as in [8], [9]. However, there are not many studies on inverted pendulums of the four-order or higher. Simon Lam and Edward J. Davison [2] have given the corresponding equations for the n-degree pendubota kind of multi-link inverted pendulum-but have not yet given a corresponding control algorithm. Igor Ananyeski and Nikolay Anokhin [3] have successfully controlled the multi-level system, but the results are only at the three-order and have not shown the results at many different working points.
Based on the basis of the multi-degree inverted pendulum model of [2] and [3], the authors consider the case of a four-link inverted pendulum and study to build an LQR controller for the above system. If the system parameters and mathematical equations are clearly determined, the stable control of the LQR algorithm will be ensured through mathematics from solving Ricatti equations [5]. In addition, unlike PID control which is usually only good for SISO systems, LQR algorithm can control MIMO, SIMO systems ... if the condition of control, which is mentioned in (11), matrix is satisfied. Some authors in [6], [8] have controlled the inverted pendulum systems at lower order of quadratic and triple order. And through the simulations of this paper, the authors show that the five-link pendubot (5L-P) can still be controlled well through the optimal control algorithm.
The next sections of the paper are presented in the following order: Section II presents the mathematical model of the 5L-P and the linearization of the system. Section III presents how to build a general LQR controller and apply that algorithm to a 5L-P. Section IV presents the simulation results of the proposed algorithm for 5L-P. The conclusion is presented in Section V of the paper.

Mechanical Structure
Multi-link pendubot is shown in Fig.1 [9]. Only one control input is the torque affecting the lowest-order link. This signal indirectly controls other highr-order links. The TOP position (Fig. 2) is the most popular working point of this model. According to document [2], we have mathematical equations describing n-link pendubot system with v link: Working with a 5L-P, we have 5 v = . Then, through setting the state variable as and calculating Matlab, we put (1) in the form: x Then, we continue linearizing system around the static working point: At this point, (6) becomes the form: x Ax Bu yx =+   =  (8) where linear matrixes are: xx u

Controller Designing
The optimal controller (LQR) is shown through the following diagram: The target function selected are: Through solving (12) to get solution P, we continue to find the feedback matrix K through the expression: Here, the article uses the Matlab tool to solve the Ricatti equation through the command: ( , , , ) K lqr A B Q R = Q, R are weighing matrixes. The values qi are positive, corresponding to the adjustment of the variables xi. The choice of qi is based on consideration of the stability of the corresponding variable xi. To prioritize which parameter is stable, we increase the weight corresponding to that variable. However, increasing the overall weight will make no priority variable stable.
The weighing matrix R in this case is only a positive real number because the system has only one input variable u. The larger R-matrix corresponds to the higher priority given to stabilizing the control input signal. Reducing R will cause the control signal to oscillate more. However, an excessively increasing R will cause the control signal to change too slowly to respond to the system. System parameters ar chosen as: 12 00000 00000 00000 00000 With matrices A, B as in (18) and (19), and from Mc in (11), we calculate: Thus, there exists a feedback matrix K to control system variables to a given working point.
In the matrix Q, R in (16), we choose:

Simulation Results
We choose the initial values as follows:    We see that the controller with the K in (22) with the weighing matrices Q, R in (16) gives very good control results. All links move to equilibrium position (all links are in the vertical position upwards) with less than 3 seconds. The torque on link 1 is also quickly stable to 0 after less than 3 seconds, ie no control torque is required when the pendulum is in stable equilibrium.

Case 2:
The working point changes corresponding to the change of the set value of the angle 1  in Fig. 16.
In this section, 1  ref is trajectory of link 1 that we expect the angle of link 1 to follow.   ; 4  ; 5  stabilizes quickly every 4s after the placement is changed. However, the value does not follow the set value when the value is too far from zero because when building the LQR controller, we linearize the system around the working point, the built-in K number also ensures good stability around the equilibrium point. Therefore, when the working point is no longer in position, the controller can no longer guarantee the system to function properly. However, through Figures 11 to 16, we realize that the system is still stable if the set value of the angle 1  is not too much 4( ) 8 rad   .

Conclusion
The paper presented how to successfully build an optimal LQR controller for a 5L-P. Simulation results show that: the system responds quickly to the vertical equilibrium position and if the set value of the actuator arm (link 1) is not too far from the vertical position, the system remains stable. By this action, we can control system tracking pulse trajectory.