Dynamics and Control of A Chain Pendulum On A Cart: Taeyoung Lee, Melvin Leok, and N. Harris Mcclamroch

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Dynamics and Control of a Chain Pendulum on a Cart

Taeyoung Lee∗ , Melvin Leok† , and N. Harris McClamroch

Abstract— A geometric form of Euler-Lagrange equations


m3
is developed for a chain pendulum, a serial connection of n
rigid links connected by spherical joints, that is attached to a l3 q3
rigid cart. The cart can translate in a horizontal plane acted m2
on by a horizontal control force while the chain pendulum
arXiv:1211.4604v1 [math.OC] 19 Nov 2012

can undergo complex motion in 3D due to gravity. The l2 q2


configuration of the system is in (S2 )n ×R2 . We examine the rich e1 m1
structure of the uncontrolled system dynamics: the equilibria
of the system correspond to any one of 2n different chain l1 q1
pendulum configurations and any cart location. A linearization x
about each equilibrium, and the corresponding controllability m H
criterion is provided. We also show that any equilibrium can e2
H
ju
H
e3
be asymptotically stabilized by using a proportional-derivative
type controller, and we provide a few numerical examples. Fig. 1. Chain pendulum on a cart (n = 3)
I. I NTRODUCTION
Pendulum models have been a rich source of examples in We demonstrate that globally valid Euler-Lagrange equa-
nonlinear dynamics and control [1], [2]. For example, the tions on (S2 )n ×R2 can be developed for the chain pendulum
dynamics of a double spherical pendulum and a Lagrange on a cart system, and they can be analyzed in a compact form
top have been studied in [3], [4], [5]. Generalized models, without local parameterization or constraints. This also leads
such as a 3D pendulum [6] or a 3D pendulum attached a coordinate-free form of linearized equations, controllability
to an elastic string [7], have been considered. A variety criteria, and control systems. The main contribution of this
of control techniques have been applied, such as passivity- paper is providing an intrinsic and unified framework to
based approaches [8], [9], swing-up strategies [10], [11], study dynamics and control of chain pendulum on a cart
Lyapunov-based method [12], controlled-Lagrangian [13], systems, that is uniformly applicable for an arbitrary number
and hybrid control systems [14]. In particular, stabilization of links, and globally valid for any configuration of the links.
of a triple inverted pendulum has been studied in [15], [16].
In this paper, we consider the dynamics and control of a II. L AGRANGIAN DYNAMICS OF THE C HAIN P ENDULUM
chain pendulum on a cart, that is a serial connection of n ON A C ART S YSTEM
rigid links, connected by a spherical joint, attached to a cart A. Background
that moves on a horizontal plane. The configuration manifold The cart of mass m can translate on a horizontal plane,
of this system is (S2 )n × R2 , where the manifold of unit and its position in an inertial frame is denoted by x ∈ R2 .
vectors in R3 is denoted by the two-sphere S2 . It is acted on by a horizontal control force u ∈ R2 . A serial
Many interesting mechanical systems, such as robotic
connection of n rigid links, connected by spherical joints, is
manipulators or variations of pendulum models, evolve on
attached to the cart, where the mass of the i-th link is denoted
the two-sphere S2 or on products of two-spheres (S2 )n . In
by mi and the link length is denoted by li . For simplicity,
most of the literature that treats dynamic systems on (S2 )n ,
we assume that the mass of each link is concentrated at the
including many of the above references, either 2n spherical
outboard end of the link. The direction vector of each link in
polar angles or n explicit equality constraints that enforce
an inertial frame is given by qi ∈ S2 = {q ∈ R3 | kqk = 1}
unit lengths are used to describe the configuration of the
for i = 1, . . . , n. The configuration manifold of this chain
system. These descriptions necessarily involve complicated
pendulum on a cart system is (S2 )n × R2 .
trigonometric expressions and introduce additional complex- The inertial frame is defined by the unit vectors e1 =
ity in analysis and computations, as well as singularities. [1; 0; 0] ∈ R3 , e2 = [0; 1; 0] ∈ R3 , e3 = [0; 0; 1] ∈ R3 ;
Taeyoung Lee, Mechanical and Aerospace Engineering, George Wash- we assume that e3 is in the direction of gravity. Define C =
ington University, Washington DC 20052 [email protected] [e1 , e2 ] ∈ R3×2 .
Melvin Leok, Mathematics, University of California at San Diego, La
Jolla, CA 92093 [email protected]
The kinematic equation for the direction vector of the i-th
N. Harris McClamroch, Aerospace Engineering, University of Michigan, link qi is given by
Ann Arbor, MI 48109 [email protected]
∗ This research has been supported in part by NSF under grants CMMI- q̇i = ωi × qi = ω̂i qi , (1)
1243000 (transferred from 1029551).
3
† This research has been supported in part by NSF under grants DMS- where ωi ∈ R is the angular velocity of the i-th link
0726263, DMS-1001521, DMS-1010687, and CMMI-1029445. satisfying ωi · qi = 0.
The hat map ∧ : R3 → so(3) transforms a vector in R3 to for i, j = 1, . . . , n.
a 3 × 3 skew-symmetric matrix, and is uniquely defined by From (8) and (10), the total kinetic energy is given by
the property that x̂y = x × y for any x, y ∈ R3 . The inverse n n
1 X 1 X
of the hat map is denoted by the vee map ∨ : so(3) → R3 . T = M00 kẋk2 + ẋ · M0i q̇i + Mij q̇i · q̇j , (12)
Throughout this paper, the dot product of two vectors is 2 i=1
2 i,j=1
denoted by x·y = xT y for any x, y ∈ Rn . The n×n identity where the inertia matrices are given by (9), (11). The grav-
matrix is denoted by In . The n × m by matrix composed itational potential energy is composed of the gravitational
of zero elements is denoted by 0n×m , and it is written as potential energy of each mass. From (6), it can be written as
0n if n = m. A column-wise stack of matrices is written n n X
n
as [A; B] = [AT , B T ]T ∈ R(a+b)×n for A ∈ Ra×n and V =−
X
mi gxi · e3 = −
X
ma gli e3 · qi . (13)
B ∈ Rb×n . Some properties of the hat map are given by i=1 i=1 a=i
x̂y = x × y = −y × x = −ŷx, (2) The Lagrangian of a chain pendulum on a cart is L = T −V .
x · ŷz = y · ẑx = z · x̂y, (3) C. Euler-Lagrange equations
x̂ŷz = (x · z)y − (x · y)z, (4) In [17], it is shown that a coordinate-free form of Euler-
C T C = −C T ê23 C = I2 (5) Lagrange equations on the two-spheres can be derived from
3 Hamilton’s variational principle. The key idea is to express
for any x, y, z ∈ R .
the variation of a curve on the two-sphere in terms of the
B. Lagrangian exponential map on SO(3). Let qi (t) be a curve on S2 . Its
The location of the cart is given by Cx ∈ R3 in the inertial variation can be written as
frame. Let xi ∈ R3 be the position of the outboard end of qi (t) = exp(ξi (t))qi (t),
the i-th link in the inertial frame. It can be written as
X i where ξi (t) is a curve in R3 satisfying qi (t) · ξi (t) = 0
xi = Cx + la q a . (6) for all t. As the exponential map represents the rotation of
a=1 qi (t) about the axis ξ(t) by the angle ||kξi (t)k at each t,
The total kinetic energy is composed of the kinetic energy it is guaranteed that the varied curve qi (t) lies in S2 . The
of the cart and the kinetic energy of each mass: corresponding infinitesimal variation is given by

