Professional Documents
Culture Documents
Brief Paper
Swinging up a pendulum by energy controlq
K.J. As stroK m!,*, K. Furuta"
!Department of Automatic Control, Lund Institute of Technology, Box 118, S-22100 Lund, Sweden
"Department of Control and Systems Engineering, Tokyo Institute of Technology, Tokyo, Japan
Received 13 November 1997; revised 10 August 1998; received in "nal form 10 May 1999
Abstract
Properties of simple strategies for swinging up an inverted pendulum are discussed. It is shown that the behavior critically depends
on the ratio of the maximum acceleration of the pivot to the acceleration of gravity. A comparison of energy-based strategies with
minimum time strategy gives interesting insights into the robustness of minimum time solutions. ( 1999 Elsevier Science Ltd. All
rights reserved.
0005-1098/00/$ - see front matter ( 1999 Elsevier Science Ltd. All rights reserved.
PII: S 0 0 0 5 - 1 0 9 8 ( 9 9 ) 0 0 1 4 0 - 5
288 K.J. As stro( m, K. Furuta / Automatica 36 (2000) 287}295
2. Preliminaries
A B
E 1 dh 2
E" " #cos h!1. (4) upright position. This corresponds to the trajectory
n mgl 2 dq
E"1J(hQ )2#mgl(cos h!1)"0,
The system is thus characterized by two parameters only, 2
the natural frequency for small oscillations u "Jmgl/J which passes through the unstable equilibrium at the
0
and the normalized maximum acceleration of the pendu- upright position. A di!erent strategy is used to catch
lum n"u /g. The model given by Eq. (1) is locally the pendulum as it approaches the equilibrium. Such
.!9
K.J. As stro( m, K. Furuta / Automatica 36 (2000) 287}295 289
a strategy can also catch the pendulum even if there is an The parameter n is crucial because it gives the max-
error in the energy control so that the constant energy imum control signal and thus the maximum rate of
strategy does not pass through the desired equilibrium, energy change, compare with Eq. (5). Parameter n drasti-
see As stroK m (1999). cally in#uences the behavior of the swing up as will be
The energy E of the uncontrolled pendulum is given by shown later. Parameter k determines the region where
Eq. (2). To perform energy control it is necessary to the strategy behaves linearly. For large values of k
understand how the energy is in#uenced by the acceler- strategy (8) is arbitrarily close to the strategy that gives
ation of the pivot. Computing the derivative of E with the maximum increase or decrease of the energy. In
respect to time we "nd practical experiments, the parameter is determined by the
noise levels on the measured signals.
dE
"JhQ h$ !mglhQ sin h"!mulhQ cos h, (5)
dt
where Eq. (1) has been used to obtain the last equality. 4. Swing-up behaviors
Eq. (5) implies that it is easy to control the energy. The
system is simply an integrator with varying gain. Con- We will now discuss strategies for bringing the pendu-
trollability is lost when the coe$cient of u in the right- lum to rest in the upright position. The analysis will be
hand side of (5) vanishes. This occurs for hQ "0 or carried out for the strategy given by Eq. (7). The sign
h"$p/2, i.e., when the pendulum is horizontal or when function in Eq. (7) is de"ned to be #1 when the argu-
it reverses its velocity. Control action is most e!ective ment is zero. The energy of the pendulum given by Eq. (2)
when the angle h is 0 or p and the velocity is large. To is de"ned so that it is zero in the stable upright position
increase energy the acceleration of the pivot u should be and !2mgl in the downward position. With these con-
positive when the quantity hQ cos h is negative. A control ventions the acceleration is always positive when the
strategy is easily obtained by the Lyapunov method. pendulum starts at rest in the downward position.
Energy control with E "0 gives the pendulum the
With the Lyapunov function <"(E!E )2/2, and the
0 0
control law desired energy. The motion approaches the manifold
where the energy is zero. This manifold contains the
u"k(E!E )hQ cos h, (6) desired equilibrium. With energy control the equilibrium
0
is an unstable saddle. It is necessary to use another
we "nd that
strategy to catch and stabilize the pendulum in the up-
d< right position. In Malmborg, Bernhardsson and As stroK m
"!mlk((E!E )hQ cos h)2.
dt 0 (1996) it is shown how to design suitable hybrid
strategies. Before considering the details we will make a
The Lyapunov function decreases as long as hQ O0 and taxonomy of the di!erent strategies. We will do this by
cos hO0. Since the pendulum cannot maintain a station- characterizing the gross behavior of the pendulum and
ary position with h"$p/2 strategy (6) drives the en- the control signal during swing-up. The number of
ergy towards its desired value E . There are many other swings the pendulum makes before reaching the upright
0
control laws that accomplishes this. To change the en- position is used as the primary classi"er and the number
ergy as fast as possible the magnitude of the control of switches of the control signal as a secondary classi"er.
signal should be as large as possible. This is achieved with It turns out that the gross behavior is entirely determined
the control law by the maximum acceleration of the pivot ng. The behav-
u"ng sign((E!E )hQ cos h), (7) ior during swing up is simple for large values of ng and
0 becomes more complicated with decreasing values of ng.
which drives the function <"DE!E D to zero and E
0
towards E . Control law (7) may result in chattering. 4.1. Single-swing double-switch behavior
0
This is avoided with the control law
There are situations where the pendulum swings in
u"sat (k(E!E )sign(hQ cos h)), (8)
ng 0 such a way that the angle increases or decreases mono-
where sat denotes a linear function which saturates at tonically. This is called the single-swing behavior. If the
ng
ng. Strategy (8) behaves like linear controller (6) for small available acceleration is su$ciently large, the pendulum
errors and like strategy (7) for large errors. Notice that can be swung up simply by using the maximum acceler-
the function sign is not de"ned when its argument is zero. ation until the desired energy is obtained and then setting
If the value is de"ned as zero the control signal will be acceleration to zero. With this strategy the control signal
zero when the pendulum is at rest or when it is horizon- switches from zero to its largest value and then back to
tal. If the pendulum starts at rest in the downward zero again. This motivates the name of the strategy.
position strategies (7), (6) and (8) all give u"0 and the To "nd the strategy we will consider a coordinate
pendulum will remain in the downward position. system "xed to the pivot of the pendulum and regard the
290 K.J. As stro( m, K. Furuta / Automatica 36 (2000) 287}295
P
b observer in a coordinate frame "xed to the pivot then
= " F dx. (9)
ab sees a gravitational "eld with strength w in the direction
a OC. The kinetic energy is continuous at the switch but
To swing up the pendulum with only two switches of the the potential energy is discontinuous. The pendulum will
control signal the pendulum must have obtained the swing towards the upright position if its kinetic energy is
required energy before the pendulum is horizontal. In so large that it reaches the point E. The kinetic energy at
a coordinate system "xed to the pivot the center of mass F must thus be at least mbw. The condition for this is
of the pendulum has moved the distance l when it be-
comes horizontal. The horizontal force is mng and its a5b. (10)
energy has thus been increased by mngl. The energy
It follows from Fig. 3 that a"sin h !cos h and
required to swing up the pendulum is 2mgl and we thus 0 0
b"1!sin h . Condition (10) then becomes
"nd that the maximum acceleration must be at least 2g 0
for single-swing double-switch behavior. If the acceler- 2 sin h 51#cos h . (11)
0 0
ation is larger than 2g the acceleration will be switched
o! when the pendulum angle has changed by hH. The Introducing n"tan h and using equality in Eq. (11)
0
center of the mass has moved the distance l sin hH and the gives
energy supplied to the pendulum is nmgl sin hH. Equating
2n"1#J1#n2.
this with 2mgl gives sin hH"2/n.
This equation has the solution n"4. To have a single-
3
4.1.1. Example 1 * simulation of SSDS behavior swing triple-switch behavior the acceleration of the pivot
The single-swing double-switch strategy is illustrated must thus be at least 4g/3. If n"4 the pivot accelerates to
3
in Fig. 2 which shows the angle, the normalized energy, the right until the pendulum reaches the horizontal. The
and the control signal. The simulation is made using the pivot is then accelerated to the left until the desired
normalized model with u "1 and the control law given energy is obtained. This happens when the pendulum is
0
by Eq. (8) with n"2.1 and k"100. With this value of 303 from the vertical and the acceleration is then set to
k the behavior is very close to a pure switching strategy. zero.
Notice that it is required to have n52 to have the If n is greater than 4 the acceleration of the pivot can be
3
single-swing double switch behavior for pure switching. set to zero before the pendulum reaches the point E. Let
Slightly larger values of n are required with the control hH be the angle of the pendulum when the acceleration of
K.J. As stro( m, K. Furuta / Automatica 36 (2000) 287}295 291
Fig. 3. Diagram used to explain the single-swing, triple-switch behav- Fig. 5. Figure used to derive the conditions for the double-swing
ior. The origin of the coordinate system is called O. quadruple-switch behavior. The origin of the coordinate system is
called O.
5. Generalizations d<
"!Gu,
dt
The energy control for a single pendulum is very
where
simple. It leads to a "rst-order system described by an
integrator whose gain depends on the angle and its rate G"m l E hQ cos h #m l E hQ cos h .
11 1 1 1 22 2 2 2
294 K.J. As stro( m, K. Furuta / Automatica 36 (2000) 287}295
References
Meier, H., Farwig, Z., & Unbehauen, H. (1990). Discrete computer Katsuhisa Furuta was born in Tokyo, Ja-
control of a triple-inverted pendulum.. Optical Control pan in 1940. He received his B.S., M.S., and
Applications and Methods, 11, 157}171. Ph.D. degrees in Engineering from the To-
Mori, S., Nishihara, H., & Furuta, K. (1976). Control of unstable kyo Institute of Technology in 1962, 1964,
mechanical systems: Control of pendulum.. International Journal of and 1967, respectively. He was a post doc-
toral fellow at Laval University (Quebec,
Control, 23(5), 673}692. Canada) from July 1967 to August 1969.
Schaefer, J. F., & Cannon, R. H. (1967). On the control of unstable Since then, he has been a member of
mechanical systems. In Automatic remote control III, Proceedings of the teaching sta! of the Tokyo Institute
the 3rd International Federation on Automatic Control (IFAC), vol. of Technology, Department of Control
1 (6C.1-6C.13). Engineering, where he is currently a
Shinbrot, T., Grebogi, C., & Wisdom, J. (1992). Chaos in a double Professor, Graduate School of Informa-
pendulum.. American Journal of Physics, 60, 491}499. tion Science and Engineering. He was a Russell Severance Springer
Spong, M. W. (1995). The swing up control problem for the acrobot.. Professor, University of California University at Berkeley in 1997. He is
IEEE Control Systems Magazine, 15(1), 49}55. a member of Science Council of Japan from 1997, and is the President
of SICE (Society of Instrument and Control Engineers) in 1999. He has
Spong, M. W., & Praly, L. (1995). Energy based control of under- been a council member of IFAC and the editor of Automatica in
actuated mechanical systems using switching and saturation. In application from 1996 till 1999. He is a fellow of both IEEE and SICE
Morse, Preprints of the Block Island workshop on control using and has received the honorary doctor from Helsinki University of
logic-based switching (pp. 86}95). Rhode Island. Technology.
Spong, M. W., & Vidyasagar, M. (1989). Robot dynamics and control.
New York: Wiley.
Wei, Q., Dayawansa, W. P., & Levine, W. S. (1995). Nonlinear control-
ler for an inverted pendulum having restricted travel.. Automatica, Karl J. As stroK m is Professor and Head of
31(6), 841}850. the Department of Automatic Control at
Lund University since 1965. He has broad
Wiklund, M., Kristenson, A., & As stroK m, K. J. (1993). A new strategy for interests in automatic control including,
swinging up an inverted pendulum. In Preprints IFAC 12th world stochastic control, system identi"cation,
congress. Sydney, Australia. adaptive control, computer control and
Yamakita, M., & Furuta, K. (1992). VSS adaptive control based on computer-aided control engineering. He
nonlinar model for TITech pendulum.. IEEE, 1488}1493. has supervised 44 Ph.D. students, written
Yamakita, M., Iwashiro, M., Sugahara, Y., & Furuta, K. (1995). Robust six books and more than 100 papers in
swing up control of double pendulum. In American control con- archival journals. He is a member of the
ference (pp. 290}295). Royal Swedish Academy of Engineering
Yamakita, M., Nonaka, K., & Furuta, K. (1993). Swing up control of Sciences (IVA) and the Royal Swedish
Academy of Sciences (KVA) and a foreign member of the US National
a double pendulum. In Proceedings of the American Control Academy of Engineering and the Russian Academy of Sciences. As stroK m
Conference (pp. 2229}2233). San Francisco, CA. has received many honors including three honorary doctorates, the
Yamakita, M., Nonaka, K., Sugahara, Y., & Furuta, K. (1994). Robust Callender Silver Medal, the Quazza Medal from IFAC, the Rufus
state transfer control of double pendulum. In IFAC symposium on Oldenburger Medal from ASME, the IEEE Control Systems Science
advances in control education (pp. 223}226) Boston. Award and the IEEE Medal of Honor.