Sie sind auf Seite 1von 23

Nonlinear Control of the Gyroscopic Pendulum

Mark W. Spong
Coordinated Science Laboratory 
University of Illinois at Urbana{Champaign
1308 W. Main Street
Urbana, Ill. 61801
Peter Corke
Division of Manufacturing Science & Technology
CSIRO
Kenmore, Australia, 4069
Rogelio Lozano
Heudiasyc UMR CNRS 6599
Universite de Technologie de Compiegne
BP 20529
60205 Compiegne cedex

I watched it for some minutes, somewhat in fear, but more in wonder. . . . it seemed
massy and heavy, tapering from the edge into a solid and broad structure above. It
was appended to a weighty rod of brass, and the whole hissed as it swung through the
air. - Edgar Allen Poe, \The Pit and the Pendulum" (1843) [8].
Abstract
In this paper we consider the nonlinear control of the Gyroscopic Pendulum, a novel me-
chanical system consisting of a physical pendulum with a rotating mass at the end. We study
the problem of swingup and balance of the pendulum, where the control input is the coupling
torque produced by the angular acceleration of the end-mass. We show that the system is lo-
cally feedback linearizable by a local di eomorphism in state space and nonlinear feedback. We
compare the feedback linearization control with a linear pole-placement control for the problem
of balancing the pendulum about the inverted position. For the swingup problem we compare
two di erent energy based controllers; one based on passivity of the Lagrangian dynamics of
the system and the other based on collocated partial feedback linearization, and passivity of
the resulting zero dynamics. A hybrid/switching control strategy is used to switch between the
swingup and the balance control. Both simulations and experimental results are presented.
 This research was partially supported by the National Science Foundation under grants CMS-9712222 and ECS-
9812591 and by a CNRS/UIUC Collaborative Research Agreement
1 Introduction
The Gyroscopic Pendulum is shown schematically in Figure 1. It is a physical pendulum with a
symmetric mass (disk) attached to the end which is free to spin about an axis parallel to the axis
of rotation of the pendulum. It is thus a two-degree-of-freedom system. The disk is actuated by a
DC-motor and the coupling torque generated by the angular acceleration of the disk can be used to
actively control the system. The control problems for the Gyroscopic Pendulum are reminiscent of
those for the Acrobot [2, 9], but are distinct enough to warrant a separate investigation. Because of
the symmetric mass distribution of the disk, precise analytical statements are more readily obtain-
able for the Gyroscopic Pendulum than for the Acrobot[14] or Pendubot[15]. From a pedagogical
standpoint, the Gyroscopic Pendulum is one of the simplest nonlinear systems that can be used to
illustrate advanced control designs based on recently developed geometric methods.
y

q1
x
lc1

l1 m1, I1
m2, I2

q2
Figure 1: Coordinate conventions for the gyroscopic pendulum.
We consider the problem of swinging the pendulum up and balancing it about the inverted po-
sition. This is accomplished with a supervisory hybrid/switching control strategy which uses a
passivity based nonlinear controller for swingup and a local controller for balance. The nonlinear
swingup controllers are designed so that trajectories are guaranteed to eventually enter the basin
of attraction of the balance controller, which is in turn designed to asymptotically stabilize the
inverted equilibrium state. The supervisor determines when to switch between the swingup and
balance controllers based on an estimate of the basin of attraction of the balance controller. The
switch includes hysteresis to avoid chattering between the two controllers.
For the design of the balance controller we consider two approaches; a linear pole placement design

2
based on the linearized approximation of the nonlinear dynamics about the inverted equilibrium,
and a full state nonlinear feedback linearizing controller. The fact that the dynamics of the gyro-
scopic pendulum are feedback linearizable, the proof of which is a new contribution of the present
paper, is interesting in its own right. Other underactuated nonlinear systems of this type, such as
the Acrobot, Pendubot, and cart-pole system do not satisfy the conditions for feedback linearization
without some simplifying approximations [9, 11].
For the design of the swingup controller we compare two alternatives. The rst is based on the
notion of collocated partial feedback linearization of underactuated systems from [12]. Passivity
from acceleration of the disk to velocity of the pendulum of the resulting zero dynamics is used to
design a Lyapunov function that is positive de nite in the pendulum energy and the disk kinetic
energy. The control then drives the pendulum energy and disk velocity to zero. The second swingup
controller exploits passivity of the complete system dynamics from input torque to the velocity of
the disk and does not use partial feedback linearization. A Lyapunov function, positive de nite in
the total energy of the system, is used to determine a control that also drives the pendulum energy
and velocity of the disk to zero.
In both cases, the proof of convergence relies on LaSalle's Invariance Principle. We compare the
performance of the swingup and balance controllers in both simulation and experiment.

2 Dynamics
An easy way to derive the dynamic equations of the Gyroscopic Pendulum is to notice that the
system may be modelled as a two-degree-of-freedom robot, where the pendulum forms the rst
link and the rotating disk forms the second link. We assume that the center of mass of the disk is
coincident with its axis of rotation and we measure the angle of the pendulum clockwise from the
vertical. Under these assumptions the equations of motion can be taken from any standard text,
for example [16], as

d11 q1 + d12 q2 + (q1 ) = 0 (1)


d21 q1 + d22 q2 =  (2)

where q1 is the pendulum angle, q2 is the disk angle,  is the motor torque input and

d11 = m1 `2c1 + m2 `21 + I1 + I2 (3)


d12 = d21 = d22 = I2 (4)
(q1 ) = ?(m1 `c1 + m2 `1 )g sin(q1 ) = mg
 sin(q1 ) (5)

with the various parameters as shown in Figure 1 and m := m1 `c1 + m2 `1 . The system can be
expressed compactly as

Dq + g(q) = u (6)

3
where
" # " # " # " #
D = dd11 dd12 ; q = q1
q2 ; g(q) = (q1 )
0
; u= 0
 (7)
21 22

The total energy of the system (6) is given by

E = 12 q_T Dq_ + mg
 (cos q1 ? 1): (8)

From (8) and the system equation (6) it follows that

E_ = q_T Dq ? mg
 sin(q1 )q_1 = q_2  (9)

which is just the familiar passivity property of Lagrangian mechanical systems from torque to
velocity [16].
The gyroscopic pendulum with zero control input ( = 0) has an unstable equilibrium at (q1 ; q_1 ; q_2 ) =
(0; 0; 0) with energy E (0; 0; 0) = 0, and a stable equilibrium at (q1 ; q_1 ; q_2 ) = (; 0; 0) with energy
E (; 0; 0) = ?2mg . Note that the disk position q2 can be arbitrary since the energy does not
depend on q2 , i.e. q2 is a cyclic variable. Hence these points are not isolated equilibrium points in
the four dimensional state space of the system.
When q_2 = 0, Equation (8) reduces to

E0 = 21 d11 q_12 + mg
 (cos q1 ? 1) (10)

which de nes the energy of the pendulum alone. A similar calculation as above shows that

E_ 0 = q_1(d11 q1 ? mg
 sin(q1 )) = ?q_1 d12 q2 (11)

from (6), which shows that the gyroscopic pendulum also de nes a passive mapping from (?d12
times) the disk acceleration to pendulum velocity. These two passivity relationships will be used
later in the design of the swingup controllers.
The set de ned by E0 = 0 is the homoclinic orbit of the pendulum in the (q1 ; q_1 ) phase plane,
which is a two-dimensional subspace of the four dimensional state space of the complete system.
We will refer to the set de ned by E0 = 0 as the homoclinic orbit even when referring to the full
order system. Although this is an abuse of terminology we assume that no confusion will arise in
this case.

2.1 Reduced Order Model


Since the disk angular position, q2 , is arbitrary in the inverted equilibrium, it makes sense to ignore
it in the sequel and de ne a reduced order model with states x1 = q1 , x2 = q_1 , and x3 = q_2 . Our
4
goal will thus be to control only the pendulum position, pendulum velocity and disk velocity and
leave the disk position unspeci ed. In terms of the state vector x = (x1 ; x2 ; x3 )T we can write the
system (6) as

x_ 1 = x2 (12)
d22 (x ) ? d12 
x_ 2 = ? detD (13)
1
detD
d
x_ 3 = detD21 d
(x1 ) + detD
11
 (14)

where detD = d11 d22 ? d12 d21 > 0. This can be written as

x_ = f (x) + g(x) (15)

in terms of the vector elds


2 3 2 3
x2 0
d22 (x1 ) 7
f (x) = 64 ? detD 5; g(x) = 64 ? detD
d12 7
5 (16)
d21 (x1 ) d 11
detD detD

We will assume that the pendulum angle is computed modulo 2 so that the system state trajectory
evolves on the manifold S 1  <2 , where S 1 is the unit circle. Therefore, boundedness of x1 = q1
is not an issue and the state will be bounded whenever the velocities x2 and x3 are bounded. We
will use this reduced order model (15) in the remainder of the paper.

3 Feedback Linearization (FL)


In this section we show that the Gyroscopic Pendulum is locally feedback linearizable in a neigh-
borhood of the inverted equilibrium, x = 0, using a nonlinear change of coordinates and nonlinear
feedback. To show feedback linearizability we will follow the approach of [5] and seek an output
function with respect to which the system relative degree equals the dimension of the state space,
in this case, three.
With the system de ned as in (15), we de ne an output equation

y = h(x) = d11 x2 + d12 x3 : (17)

The function h(x) is the rst component of the generalized momentum of the system (6). The
derivative of the output function y satis es

y_ = @h@x(x) x_ = @h@x(x) f (x) + @h@x(x) g(x) = Lf h + Lg h (18)

5
where Lf h and Lg h denote the Lie derivatives of h with respect to f and g, respectively. In local
coordinates, Lf h and Lg h are given as
2 3
h i 6 d x2
Lf h = 0; d11 ; d12 4 ? detD 22 (x ) 7 = ?(x ) = mg
 sin(x1 ) (19)
1 5 1
d21 (x1 )
detD
and
2 3
h i 6 0d 7
Lg h = 0; d11 ; d12 4 ? detD
12
5 = 0: (20)
d 11
detD
Continuing in this fashion it is straightforward to compute the higher derivates of y as
y = L2f h + Lg Lf  = L2f h ; Lg Lf h = 0 (21)
y(3) = L3f h + Lg L2f h ; Lg L2f h 6= 0
where
L2f h = mg
 cos(x1 )x2 (22)
L3f h = ?mg
 sin(x1 )x22 + (mg d22 cos(x ) sin(x )
 )2 detD (23)
1 1

d12 mg
Lg L2f h = ? detD  cos(x1 ) (24)

Thus the system has a well de ned relative degree of three with respect to the output y = d11 x2 +
d12 x3 since Lg L2f h is nonzero in the region ?=2 < q1 < =2.
We can therefore de ne new state variables 1 ; : : : 3 as follows
1 = h(x) = d11 x2 + d12 x3
2 = Lf h(x) = mg
 sin(x1 ) (25)
3 = Lf h(x) = mg
2  cos(x1 )x2
It is easy to see that this state space transformation de nes a local di eomorphism T : S 1  <2 !
S 1  <2 . Indeed, the Jacobian of this transformation at the origin is given by
2 3
@T = 6 mg 0 d 11 d12
4  0 0 75 (26)
@q 0 mg
 0
which clearly has rank 3. The inverse of the di eomorphism T can be explicitly computed as
2 )
x1 = sin?1 ( mg (27)

6
x2 = 3 (28)
 cos(sin?1 ( mg
mg 2
 ))

x3 = d1 1 ? dd11 3
2 (29)
12  cos(sin?1 ( mg
12 mg  ))

In terms of these new state variables, the system becomes


_1 = 2 (30)
_2 = 3 (31)
_3 = L3f h + LgL2f h (32)
We can now de ne the feedback transformation
 = L L21h(x) [u ? L3f h(x)] (33)
g f
so that the system becomes the linear chain of integrators
_1 = 2 (34)
_2 = 3 (35)
_3 = u (36)
The new control variable u can then be taken as
u = ?k1 1 ? k2 2 ? k3 3 (37)
to place the closed loop poles (in the  -coordinates) arbitrarily. The state transformation and hence
the feedback linearization control strategy is valid as long as jx1 j < =2.
We have shown that the gyroscopic pendulum is feedback linearizable in the region jx1 j < =2.
Thus, as long as the pendulum angle, q1 , is above the horizontal, the feedback linearizing control
strategy can balance it. In practice, of course, limitations on the available input torque will reduce
the region in which the pendulum can be stabilized using this control.
We leave it to the reader to verify that the region jx1 j < =2 is the largest possible region in which
the system can be feedback linearizable. This can be shown by computing the involutivity and
rank conditions that are necessary and sucient for feedback linearizability [5]. It turns out that
involutivity of the set fg; adf gg for the third order system holds globally but the rank condition,
i.e.
rank[g; adf g; ad2f g] = 3
fails at jx1 j = =2.
We also remark that the full fourth order system, including the disk angular position, is also locally
feedback linearizable in the above fashion using the output equation
y = d11 q1 + d12 q2
7
We omit the details.

3.1 Approximate Linearization (AL)


For later comparison in simulation and experiment we also present here the linear approximation
about the origin of the nonlinear system (15). Since the Lagrangian equations of motion are linear
apart from the gravity term, linearizing about x1 = 0 gives the controllable linear system

x_ = Ax + B (38)

where
2 3 2 3
0 1 0 0
6 mgd
A = 4 detD
 22
0 0 75 ; B = 64 ?detD
d12 7
5 (39)
?mgd
 21
0 0 d11
detD detD

In the later section on simulation and experimental results we will compare the performance of
the linear approximation and the exact feedback linearization for balance control using parameter
values measured for our laboratory apparatus.

4 Partial Feedback Linearization Based Control (PFLBC)


Since the feedback linearization control derived in the previous section is only valid locally around
the origin, it cannot be used to swing the pendulum up from the vertically downward position,
x1 = . Indeed, the initial angle of the pendulum is restricted to the interval (?=2; +=2), since
the coordinate transformation (25) loses rank at x1 = =2. In this section we derive a swingup
control based on the notion of Collocated Partial Feedback Linearization from [12] and passivity
of the resulting zero dynamics. Interestingly enough, this swingup controller cannot be used to
balance the pendulum, as we shall see, but it can swing the pendulum up to a neighborhood of the
equilibrium starting from (almost) arbitrary initial conditions. This is the reason that our complete
control strategy must switch between the swingup and the balance control.
The partial feedback linearization strategy proceeds, as in the previous section, by choosing an
output function and its derivatives as new state variables. In this case we take the output equation
as

y = h (x) = x3 (40)

which is the velocity of the disk, and compute

y_ = x_ 3 = Lf h + Lg h  (41)

8
where, from (14),
d21 (x )
Lf h = detD (42)
1

d11
Lg h = detD (43)

Since Lg h is nonzero globally, the system has relative degree one with respect to the output y,
resulting in two dimensional zero dynamics which we compute below. Taking as state variables
 = h (x) = x3 (44)
1 = x1 (45)
2 = x2 (46)
and de ning the control input

 = L1h (u ? Lf h) (47)


g
we have, after some algebra,
_ = u (48)
_1 = 2 (49)
_2 = ? d1 (1 ) ? dd12 u (50)
11 11

We note that, with u = 0, the system


_1 = 2 (51)
_2 = ? d1 (1 ) (52)
11

de nes the dynamics of the undamped pendulum. We shall de ne the additional control input u
both to stabilize the disk angular velocity,  , and to render the homoclinic orbit of the pendulum
attractive. To accomplish this we rst set
Z 1
E0 = 12 d11 22 + ()d; (53)
0

the energy of the free pendulum corresponding to u = 0 and compute


E_0 = ?d12 2 u (54)
which is the passivity property of the pendulum with input ?d12 u and output 2 that we computed
previously. We then choose as a Lyapunov function V

V (1; 2 ; ) = 21 ke E02 + 12 kv  2 (55)

9
It is easy to show that V is positive de nite and that

V_ = ?(d12 keE0 2 ? kv )u (56)

If we therefore choose the control input u according to

u = ku (d12 keE0 2 ? kv ) (57)

we have that

V_ = ?ku u2  0 (58)

We use LaSalle's Invariance Principle to compute the invariant set to which all trajectories converge.
For completeness, we recall LaSalle's Theorem from [6].
Theorem [LaSalle]
Let D be any region of the state space S 1  <2 containing the origin and let
 D be a compact
subset of D that is positively invariant with respect to the system considered. Let V : D ! < be
a continuously di erentiable function such that V_ (x)  0 in
. Let E be the set of all points in

where V_ (x) = 0. Let M be the largest invariant set in E . Then every solution starting in

approaches M as t ! 1.
We now claim that with the control law (57) all solutions of the gyroscopic pendulum converge to
the set M := C1 [ C2 where

C1 = f(1 ; 2 ; ) j E0(1 ; 2 ) = 0 and  = 0g: (59)

and

C2 = f(1 ; 2 ; ) j 1 = 0 or  and  = 0g: (60)

Proof:
Let x denote (1 ; 2 ;  )T for convenience and take D = S 1  <2 . Since V (x) de ned by (55) is a
Lyapunov function, we may take
= V ?1 (x(0)).
is positively invariant since V_  0. Setting
V_ identically zero in (58) yields u  0 which implies, from Equation (48), that  is constant and,
from Equation (54), that E0 is constant. Now, from Equation (57), it follows that

E0 2  Constant: (61)

Di erentiating (61), with E0 constant, yields

E0   0: (62)

10
Thus, either E0  0 or (1 )  0 or both. It follows from (57) that, if E0  0 then   0. If
E0 6= 0, then, since (1 )  0, we must have 2  0 and so   0 from u  0. In either case, we
have that   0.
The above discussion shows that that the disk angular velocity,  converges to zero globally. The
pendulum trajectory converges to the set where the energy E0 = 0, which is the homoclinic orbit
or to (1 ; 2 ) = (; 0), in which case the energy satis es E0 (; 0; 0) = ?2mg
 . This completes the
proof of the claim.
Remark: The open loop equilibrium point, (; 1 ; 2 ) = (0; ; 0), is also an equilibrium of the
closed loop system so, if the system starts out in this state, it cannot swing up. Also, LaSalle's
Theorem cannot rule out the possibility that the pendulum comes to rest at the downward position
for initial conditions away from this equilibrium point, since it is in the invariant set. We can
analyze this situation further to discover the behavior of the system near this equilibrium point.
Combining the equations (48,49,50,53,57) yields, after some algebra

_ = ?kv  + ?d12ke mg  2 cos(1 ) + 21 d11 d12 ke 23


 2 + d12 ke mg (63)
_1 = 2 (64)
_3 = dd12 kv  + dd12 kemg  sin( ) ? 1 d2 k 3 ? d212 k mg
 2 + mg
2

11 11 d11 1
2 12 e 2 d11 e  2 cos(1 ) (65)

Computing the Jacobian A of this nonlinear system at (; 1 ; 2 ) = (0; ; 0) yields,


2 3
6 ? k v 0 ? 2 d 12 ke mg
 77
A = 64 0 0 1 5 (66)
d12 kv ? mg

2 d212 k mg
d11 d11 d11 e

Using the parameters from Table 1 gives


2
?kv 0 ?1:2259  10?5 ke 3
A = 64 0 0 1 75 (67)
0:0067kv ?78:5308 1:6386  10?7 ke

We can compute the root locus of eigenvalues of A in terms of kv for given ke . For a range of ke
up to about 4:792  108 the root locus is qualitatively as shown in Figure 2, while for larger values
of ke , the root locus has the shape shown in Figure 3.
We see that, for positive values of kv , the closed loop system always has one stable and two unstable
eigenvalues. Thus the linearization of the closed loop system about (; 1 ; 2 ) = (0; ; 0) will have
a one dimensional stable subspace and a two dimensional unstable subspace. Hence, the nonlinear
system will have a one dimensional stable invariant manifold and a two dimensional unstable invari-
ant manifold tangent to these stable and unstable subspaces, respectively [4]. For initial conditions
on the stable invariant manifold, the trajectory will converge to the lower equilibrium. However,
since this set of initial conditions has measure zero, so that for \almost all" initial conditions the
11
10

kv =1;
6 ke= 5e5
ku=100

Imag Axis
0

−2

−4

−6

−8

−10
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real Axis

Figure 2: Locus of eigenvalues of A in terms of kv for ke  4:792  108


10

8
kv=1;
ke=5e6
6 ku=100

2
Imag Axis

−2

−4

−6

−8

−10
−3 −2 −1 0 1 2 3 4
Real Axis

Figure 3: Locus of eigenvalues of A in terms of kv for ke > 4:792  108

system trajectory will converge to the homoclinic orbit of the pendulum. It also means that con-
vergence to the lower equilibrium con guration will not be seen in practice due to noise, parameter
uncertainty, computational round-o , etc.

5 Passivity Based Control (PBC)


In this section we present an alternative swingup control strategy that is not based on partial
feedback linearization. Instead, the control design in this section exploits the passivity property
of the complete Lagrangian dynamics. Similar control strategies have been used to control other
underactuated mechanical systems in [7] for the cart and pole system and in [3] for the Pendubot.
Although the control design in this section is distinct from that in the previous section, the strategy
is essentially the same, i.e. to guarantee that the disk angular velocity and the total energy both

12
converge to zero.
Therefore, consider again the system (15) and let E represent the total energy as de ned in (8).
De ne the Lyapunov function candidate

V = 12 kE E 2 + 12 kv x23 (68)

where kE and kv are positive constants. Di erentiating V and using (9) we obtain
V_ = kE Ex3  + kv x3x_ 3 (69)
Substituting x_ 3 from the state equations (14) we obtain
kv d11 ) + kv d21 mg
V_ = x3 [ (kE E + det D det D  sin(x1 )] (70)
We therefore propose the control input
 k d ?1  k d 
v
 = kE E + det D 11 v 21
 sin(x1 ) ? kq x3
? det D mg (71)

so that
V_ = ?kq x23  0 (72)
In view of (8), E  ?2mg:
 Therefore, in order to avoid division by zero in (71), kE and kv should
be chosen so that the following inequality holds for some " > 0
kv d11  ?k 2mg
kE E + det  + kv d11  " > 0 (73)
D E det D
From (68) and (72) we conclude that V  V (0). This implies that the energy E remains bounded
and so will x2 and x3 . Thus the closed-loop state x is bounded and we can apply LaSalle Invariance
Principle.
Setting V_  0 it follows from (72) that x3  0 and hence that E is constant from (68). When
x3 = 0 we have from (14)
d11  = ?mg
 sin(x1 )
d21
The control input in (71), when x3 = 0; can also be rewritten as

(E kEk det
d
D + d11 ) = ?mg
d  sin(x1 ) (74)
v 21 21

Subtracting the two equations above it follows that E = 0: From (71) it follows that if  = 0 then
sin(x1 ) = 0 which implies that x1 = 0 or . If on the other hand E = 0 then the system moves
13
in the homoclinic orbit. It follows that the invariant set M is identical to that given by (59)-(60).
The remaining details are omitted.
Remarks: We leave it to the reader to verify as we did for the controller of the previous section
that almost all trajectories, i.e. except those starting on a one-dimensional invariant manifold of
the downward equilibrium con guration, converge to the homoclinic orbit of the pendulum with
zero disk velocity.
We also note that another way to prevent the pendulum from converging to the downward equi-
librium is to further restrict the initial conditions as follows. Recall that the pendulum's energy
is E (; 0; 0) = ?2mg
 at the stable equilibrium point. Thus, if the initial state is constrained such
that
V (0) < 21 kE (2mg
 )2 (75)

then, in view of (68) and given that V  V (0), the energy E will never reach the value ?2mg
 which
characterizes the stable equilibrium point for x3 = 0. The inequality (75) imposes upperbounds on
jx2 j and jx3 j.

6 Hybrid/Switching Controller
The nal controller is a hybrid control to switch between the swingup controller (either PBC or
PFLBC) and the balancing controller (either the FL or AL). The balance controller must only be
activated when the system state is within its basin of attraction. We will de ne the switch in terms
of a weighted norm of the state
s 2  2  2
 = x x1 + x x2 + x x3 (76)
1max 2max 3max

In order to avoid chattering between the two controllers we introduce hysterisis


if  < 1 switch to linear controller
if  > 2 switch to swingup controller
The determination of of xi;max and i will be discussed in the next section using the parameter
values of the actual laboratory hardware.
Since the stable equilibrium con guration of the open loop system is an equilibrium point for both
of the non-linear swingup controllers, it is required that the arm be displaced in order to start the
swingup motion. This displacement could be accomplished by a third `push o ' controller which
is active at this point in state space. In fact we were able to use the balancing controller for this
purpose, since it is unstable at the downward equilibrium point. Taking the angle x1 modulo ,
instead of modulo 2, maps both equilibrium points to x1 = 0 where the linear controller is active.
When the error is suciently large the swingup controller is activated.
14
7 Simulation and Experimental Results
In this section we present the results of Matlab and Simulink simulations and compare them with
experimenal results obtained on a hardware setup in the College of Engineering Control Systems
Laboratory at the University of Illinois at Urbana-Champaign. The model parameters used in the
simulations were the parameters from the actual system. These parameters are shown in Table 1.
Parameter Value Units
l1 0.125 m
lc1 0.063 m
m1 0.020 kg
m2 0.300 kg
I1 47  10?6 kg:m2
I2 32  10?6 kg:m2
d11 4:83  10?3 kg:m2
d12 32  10?6 kg:m2
d21 32  10?6 kg:m2
d22 32  10?6 kg:m2
det D 155  10?9 kg:m2
m 38:7  10?3 kg
Km0 5:5  10?3 Nm=V
Table 1: Estimated parameters for the laboratory apparatus. Km0 is a lumped gain representing
motor torque constant and amplifer transconductance.
The two controllers were simulated using Matlab and Simulink. The initial conditions for the
pendulum were x1 = 0:8 rad and x2 = x3 = 0. The AL and FL balancing controllers were both
designed to place the closed-loop poles at ?4  2j and ?8 rad=s. For the AL controller the state-
feedback gain matrix is ?[0:7828; 0:0866; 65:36  10?6 ] and for the FL controller is [160; 84; 16].
We estimate the basin of attraction for the linear balance controller (AL) case by assuming that
states on its periphery result in saturating motor torque. First consider the case where the velocity
errors are zero, x2 = x3 = 0, but there exists a nite position error. The maximum value of x1 can
then be estimated as
x1 k1 = max
where k1 is the appropriate state feedback gain coecient and the maximum available torque is
max = 10Km0 = 55  10?3 Nm
which leads to an estimate of x1max = 0:07 rad. Similarly consider the case where there is zero
position error, but nite velocity error, that is, x1 = x3 = 0. We can write
x2 k2 = max
15
leading to x2max = 0:6 rad=s. Finally, the case where x1 = x2 = 0 yields the estimate x3max =
838 rad=s. The switching parameters were selected as 1 = 1 and 2 = 2 in order to provide
sucient hysteris to prevent chattering between the two control modes.
Simulation results for the hybrid controller PFBLC+AL are shown in Figures 4 and 5. The phase
portrait, shown in Figure 4, clearly shows the pendulum state approaching the homoclinic orbit
and being captured by the balancing controller close to the origin.
20

15

10

d/dt q1 (rad/s) 5

−5

−10

−15

−20
−1 0 1 2 3 4 5 6 7
q1 (rad)

Figure 4: Simulated phase plane trajectory for PFLBC+AL hybrid controller. Ke = 5  105 ,
Kv = 1:7.

The time evolution of the signals, Figure 5, shows that capture occurs at time t = 22 s and that the
rate of convergence is low after time t = 10 s. The gains Ke = 5  105 , Kv = 1:7, and Ku = 1 were
determined empirically. The large value of Ke is required due to the very small values of inertia in
our apparatus. Figure 6 compares the two energy measures; E is the total energy of the system,
while E0 is the energy of the pendulum alone. Since the PFBLC is based on E0 it is this quantity
which converges to zero in a non-decreasing fashion.
Simulation results for the hybrid controller PBC+AL are shown in Figure 7. The PBC clearly has
a much slower rate of convergence and it was much more dicult to nd an e ective set of gains.
We found it important to set Kv as small as possible while also meeting the constraint (73). Kq
greater than one is also critical to swingup.

7.1 Experimental results


The experimental apparatus is shown in Figure 8. A limitation of this design are the wires connected
to the motor and encoder mounted on the end of the arm. These exert a signi cant a spring-like
disturbance torque on the joint making the results unrepeatable. A new version of the apparatus
is currently under construction and will use slip rings to transfer power and signals to the rotating
arm.
The apparatus has a high-resolution encoder tted to each axis giving (4000 count=rev on q1 and
16
10

q1
5

0
0 5 10 15 20 25
Time
200

100

d/dt q2
0

−100
0 5 10 15 20 25
Time
0.15

0.1

0.05

τ
0

−0.05
0 5 10 15 20 25
Time
0.5

0
Ebar

−0.5

−1
0 5 10 15 20 25
5 Time
x 10
15

10
V

0
0 5 10 15 20 25
Time

Figure 5: Simulated trajectories for PFLBC+AL hybrid controller showing capture by the balance
controller at t = 22 s. Ke = 5  105 , Kv = 1:7.

2000 count=rev on q2 . A D/A converter provides a current demand voltage to an amplifer which
drives the permananent magnet DC motor. The controller was implemented in Simulink using the
WinCon real-time extension with a sample interval of 5 ms. This sample rate is suciently fast
that the continuous time state-feedback gain matrices are used. Angular rates were estimated using
a rst-order di erence with no ltering.
Experimental results for the hybrid PFBLC+AL controller are shown in Figures 9 and 10. The
control was able to reach the inverted position in only 5 swings. The control parameters used,
Ke = 1000, Kv = 0:1, Ku = 1, had to be changed from those used in simulation in order to achieve
swing up. We postulate that this is due to unmodelled frictional dissipation in the real plant. The
switching function shown in Figure 10 indicates which controller is active | the linear controller
is active during both initial pusho and the nal balance phase.
The linear controller, actually a regulator, should bring all states to zero but we can see in the
Figure that q_2 has adopted a steady state value of nearly 200 rad=s. Disturbance forces on the arm
result in q1 6= 0 and at steady-state  = q_1 = 0 the state feedback control law
k1 q1 + k3 q_2 = 0
relates q1 error to disk velocity q_2 . For this particular example q1  0:015 rad, and using the
state-feedback gains from above we would estimate q_2  180 rad=s as observed. We can also
17
0.6

0.4

0.2

E
−0.2

−0.4

−0.6

−0.8
0 5 10 15 20 25
Time

0.2

−0.2

Ebar
−0.4

−0.6

−0.8
0 5 10 15 20 25
Time

Figure 6: Comparison of simulated E and E0 for hybrid controller based on partial feedback
linearization. Ke = 5  105 , Kv = 1:7.

observe in Figure 10 that neither the Lyapunov or energy functions exhibit the expected monotonic
characteristic, and which we postulate is due to model error.
Experimental results for the hybrid PFBLC+FL controller are shown in Figure 10 and are not sig-
ni cantly di erent to the PFBLC+AL case. Qualitative investigations showed they both balancing
controllers exhibited similar robustness to external disturbances, which is ultimately limited by the
nite torque capability of the motor. The FL controller performs di erently in the pusho phase,
taking longer to enter the operating region of the swingup controller, and doing so with a much
higher disk velocity.
The di erences between the two swingup controllers, PFBLC and PBC, is even more pronounced in
experiment than simulation. In fact with PBC we were not able to swing the arm above horizontal.
The very slow convergence of the passivity-based controller manifested in simulation, combined
with energy dissipation due to friction in the real plant, meant that it entered a stable orbit on the
phase plane.

8 Conclusion
This paper has discussed hybrid nonlinear control of a Gyroscopic Pendulum to achieve both
swingup and balancing. We investigate several di erent control strategies based on feedback lin-
earization, partial feedback linearization, and energy/passivity methods. We have shown that the
system is locally feedback linearizable by a local di eomorphism in state space and nonlinear feed-
back. In practice the performance of feedback linearization control is comparable to approximate
linearization and pole-placement control | the performance being limited by nite acuator torque
capability.
For the swingup problem we compared two di erent energy based controllers; one based on pas-
sivity of the Lagrangian dynamics of the system (PBC) and the other based on collocated partial

18
6

q1
2

0
0 20 40 60 80 100 120 140 160 180 200
Time
50

d/dt q2
−50

−100
0 20 40 60 80 100 120 140 160 180 200
Time
0.04

0.02

τ
0

−0.02
0 20 40 60 80 100 120 140 160 180 200
Time
0

−0.5
E

−1
0 20 40 60 80 100 120 140 160 180 200
4 Time
x 10
15

10
V

0
0 20 40 60 80 100 120 140 160 180 200
Time

Figure 7: Simulated trajectories for the PBC+AL hybrid controller. Ke = 4  105 , Kv = 9:742
and Kq = 2.

feedback linearization, and passivity of the resulting zero dynamics (PFBLC). In both simulation
and experiment we have found that the PFBLC is able to achieve swingup whereas PBC cannot in
a practical period of time.
Acknowledgements We would like to thank Dan Block, Manager of the College of Engineering
Control Systems Laboratory at the University of Illinois for valuable assistance in constructing the
gyroscopic pendulum and implementing the control algorithms derived in this paper.

19
Figure 8: Photograph of the experimental apparatus balancing at the unstable equilibrium point.

20

15

10

5
d/dt q1 (rad/s)

−5

−10

−15

−20
−1 0 1 2 3 4 5 6
q1 (rad)

Figure 9: Experimental phase plane trajectory for the hybrid controller PFBLC+AL. The circular
marker shows the location at which the switch to balancing control took place. Ke = 5  105 ,
Kv = 0:1.

20
10

1
q 5

0
0 1 2 3 4 5 6
Time
500
2
d/dt q

−500
0 1 2 3 4 5 6
Time
0.2

0
τ

−0.2
0 1 2 3 4 5 6
Time
2

1
E

−1
0 7 1 2 3 4 5 6
x 10 Time
4

2
V

0
0 1 2 3 4 5 6
Time
2
swingup

0
0 1 2 3 4 5 6
Time

Figure 10: Experimental trajectories for the hybrid controller PFBLC+AL. Ke = 5  105 , Kv =
0:1.

21
10

q1
5

0
0 2 4 6 8 10 12
1000 Time
d/dt q2

500

−500
0 2 4 6 8 10 12
0.2 Time

0
τ

−0.2
0 2 4 6 8 10 12
10 Time

5
E

−5
0x 108 2 4 6 8 10 12
10 Time

5
V

0
0 2 4 6 8 10 12
2 Time
swingup

0
0 2 4 6 8 10 12
Time

Figure 11: Experimental trajectories for the hybrid controller PFBLC+FL. Ke = 5  105 , Kv = 0:1.

22
References
[1] Arai, H. and Tachi, S. \Position Control of a Manipulator with Passive Joints Using Dynamic
Coupling," IEEE Trans. Robotics and Automation, Vol. 7, No. 4, pp. 528{534, Aug. 1991.
[2] Borto , S., and Spong, M.W., \Pseudolinearization of the Acrobot Using Spline Functions,"
IEEE Conf. on Decision and Control, Tucson, AZ, pp. 593-598, Dec. 1992.
[3] I. Fantoni, R. Lozano and M. W. Spong. Passivity based control of the Pendubot. To appear in
the IEEE Transactions on Automatic Control.
[4] Hartman, Ordinary Di erential Equations, Birkhauser, Boston, 2nd Edition, 1982.
[5] Isidori, A., Nonlinear Control Systems, Third Edition, Springer-Verlag, New York, 1995.
[6] Khalil, H.K., Nonlinear Systems, Second Edition, Prentice Hall, Upper Saddle River, NJ, 1996.
[7] Lozano R., I. Fantoni. Passivity based control of the inverted pendulum. Proceedings of the 4th
IFAC NOLCOS'98, Enschede, The Netherlands, July 1998.
[8] Mabbott, Thomas Ollive, ed. The Collected Works of Edgar Allan Poe, The Belknap Press of
Harvard University Press Cambridge, MA, 1969.
[9] Murray, R.M., and Hauser, J., \A Case Study in Approximate Linearization: The Acrobot
Example," Proc. American Control Conference, 1990.
[10] Saito, F., Fukuda, T., and Arai, F., \Swing and Locomotion Control for Two{Link Brachiation
Robot," Proc. 1993 IEEE Int. Conf. on Robotics and Automation, pp. 719-724, Atlanta, GA,
1993.
[11] Spong, M.W., \Modeling and Control of Elastic Joint Manipulators," ASME J. of Dyn. Sys.,
Meas., and Control, December, 1989.
[12] Spong, M.W., \The Control of Underactuated Mechanical Systems", Plenary lecture at the
First International Conference on Mechatronics, Mexico City, January 26-29, 1994.
[13] Spong, M.W., \Swing Up Control of the Acrobot using Partial Feedback Linearization", Proc.
of the SY{ROCO`94, Capri, Italy, pp. 833-838, September, 1994.
[14] Spong, M.W., \Swing Up Control of the Acrobot," IEEE Control Systems Magazine, Feb.,
1995.
[15] Spong, M.W., and Block, D., \The Pendubot: A Mechatronic System for Control Research
and Education," Proc. IEEE CDC, New Orleans, Dec. 1996.
[16] Spong, M.W., and Vidyasagar, M., Robot Dynamics and Control, John Wiley & Sons, Inc.,
New York, 1989.
[17] Wiklund, M., Kristenson, A., and Astrom, K.J., \A New Strategy for Swinging up an Inverted
Pendulum," Proc. IFAC Symposium, Sydney, Australia, 1993.

23

Das könnte Ihnen auch gefallen