n i d
1 1X X δqi (t) = exp(ξi (t))qi (t) = ξi (t) × qi (t), (14)
T = mkẋk2 + mi kC ẋ + la q̇a k2 . (7) d =0
2 2 i=1 a=1
which lies in the tangent space Tqi (t) S2 as it is perpendicular
For simplicity, we first consider the part of the kinetic to qi (t) at each t. Using these, we obtain the Euler-Lagrange
energy, namely Tx that is dependent on the motion of the equations of a chain pendulum on a cart as follows.
cart. The part of (7) dependent on ẋ is given by Proposition 1: Consider a chain pendulum on a cart,
n n X n
1 X X whose Lagrangian is given by (12) and (13). The Euler-
Tx = (m + mi )kẋk2 + C ẋ · ma li q̇i . Lagrange equation on (S2 )n × R2 are as follows:
2 i=1 i=1 a=i   
This can be written as M00 M01 M02 ··· M0n ẍ
n
 −q̂12 M10 M 11 3I −M q̂
12 1
2
· · · −M q̂ 2  

1n 1   1 
1  2
 −q̂2 M20 −M21 q̂22 M22 I3 · · · −M2n q̂22    q̈2 
X
Tx = M00 kẋk2 + ẋ · M0i q̇i , (8)
 
2

i=1
 .. .. .. ..   .. 
 . . . .  . 
where the inertia matrices M00 ∈ R, M0i ∈ R2×3 , and 2 2
−q̂n Mn0 −Mn1 q̂n −Mn2 q̂n · · · 2
Mnn I3 q̈n
Mi0 ∈ R3×2 are given by 
uP

n n −kq̇1 k2 M11 q1 − n ma gl1 q̂12 e3 
Pa=1
X X
M00 = m + mi , M0i = C T T
ma li , Mi0 = M0i  2 n 2 

= −kq̇2 k M22 q2 − a=2 ma gl2 q̂2 e3  , (15)

