History of Inverted-Pendulum Systems Kent H. Lundberg Franklin W. Olin College of Engineering, Needham, Mass. 02492 email: klund@alum.mit.edu Taylor W. Barton Massachusetts Institute of Technology, Cambridge, Mass. 02139 Abstract: The inverted-pendulum system is a favorite example system and lecture demonstration of students and educators in physics, dynamics, and control. This system is a simple and valuable laboratory representation of an unstable mechanical system. This paper traces the early history of the inverted-pendulum system, and also compares several of the early treatments from the literature between 1960 and 1970. 1. INTRODUCTION The inverted-pendulum system is a favorite example system and lecture demonstration of students and educators in physics, dynamics, and control. This system is a simple and valuable laboratory representation of an unstable mechanical system. It is also often used to model the control problems encountered in the flight of rockets and missiles in the initial stages of launch, when the airspeed is too small for aerodynamic stability. 2. SOME HISTORY Roberge (1960) demonstrated a solution to the invertedpendulum system at M.I.T. in his aptly named bachelor’s thesis, “The Mechanical Seal”. Roberge’s research was supervised by Leonard Gould. Systems with multiple independent inverted pendula were described by Higdon and Cannon (1963) at Stanford. Higdon’s article acknowledges Roberge’s work and credits Claude Shannon (father of information theory and avid unicyclist) with suggesting the multiple-inverted-pendula mechanical system in a prominent footnote: This model was suggested to the second author by Prof. Claude Shannon, of MIT. (Experiments with a single pendulum are reported in an SB thesis entitled “The Mechanical Seal” by Roberge at MIT, May 1960.) Schaefer and Cannon (1966) discussed jointed and flexible inverted-pendulum systems. This article (which shares a coauthor with Higdon and Cannon (1963)) also credits Shannon with suggesting the system, but does not mention Roberge’s work. Truxal (1965) wrote a set of lecture notes on state-space models and control using the dual-inverted-pendulum system as an example. By the end of the 1960s, discussions of the single inverted-pendulum system were included in popular textbooks such as Cannon (1967), Dorf (1967), and Ogata (1970) (which all reference Higdon and Cannon (1963) in their discussions of the inverted pendulum). Stabilization of a pendulum in the inverted configuration by a vertically oscillating base is a favorite example of classes in physics and classical mechanics. This example system was treated by a series of articles in American Journal of Physics by Phelps and Hunter (1965), Blitzer (1965), and Kalmus (1970). A recent article by Åström and Furuta (2000) claims that “Inverted pendulums have been classic tools in the control laboratories since the 1950s,” but their earliest citation is Schaefer and Cannon (1966). Swing-up control of an inverted-pendulum system was demonstrated by Mori et al. (1976) (which cites Schaefer and Cannon (1966) but nothing earlier). The rotary pendulum system was suggested as an alternative to the cart-on-track system by Furuta et al. (1991). 3. MODELS The analysis of the inverted-pendulum system and the design of the stabilizing controls by various authors shows interesting differences. Stabilizing the angle of the pendulum is straightforward, but a significant (and often overlooked) difficulty exists in maintaining small deviations in cart travel. Without position control, in addition to angle control, the cart will quickly run out of track. This section compares the early treatments by Roberge (1960), Higdon and Cannon (1963), Cannon (1967), Dorf (1967), and Ogata (1970). In addition, this section reviews the treatment by Siebert (1986), which is one of the few complete discussions of the cart-position problem in the textbook literature. 3.1 Roberge (1960) Summing forces at the head of the broom (pendulum) Roberge (1960) finds the transfer function s2 /g Θ (s) = X (L/g)s2 − 1 where L is the length of the pendulum and g is the acceleration of gravity. Bode Diagram Gm = −6.25 dB (at 1.43 rad/sec) , Pm = −7.04 deg (at 0.771 rad/sec) Bode Diagram Gm = 9.79 dB (at 16.8 rad/sec) , Pm = 20.7 deg (at 7.47 rad/sec) 50 100 0 Magnitude (dB) Magnitude (dB) 50 0 −50 −50 −100 −100 −150 −135 −150 −135 −180 Phase (deg) Phase (deg) −180 −225 −225 −270 −270 −315 −315 −360 −3 10 −360 −3 −2 10 −1 10 0 10 1 10 Frequency (rad/sec) 2 10 −2 −1 10 10 3 10 10 Fig. 1. Bode plot of the compensated loop transfer function, showing 21 degress of phase margin. Reproduced in MATLAB from the transfer functions in Roberge (1960). 0 10 Frequency (rad/sec) 1 2 10 3 10 10 Fig. 3. Bode plot of the loop transfer function, including the effects of the position-compensation loop, showing 18 degress of phase margin at the critical cross-over frequency. Reproduced in MATLAB from the transfer functions in Roberge (1960). Nyquist Diagram 1 Nyquist Diagram 4 0.8 0.6 3 0.4 Imaginary Axis 2 Imaginary Axis 1 0 0.2 0 −0.2 −0.4 −1 −0.6 −2 −0.8 −3 −1 −3 −4 −7 −6 −5 −4 −3 Real Axis −2 −1 0 −2.5 −2 −1.5 −1 Real Axis −0.5 0 0.5 1 1 Fig. 2. Nyquist plot of the compensated loop transfer function, showing a negative encirclement of the −1 point. Since the system has one open-loop pole in the right-half plane, the closed-loop system is stable. Reproduced in MATLAB from the transfer functions in Roberge (1960). Fig. 4. Nyquist plot of the loop transfer function, including the effects of the position-compensation loop, showing two negative encirclements of the −1 point. Since the system has two open-loop poles in the right-half plane (one from the pendulum and one from the positivefeedback-integrator loop), the closed-loop system is stable. Reproduced in MATLAB from the transfer functions in Roberge (1960). To stabilize the system, a compensator with transfer function K (αds + 1) G(s) = 2 · 2 s (cs + 1) (ds + 1) discusses a control scheme without position compensation. Then, admitting that “it is desired to have the cart return to a given position on the floor after correcting a given initial disturbance,” a controller that stabilizes the cart position is found. is used, as shown in Figure 1, where the integrations are implemented using electromechanical motor-tach units (that is, true integrations). The (cs + 1) term in the denominator models the lag of these motor-tach units. The second term of the compensator transfer function implements lead compensation to offset the integrator lag and to push the closed-loop poles into the left-half plane. The Nyquist criterion is used to illustrate the stability of the system, as shown in Figure 2. The mechanical system was built using a plotting table and electromechanical integrators from the M.I.T. Dynamic Analysis and Control Laboratory (described by Hall (1950)). Two bang-bang controllers are synthesized for the system, one with linear switching and one with a limiting nonlinearity. For the linear-switching case, the control law is p fẋ u = a sign θ + θ̇ ρ2 /gr + ẋb − xk Mg Turning to the position of the cart, Roberge notes Since the major loop as developed thus far has a double integrator in the forward gain path and no position feedback, drift becomes a problem. Drift could cause the platform to reach the limits of travel of [the cart] and thus control would be lost. Even if no drift is assumed in the loop, an initial synchro misalignment with respect to vertical of only one second of arc (certainly much smaller than can be achieved in practice) would cause the broom to reach the limits of travel in about 100 seconds. To eliminate this problem position feedback was employed. . . The position signal is summed with the synchro signal to form the input of the first integrator. Polarity is chosen to cause positive feedback—if the base of the broom moves to the right, the synchro null is effectively shifted towards the center of the table, thus causing the broom base to move slightly futher to the right, and the broom handle tips inward. The net result is to force the broom to fall back towards the center of the table. The result of this additional feedback loop is shown in the Bode plot in Figure 3 and the Nyquist plot in Figure 4. 3.2 Higdon and Cannon (1963) Higdon and Cannon (1963) find the linearized equations of motion to be mρ2 θ̈ = mrgθ − mrẍ M ẍ = −mrθ̈ + fẋ ẋ + fv v where θ is the pendulum angle, x is the position of the cart, m is the pendulum mass, ρ is the pendulum radius of gyration about the hinge line, r is the distance from the hinge line to the pendulum center of mass, g is the acceleration of gravity, M is the total system effective mass, fẋ is the motor damping coefficient, fv is the voltage force coefficient, and v is the applied voltage to the motor. After recasting the equations of motion in normal coordinates and examining the resulting eigenvalues, Higdon first where p gr/ρ2 p . b= fẋ /M g − gr/ρ2 fẋ /M g Higdon observes It is interesting to note that for a damped motor fẋ is negative, hence the coefficients of x and ẋ are positive, indicating a positive feedback loop around cart position. This result was found by linear analysis also, but only after considerable head scratching. 3.3 Cannon (1967) In his textbook, Cannon (1967) finds the equations of motion of the pendulum-and-cart system to be (mC + m)ẍ + mlθ̈ = f mlẍ + (J + ml2 )θ̈ − mglθ = 0 and the transfer function from force to angle Θ −ρ1 /lm (s) = 2 F s − σo2 where ρ1 = 3/(1 + 4mC /m) and s 3(1 + mC /m)g . σo = (1 + 4mC /m)l The closed-loop system is stabilized using a lead compensator, and illustrated using the root-locus method, as shown in Figure 5. Cannon observes “The behavior of coordinate x (cart position) during the controlled recovery is also of interest”, but then leaves the details as an exercise for the reader: Prob. 22.33 Design a simple auxiliary loop, to be added to the stick-balancing system. . . whose purpose is simply to control cart position x to be zero with a leisurely speed of response (i.e., merely to keep the cart on the premises) . . . The effectiveness of this control may be demonstrated merely by (i) showing that its characteristic equation has all stable roots, and (ii) writing the overall system response function for an initial x, then using FVT to show that x(∞) is 0. (iii) As an additional feature, IVT may be used (shrewdly) to show that the initial velocity ẋ will be negative. That is, the cart corrects an x error by first backing up. Explain physically. 3.6 Siebert (1986) Root Locus 15 Siebert (1986) contains one of the few complete discussions of the cart-position problem in the textbook literature. He starts with the equation of motion 10 mgl sin θ − mlẍ cos θ = I θ̈ Imaginary Axis 5 to develop the small-angle linearized transfer function from cart position to angle Θ −mls2 H(s) = (s) = 2 . X Is − mgl 0 −5 −10 −15 −15 −10 −5 0 Real Axis 5 10 15 Fig. 5. Root-locus plot of the pendulum transfer function, stabilized with lead compensation. Reproduced in MATLAB from Figure 22.8 in Cannon (1967). 3.4 Dorf (1967) Dorf (1967) finds the equations of motion (assuming the cart M is much more massive than the pendulum m and ignoring the moment of inertia) to be M ÿ + mlθ̈ = u(t) mlÿ + ml2 θ̈ − mglθ = 0 Using these equations to obtain the necessary first-order differential equations, he finds the system matrix 01 0 0 mg 0 0 − 0 M A= . 0 0 0 1 g 0 00 l After suggesting sensors that could be used for full-state feedback (potentiometers and tachometers on angle and position), the system matrix is reduced (by throwing away the states associated with cart position and velocity!) and a stabilizing controller is found with u(t) = h1 θ + h2 θ̇ where it is shown that for stability, h2 > 0 and h1 > g. Unfortunately, this control scheme does not stabilize the position of the cart. 3.5 Ogata (1970) Ogata (1970) finds the same equations of motion as Cannon (J + ml2 )θ̈ + mlÿ − mglθ = 0 mlθ̈ + (mC + m)ẍ = u and uses the same stabilizing control as Dorf, u = M (aθ + bθ̇). For stability, it is necessary that b > 0 and a > (1 + m/M )g. Again, this solution does not control the position of the cart. Assuming the cart is driven by a motor with transfer function X km M (s) = (s) = V s(s + α) and proportional-plus-integral compensator a , K(s) = K 1 + s the system as shown in Figure 6 (with the desired pendulum angle Θ0 as the input variable and the actual pendulum angle Θ as the output variable) Θ −M (s)H(s) (s) = Θ0 1 − K(s)M (s)H(s) is shown to be stable, using the closed-loop transfer function and the Routh criterion. However, it is noted that the closed-loop transfer function to cart position has a pole at the origin −M (s) X (s) = Θ0 1 − K(s)M (s)H(s) as shown in Figure 7. Thus, a succession of random disturbances will induce a “random walk” in the car’s position that will sooner or later cause it to go off one end or the other of the track. This can be avoided by adding still another feedback path. . . This additional feedback path is shown as positive feedback from cart position to pendulum angle which implies that deviations of x(t) from its zero position will induce motor inputs in a direction that makes the error worse. But a little reflection on how you move your hand balancing a pointer will make it clear that this counterintuitive result is indeed correct. To achieve an ultimate motion of your hand to the right, you must first move it sharply to the left, displacing the pendulum angle to the right so that you can then steadily move your hand to the right under the pendulum. This intuitive explanation is satisfying for students and educators. 4. ADVANCES IN CONTROL EDUCATION 2009 The Eighth IFAC Symposium on Advances in Control Education is meeting in Kumamoto, Japan in October Θ0 + M (s) X H(s) Θ + K(s) Fig. 6. Block diagram from reference angle Θ0 to pendulum angle Θ. Adapted from Figure 6.4-3 of Siebert (1986). ml −km s2 − g X I . (s) = ml ml Θ0 (Kkm − g)s + (Kkm a − gα) s s3 + αs2 + I I Fig. 7. Closed-loop transfer function from reference angle to cart position showing the unstable pole at the origin. Reproduced from Siebert (1986). 2009. As described in the Call for Papers (IFAC (2009)), the theme of the conference is Inverted pendulum has been utilized for evaluating all kinds of control algorithms developed in control research field since its first success by Prof. Furuta in 1975. Today, inverted pendulum is used as the best benchmark in laboratory. Control engineering education with inverted pendulum will be specifically addressed by the ACE2009 program, where all kinds of algorithms for inverted pendulum will be proposed and competed by practical experiments in the site. As shown in this paper, this history is incomplete. REFERENCES K. J. Åström and K. Furuta. Swinging up a pendulum by energy control. Automatica, 36:287–295, 2000. Taylor W. Barton. Stabilizing the dual inverted pendulum. In Advances in Control Education, Kumamoto, Japan, October 2009. Leon Blitzer. Inverted pendulum. American Journal of Physics, 33(12):1076–1078, December 1965. Robert H. Cannon. Dynamics of Physical Systems, pages 703–710. McGraw-Hill, New York, 1967. Richard C. Dorf. Modern Control Systems, pages 276–279. Addison-Wesley, Reading, 1967. Katsuhisa Furuta, Masaki Yamakita, and Seiichi Kobayashi. Swing up control of inverted pendulum. In Proceedings, International Conference on Industrial Electronics, Control and Instrumentation, volume 3, pages 2193–2198, Kobe, Japan, 1991. Albert C. Hall. A generalized analogue computer for flight simulation. Transactions of the AIEE, 69:308–320, 1950. Donald T. Higdon and Robert H. Cannon. On the control of unstable multiple-output mechanical systems. ASME Publication 63-WA-148, American Society of Mechanical Engineers, New York, 1963. IFAC. Eighth IFAC Symposium on Advances in Control Education, Call for Papers, October 2009. URL http:// ace2009.cs.kumamoto-u.ac.jp/CFP_ACE2009A.pdf. Henry P. Kalmus. The inverted pendulum. American Journal of Physics, 38(7):874–878, July 1970. Kent H. Lundberg and James K. Roberge. Classical dualinverted-pendulum control. In Proceedings of the IEEE Conference on Decision and Control, pages 4399–4404, Maui, December 2003. Shozo Mori, Hiroyoshi Nishihara, and Katsuhisa Furuta. Control of unstable mechanical systems: Control of pendulum. International Journal of Control, 23(5):673– 692, May 1976. Katsuhiko Ogata. Modern Control Engineering, pages 277–279. Prentice-Hall, Englewood Cliffs, 1970. F. M. Phelps and J. H. Hunter. An analytical solution of the inverted pendulum. American Journal of Physics, 33(4):285–295, April 1965. James K. Roberge. The mechanical seal. Bachelor’s thesis, Massachusetts Institute of Technology, Cambridge, May 1960. James K. Roberge. Propagation of the race (of analog circuit designers). In Jim Williams, editor, Analog Circuit Design: Art, Science, and Personalities, chapter 10, pages 79–87. Butterworth-Heinemann, Boston, 1991. J. F. Schaefer and R. H. Cannon. On the control of unstable mechanical systems. In Proceedings of the 1966 International Federation of Automatic Control, volume 1, pages 6C.1–6C.13, London, 1966. William McC. Siebert. Circuits, Signals, and Systems, pages 177–182. MIT Press, Cambridge, 1986. J. G. Truxal. State models, transfer functions, and simulation. Monograph 8, Discrete Systems Concept Project, 1965. ABOUT THE AUTHORS Lundberg and Roberge (2003) described the intuitive construction of classical controllers for single- and dualinverted-pendulum systems, based on the intuitive singleinverted-pendulum controller of Siebert (1986) and the intuitive dual-inverted-pendulum controller as first described by Roberge (1991). This intuitive dual-invertedpendulum control system was built and demonstrated by Barton (2009).