A New SG Law for Swinging the Furuta Pendulum Up

A New SG Law for Swinging the Furuta Pendulum Up

IFAC [::0[> Copyright © IFAC Nonlinear Control Systems, SI. Petersburg, Russia, 200 1 Pu blications www.eIsevier.comllocate!ifac A NEW SG LAW FOR S...

676KB Sizes 1 Downloads 28 Views

IFAC [::0[>

Copyright © IFAC Nonlinear Control Systems, SI. Petersburg, Russia, 200 1

Pu blications www.eIsevier.comllocate!ifac

A NEW SG LAW FOR SWINGING THE FURUTA PENDULUM UP J .A. Acosta * F. Gordillo * J. Aracil*

* Dept. de Ingenieria de Sistemas y Automatica

Universidad de Sevilla Camino de los Descubrimientos sin. 41092 - Sevilla Spain E-mail:{jaar.gordillo.aracil}@cartuja.us.es Phone: (+34) 954 48 73 60, Fax: (+34) 954 48 73 40 Abstract: In this paper the swing-up problem for the Furuta pendulum is analyzed by comparing the results obtained by the conventional Astrom-Furuta strategy, based on a dimension 2 model, with a new strategy based on a dimension 3 control law using the symmetry of the configuration space of the system. The controller design is based on Fradkov's speed-gradient (SG) method (Andrievskii et al., 1996). A comparative analysis whereby the advantages and effectiveness of the new law for swinging the pendulum up are shown is included. Copyright © 2001IFAC Keywords: Speed Gradient Method. Furuta pendulum. Swing up. Energy-based Design. Non-linear Oscillations. problems. One is swinging the pendulum up from the hanging position to the upright one. To deal with this problem an energy control strategy is usually adopted. When the pendulum is close to the desired upright position an stabilization or balancing strategy is applied. These two problems are quite interesting. The first one, in particular, a truly nonlinear control problem, displays many difficulties. The simplest and best known solution to the swing-up problem and that which is easiest to implement is the one proposed by Astrom and Furuta (Astrom and Furuta, 2000). It is mainly based on neglecting the reaction torques from the pendulum to the arm, so that the energy control of the pendulum can be studied without considering the position and the velocity of the arm. That enables us to greatly simplify the model, which is reduced to a second order one. With this simple model, and with the help of Fradkov's speedgradient method (Andrievskii et al., 1996), the desired energy injection can be easily computed

1. INTRODUCTION

The inverted pendulum is a very simple device that displays very interesting behaviour modes, which have attracted the attention of many control researchers. In this paper, the interest is f~ cused on the rotating type of inverted pendulum. A schematic representation of the system is shown in Fig. 1. As it is displayed in this figure, () denotes the angle of the pendulum with the upright vertical and ip denotes the angle of the rotor arm. The rotating pendulum is also known as the Furuta pendulum, and has been studied by many authors such as Furuta himself and Astrom (Wiklund et al., 1993), and others (Bloch et al., 1999). The inverted pendulum gives rise to many interesting control problems. It is a nonlinear underactuated mechanical system that is unstable at the desired position. Furthermore, the actuator limitations produce very complex and interesting behaviours that deserve careful analysis. As a matter of fact, it shows two different and very interesting control

795

2. SPEED PSEUDOGRADIENT ALGORITHM First the results for the Speed Pseudogradient Algorithm proposed in (Fradkov and Pogromsky, 1998; Fradkov et al., 1995) are reviewed. This is a finite form of the Speed Gradient Algorithm. Consider the time-invariant, affine-in-control system:

x = !(x) + g(x)u

(1)

Y = hex)

(2)

where x(t) E Rn is the state vector, yet) E RI is the output and u(t) E Rm is the input. Also consider the control objective yet) ~ 0 when t ~ 00; this control objective can be written as an objective function, Q(x)

Fig. 1. Furuta pendulum.

1 = 2lh(xW

(3)

For this objective function the Speed Pseudogradient Algorithm in finite form can be written as follows: and a very successful control law for the swingup problem is obtained. However, it is based on simplifying assumptions, as mentioned above. In this paper a new control strategy is proposed that does not neglect the reaction torques from the pendulum to the arm, and therefore considers the velocity of the arm. Thus, an objective function for Fradkov's speed-gradient method which includes not only the energy, but also the arm momentum, is proposed. With this objective function, Fradkov's method leads to a control law which prevents some of the problems found with the Astrom and Furuta one. IT the reaction torques from the pendulum to the arm can not be neglected, for example, due to the mass of the pendulum or to the low friction on the arm, the new law solves the swing-up problem for cases where Astrom and Furuta's fails. Furthermore, the arm is also controlled during the swing-up process. Concrete examples are given below.

u

= -)..(Lgh(x)fh(x)

(4)

Stability properties of the algorithm (4) are described by Theorem 2.21 proposed in (Fradkov and Pogromsky, 1998), reproduced in Appendix A. In essence, if the objective function is closed and bounded and Q(x) :::; 0, the goal will be achieved. Some examples can be seen in (Fradkov, 1996), (Fradkov and Pogromsky, 1998), (Fradkov et al., 1995) and (Konjukhov et al., 1996).

3. SWING-UP STRATEGIES The swing-up problem consists of swinging the pendulum to the upright position. This can be accomplished driving the energy towards the energy of the upright position. Two strategies for swinging the pendulum up are presented; both are based in the SG method described. First, the law presented in (Astrom and Furuta, 2000) by Astrom y Furuta, is recalled. This law is based on a dimension 2 model, which is an approximation to model (B.2-B.5) (see Appendix A) . Then, a dimension 4 model is used and a new law that takes into account the velocity of the arm is proposed. However, in practice, variable


The paper is organized as follows. First a Section is devoted to recall Fradkov's speed-gradient method, with emphasis on the pseudogradient method and the application to Hamiltonian systems. Then in Section 3, the method is applied to a Hamiltonian formulation of the rotating inverted pendulum with a dimension 2 model and with a dimension 4 model. For the latter, an objective function with two terms -the energy and the arm momentum- is proposed, while in the former the objective function depends only on the energy. This leads to two control laws that have been checked on a concrete experimental pendulum, where the friction effects are compensated with a LuGre friction model (de Wit et al., 1995). In Section 4 some conclusions are given.

3.1 Law obtained with a dimension 2 model (Astrom and Furuta) The control law proposed in (Astrom and Furuta, 2000; Wiklund et al., 1993) can be derived

796

by the SO method when only the pendulum is considered, and the arm is neglected. Then the dimension 2 model of the pendulum is the one taken into account. The problem is to approach the pendulum to the upright position despite the position of the arm. It should be noted that neglecting the arm is equivalent to neglecting the reaction torque from the pendulum to the arm (this reaction is actually diminished by the friction of the motor) . Then, the Hamilton equations (12) on the single pendulum become

1 [-kl 0cos q ]

? = [ mglJppsin q +

.] [P

20

~

~

~

,-..

1

1)

-

• • i~·05 ~

!; ~

-20

• ••

-to

f ..

j

ii._. - 30

20

-<.,

~ -20

-

..

• •• 20

Ant;1Iaol~(rK)

0.0<

~

,.

(5)

TIIM(seg )

~

0.02

I • "

20

1-<··' -<0< -<.06



10 TnIII (Mg)

"

20

Fig. 2. Swinging up the pendulum with a law based on a dimension 2 model. ). = 0.1. Experimental framework.

{x E Rn : Q(x) ~ Qo}. As Q(x) is conservative when u = 0, L,h(x) = 0 and assumption A2 is valid. Assumption A3 is also valid, because any connected subset between sets of D, = no fo is compact where fo = {q,p : p = O} U{q,p : q = k1,k = ±1,±2, ... }. The last assumption A4 is not fulfilled. Matrix Lgh(x)T = ; p pcosq, has a rank I = 0 :j: 1 for Do = {p = O} U{q = k 1,k = ±1, ±2, ... }. As assumption A4 is violated for the set Do , according to Remark 2 of Theorem 1, Q -+ 0 for almost all initial conditions from no and the pendulum will tend to the homoclinic orbit lip = O.

n

(7)

3.2 Law obtained with a dimension -4 model In order to take into account the arm velocity in the derivation of the control law, the dimension 4 model (B.2-B.5) is adopted_ The system affine control is

li;)p cos q