i=1 a=i  .. 
(9)  . 
for i = 1, . . . , n. The part of the kinetic energy, namely Tq , −kq̇n k2 Mnn qn − mn gln q̂n2 e3
that is independent of ẋ is given by where the inertia matrices are given by (9) and (11).
n i n Or equivalently, it can be written in terms of the angular
1 X X 1 X
Tq = mi k la q̇a k2 = Mij q̇i · q̇j , (10) velocities as
2 2 i,j=1   
i=1 a=1 M00 −M01 q̂1 −M02 q̂2 ··· −M0n q̂n ẍ
where the inertia constants Mij ∈ R are given by  q̂1 M10
 M 11 I 3 −M 12 q̂ 1 q̂ 2 · · · −M 1n q̂1 q̂ n
  ω̇1 
 
 q̂2 M20 −M21 q̂2 q̂1 M22 I3 · · · −M2n q̂2 q̂n    ω̇2 
   
n 
X  .. .. .. ..   .. 
Mij =  ma  li lj (11)  . . . .  . 
a=max{i,j} q̂n Mn0 −Mn1 q̂n q̂1 −Mn2 q̂n q̂2 ··· Mnn I3 ω̇n
Pn 2
j=1 M0j kωj kPqj + u
 
Pn n
the gravity direction qi = −e3 for i = 1, . . . , n, is referred to
2
M kω k q̂ q + a=1 ma gl1 q̂1 e3  as the inverted equilibrium. Two other interesting equilibria
Pn j=2 1j j 21 j

 j=1,j6=2 M2j kωj k q̂2 qj + na=2 ma gl2 q̂2 e3 
P 
=  , (16) correspond to the case that all adjacent links point in opposite
 ..  directions, that is qi · qi+1 = −1. These two equilibria, one
 . 
