Cop yrig ht
©
T RE;\DS 11'\ ACTO \I AT IC CO:-;TROL EDCCATlO:-;
IFAC 9t h T rie nnial Wo rld Congress
Budapest. H ungar~ . IYH4
STABILIZATION OF A DOUBLE INVERTED PENDULUM BY ANALOGUE CONTROLLER Feng Zu·ren, Yin Zheng.qi and Chen Hui·tang Department oJ Con trol and InJol7TUltion E"gineenng, Xi'a" j laoto"g Cnil'a sit.)" Xi'"", The People', Republic oJ Chi,,,,
Abs t ract . The research about the c ontrol of an inve r ted pendulum has been carried out for a long t i me. However they failed in using an analogue contr olle r with the structure of reduced or der observer and turned to implement the control system with a digital c omputer . In this paper we for the first time implement the control system with an anal ogue controlle r, both in par tial or de r observer and linear functional observer stru ctur es. The system i s quite stable even under large distu r bance and under conditi ons of arti f icial par amete r var iations of the nract i cal model . It has bee n used f or education in the modern control theory experiment and strongly attracts students ' inter est. Since it i s simpl e and low - c ost , it can be used widely in the mode r n control the ory experiment . Keywo r ds.
Opt i mal control; double pendulum
1 . INTRODUCTI ON
partial order observer.
computer HP- 2100 ; mo r eover the control system is in a two - layer hierachy. A sub ordinate layer of the control c onsists of the cart model referenc e c ontrol , wh i ch forces the car t to behave as a cascade of two i nteg r at ors . There is no doubt that using a digital c omputer causes the cost and the comnlexity of the contr oller t o be ve r y high . Is it nossible to use an anal ogue contro l ler f or th i s aim? This sti ll remai ns a pertinent proble m since , if it can be solved nro perly , then the cost of the controller cou l d be much lower , and the scope of mode r n c ontrol the ory ap pli cation might widen.
The r esearch of stabi l izing an inve r ted pendulum system began many years ago . Sturgen and 10 scutoff (1 q72 ) succeeded in the stabilizati on of a double inve r ted pendulum with a fu1l - order observe r. In their onini on , the partial or der observer could not fi l ter the measu r ement noise sufficiently and be more sensitive to the plant paramete r variations . So , Furuta , Okutani and Sone (1 q78 ) turned to imple menting the control system with a minic omputer . They succeeded in using both partial and l inear functi onal obser vers. In their pa per , they concluded that Sturgen and Loscutoff failed , not only because the i r feedback was inannropriate, but also because the inaccur acy for the small s i gnal and saturation in t he ope r a tional amnlifiers mi ght have caused serious error. Mal etinsky , Senning and Wiede r kehr (1 981) presented a ve r y interesting paper at the 8 th World Congress of IFAC. In their experiment they measured only one angle of the double pendul ums , but they sti ll used a digital
In this naper , the nonli near i ties of the pendulum system are conside r ed to be the main causes which reduce the stabi l ity of the resulting system. In our deSign , the nonlinearities are taken int o account t o a certain degree by : 1 . ch oosing a more s u itabl e quadrat i c crite r i on functi on and 2 . employing the c omnensat or based on nonl inear feed back of state variables .
3443
3444
FengZu-ren, Yin Zheng-qi and Chen Hui-tang
It was proved in this paper that the resulting analogue controller worked satisfactorily, with the structure of partial order observer, or even with a linear functional observer. The pendulum system under control is stable even under a large disturbance or when some parameter variations of the practical model has been made artificially. In this research, the modern control theory is shown to be a very powerful technique to design controllers for complicated practical system. The paper also implies that in the practical application of modern control theory, the high precision of computation and the strict requirement of implementation of the controller might not be necessary. The important things which should be taken into account in the research are careful analysis of the practical system as well as a suitable design for the controller.
and the angular positions 61 and 92 of the pendulums are measured respectively by potentiometer P2 and P3. The three potentiometers give the detected variables y1, y2 and y3 as the system out puts . Obvi ous ly, the upright position y2=y3=0 is an unstable equilibrium point of the pendulum system. The control ob~ective is to design a controller which stabi l izes the system in the upright position based on the detected variables y1, y2 and y3. The pendulum system is a nonlinear as well as an unstable, complicated system. For the purpose of linearization, we assume that the who le motion of the plant during the regulation is in the neighborhood of the equilibrium point. Thus, a sixth-order linear model approximately representing the real system, can be obtained as is shown below: x = Ax
This device strongly attracts students when we use it to demonstrate the application of modern control theory. The students calculate the parameters of controller, using a CAD program package and implementing the analogue control le r to stabilize the real system. This kind of experiment is very useful in helping students master modern control theory and in more confidently applying the theory to complicated control problems.
+
bu
y
(2-1 )
Cx
where x
(r, 91,82-91, r, 91, 9 2-(1)T
y
(y1, y2, y3)T= (r, 91, 82-e1)T A
(A: 1A: 2)
0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 -1.982 .09565 - 9 .550 . 008 17 -. 0036 0 26.871 -13.85 21 . 769 -.1 602 .13135 0 -31.1 9 57.847 - 25 . 27 .35027 -.4 292
2. SYSTEM DESCRIPTI ON AND OBSERVER DESIGN
b
(0, b ) T 2
( 0 ,0, 0 ,6.1 836 , -14. 0'=16 ,1 6.3 6 1 )T The double inverted pendulum in the controlled state is shown in Photo 1, and is schematically depicted in Fig. 1. The pendulum system consists of: (1) a cart movable on a straight monorail, (2) the lower pendulum pinned to the cart using ball bearings so that its motion is smooth and restricted to the vertical plane containing the line of the monorail, along with the upper pendulum connected to the lower one in the similar way that the lower one is connecteq to the cart, and (3) a cart-driving system consisting of a d.c. torque motor, a pully-belt transmission system and a d.c. power amplifier. The position r of the cart from the reference position is measured by potentiometer P1,
C
( I, 0 )
and u is the input voltage to the amplifier. The design of the observer follows the approach of Kudva and Gourishankar (1977). The minimal order observer designed for (2-1) is given by Fz + Gy + hu A
X
(2-2)
Dz + Ey
where, x'" is the estimate of x, F
A22 - L,
D
0, I)T
G
-FL
+
A21
h
E = ( I, - 1 )T
In the present case, t is chosen so that
Stabilization of a Double Inverted Pendulum
the eigenvalues of the matrix Fare ( -10.018, -17.463 ± j11.890 ) In practice, the saturation of each operational amplifier must be avoided, otherwise, the estimation of the state variables and the control law would be damaged. It often occured that one of the elements of the vector z went beyond the limits of the integrator used. If this happens, this element must be reduced by simply transforming (2-2) into an equivalent one using a nonsingular transformation J as is shown below Jz
.
Fz
z A
+
Gy
+
JFJ- 1 , G
(2-3)
= JG , -h = Jh , -DJ 1 D =
After choosing j1, j2 and j3 properly, the saturation in the practical observer implemented according to (2-3), could be avoided and the operating precision of the controller could be ensured. The structure of the observer is shown in Fig. 2. There are several ways to design linearstate feedback laws. In this paper, the optimal linear regulation theory is used. Since (2-1) is completely controllable, it is well known that for infinite-time regulation, the control function u* which minimizes the performance index J2 =
Jr"0
(
x T Qx
diag( 1, 25, 4900, 0, 0, 0.8
°) (3-1 )
hu
where,
F:
The instability problem was encountered during this research. If for example, Q and r are chosen to be: r
Dz + Ey
X
Usually, for some unstable systems such as the pendulum system, it is very difficult to find out the first suitable choice of Q and r. This is so because there is no prescribed way to pick up any information about the direction of modifying Q and r from an unstable resulting system. For this reason some practical designs for unstable plants fail before the first stable control has been found out.
Q
diag(j1,j2,j3)z
3445
+
ru 2 ) d t
(2-4)
is given by the linear state feedback law: u* : K*x
3. DESIGN CONSIDERATIONS The linear model is only an approximate representation of the practical plant in a small region around the equilibrium point. Especially, the nonlinearity of the Coulomb friction cannot be linearized, and these nonlinearities become main causes of instability. If the time-invariant quadratic performance index (2-4) is used, it is verified in practice that not all choices of the costs Q and r, which can lead to stable control for the linear model (2-1), are suitable for the real nonlinear system.
the resulting optimal feedback control based on (2-4) and (3-1) is u K x 1 1 where, K1 : -(1.1057, 25.159, 125.48, 1.3798, 14.652, 14.969) (3-2)
which makes the linear model (2-1) very stable, with the closed-loop poles: (-.763, -1.48, -1.32!j1.64, -26.4!j24.1) But the resulting real system, using u 1 as control, acts in an unstable way. The system analysis shows that one of the main cause of instability is the Coulomb friction moment between the upper and lower pendulums. Owing to the inappropriate choice of Q and r, the control action is, compared with Coulomb friction, extremely weak. Referring to the simulation result shown in Fig. 3, it can be readily seen that during the regulating period, the driving moment to the upper pendulum (see the line (1) in Fig. 3) can not overcome effectively the practical friction moment existing between the upper and the lower pendulums (indicated by dotted lines (2) and (2') in Fig. 3). We tried the new quadratic performance index given by (3-3) 2 J xTtQx + ru )dt (3-3) t =~: The difference between J 2 and J t is onlv the cost matrix for state variables. The cost matrix for x in J is tQ, which is a t time-increasing, semi-positive definite matrix instead of a constant one. From (3-3) it can be easily seen that, qualita-
(
Feng Zu-ren, Yin Zheng-qi and Chen Hui-tang
3446
tively, the optimal control due to J t would allow state deviations to get larger when t is small, and as time goes on, it would tend to reduce the deviations of state very quickly. For this unstable pendulum system, permitting larger scope of pendulum motion during the initial regulating period is necessary for overcoming the Coulomb friction. This will be shown later from simulation results. Practically, a linear time-invariant feedback law is preferable for easy. Under some conditions, the solution of (3-3) is indeed a linear, time-invariant one (refer to Ramani and Atherton (1974)). Let Q and r be the same as (3-1), the resulting optimal control based on (3-3) is: Ut = Ktx , where, Kt
=
-(1.6785, 25.437, 81.513, 1.8432, 13.298, 12.598)
(3-4)
The two simulation curves of the linear model (2-1) under the two optimal controls u 1 and Ut are depicted in Fig. 4. It shows that though the state deviations in curve 2 are larger when t is small, the rate of deviation reduction is much higher. From Fig. 5, it can be seen that the control Ut acting upon the upper pendulum, is strengthened. The real system dynamics under the control Ut is shown in Fig. 6. The resulting system acts in a stable way even though a disturbance is imposed on the pendulum. Comparing the two feedback matrices K1 and Kt' we can conclude qualitatively that the third element k3 in K1 is much bigger than that in Kt; this might be the main cause why K1 is not suitable. Calculation shows that the bigger the third element in Q's diagonal, the bigger the k • Thus we have 3 found the approximate direction of modifying Q's elements when J 2 is used. Consequently, when Q and r in J 2 is chosen as: Q
= diag(1, 50, 250, 0, 0, 0) , r = .1
a more satisfactory result was obtained and is shown in Fig. 7.
4. USING NONLINEAR COMPENSATOR FOR THE SYSTEM Since a d.c. motor is used as the driving machine, and the friction force existing in the cart-rail part is not very small, the behaviour of the pendulum system is affected quite considerably by Coulomb friction force. It is one of the main causes which make the cart vibrate violently. In order to reduce the amolitude of the limit-cycle, we added a nonlinear velocity feedback to the original control: u
=
~
+
k7sign(~4)
A
where, x is the estimate of x • This non4 4 linear compensator works effectively when the system is near the equilibrium point. See Fig. 8.
5. USING THIS DEVICE FOR EDUCATIONAL PURPOSES This experiment was incorporated into control education and good results were obtained. Parallel to the lectures about modern control theory, we asked students to complete the tasks listed below: 1. Formulate the linear model which represents the system with the given parameters of various parts. 2. Analyze the controllability, observability, stability and so on, with the CAD program package on the HP-1000 minicomputer. 3. Design the controller, which consists of the observer and the feedback control law, by using the CAD package. 4. Simulate the control system by digital integration. 5. Implement the controller by means of analogue electric circuits, and carry out the experiment. Items 1-4 above serve as pre-experiment exercises and projects. For item 5, thirty students were divided into six grouos to conduct the experiment, which took about six hours.
6. CONCLUSION In this research, we succeeded to implement minimal order observer or functional
Stabilization of a Double Inverted Pendulum
344 7
observer by using analogue circuit. This makes the controller for such a difficu l t plant very simple and inexnensive. Compared with the resu l ts already published, the performance of this experiment set seems to be better. This device was and is being used as an educational ex p eriment device for the students in the Department of Contro l and Information Engineering. Also we have allowed a factory to reproduce it. We believe that in near future it wi ll be widely adopted in other universities in China.
REFERENC ES Furuta, K., T. Okutani, and H. Sone (1978)·
P hoto 1.
Computer control of a double inverted pendulum. Comput.
& Elect. Engng.,
Photo of the doub l e inverted n endulum.
~,
67-84. Kudva, P., and V. Gourishankar (1977). Optimal observers for the state regulation of linear continuous-time plants. Int. J. Control, 26, 115-120. Maletinsky, W., M. F. Senning, and F. Wiederkehr (1981). Observer based control of a double pendulum. Proc. of the 8th IFAC Triennial World Con-
r-
gress, Kyoto, 3383-3387.
y,
Ramani, N., and D. P. Atherton (1974). Controller
Design of regulators using timemultiplied quadratic performance indices. I EEE Trans. Automat. Contr., AC-19, 65-67.
Fig. 1.
Sturgeon, W. R., and W. V. Loscutoff
S chemat i c d i a g ram of the doub l e inverted nendu l um.
(1972). App li cation of modern control and dynamical observers t o control of a doub l e inverted pendulum. Proceeding of JAC C, 857-865.
Fig. 2.
The structure of nartia l o rder o bserver.
3448
Feng Zu-ren, Yin Zheng-qi and Chen Hui-tang
-%,
A
(2)
line (1): driving moment lines (2), . (2'): Coulomb friction moment
~I
Fig. 3. Simulation result 1 about moment
acting upon the upper pendulum. Fig. 6. Behaviour of the system under disturbance.
... ,
• x, \
,,
,
ti.Z
' ...
....
--
simulation result for J 2 simulation result for J t Fig. 4. Simulation results with different
performance indices. Fig. 7. A more satisfactory behaviour of the system under disturbance •
.. -x, 0.2
/o.ftc
line (1): driving moment lines (2), (2'): Coulomb fricti'on moment Fig. 5. Simu l ation result 2 about moment
acting upon the upper pendulum.
Fig. 8.
Behaviour of the system with nonlinear compensation.