p

=-)'kl(lip -li;)qcosq

OOJJ

• .05

In order to apply the SO method consider the objective function Q = !(li p _11.;)2, where 11.; = o is the desired energy of the upright position which is usually assumed to be equal to zero. Clearly, if the SO method is applied, the control law is given by

u = -). ~l (li p

i

"0 •

~ d petldl..Un (rad)

where x = (q,p) and where q = 8 and p is the conjugate momenta for variable q. The parameters are defined in Appendix B. It should be noted that the objective function y is the energy, which can be identified with the Hamiltonian. The origin for the potential energy is the pendulum in the upright position; thus, the total energy of the unforced pendulum is

= 2Jp p2 + mgl(cosq -

0

l -20- 30

(6)

lip

10

~

W~_ 1 5

u

r

1

(8)

where ). is a positive control gain. In Fig. 2 the results of an experiment with law (8) and), = 0.1 are shown. Astrom proposes modifying the control law (8) in order to make it more efficient, e.g. u = sat {X(li p -1i;)} sign (qcosq), with X = )'kI. This variant of (8) is more efficient and also makes Q ~ O. Some other modifications serve as attempts to decrease the arm velocity trying to correct the no-consideration of cj; in the simplified model. In these cases, Q is no longer a Lyapunov function . With control law (8) the pendulum is supposed to approach the origin (8,0) = (0, 0) , where it would be caught by a linear control law that stabilizes it at this point. In the current paper the design of the balancing controller is not considered.