Pn−1 2 with the first link pointing in the direction of e3 and the
j=1 Mnj kωj k q̂n qj + mn gln q̂n e3 other with the first link pointing in the direction of −e3 , are
q̇i = ωi × qi . (17) referred to as folded equilibria since the chain pendulum is
Proof: See Appendix A completely folded in each case.
We introduce binary variables si to describe a specific
D. Remarks about the Chain Pendulum on a Cart System
equilibrium. It is defined as
The system of equations above for the chain pendulum (
on a cart system remains valid for arbitrary deformations 1 if qi = e3 (along gravity),
si = (18)
of the chain with respect to the cart; part or all of the chain −1 if qi = −e3 (opposite to gravity)
pendulum may be above the cart while part or all of the chain
pendulum may be below the cart. We ignore all possible for i = 1, . . . , n. Then, an ordered n-tuple s =
collisions of the chain pendulum with itself and of the chain (s1 , s2 , . . . , sn ), specifies a particular equilibrium.
pendulum with the cart. B. Linearized Equations of Motion
The chain pendulum with the cart inertially fixed is a
special case of the model above. If there is a single link, n = The local dynamics near each equilibrium can be studied
1, the spherical pendulum is obtained; if there are two serial using linearization methods. From (14), the variation of qi
links, n = 2, the double spherical pendulum is obtained. The from any equilibrium configuration can be written as
resulting dynamics of the chain pendulum for any number δqi = ξi × e3 or δqi = ξi × −e3 ,
of links can be very complex. The Euler-Lagrange equations
3
for this case are easily obtained as special cases of the prior where ξi ∈ R with ξi · e3 = 0. The variation of ωi is
equations. The cart is included in the system primarily as a given by δω ∈ R3 with δωi · e3 = 0. Therefore, the third
means of achieving control actuation. components of ξi and δωi for any equilibrium configuration
The planar chain pendulum on a cart is also a special case are zero, and they are omitted in the following linearized
of the above model. Let v ∈ R3 be a vector normal to e3 , equation, i.e., the state vector of the linearized equation is
i.e., v · e3 = 0. Suppose that the initial condition is chosen composed of C T ξi ∈ R2 . As a result, the dimension of the
such that ωi (0) × v = 0 and qi (0) · v = 0 for i = 1, . . . , n corresponding unconstrained linearized equation is 2n + 2.
and the control input is given such that v · Cu = 0. From Proposition 2: Consider an equilibrium of a chain pendu-
(16), we can show that the motion of links with respect to lum on a cart, specified by s = (s1 , . . . , sn ) and x = 0. The
the cart remains confined to the plane normal to v. linearized equation of the Euler-Lagrange equation (16) is
In short, equations (15), or (16) and (17), provide the Mẍ + Gx = Bu, (19)
Euler-Lagrange equations for a chain pendulum or a chain
pendulum on a cart with an arbitrary number of links. As or equivalently
they are developed in a compact, coordinate-free fashion,        
Mxx Mxq δ ẍ 02 02×2n δx I2
singularities that arise when using local coordinates are + = u,
Mqx Mqq ẍq 02n×2 Gqq xq 02n×2
completely avoided.
where the corresponding sub-matrices are defined as
III. DYNAMIC P ROPERTIES OF THE U NCONTROLLED
C HAIN P ENDULUM ON A C ART S YSTEM xq = [C T ξ1 ; . . . ; C T ξn ],
A. Equilibrium Configurations Mxx = M00 I2 ,
 
We can determine the equilibria of the uncontrolled chain Mxq = −s1 M01 ê3 C −s2 M02 ê3 C ··· −sn M0n ê3 C ,
pendulum on a cart system using (16) when u = 0. Assuming Mqx = MTxq ,
the configuration is constant, the equilibrium configurations  
M11 I2 s12 M12 I2 ··· s1n M1n I2
in (S2 )n × R2 are given by the cart in a fixed location and  s21 M21 I2 M22 I2 ··· s2n M2n I2 
the chain pendulum aligned vertically, i.e., Mqq = 

.. .. .. ,

 . . . 
qi × e3 = 0, for i = 1, . . . , n.
sn1 Mn1 I2 sn2 Mn2 I2 · · · Mnn I2
Consequently, assuming that we are interested in the n
X
equilibria where x = 0, there are 2n possible equilibrium Gqq = diag[s1 ma gl1 I2 , . . . , sn mn gln I2 ],
configurations that correspond to the case where all n links a=1

are vertical: qi = ±e3 for i = 1, . . . , n. The equilibrium for where sij = si sj for i, j = 1, . . . , n.
which all links are aligned with the gravity direction, qi = e3 Proof: See Appendix B.
for i = 1, . . . , n, is referred to as the hanging equilibrium; The local eigenstructure near each equilibrium can be
the equilibrium for which all links are aligned opposite to determined from the linearized dynamics. The eigenvalues
of (19) are the roots of det[λ2 M + G] = 0. Note that there 0.4 1

e3 · q 3
0
are zero eigenvalues since the first two columns and rows of

e1 · x
0.2
−1
G are zero. These correspond to the cart dynamics. 0 2 4 6 8 10
1
For the hanging equilibrium, given by si = 1 for all 0

e3 · q 4
0 2 4 6 8 10
0
i = 1, . . . , n, the matrix Gqq becomes positive-definite. 0.5
−1
0 2 4 6 8 10
This implies that λ2 ≤ 0 always. Then, the stability of the 0

e2 · x
1

e3 · q 5
nonlinear dynamics (16) is inconclusive from the linearized −0.5 0

−1 −1
equation (19) as Re[λ] = 0. But, it can be shown that the 0 2 4
t
6 8 10 0 2 4
t
6 8 10

hanging equilibrium is stable in the sense of Lyapunov mod-


(a) Cart position x (b) Third elements of q3 , q4 , q5
ulo the cart position, using the total energy as a Lyapunov
function: the hanging equilibrium is the local minimum of −0.1
3

the total energy, which is conserved along the solution of the 2

T , Tq
0
uncontrolled system. For each of the other 2n −1 equilibrium 1
0.1
configurations, there exist a pair of positive and negative 0
0 2 4 6 8 10

e3
0.2
eigenvalues, which implies that it is an unstable saddle. Het- 1

eroclinic connections between the various equilibria provide 0.3 0

V
a non-local characterization of the dynamic flow. 0.4 −1

−2
−0.3 −0.2 −0.1 0 0.1 0.2 0.3 0 2 4 6 8 10
e1 t
IV. C ONTROL A NALYSIS
(c) Location of m5 with respect to the (d) Kinetic energy T (Tq in (10):
Various control problems can be posed for the chain pen- cart (P5 li qi ) in the e1 e3 plane red,dotted) and potential energy V
i=1
dulum on a cart system. For example, feedback control might
be used to achieve asymptotic stabilization of any of the Fig. 2. Uncontrolled response: perturbation from a folded equilibrium
natural equilibrium solutions. From the linearized equation
(19), we find a criterion for controllability as follows.
Proposition 3: Consider an equilibrium of a chain pendu- such that the equilibrium of the controlled system is locally
lum on a cart, specified by s = (s1 , . . . , sn ) and x = 0. asymptotically stable.
Suppose that the inertia matrix M of the linearized equation Proof: See Appendix D.
(19) is positive-definite. Then, the equilibrium is controllable This control system can be used uniformly to stabilize any of
n
if and only if the following subsystem is controllable 2 equilibrium configurations of a chain pendulum on a cart.
But, as it is based on the linearized dynamics, the region of
Mqq ẍq + Gqq = Mxq u (20) attraction could be limited.
for a control input u ∈ R2 , or equivalently V. N UMERICAL E XAMPLES
2 In the subsequent numerical simulations, we consider a
rank[λ Mqq + Gqq , Mqx ] = 2n (21)
chain pendulum model with five identical links, i.e. n = 5.
for any λ ∈ C. This system has twelve degrees of freedom with two force
Proof: See Appendix C. control inputs on the cart. The properties of the cart and the
This proposition states that the controllability of (19) is links are chosen as
equivalent to the controllability of a reduced system given
by (20). It represents the dynamics of the chain pendulum, m = 0.5 kg, mi = 0.1 kg, li = 0.1 m for i = 1, . . . , 5.
without the cart, where the input matrix is given by Mqx
Throughout this section, the following units are used:
that corresponds to the inertia coupling between the chain
kg, m, sec and rad, unless otherwise specified.
dynamics and the cart dynamics.
First, simulation results for the uncontrolled chain pendu-
If the linearized equation about a specific equilibrium
lum on a cart system are presented. The initial condition is a
configuration is controllable, then we can design a control
small perturbation from one of the completely folded equi-
system to asymptotically stabilize that equilibrium.
libria, given by s = (−1, 1, −1, 1, −1). More specifically,
Proposition 4: Consider an equilibrium of a chain pen-
dulum on a cart, specified by s = (s1 , . . . , sn ) and x = x(0) = [0.2; 0.1], ẋ(0) = [0; −0.1],
0. Assume that the corresponding linearized equation is qi (0) = si e3 = (−1)i e3 for i = 1, . . . , 4,
controllable (as characterized by Proposition 3). The control (23)
force u is chosen as follows: q5 (0) = [sin 1◦ ; 0; − cos 1◦ ],
Xn ωi (0) = 03×1 for i = 1, . . . , 5,
u = −Kx x − Kẋ ẋ − {Kqi C T (si e3 × qi ) + Kωi C T ωi }, where the fifth link is perturbed by 1◦ from the equilibrium.
i=1
(22) The corresponding simulation results are shown at Figure
2. The given initial condition guarantees that the relative
2×2
for controller gains Kx , Kẋ , Kqi , Kωi ∈ R for i = motion of the links with respect to the cart always lies in
1, . . . , n. Then, there exist values of the controller gains the e1 e3 plane, which is depicted in Figure 2(c). Figure 2(d)
1 10 0.5 2

e1 · x
e1 · x

eq
1

eq
5 0
−1

−2 0 −0.5 0
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
0.4 150 0.5 30

0.2 100 0 20

e2 · x
e2 · x



0 50 −0.5 10

−0.2 0 −1 0
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
t t t t

(a) Cart position x (b) Direction error eq and angular ve- (a) Cart position x (b) Direction error eq and angular
locity error eω for links velocity error eω for links

20

20
0

u
0 −0.14
0
u

−0.12 −20
0.1 −20 0 2 4 6 8 10
−0.1

e3
0.2 40
e3

−40
0 2 4 6 8 10
−0.08
0.3 20
20
−0.06 0.05
0.4 0
−0.03
−0.02 0
0 −0.01 0 −20
−0.2 −0.05 e 1 0 2 4 6 8 10
0.2 e 2 0.01 t
−0.1
0 0 −20
e2 0.1 −0.2 e 1 0 2 4 6 8 10 (c) LocationPof m5 with respect (d) Control force u
t
to the cart ( 5i=1 li qi )
(c) Location of m P5 with re- (d) Control force u
spect to the cart ( 5i=1 li qi ) Fig. 4. Controlled response: asymptotic stabilization of a partially-folded
equilibrium s = {−1, −1, −1, 1, 1}
Fig. 3. Controlled response: asymptotic stabilization of the hanging
equilibrium s = {1, 1, 1, 1, 1}

the cart and the pendulum asymptotically converge to the


demonstrates the complex transfer of potential energy and equilibrium s = (−1, −1, −1, 1, 1).
kinetic energy between the links and the cart as the chain
VI. C ONCLUSIONS
pendulum on a cart dynamics evolve.
Second, simulation results are presented that show the Euler-Lagrange equations that evolve on (S2 )n × R2 have
response of the chain pendulum on a cart system to a been derived for the chain pendulum on a cart system. These
feedback control (22) that stabilizes the hanging equilibrium equations of motion provide a remarkably compact form
s = (1, 1, 1, 1, 1). The initial conditions are same as (23), and of the equations of motion, which enables us to analyze
the controller gains are chosen from a linear quadratic regula- their dynamic properties and control systems uniformly for
tor with the weighting matrices Q = diag[8I2 , I2n , 8I2 , I2n ] an arbitrary number of the links, and globally for any
and R = I2 . We define the following variables that measure configuration of the links.
the direction errors and the angular velocity errors of links: We emphasize that modeling, analysis, and computations
n
X n
X can be carried out directly in terms of a geometric coordinate-
eq = kqi − si ei k, eω = kωi k. free framework as illustrated by the chain pendulum on a
i=1 i=1 cart system studied in this paper; there is no need ever to use
Figure 3 illustrates that the chain pendulum on a cart local angle coordinates. This important fact is not appreciated
asymptotically approaches the hanging equilibrium. by many researchers in dynamics and control who continue
Next, we consider the control system (22) to stabilize a to formulate many dynamics and control problems in local
partially folded equilibrium given by s = (−1, −1, −1, 1, 1), coordinates, which could otherwise be analyzed with greater
i.e., the first three links are opposite to gravity, and the ease in a coordinate-free framework.
remaining last two links are aligned with gravity. Initial A PPENDIX
conditions are given as follows:
A. Proof of Proposition 1
q1 (0) = −[sin 6◦ ; 0; cos 6◦ ],
The variations of the Lagrangian with respect to x and ẋ
q2 (0) = q3 (0) = −[0; sin 4◦ ; 0; cos 4◦ ], are given by
q4 (0) = [sin 5◦ cos 4◦ ; − sin 5◦ sin 4◦ ; cos 5◦ ],
Dx L · δx = 0,
q5 (0) = [− sin 35◦ ; 0; cos 35◦ ]. n
X
Other initial conditions for x(0), ẋ(0) and ωi (0) are iden- Dẋ L · δ ẋ = (M00 ẋ + M0i q̇i ) · δ ẋ,
tical to (23). Controller gains are chosen from a lin- i=1

ear quadratic regulator with the weighting matrices Q = where Dx L represents the derivative of L with respect to x.
diag[I2 , 8I2n , I2 , 8I2n ] and R = I2 . Figure 4 illustrates that From (14), the variation of qi is δqi = ξi × qi for ξi ∈ R3
with ξi · qi = 0. The variation of the Lagrangian with respect Substituting this into (24) and (26), and using the fact that
to qi is given by ω̇i · qi = 0, we obtain (16).
n n
X X B. Proof of Proposition 2
Dqi L · δqi = ma gli e3 · (ξi × qi ) = − ma gli ê3 qi · ξi ,
a=i a=i Consider the hanging equilibrium where s = (1, 1, . . . , 1),
where (3) has been used. The variation of q̇i is given by and x = 0. The variations from the hanging equilibrium are

δ q̇i = ξ˙i × qi + ξ× q̇i . x = δx, ẋ = δ ẋ, qi = exp(ξˆi )e3 , ωi = δωi ,

From this and (3), the variation of the Lagrangian with where δx, δ ẋ ∈ R2 , and ξi , δωi ∈ R3 with ξi · e3 = 0 and
respect to q̇i is given by δωi · e3 = 0. This yields the following infinitesimal variation
n
X δqi = ξi × e3 . From (1), δ q̇i is given by
Dq̇i L · δ q̇i = (Mi0 ẋ + Mij q̇j ) · (ξ˙i × q + ξi × q̇i ) δ q̇i = ξ˙i × e3 = δωi × e3 + 0 × (ξi × e3 ) = δωi × e3 .
j=1
n
X n
X Since both sides of the above equation is perpendicular to
= q̂i (Mi0 ẋ + Mij q̇j ) · ξ˙i + q̇ˆi (Mi0 ẋ + Mij q̇j ) · ξi . e3 , this is equivalent to e3 × (ξ˙i × e3 ) = e3 × (δωi × e3 ),
j=1 j=1 which yields
Using these expressions and integrating by parts, the
ξ˙ − (e3 · ξ)e
˙ 3 = δωi − (e3 · δωi )e3 .
variation of the action integral can be written as
Z tf Xn Since ξi · e3 = 0, we have ξ˙ · e3 = 0. As e3 · δωi = 0 from
δG = −{M00 ẍ + M0i q̈i } · δx the constraint, we obtain the linearized equation for (1):
t0 i=1
n
X Xn n
X ξ˙i = δωi . (27)
+ {−q̂i (Mi0 ẍ + Mij q̈j ) − ma gli ê3 qi } · ξi dt.
i=1 j=1 a=i
Substituting these into (16), and ignoring the higher order
terms, we obtain
According to the Lagrange-d’Alembert principle, the sum  
of the variation of the action integral, and the integral of the M00 I2×2 −M01 ê3 C −M02 ê3 C · · · −M0n ê3 C
virtual work done by the control force on the cart, namely  C T ê3 M10 M11 I2 M12 I2 ··· M1n I2 
R tf  T 
uδx dt, is zero. This implies that the expression within  C ê3 M20 M 21 2I M 22 2I · · · M2n I2 
t0  
the first pair of braces in the above equation is equal to  .. .. .. .. 
 . . . . 
−u, and the expression within the second pair of braces is C T ê3 Mn0 Mn1 I2 Mn2 I2 ··· Mnn I2
parallel to qi for any 1 ≤ i ≤ n, as ξi is perpendicular to qi .
δ ẍ
  
P u

Therefore, we obtain
 C T ξ¨1  − na=1 ma gl1 ξ10 
n  T   Pn
¨  0

×  C ξ2  = − a=2 ma gl2 ξ2  ,
X
M00 ẍ + M0i q̈i = u, (24) (28)

 .   ..
 ..  

i=1 . 
n n
−q̂i2 (Mi0 ẍ +
X
Mij q̈j ) +
X
ma gli q̂i2 e3 = 0. (25) C T ξ¨n −mn gln ξˆ0 n
j=1 a=i where we have used the fact that ê23 = diag[−1, −1, 0],
Equation (25) is rewritten to obtain an explicit expression C T ê23 C = −I2 and ê3 CC T = ê3 . This is the linearized
for q̈i . As qi · q̇i = 0, we have q̇i · q̇i + qi · q̈i = 0. Using this equation about the hanging equilibrium.
and (4), we have This analysis can be easily generalized to other equilibria,
where one or more links are aligned opposite to the gravity.
−q̂i2 q̈i = −(qi · q̈i )qi + (qi · qi )q̈i = (q̇i · q̇i )qi + q̈i .
Consider the equilibrium where only the i-th link is pointing
Substituting this into (25), upward, i.e. qi = e3 and qj = −e3 for all j 6= i. By
n
X following the same procedure, we obtain the same form of
Mii q̈i − q̂i2 (Mi0 ẍ + Mij q̈j ) the linearized equation as (28), where all of the terms related
j=1 to Mij , Mji and li for all j 6= i are multiplied by −1. This
j6=i
n
yields (19).
X
= −Mii kq̇i k2 qi − ma gli q̂i2 e3 . (26) C. Proof of Proposition 3
a=i
Suppose that M is invertible. It is well-known that the
These equations (24) and (26) are rewritten in a matrix form linearized system (19) is controllable, if and only if
to obtain (15).
These can also be rewritten in terms of the angular rank[λ2 M + G, B] = 2n + 2 (29)
velocities. Since q̇i = ωi × qi for the angular velocity ωi 2
for any generalized eigenvalue λ satisfying det[λ M+G] =
satisfying qi · ωi = 0, we have
0 (see [18], [19]). This is a generalization of the Popov-
q̈i = ω̇i × qi + ωi × (ωi × qi ) = −q̂i ω̇i − kωi k2 qi . Belevitch-Hautus (PBH) eigenvalue test to a second-order
system. While it is not explicitly stated in the above refer- where Kx = [Kx , Kqi , . . . , Kqn ] ∈ R2×2n+2 and Kẋ =
ences [18], [19], it is straightforward to find an equivalent [Kẋ , Kω1 , . . . , Kωn ] ∈ R2×2n+2 . Since (19) is controllable,
condition in terms of eigenvectors, which is similar to the we can choose the controller gains Kx , Kẋ such that the
PBH eigenvector test. equilibrium is asymptotically stable for the linearized equa-
We claim that (29) holds if and only if there is no general- tion (19). According to Theorem 4.7 in [20], the equilib-
ized left eigenvector that is orthogonal to B, i.e. for any non- rium becomes asymptotically stable for the nonlinear Euler-
zero eigenvector vi ∈ R2n+2 satisfying viT (λ2i M + G) = 0, Lagrange equation (16).
we have viT B 6= 01×2 . The proof is as follows:
(Sufficiency) Suppose that there is a generalized eigenvector
vi that is orthogonal to B. Left-multiplying (29) by vi yields R EFERENCES
[1] F. Furuta, “Control of pendulum: From super mechano-system to hu-
viT [λ2 M + G, B] = [viT (λ2 M + G), viT B], man adaptive mechatronics,” in Proceedings of 42nd IEEE Conference
on Decision and Control, Dec. 2003, pp. 1498–1507.
which becomes [01×2n+2 , 01×2 ] when λ = λi . Therefore, [2] S. Mori, H. Nisihara, and K. Furuta, “Control of unstable mechanical
the matrix given in (29) has linearly dependent rows, which systems: Control of pendulum,” International Journal of Control,
vol. 23, pp. 673–692, 1976.
implies that it is rank-deficient. [3] S. Bendersky and B. Sandler, “Investigation of spatial double pen-
(Necessity) If the matrix given in (29) is rank-deficient for dulum: an engineering approach,” Discrete Dynamics in Nature and
λi , there exists a vector vi satisfying Society, vol. 2006, pp. 1–12, 2006.
[4] J. Marsden, J. Scheurle, and J. Wendlandt, “Visualization of orbits and
viT [λ2i M + G, B] = [((λ2 M + G)vi )T , viT B] = [01×2n+4 ], pattern evocation for the double spherical pendulum,” ZAMP, vol. 44,
no. 1, pp. 17–43, 1993.
which implies that vi is a generalized eigenvector that is [5] R. Cushman and J. van der Meer, “The Hamiltonian Hopf bifurcation
in the Lagrange top,” in Géométrie Symplectique et Mécanique, ser.
orthogonal to B. Lecture Notes in Mathematics, C. Albert, Ed. Springer, 1990, vol.
Using this eigenvector test, we show that (21) implies (29). 1416, pp. 26–38.
More specifically, we show that if (29) is false, then (21) [6] N. Chaturvedi, T. Lee, M. Leok, and N. McClamroch, “Nonlinear
dynamics of the 3D pendulum,” Journal of Nonlinear Science, vol. 21,
is false. Suppose that there exists a generalized eigenvector no. 1, pp. 3–32, 2011.
vi = [vx ; vq ] that is orthogonal to B. Then, we have viT B = [7] T. Lee, M. Leok, and N. McClamroch, “Computational dynamics of a
vxT I2 + vqT 02n×2 = vxT = 01×2 from the definition of B in 3D elastic string pendulum attached to a rigid body and an inertially
fixed reel mechanism,” Nonlinear Dynamics, vol. 64, no. 1-2, pp. 97–
(19). As vi is the left eigenvector, we also have 115, 2011.
 2 [8] A. Shirieav, A. Pogromsky, H. Ludvigsen, and O. Egeland, “On
λ2i Mxq

λ M
viT [λ2i M + G] = [0T2×1 , vqT ] 2i x global properties of passivity-based control of an inverted pendulum,”
λi Mqx λ2i Mqq + Gqq International Journal of Robust and Nonlinear Control, vol. 10, pp.
283–300, 2000.
= λi vq Mqx vqT (λ2i Mqq + Gqq )
 2 T 
[9] M. Spong, “Energy based control of a class of underactuated mechan-
ical systems,” in Proceedings of the IFAC World Congress, 1996, pp.
 
= 01×2 01×2n . (30)
431–435.
[10] A. Shiriaev, H. Ludvigsen, and O. Egeland, “Swinging up the spherical
When λi = 0, this yields vqT Gqq = 01×2n ⇒ vq = 02n×1 pendulum via stabilization of its first integrals,” Automatica, vol. 40,
as Gqq is invertible. This is not possible since it contradicts no. 1, pp. 73–85, January 2004.
the fact that vi = [02×1 ; vq ] 6= 02n+2×1 . Therefore, λi 6= 0. [11] K. Astrom and K. Furuta, “Swinging up a pendulum by energy
control,” Automatica, vol. 36, no. 2, pp. 287–295, February 2000.
Then, (30) implies [12] O. Gutiérrez F., C. Aguilar Ibéñez, and H. Sossa A., “Stabilization
of the inverted spherical pendulum via Lyapunov approach,” Asian
vqT (λ2i Mqq + Gqq ) = 01×2n , vqT Mqx = 01×2 , (31) Journal of Control, vol. 11, no. 6, pp. 587–594, 2009.
[13] A. Bloch, D. Chang, N. Leonard, and J. Marsden, “Controlled La-
which states that there exists a non-zero generalized left grangians and the stabilization of mechanical systems II: Potential
eigenvector of (20) that is orthogonal to Mqx . Therefore (21) shaping,” IEEE Transactions on Automatic Control, vol. 46, pp. 1556–
is false. 1571, 2001.
[14] J. Zhao and M. Spong, “Hybrid control for global stabilization of the
As a last step, we show (29) implies (21). If (21) is false, cart-pendulum system,” Automatica, vol. 37, no. 12, pp. 1941–1951,
there exists a non-zero eigenvector vq satisfying (31). Let 2001.
vi = [02×1 ; vq ]. Then, it is orthogonal to B as viT B = 01×2 . [15] T. Hoshino, H. Kawai, and K. Furuta, “Stabilization of the triple
spherical inverted pendulum-a simultaneous design approach,” Autom-
And vi is a generalized left eigenvector of (M, G) as it matisierungstechnik, vol. 48, pp. 577–587, 2000.
satisfies (30). In short, (21) is equivalent to (29). [16] K. Furuta, T. Ochiai, and N. Ono, “Attitude control of a triple inverted
pendulum,” International Journal of Control, vol. 39, pp. 1351–1365,
D. Proof of Proposition 4 1984.
[17] T. Lee, M. Leok, and N. H. McClamroch, “Lagrangian mechanics
Using (14), (27), the linearized control input is given by and variational integrators on two-spheres,” International Journal for
n Numerical Methods in Engineering, vol. 79, no. 9, pp. 1147–1174,
X 2009.
u = −Kx δx − Kẋ δ ẋ − {Kqi C T ξi + Kωi C T δωi }. [18] P. Hughes and R. Skelton, “Controllability and observability of linear
i=1 matrix-second-order systems,” ASME Journal of Applied Mechanics,
vol. 47, pp. 415–420, 1980.
From the definition of the state vector x = [19] A. Laub and W. Arnold, “Controllability and observabiilty criteria
[δx; C T ξ1 ; . . . ; C T ξn ] in (19), u can be written as for multivariable linear second-order models,” IEEE Transactions on
Automatic Control, vol. 29, no. 2, pp. 163–165, 1984.
u = −Kx x − Kẋ ẋ, [20] H. Khalil, Nonlinear Systems. Prentice Hall, 2002.

You might also like