0% found this document useful (0 votes)
4 views9 pages

FFWD 2ble Pend

Uploaded by

a01770261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views9 pages

FFWD 2ble Pend

Uploaded by

a01770261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Automatica 43 (2007) 63 – 71

www.elsevier.com/locate/automatica

Brief paper
Swing-up of the double pendulum on a cart by feedforward and feedback
control with experimental validation夡
Knut Graichen ∗ , Michael Treuer, Michael Zeitz
Institut für Systemdynamik, Universität Stuttgart, Pfaffenwaldring 9, 70569 Stuttgart, Germany

Received 29 August 2005; received in revised form 4 April 2006; accepted 10 July 2006
Available online 2 October 2006

Abstract
The swing-up maneuver of the double pendulum on a cart serves to demonstrate a new approach of inversion-based feedforward control
design introduced recently. The concept treats the transition task as a nonlinear two-point boundary value problem of the internal dynamics by
providing free parameters in the desired output trajectory for the cart position. A feedback control is designed with linear methods to stabilize
the swing-up maneuver. The emphasis of the paper is on the experimental realization of the double pendulum swing-up, which reveals the
accuracy of the feedforward/feedback control scheme.
䉷 2006 Elsevier Ltd. All rights reserved.

Keywords: Double pendulum swing-up; Nonlinear feedforward control; Boundary value problem; Input–output normal form; Linear feedback control;
Experiment

1. Introduction A challenging problem is the swing-up of the double pendu-


lum on a cart, which is less accounted for in the literature. This
Pendulums are widely used in nonlinear control education is mainly due to the limited rail length of the cart, in contrast
and research as benchmark examples of underactuated me- e.g. to the rotary double pendulum. In Zhong and Röck (2001)
chanical systems. A vast range of contributions exists for the and Huang and Fu (2003), a passivity-based approach is pro-
stabilization of different types of inverted pendulums, see e.g. posed in combination with partial feedback linearization. The
Mori, Nishihara, and Furuta (1976), Furuta, Kajiwara, and swing-up of the double pendulum on a cart is accomplished in
Kosuge (1980), Anderson and Grantham (1989). Besides the simulation studies, but no experimental results are provided in
stabilization aspect, the swing-up problem—especially of the Zhong and Röck (2001) and Huang and Fu (2003).
classic single pendulum on a cart—has gained increasing atten- Another approach utilizes a combined feedforward/feedback
tion during the recent past, see e.g. Wiklund, Kristenson, and (“two-degree-of-freedom”) control scheme to solve the swing-
Åström (1993), Åström and Furuta (2000). The swing-up of up problem (Rubí, Rubio, & Avello, 2002). The feedforward
various types of double pendulums is also addressed in the control and the nominal state trajectories for the swing-up
literature, like the acrobot and pendubot (Fantoni, Lozano, & are obtained by solving an optimization problem with the
Spong, 2000; Graichen & Zeitz, 2005b; Spong, 1995), or the stationary downward and upward equilibria as boundary con-
rotary double pendulum in Yamakati, Nonaka, and Furuta ditions. The underactuated dynamics of the double pendulum
(1993), Yamakati, Iwashiro, Sugahara, and Furuta (1995). are taken into account by considering all links of the double
pendulum to be active and minimizing the torques exerted at
夡 This paper was not presented at any IAFC meeting. This paper was the unactuated links. Hence, the obtained trajectory is only
recommended for publication in revised form by Associate Editor Bernard an approximate solution for the swing-up problem since the
Brogliato under the direction of Editor H.K. Khalil. torques acting at the free joints are not identically zero. A
∗ Corresponding author. Tel.: +49 711 685 66568; fax: +49 711 685 66371.
E-mail addresses: [email protected] gain-scheduled feedback control is used to stabilize the system
(K. Graichen), [email protected] (M. Treuer), during the swing-up and in the upward position. To the authors
[email protected] (M. Zeitz). knowledge, Rubí et al. (2002) is the only contribution so far
0005-1098/$ - see front matter 䉷 2006 Elsevier Ltd. All rights reserved.
doi:10.1016/j.automatica.2006.07.023
64 K. Graichen et al. / Automatica 43 (2007) 63 – 71

providing experimental results for the swing-up of the double Table 2