(9)

(1 (11. -11.*)] y = h () x = [(2 (JI2 _ p~)

(10)

where x = (q1,q2,Pl,P2) and (1 ,(2 are arbitrary positive constants. If the objective function is still the square of the divergence of the total system energy Q = Q1 = H(l (11. _11.*)]2, the mechanical system will tend towards the surface 11. = 0 in the space (qI, q2, (h) = (8,0 , cj;). This aim does not guarantee that the system will pass near the origin. If now, the objective function is modified, so Q = Q1 + Q2 with Q2 a positive semidefinite function, the system will tend towards the curve (Q1 = 0, Q2 = 0). If Q2 is chosen correctly, the origin of the state space will belong to this

Let us check the conditions of Theorem 1. Assumption Al is fulfilled because all functions f(x), g(x) and h(x) , in model (5-6) , and their second partial derivatives are bounded in a region no =

797

no = {x E Rn : Q(x) ~ Qo}. Since Q(x) is conservative for 1.1 = 0 then Lfh(x) = 0 and the A2 assumption is valid. Assumption A3 is also valid, because DE = no = no, because fo = {x ERn: det«Lgh(x))TLgh(x))} and

curve. One possibility is to choose both Q1 and Q2 conservative for the unforced system. The Hamiltonian structure of the system model can help to find function Q2' It can be seen that, as the system is symmetrical with respect to angle cp, the conjugate momentum P2 is conservative for 1.1 = O. This fact is obvious (Eq. (B.5)). Thus, it is reasonable to choose Q2 = ~[(2 (])2 - P2))2. Therefore the objective of the SG controller will be to bring the system to this homoclinic orbit and then, with 1.1 = 0, the system will evolve towards the desired position and, once close to it, the control strategy can be commuted to a local stabilizing controller. Thus the objective function is

Q=

nfo

ILgh(xf Lgh(x)1

(,:!"(w5)2

2- v - ' '

,

Q1

Q2

and the output of the system is (10). The SG algorithm (4) yields

where

Ii ·

'0

..

0

~



1-20o!:--'--:-:-----:::-'-----'-:::-'

3.3 Comparison of both swing-up strategies

0

~

1-10

.

In this section, both swing-up strategies are compared using the experimental Furuta pendulum shown in Fig. C.l (see Appendix C). For approaching a Hamiltonian system, a dynamic friction LuGre model is used for the arm of the pendulum. In order to compare both control laws some experiments are included. In these experiments only the swing-up problem is considered. It is assumed that if this problem is adequately solved, i.e. if the control law leads the pendulum to a neighborhood of the desired upper position, commuting to a local balancing law is possible, and then the whole problem can be solved. A first conclusion of our experimentation is that control law (8) based on the dimension 2 model needs to be carefully tuned: the swing up is only accomplished for some particular values of parameter )... We have found that for)" = 0.1 the goal is achieved but it is not for other values of ).. that have been tested. For example, Fig. 4 shows an experiment with ).. = 0.01. It can be seen that the state of the system does not pass close to the origin. Of course, in an actual experiment Vvith hybrid control the local controller would not have the opportunity to work. Moreover, for).. = 0.1, law (8) works well for a large number of initial conditions (see for example Fig. 2) but fails when the initial speeds of the arm and the pendulum are very large . -'

to:----------:::-----:::---::-' o 10 20 JO Ivge 01 pendutum (lad'

0.2

j

.!:

0.1 0

f

w -0.1

" .2

'"

(12)

"X = )...1"(w5.

20 1 !

I

[('212] . [(112 (2] = 0

As in the dimension 2 case, Assumption A4 is not fulfilled. Furthermore, in this case, Remark 2 is not valid. Matrix Lgh(x)T ex [(112,(2]T, has rank 1 < I = 2 for all points in the state space. On the other hand, this assumption can only be valid if m 2: I (number of the inputs 2: number of outputs), and in our case the system is underactuated. Nevertheless, in view of Remark 3 of Theorem 1, Assumption A4 can be weakened by Shiriaev's rank condition (Fradkov et al., 1997). In our case dimS(x) = 1 = 2 \Ix E no, since

~[(1(1l-1l·))2 + ~[(2(P-2 _ p~))2

,2

=

0.'

~. ....

0 0 .06 Conjuge" Ift(lrnefttI at ~

2:

I

i'

E

0

S 0.1

....

0

10

15

20

T_IMg)

Fig. 3. Swinging up the pendulum with a law based on a dimension 4 model. (~)2 = 0.3, )..=1. The effectiveness of this control law depends on a careful selection of constants (1 and (2 (Acosta et al., 2000). However, for any value of (] and (2 the system works well, in the sense that the objective is reached. Fig. 3 shows an experiment with law (11) for a good selection of constants (] and (2, and for the control gain ).. = 1. It should be noted that the control law depends only on the variables [ql, 11, 12), so it can be considered a dimension 3 control problem. Let us now check the conditions of Theorem 1. Assumption Al is fulfilled because all functions f(x), g(x) and h(x), in model (9-10), and their second partial derivatives are bounded in a region

798

r

D<

"r-----".".".:------,

,;. 10

{x E Rn: det«Lgh(x)fLgh(x)) :::; f}

E

t ' i 0

.f

is compact. • A4. The matrix Lgh(x) has rank I for any x E no such that Q(x) f:. O.

-5

>-10

1-15

=no n

~"""-:.:--~

:---':-, 0

AngMof"'~ltad)

O.5 r - - - - - - - - - ,

O.15 r - - --

Thus in system (1-2), (4) for any initial conditions x(O) E no the goal (3) is achieved.

---,

01

-().20'------:---:':1O:----:':-'-----=20 Tome(seg)

10

15

Remark 2. If assumption A4 is violated on some set Do then it can be shown that all trajectories of the closed loop system tend to a maximal invariant subset Mo of Do. Particularly if set Mo is countable and consists of isolated points such that at all these points the matrix V' z f has a least one eigenvalue with the positive real part, then the statement of Theorem 1 remains true for almost all initial conditions from no.

20

TIrIW(..g)

Fig. 4. Pathological behaviour with a dimension 2 swing-up law. ). = 0.01. 4. CONCLUSIONS A new control law for swinging the Furuta pendulum up based on Fradkov's speed-gradient method has been derived, using the symmetry of the configuration space of the system. The design is based on a dimension 4 model, but it gives rise to a dimension three control law. Experiments illustrate the effectiveness of the new control law. The well-known control law based on a dimension 2 model might not be a good approach for the Furuta pendulum. The reason is that this control law is not able to achieve the control objective for all values of the control gain and to swing the pendulum up for some initial conditions.

Remark 3. Condition A4 severely restricts the class of controlled plant models. Indeed, it can be fulfilled only if m ~ I, i.e. if the number of controlling inputs is not less than the number of controlled outputs. It was shown by A. Shiriaev (Fradkov et al., 1997) that A4 can be weakened at the cost of strengthening A2. namely, let A2 be complemented by the conservativity-like condition A2'. h(x)T Lfh(x) :::; 0 for all x E no and h(x)T Lfh(x) = 0 if x E no and Lgh(x) = O. Let A4 be replaced by Shiriaev's rank condition dimS(x)

~

1 '
no

where Sex) = span{L,(Lgh(x)), k = 0,1, ...}; then the theorem statement remains true.

5. ACKNOWLEDGEMENT This work has been supported by the Spanish Ministry of Science and Technology under grants 1FD97-0783 and DPI2000-1218-C04-01.

Appendix B. HAMILTONIAN MECHANICAL MODEL. DIMENSION 4 Consider the pendulum shown in Fig. 1. The arm shaft (corresponding to angle
Appendix A. SPEED PSEUDO GRADIENT ALGORITHM For the sake of completeness, the Thwrem 2.21 of (Fradkov and Pogromsky, 1998) is reproduced here.

=

Theorem 1. Consider the system (1-2), (4) under the following assumptions: • AI. Functions f, g, h are smooth and bounded together with their second partial derivatives in the region no = {x E Rn : Q(x) :::; Qo} for some Qo. • A2. For all x E no, it follows that h(x)T Lfh(x) :::; O. • A3. There exists a positive number f > 0 such that any connected subset of the set

,=

~l' The new coordinates [ql, qz] = [B,
The Hamiltonian that represents the energy of the unforced system is

799

Ho

= 2~ {(f3 + sinZ ql )PI + ~ - 2aplp.~ cos ql }

+Jw5(COSql -1) (B.1) with ~ = J[f3 +sin z ql -a z cos 2 ql] . The Hamiltonian is given by the energy of the unforced system plus the interconnection Hamiltonian (1£ = Ho + Hz(q2))· In our case H 2(qz ) = qz:F = qzJ, w5u . Thus, the Hamilton equations are

(b .

= ~ [CB+ sin2 qdPl -

q2

= ~1 (pz -

lh

= 2~2 J . [(1 -

P2

2~

aPz cosqI]

apl cos ql]

(B.2)

(B.3)

[(13 + sin 2 qdPI + p~ - 2apIPz COSql] .

+ a Z ) sin 2ql] + J w5 sin ql [pi sin 2ql

-

+ 2apIPz sin ql]

= J,w5 u

(B.4) (B .5)

Appendix C. EXPERIMElS"TAL SYSTEM. The Furuta pendulum shown in Fig. C.1 has been used as an experimental framework. Concrete val-

Fig. C.l. Experimental Furuta pendulum system. ues of the parameters used in the experimental framework are: mass of the pendulum = 0.0679 (Kg), length of the pendulum = 0.28 (m) , radius of the arm = 0.235 (m), mass of the arm = 0.2869 (Kg), constant torque = 7.4, moment of inertia of the motor = 0.OO12(Kg· mZ) . Appendix D. REFERENCES Acosta, J . A., J. Aracil and F. Gordillo (2000). Comparative study of differents control strategies for the Furuta pendulum. In: Jornadas de Automatica. Sevilla (Spain) . (In Spanish).

800

Andrievskii, P., P. Guzenko and A. 1. Fradkov (1996). Control of nonlinear vibrations of mechanical systems via the method of velocity gradient. A utomation and Remote Control 57,456-467. Astrom, K. J. and K. Furuta (2000) . Swinging up a pendulum by energy control. Automatica 36 , 287-295. Bloch, A. M., N. E. Leonard and J. E. Marsden (1999) . Stabilization of the pendulum on a rotor arm by the method of controlled lagrangians. In: Proc. of the 1999 IEEE Int. Conf. on Robotics an Automation. de Wit , C. Canudas, H. Olsson, K. J. Astrom and P. Lischinsky (1995) . A new model for control of systems with friction. IEEE Transactions on Automatic Control 40, 419-425. Fradkov, A. 1. (1996) . Swinging control of nonlinear oscillations. Int. J. Control 64, 11891202. Fradkov, A. L. and A. Yu. Pogromsky (1998). Introduction to control of oscillations and chaos. World Scientific. Fradkov, A. L., 1. A. Makarov, A. S. Shiriaev and O. P. Tomchina (1997). Control of oscillations in hamiltonian systems. In: Proc. of the 4th European Control Conference. Fradkov, A. 1., O. P. Tomchina and O. 1. Nagibina (1995). Swinging control of rotating pendulum. In: Proc. of 3rd IEEE Mediterranean Control Conf.. Limasson. pp. 347-35l. Konjukhov, A. P., O. L. Nagibina and O. P. Tomchina (1996) . Energy based double pendulum control in periodic and chaotic mode. In: Third International Conference on Motion an Vibration Control. Chiba. pp. 99-104. Wiklund, M., A. Kristenson and K. J . Astrom (1993). A new strategy for swinging up an inverted pendulum. In: Proc. IFAC 12th World congress. Vol. 9. pp. 151-154.