pendulum on a cart. Equations of motion of the double pendulum in Fig. 1
In this paper, the inversion-based feedforward control design
recently proposed in Graichen, Hagenmeyer, and Zeitz (2005) ¨ + a2 l1 m2 cos( −  )
(J1 + a12 m1 + l12 m2 ) ¨
1 1 2 2
is applied to the swing-up maneuver of the double pendulum ˙
= (a1 m1 + l1 m2 )g sin(1 ) − a2 l1 m2 sin(1 − 2 )
2
2
on a cart. Thereby, the nonlinear feedforward control is deter- ˙ − d2 (
− d1  ˙ − ˙ ) + (a1 m1 + l1 m2 ) cos( )ÿ
1 1 2 1
mined by solving a two-point boundary value problem (BVP) ¨ + (J2 + a 2 m2 )
a2 l1 m2 cos(1 − 2 ) ¨
1 2 2
for the internal dynamics of the pendulum, i.e. the dynamics ˙
= a2 gm2 sin(2 ) + a2 l1 m2 sin(1 − 2 )
2
1
of the unactuated links, by providing free parameters in the de- ˙ − ˙ ) + a2 m2 cos( )ÿ
+ d2 ( 1 2 2
sired output trajectory to solve the overdetermined BVP. Due to
the high accuracy of the nonlinear feedforward control, the sta-
bilizing feedback part can be designed by linear methods with
the pendulum model linearized along the nominal trajectories. due to the limited rail length and the physical limits of the cart
Experimental results for the swing-up maneuver illustrate the actuator.
potential of the concept.
The paper is outlined as follows: the next section describes 2.1. Equations of motion
the model of the double pendulum experiment and formulates
the transition problem for the swing-up maneuver. Section 3 is The model of the double pendulum can be derived via the
devoted to the feedforward control design and the BVP of the Lagrangian method. The absolute position xi =[x1i , x2i ]T , i=1, 2
internal dynamics with free parameters. The swing-up trajecto- of the center of mass of each link i is given by
ries are computed using a standard MATLAB BVP-solver. Sec-  
tion 4 addresses the experimental validation of the swing-up. y − a1 sin 1
Link 1 : x = 1
,
a1 cos 1
2. Problem statement  
y − l1 sin 1 − a2 sin 2
Link 2 : x2 = .
The double pendulum on a cart (see Fig. 1) consists of two l1 cos 1 + a2 cos 2
links with the length li and the angles i (t), i = 1, 2 to the
The kinetic and potential energies are determined to be
vertical. The mechanical parameters are described in Table 1
together with their corresponding values, which have been mea-
1
2
1
[mi |ẋi |2 + Ji ˙ i ],
2
sured and identified at the experimental device (see Section 4). T = mc ẏ 2 +
Furthermore, the cart movement is subject to the constraints 2 2
i=1

|y|0.7 m, |ẏ|2.2 m/s, |ÿ|20 m/s 2


(1) 
2
V = mi gx i2 .
i=1
2 (t)
m2, l2, J2 The non-conservative friction forces in the links are modeled
by the linear expressions
a2
1 (t)
F1 = −d1 ˙ 1 + d2 (
˙ 2 − ˙ 1 ), ˙ 1 − ˙ 2 ),
F2 = d2 ( (2)
m1, l1, J1
x2 u (t) = y¨ (t)
whereby the parameters di denote the damping coefficient at
a1
the respective link i. The Lagrangian L = T − V yields the
x1 equations of motion
0 y
j jL jL
− = Fi , i = 1, 2, (3)
Fig. 1. Schematic of the double pendulum on a cart with the mechanical jt j˙ i ji
parameters in Table 1.
which are given in Table 2. Furthermore, in the double pendu-
lum experiment, the acceleration ÿ of the cart serves as input
Table 1 u = ÿ to the system. The overall model of the double pendulum
Mechanical parameters of the double pendulum can be formally written as a system of second-order ODEs
Pendulum link Inner Outer
i=1 i=2 ÿ = u, (4)

Length li (m) 0.323 0.480 ¨ = (, ,


 ˙ u), (5)
Distance to center of gravity ai (m) 0.2145 0.223
Mass mi (kg) 0.853 0.510 with  = [1 , 2 ]T ,  = [1 , 2 ]T , and the system order n = 6.
Moment of inertia Ji (N m s2 ) 0.0126 0.0185
Note that the ODEs (5) are independent of the cart displacement
Friction constant di (N m s) 0.005 0.005
y and velocity ẏ.
K. Graichen et al. / Automatica 43 (2007) 63 – 71 65

2.2. Swing-up problem subject to the respective BCs in (6)–(7):

The swing up within a finite time interval t ∈ [0, T ] requires ∗ (0) = [−, −]T , ∗ (T ) = 0, ˙ ∗ |t=0,T = 0.
 (10)
to steer the double pendulum from the initial downward equi-
librium Note that the second time derivative ÿ ∗ (t) of the output tra-
jectory serves as input to (9). Obviously, the BVP (9)–(10) of
y(0) = 0, ẏ(0) = 0, (0) = [−, −]T , ˙
(0) =0 (6) the internal dynamics is overdetermined by eight BCs for two
second-order ODEs.
to the terminal upward equilibrium The basic idea of the approach presented in Graichen et al.
˙ ) = 0. (2005) is to provide a sufficient number of four free parameters
y(T ) = 0, ẏ(T ) = 0, (T ) = 0, (T (7)
in the internal dynamics (9), which are required for its solvabil-
The internal dynamics (5) is weakly asymptotically stable in ity. Thereby, the parameters p = (p1 , . . . , p4 ) are provided in a
the downward equilibrium and unstable in the upward position. setup function Υ (t, p) for the output trajectory y ∗ (t) = Υ (t, p).
The ODEs (4)–(5) together with the boundary conditions
(BCs) (6)–(7) form a nonlinear two-point BVP for the states 3.2. Output trajectory setup with free parameters
˙
y(t), ẏ(t) and (t), (t) that depends on the input trajectory
u(t). Its determination is the main objective of the feedforward The output trajectory y ∗ (t) = Υ (t, p) has to satisfy the four
control design. BCs (6)–(7), which implies that the output trajectory must be at
The swing-up time T is an important parameter and mainly least once differentiable,2 i.e. y ∗ (t) ∈ C1 . The setup function
depends on the constraints (1) and the system dynamics (4)–(5). Υ (t, p) is constructed using the cosine series
If T is chosen too small, the cart may violate the constraints.
  
5  
On the other hand, the swing up is not possible arbitrarily t it
slowly due to the fact that no quasi-stationary connection exists Υ (t, p) = a0 + a1 cos + pi−1 cos , (11)
T T
between the downward and upward equilibria, i.e. they are not i=2
connected by a set of equilibria in between. Hence, the swing-
with the free parameters p = (p1 , . . . , p4 ) as the coefficients
up time T has to be determined appropriately in course of the
for the cosine terms with the highest frequencies. The remain-
feedforward control design.
ing coefficients a0 = −p1 − p3 and a1 = −p2 − p4 follow
from solving the equations stemming from the BCs Υ (0, p)=0
3. Nonlinear feedforward control design and Υ (T , p) = 0. Note that the cosine series directly satisfies
Υ̇ (0, p)= Υ̇ (T , p)=0 due to the sine terms occuring in the first
The inversion-based feedforward control design (Devasia, time derivative Υ̇ (t, p). Other possible choices for the setup
Chen, & Paden, 1996; Graichen et al., 2005) uses the of Υ (t, p) are e.g. polynomials or spline functions (Graichen,
input–output coordinates of the considered system. In case of Treuer, & Zeitz, 2005).
the double pendulum, the system (4)–(5) is already given in
input–output normal form (Isidori, 1995) with the cart position Remark 1. The swing-up time T is directly affected by the
y as the output and the relative degree r = 2. The respective choice of the setup function y ∗ (t) = Υ (t, p). For instance, the
cart ODE (4) represents the input–output dynamics, and the number of times that the output y ∗ (t) passes through zero
ODEs (5) of the angles 1 , 2 form the internal dynamics of (“swinging” of the cart) is limited by the highest frequency
order n − r = 4. of Υ (t, p) in (11). This corresponds to certain regions of T
The feedforward control is obtained by inverting the where solutions for the swing-up problem exist. Alternatively,
input–output dynamics (Devasia et al., 1996; Graichen et al., the swing-up time can also be treated as a free parameter
2005). In view of (4), the feedforward control1 (via time transformation) with the remaining three parameters
p=(p1 , p2 , p3 ) in the setup function Υ (t, p), see Graichen and
u∗ (t) = ÿ ∗ (t) (8)
Zeitz (2005a,b).
is simply the second time derivative of the desired output tra-
jectory y ∗ (t). 3.3. Numerical results

3.1. BVP of the internal dynamics The numerical solution of the BVP (9)–(11) is a standard
task in numerics. A particularly convenient way is to use the
˙ ∗ (t) of the
In order to determine the trajectories ∗ (t) and  MATLAB function bvp4c3 designed for the solution of two-
angles, the internal dynamics (5) can be rewritten by inserting point BVPs with unknown parameters. The initial guesses
the feedforward control (8), i.e.
¨ ∗ = (∗ , 
 ˙ ∗ , ÿ ∗ ) (9)
2 If the feedforward control (8) has to be continuous at the transition
bounds t = 0 and T , two further BCs ÿ(0) = ÿ(T ) = 0 have to be satisfied
by the output trajectory y ∗ (t) ∈ C2 , see e.g. Graichen et al. (2005).
1 The asterisk “∗” signifies the feedforward variables. 3 http://www.mathworks.com/bvp_tutorial
66 K. Graichen et al. / Automatica 43 (2007) 63 – 71

1
2
0.5

∗ [rad]
y∗ [m]

0 0

1
-0.5 -2
0 0.5 1 1.5 2 2.5 0 0.5 1 1.5 2 2.5

2 3
y∗ [m/s]

∗ [rad]
0 1 T = 1.8 s

2
0 T = 2.2 s
-2 T = 2.5 s
-1
0 0.5 1 1.5 2 2.5 0 0.5 1 1.5 2 2.5
time [s]
20
Free parameters p = (p1,..., p4)
u∗ = y∗ [m/s2]

0 p1 [m] p2 [m] p3 [m] p4 [m]


T = 1:8 s: 0.054 -0.226 0.047 0.180
T = 2:2 s -0.106 -0.185 0.092 0.134
-20 T = 2:5 s: -0.346 -0.307 0.136 0.156
0 0.5 1 1.5 2 2.5
time [s]

Fig. 2. Nominal trajectories and parameters p for the swing-up of the double pendulum in three different times T.

for the trajectories ∗ (tk ) and  ˙ ∗ (tk ) are linear interpolations controller. In the context of the two-degree-of-freedom control
between the BCs (10) on a uniform time mesh with 30 points scheme in Fig. 4, the feedforward control FF is supported by a
tk ∈ [0, T ], k = 1, . . . , 30. The initial guess of the free pa- state feedback control FB with an observer  in order to stabi-
rameters p is pi = 0, i = 1, . . . , 4. bvp4c returns the trajec- lize the system  along the nominal trajectories x∗ (t) provided
tories ∗ (t) = [∗1 (t), ∗2 (t)]T and the parameter set p, which by the signal generator ∗ . Thereby, a highly accurate feed-
yields the output trajectory y ∗ (t)=Υ (t, p) and the feedforward forward control FF is necessary in order to minimize the de-
control (8), i.e. u∗ (t) = Ϋ (t, p). mands on the feedback part during the swing-up. The accuracy
Fig. 2 shows the nominal trajectories for the swing-up ma- of the nonlinear feedforward control can be enhanced by an
neuver for different swing-up times T ∈ {1.8, 2.2, 2.5} s. The optimization-based adjustment of the mechanical parameters in
significant influence of the swing-up time T is particularly Table 1 with respect to the open-loop experimental results for
apparent in the cart trajectories y ∗ (t), ẏ ∗ (t), and ÿ ∗ (t). For the nominal feedforward control u∗ (t). The experimental setup
T = 1.8 s, the cart movement y ∗ (t) is very limited, but the and the above mentioned points are addressed in the following
maximum acceleration maxt ÿ ∗ (t) = 19 m/s2 almost hits the re- subsections.
spective constraint in (1). In contrast to this, the swing-up time
T = 2.5 s leads to a different swing-up motion with the large 4.1. Experimental construction of the double pendulum
cart displacement maxt y ∗ (t) = 1 m. A good trade-off between
the maximum amplitudes of the trajectories y ∗ (t), ẏ ∗ (t), ÿ ∗ (t) The swing-up maneuver is experimentally realized with the
with respect to the constraints (1) is obtained for T = 2.2 s, double pendulum in Fig. 5 corresponding to the model parame-
which is therefore chosen as swing-up time for the experimen- ters in Table 1 and the cart constraints (1).4 The incremental an-
tal implementation. gle encoders at the two joints have a resolution of 2/8192 rad
Fig. 3 shows snapshots of the pendulum for the swing-up and transmit their information through optical links in the joints
time T =2.2 s to illustrate its motion. It is interesting to mention to reduce friction. The cart is driven by a toothed belt connected
that both arms of the pendulum are in a hinged position during to a synchronous motor. The control algorithm is implemented
the swing-up (see sequences 2 and 3 in Fig. 3) and only stretch on a 933 MHz computer with real-time Linux and the sampling
close to the upward “inverted” position.

4 The construction of the pendulum was a joint project of the


4. Experimental validation
Max Planck Institute for Dynamics of Complex Technical Systems
(www.mpi-magdeburg.mpg.de) and the company (Hasomed GmbH). The pen-
The experimental realization of the swing-up maneuver re- dulum can also be employed with three links, see e.g. Graichen et al. (2005)
quires a stabilization of the double pendulum by a feedback for the side-stepping of the triple inverted pendulum.
K. Graichen et al. / Automatica 43 (2007) 63 – 71 67

Sequence 1: t ∈ [0,0.28] s Sequence 2: t ∈[0.28,0.55] s Sequence 3: t ∈[0.55,0.83] s Sequence 4: t ∈[0.83,1.1] s

-0.6 -0.3 0 0.3 0.6 -0.6 -0.3 0 0.3 0.6 -0.6 -0.3 0 0.3 0.6 -0.6 -0.3 0 0.3 0.6
y [m] y [m] y [m] y [m]

Sequence 5: t ∈[1.1,1.4] s Sequence 6: t ∈[1.4,1.7] s Sequence 7: t ∈[1.7,1.9] s Sequence 8: t ∈ [1.9,2.2] s

-0.6 -0.3 0 0.3 0.6 -0.6 -0.3 0 0.3 0.6 -0.6 -0.3 0 0.3 0.6 -0.6 -0.3 0 0.3 0.6
y [m] y [m] y [m] y [m]

Fig. 3. Snapshots of the nominal swing-up maneuver for T = 2.2 s (see Fig. 2) depicted in eight sequences with increasing darkness of the snapshots as time
increases during the respective sequence.

y* u*
ΣFF

x* Δu u 
Σ* ΣFB Σ
-

x̂ ^
Σ

Fig. 4. Two-degree-of-freedom control scheme with system , signal gener-


ator ∗ , feedforward control FF , feedback control FB , observer 
, and
measurement vector  = [y, 1 , 2 ]T .

time 1 ms. The nominal trajectories ∗ (t), ˙ ∗ (t),y ∗ (t),ẏ ∗ (t),


and the feedforward control u∗ (t) = ÿ ∗ (t),t ∈ [0, T ] are calcu-
lated offline and stored in look-up tables. Fig. 5. Experimental construction of the double pendulum on a cart (Hasomed
GmbH) with model parameters in Table 1 and the cart constraints (1).
Remark 2. The experimental setup uses an underlying fast PI
control for the velocity ẏ of the cart instead of controlling the
acceleration u = ÿ in the pendulum model (4)–(5). Therefore, 4.2. Adjustment of model parameters
the input u is integrated before it is used as setpoint for the
cascaded velocity controller. This justifies the use of the output The feedforward control u∗ (t) must be highly accurate in
trajectory (11) which leads to discontinuities of the feedforward order to steer the double pendulum along the nominal swing-
control u∗ (t) at the time instants t = 0 and t = T . Due to the up trajectories close to the unstable upward equilibrium. If the
internal integration of u = ÿ, a step at the time instants t = 0 model is too inaccurate, the pendulum drifts away from the
and t = T results in a continuous velocity ẏ which the cascaded nominal trajectories too early, and the feedback control has to
PI controller is able to follow. correct the tracking error. As a result, the deviations of the cart
68 K. Graichen et al. / Automatica 43 (2007) 63 – 71

nominal Table 3
open-loop Adjusted mechanical parameters for the open-loop swing-up of the double
default parameters adjusted parameters
1 1 pendulum in Fig. 6.
0 0
-1 -1 Pendulum link Inner Outer

φ2 [rad]
φ2 [rad]

-2 -2 i=1 i=2
-3 -3
Distance to center of gravity ai (m) 0.186 0.195
-4 -4 Mass mi (kg) 0.881 0.551
-5 -5 Moment of inertia Ji (N m s2 ) 0.0141 0.0177
0 0.5 1 1.5 2 0 0.5 1 1.5 2 Friction constant di (N m s) 0.0034 0.0016
time [s] time [s]
1 1
0 0
-1 -1 than the swing-up time T = 2.2 s, because the dynamics (13)
φ1 [rad]

φ1 [rad]

-2 -2 turn unstable at the end of the swing-up leading to an unstable


-3 -3 numerical integration close to the upward equilibrium. Note
-4 -4
that the solution of the optimization problem (12)–(13) cannot
-5 -5
0 0.5 1 1.5 2 0 0.5 1 1.5 2
be interpreted as identification of the mechanical parameters
(a) time [s] (b) time [s]
, but rather serves to fit the pendulum dynamics(13) to the
measurement results of the open-loop swing-up maneuver.
Fig. 6. Nominal and experimental trajectories ∗ (t) and (t) for the swing-up The optimization problem is solved with the MATLAB func-
in open-loop mode with (a) nominal and (b) adjusted model parameters. tion fmincon of the optimization toolbox. Table 3 lists the ad-
justed parameters , which are used together with the remain-
ing default ones in Table 1 to recalculate the feedforward tra-
position y(t) from its nominal trajectory y ∗ (t) might exceed jectories according to Section 3. Fig. 6b shows the open-loop
the maximum rail length (1). In order to enhance the accuracy experimental results (solid lines) for the swing up with the
of the feedforward control u∗ (t), the mechanical parameters nominal feedforward trajectories (dashed lines) based on the
(Table 1) of the pendulum model (4)–(5) are adjusted by solv- adjusted parameters. The accuracy of the second angle 2 (t)
ing an optimization problem with respect to the experimental is clearly improved and both angles follow the nominal trajec-
swing-up maneuver in open-loop. tories ∗1 (t), ∗2 (t) close to the upward position. Although the
Fig. 6a shows the open-loop measurements of the angles difference between the nominal trajectories ∗1 (t) and ∗2 (t) in
1 (t) and 2 (t) (solid lines) with respect to the nominal swing- Fig. 6a and b is almost negligible, the enhanced accuracy of
up trajectories (dashed lines), also see Fig. 2. The angle 1 (t) the second angle 2 shows the high sensitivity of the swing-up
of the inner arm stays close to the nominal trajectory ∗1 (t) maneuver with respect to the model parameters.
almost up to the unstable upward equilibrium, but the outer arm
angle 2 (t) follows ∗2 (t) only at the beginning of the swing
up. For instance at t = 1.3 s, 2 (t) is 0.9 rad ≈ 50 deg away 4.3. Linear feedback control design
from ∗2 (t). The inaccuracy is mainly due to the time-delayed
response of the PI controller for the cart velocity (see Remark 2) The experimental realization of the swing-up maneuver re-
and due to unmodeled effects like nonlinear friction. quires a feedback control which stabilizes the double pendu-
In order to meet the measured angle profiles 1 (t), lum along the nominal trajectories. In order to compensate for
2 (t) in Fig. 6a as close as possible, the parameters a possible steady state error in the cart position y, the pendu-
 = (a1 , a2 , m1 , m2 , J1 , J2 , d1 , d2 ) occurring in the pendulum lum model (4)–(5) is dynamically extended by the disturbance
dynamics (5) (also see Table 2) are adjusted by solving the model ỹ˙ = y with the new state ỹ, which yields the overall state
T
optimization problem vector x = [y, ẏ, T , ˙ , ỹ]T ∈ R7 . Hence, the system (4)–(5)
 T0 together with the additional ODE ỹ˙ = y can be written in the
nonlinear form ẋ = f(x, u).
min I = (,1 (t) − 1 (t))2 + (,2 (t) − 2 (t))2 dt
 0 Due to the accuracy of the nonlinear feedforward control, the
(12) feedback part is designed with linear methods by linearizing
¨  = ( , 
s.t.  ˙  , u∗ ), ˙ T
 (0) = −[, ] ,  (0) = 0. the overall system ẋ = f(x, u) along the nominal trajectories
T
x∗ =[y ∗ , ẏ ∗ , ∗ T , ˙∗ , ỹ ∗ ]T (with ỹ ∗ (t)= 0 y ∗ () d) and u∗ .
t
(13)
This leads to the linear time-varying system
The feedforward control u∗ (t) is based on the default parameter
values nom (see Table 1 and Fig. 2) and serves as input to the ẋ = A(t)x + b(t)u, (14)
pendulum dynamics (13) with the states  = [,1 , ,2 ]T and
 ˙ ,1 , 
˙  =[ ˙ ,2 ]T . The cost function I in (12) rates the deviation with
of the angles ,1 (t), ,2 (t) with respect to the measured open-
jf jf
loop trajectories 1 (t), 2 (t) in Fig. 6a. Thereby, I is evaluated A(t) = and b(t) = .
over the time interval t ∈ [0, T0 ] with T0 = 1.6 s being smaller jx x∗ (t),u∗ (t) ju x∗ (t),u∗ (t)
K. Graichen et al. / Automatica 43 (2007) 63 – 71 69

According to the two-degree-of-freedom control scheme in of the gains ki (t) for t ∈ [0.5, 1.2] s pose significant de-
Fig. 4, the control mands on the closed-loop control of the double pendulum
leading to large displacements of the cart position y. More-
u = u∗ + kT (t)(x∗ − x̂) (15) over, the linear time-varying system (14) looses its con-
trollability (see e.g. Silverman & Meadows, 1967; Kailath,
comprises the feedforward control u∗ (t) and the feedback part
1980) several times in this time interval. Due to these rea-
u = kT (t)(x∗ − x̂). The calculation of the time-varying feed-
sons, the feedback control is turned off for t ∈ [0.6, 1.1] s by
back gains k(t) is based on an optimal LQ (linear quadratic)
setting the gain vector k(t) to zero. In the bordering intervals
feedback design which minimizes the objective functional
t ∈ [0.5, 0.6] s and t ∈ [1.1, 1.2] s, the gains ki (t) are linearly
 T interpolated between zero and the respective gains values at
I = xT (T )Mx(T ) + (xT Qx + uRu) dt, (16) t = 0.5 and 1.2 s in order to smoothly switch on/off the feed-
0
back control. Hence, during the time interval t ∈ [0.6, 1.1] s,
with the symmetric positive semidefinite matrices M ∈ R7×7 , the pendulum is steered along the nominal trajectories x∗ (t)
Q ∈ R7×7 and the positive scalar R > 0. The solution P (t), by the feedforward control without a stabilizing feedback
t ∈ [0, T ] of the Riccati ODE, see e.g. Kwakernaak and Sivan control.
(1972), Bertsekas (2000),
4.4. Experimental results
Ṗ = −P A(t) − A(t)T P + P b(t)R −1 b(t)T P − Q,
P (T ) = M (17) The implementation of the closed-loop control (15) re-
determines the feedback gains quires full state information of the double pendulum. A Lu-
enberger observer (O’Reilly, 1983) based on the nonlinear
k(t) = R −1 b(t)T P (t). (18) model (4)–(5) is used for the state estimation x̂, see Fig. 4.
The error dynamics of the observer is designed by eigenvalue
The weighting matrices in (16) are chosen to Q = diag assignment point-wise in time with the linearized pendulum
(50, 0, 500, 500, 0, 0, 10) and R = 5 (with consistent units). model.
The choice of the terminal condition P (T )=M for the reverse- Fig. 8 shows the experimental and nominal trajectories of
time integration of the Riccati equation (17) is a degree-of- the angles (t), the cart y(t), ẏ(t), and the input u(t) = ÿ(t)
freedom in the LQ-design. Thereby, the matrix M ∈ R7×7 is for open-loop (also see Fig. 6b) and closed-loop control of
determined by solving the algebraic Riccati equation follow- the swing-up maneuver. As pointed out in Section 4.2, the
ing from (17) with Ṗ = 0. The MATLAB function lqr of the open-loop trajectories reveal the good accuracy of the designed
control system toolbox is used to calculate M, whereas the feedforward control u∗ (t), but the pendulum drifts away at-
reverse-time integration of (17) is performed with a standard approximately t = 1.5 s when it approaches the unstable up-
ODE solver of MATLAB. ward position. In closed-loop mode, the feedback control is
Fig. 7 shows the time-varying feedback gains ki (t), smoothly turned on at t = 1.1 s and stabilizes the pendulum
i = 1, . . . , 7 in the time interval t ∈ [0, T ] for the swing- along the nominal trajectories. The correction u of the sta-
up maneuver with T = 2.2 s. During the time interval t ∈ bilizing feedback in (15) is less than 3 m/s2 , which reveals
[0.5, 1.2] s, the gains ki (t) oscillate and change the signs sev- the quality of the feedforward control u∗ (t) and the effective-
eral times. Although the LQ design provides optimal feedback ness of the parameter adjustment by solving the optimization
gains ki (t) for minimizing the cost functional (16) over the problem (12)–(13).
time interval t ∈ [0, T ], the large gradients and magnitudes The experimental swing up is easily repeatable without
nameable performance loss after several successive swing-up
and swing-down maneuvers (along the accordingly calculated
300 feedback OFF
swing-down trajectories). Although the double pendulum is
200 a highly sensitive system, simulations and experiments have
k3 [m/s2] shown that the control scheme is robust enough to deal with
feedback gains

100 minor deviations in the parameters and initial conditions.


k2 [1/s]
0
k6 [m/s]
-100 k4 [m/s2] 5. Conclusions
2
-200 k1 [1/s ]
k5 [m/s] The swing-up of the double pendulum on a cart is used to
-300 k7 [1/s3] illustrate the inversion-based feedforward control design for
finite-time transition problems of nonlinear systems recently
0 0.5 1 1.5 2
proposed in Graichen et al. (2005). The resulting two-point
time [s]
BVP of the internal dynamics, i.e. the pendulum dynamics,
Fig. 7. Time-varying LQ feedback gains ki (t), i = 1, . . . , 7 for the swing-up requires free parameters for its solvability, which are provided
maneuver. in the setup of the output trajectory, i.e. the cart position. The
70 K. Graichen et al. / Automatica 43 (2007) 63 – 71

1
0.5 feedback OFF
0
y [m]

0 -1

2 [rad]
-2
feedback OFF
-0.5 -3
-0.5 0 0.5 1 1.5 2 2.5 3 nominal
-4 open-loop
2
-5 closed-loop

-0.5 0 0.5 1 1.5 2 2.5 3


y [m/s]

0 time [s]

1
-2
0
-0.5 0 0.5 1 1.5 2 2.5 3
-1

1 [rad]
10 -2
u = y¨ [m/s2]

-3
0
-4
-10 -5
-0.5 0 0.5 1 1.5 2 2.5 3 -0.5 0 0.5 1 1.5 2 2.5 3
time [s] time [s]

Fig. 8. Measured and nominal trajectories of the cart y(t), ẏ(t), u = ÿ(t) and the angles 1 (t), 2 (t) for the swing-up of the double pendulum.

two-point BVP with free parameters is solved numerically Furuta, K., Kajiwara, H., & Kosuge, K. (1980). Digital control of a double
with the MATLAB function bvp4c. The mechanical parame- inverted pendulum on an inclined rail. International Journal of Control,
ters of the double pendulum are adjusted with respect to the 32, 907–924.
Graichen, K., Hagenmeyer, V., & Zeitz, M. (2005). A new approach
measured open-loop trajectories of the swing up, in order to inversion-based feedforward control design for nonlinear systems.
to increase the accuracy of the feedforward trajectories. Ex- Automatica, 41, 2033–2041.
perimental results of the swing-up maneuver reveal the high Graichen, K., Treuer, M., & Zeitz, M. Fast side-stepping of the triple
performance and accuracy of the tracking control with the inverted pendulum via constrained nonlinear feedforward control design.
In Preprints 44th IEEE conference on decision and control & European
nonlinear feedforward and linear feedback control. The applied
control conference (CDC-ECC) (pp. 1096–1101), Sevilla, Spain, 2005.
feedforward control design also allows to account for input Graichen K., & Zeitz, M., (2005a). Feedforward control design for nonlinear
constraints (Graichen & Zeitz, 2005a), which is of importance systems under input constraints. In T. Meurer, K. Graichen, and E.D.
e.g. for mechatronic systems with physical limitations of the Gilles, (Eds.), Control and observer design for nonlinear finite and infinite
actuators. dimensional systems, Lecture Notes in Control and Information Sciences
Vol. 322, (pp. 235–252) Berlin: Springer.
Graichen, K., & Zeitz, M. (2005b). Nonlinear feedforward and feedback
Acknowledgments tracking control with input constraints solving the pendubot swing-up
problem. In Preprints 16th IFAC world congress, Prague, CZ.
Hasomed GmbH. Double/triple pendulum: Product documentation.
The authors gratefully acknowledge the constructive com- Magdeburg, Germany. www.hasomed.de.
ments of the reviewers as well as the valuable support of Torsten Huang, C.-I., & Fu, L.-C. (2003). Passivity based control of the double
Nutsch with the double pendulum. inverted pendulum driven by a linear induction motor. In Proceedings of
conference on control applications (CCA) (pp. 797–802). Istanbul, Turkey.
Isidori, A. (1995). Nonlinear control systems. 3rd ed., Berlin: Springer.
Kailath, T. (1980). Linear systems. Englewood Clifffs, NJ: Prentice-Hall.
References Kwakernaak, H., & Sivan, R. (1972). Linear optimal control systems. New
York: Wiley-Interscience.
Anderson, M. J., & Grantham, W. J. (1989). Lyapunov optimal feedback Mori, S., Nishihara, H., & Furuta, K. (1976). Control of unstable mechanical
control of a nonlinear inverted pendulum. Journal of Dynamic Systems, system—control of pendulum. International Journal of Control, 23,
Measurement, and Control, 111, 554–558. 673–692.
Åström, K. J., & Furuta, K. (2000). Swinging up a pendulum by energy O’Reilly, J. (1983). Observers for linear systems. London: Academic Press.
control. Automatica, 36, 287–295. Rubí, J., Rubio, Á, & Avello, A. (2002). Swing-up control problem for a
Bertsekas, D. P. (2000). Dynamic programming and optimal control. 2nd ed., self-erecting double pendulum. IEE Proceedings of Control Theory and
Belmont, MA: Athena Scientific. Applications, 149, 169–175.
Devasia, S., Chen, D., & Paden, B. (1996). Nonlinear inversion-based output Silverman, L. M., & Meadows, H. E. (1967). Controllability and observability
tracking. IEEE Transactions on Automatic Control, 41, 930–942. of time-variable linear systems. SIAM Journal on Control, 5, 64–73.
Fantoni, I., Lozano, R., & Spong, M. W. (2000). Energy based control of the Spong, M. W. (1995). The swing up problem for the acrobot. IEEE Control
pendubot. IEEE Transactions on Automatic Control, 45, 725–729. Systems Magazine, 15, 49–55.
K. Graichen et al. / Automatica 43 (2007) 63 – 71 71

Wiklund, M., Kristenson, A., & Åström, K.J. (1993). A new strategy for Michael Treuer (1978) received his Master of
swinging up an inverted pendulum. In Proceedings of 12th IFAC world Engineering from the University of Auckland,
New Zealand in 2004 and his Diploma degree
congress Vol. 9, (pp. 151–154).
in Engineering Cybernetics from Universität
Yamakati, M., Iwashiro, M., Sugahara, Y., & Furuta, K. (1995). Robust Stuttgart (Germany) in 2005. For his Diploma
swing up control of double pendulum. In Proceedings of American control thesis on constrained feedforward control de-
conference (ACC) (pp. 290–295). Seattle, Washington. sign for multiple-link pendulums he received
Yamakati, M., Nonaka, K., & Furuta, K. (1993). Swing up control of the Award of the University’s Alumni Founda-
double pendulum. In Proceedings of American control conference (ACC) tion (“Freunde der Universität Stuttgart”). Since
(pp. 2229–2233). San Francisco, California. graduation he is a research assistant and Ph.D.
Zhong, W., & Röck, H. (2001). Energy and passivity based control of the student at the Institute of Process Engineer-
double inverted pendulum on a cart. In Proceedings of conference on ing and Power Plant Technology, Universität
Stuttgart.
control applications (CCA) (pp. 896–901). Mexico City, Mexico.
His main research interests are nonlinear modeling, simulation and control
design with applications to power plants and power systems.

Michael Zeitz (1940) received his Diploma de-


Knut Graichen (1977) received his Diploma gree in Electrical Engineering from Technische
degree in Engineering Cybernetics from Uni- Hochschule Darmstadt in 1967, and the Doc-
versität Stuttgart (Germany) in 2002. During tor and Habilitation degrees from Universität
the preparation of his Diploma thesis he was Stuttgart in 1973 and 1977. After holding a pro-
with Robert Bosch Corp., Research and Tech- fessorship for Simulation Engineering at Ruhr-
nology Center North America (RTC) in Palo Universität Bochum (Germany) from 1977 until
Alto, CA (USA). 1979, he was Professor of Control Engineer-
Since graduation he is a research assistant ing at Institut für Systemdynamik, Universität
and Ph.D. student at Institut für Systemdy- Stuttgart, and is retired since 2005. He obtained
namik, Universität Stuttgart. His main research the Research Prize of Baden-Württemberg in
interests are in nonlinear feedforward/feedback 1992 and the Honorary Doctorate of Technical
control design and differential flatness with ap- University Donetsk (Ukraine) in 1999. His main research interests are in feed-
plications to mechatronic systems and chemical forward/feedback control and observer design for nonlinear and distributed
engineering. parameter systems.

You might also like