ISSN 28 5316 ISRN LUTFD2/TFRT--7574--SE Modelling the Furuta Pendulum Magnus Gäfvert Department of Automatic Control Lund Institute of Technology April 1998
z M PSfrag replacements θ m p, l p m a, l a x Figure 1 J The furuta pendulum. y 1. Introduction This report contains derivations of the Furuta pendulum dynamics using the Euler-Lagrange equations. The Furuta pendulum is shown in Figure 1. It consists of two connected inertial bodies: A center pillar with moment of inertia J, rigidly connected to a horizontal arm with length l a and homogenously line distributed mass m a. The pendulum arm with length l p and homogenously line distributed mass m p, and the balancing body with point distributed mass M. 2. Kinematics The position of a point P on the pendulum can be described with the position vector with rr a, r p ) = r x r a, r p ), r y r a, r p ), r z r a, r p )) 1) r x r a, r p ) = r a cos r p sin sinθ, r y r a, r p ) = r a sin + r p cos sinθ, r z r a, r p ) = r p cosθ. 2) The variable r a is the radial position on the horizontal arm, and r p is the radial position on the pendulum arm. The radial distances are measured from the center of rotation for the bodies respectively. Taking time derivatives of 1) gives an expression for the velocity vr a, r p ) = v x r a, r p ), v y r a, r p ), v z r a, r p )) 3) of P on the pendulum, with v x r a, r p ) = r a sin r p cosθ sin θ r p sinθ cos, v y r a, r p ) = r a cos + r p cosθ cos θ r p sinθ sin, v z r a, r p ) = r p sinθ θ. 4) 1
This is then used to express the square magnitude of the velocity for P: v 2 r a, r p ) = r 2 a + r2 p sin2 θ) 2 + 2r a r p cosθ θ + r 2 p θ 2 5) 3. Energy expressions Expressions for kinetic and potiential energy is derived in this section. Kinetic energy is derived from solving the integral T = 1 v 2 dm, 6) 2 using 5), and potential energy from solving V = g r z dm 7) using 1). The derivations are done for each body separately. Center pillar 2T c = J 2 V c = ; 8) Horizontal arm 2T a = la = 1 3 m ala 2 2 v 2 s, )m a /l a ds 9) V a = ; Pendulum arm 2T p = lp v 2 r a, s)m p /l p ds = m p la 2 + 1 3 l2 p sin 2 θ) 2 + m p l a l p cosθ θ + 1 3 m pl 2 p lp V p = g r z l a, s)m p /l p ds = 1 2 m pgl p cosθ θ 2 1) Balancing mass 2T m = Mla 2 + l 2 p sin 2 θ) 2 + 2Ml a l p cosθ θ + Ml 2 p V m = Mgl p cosθ θ 2 11) The total kinetic energy of the pendulum is given by T = T c + T a + T p + T m, 12) and the total potential energy by V = V c + V a + V p + V m. 13) 2
4. Equations of motion Forming the Lagrangian L = T V 14) the equations of motion are given by ) d L dt ) d L dt θ L = τ L θ = τ θ 15) with τ and τ θ being external torques applied to the horizontal arm joint and the pendulum arm joint respectively. The partial derivatives are: L = L = + J + M + 1 3 m a + m p )l 2 a + M + 1 3 m p)l 2 p sin 2 θ M + 1 ) 2 m p l a l p cosθ θ ) L θ = M + 1 3 m p + M + 1 ) 2 m p gl p sinθ ) L θ = M + 1 2 m p l 2 p cosθ sinθ 2 l a l p cosθ + M + 1 ) 2 m p M + 1 ) 3 m p l 2 θ p ) l a l p sinθ θ 16) Inserting 16) into 15) and introducing α = J + M + 1 3 m a + m p )la 2 β = M + 1 3 m p)l 2 p γ = M + 1 2 m p)l a l p δ = M + 1 17) 2 m p)gl p yields the equations of motion for the pendulum: α + β sin 2 θ ) + γ cosθ θ + 2β cosθ sinθ θ γ sinθ θ 2 = τ γ cosθ + βθ β cosθ sinθ 18) 2 δ sinθ = τ θ Equation 18) can be written in matrix form as ) ) D, θ) + C, θ,, θ θ) + g, θ) = τ 19) θ with matrices defined by D, θ) = α + β sin 2 ) θ γ cosθ, γ cosθ β C, θ,, θ) = β cosθ sinθ θ β cosθ sinθ γ sinθ θ ) ) β cosθ sin θ, g, θ) =. δ sinθ 2) 3
The matrices D, θ) and C, θ,, θ) satisfies the fundamental property N, θ,, θ) = Ḋ, θ) 2C, θ,, θ) 21) with the skew symmetric matrix N, θ,, θ) γ sinθ θ 2β cosθ sinθ ) = γ sinθ θ + 2β cosθ sinθ. 22) The external torques τ can be divided into a driving torque on the -joint and dissipation terms as τ = τ u τ F. 23) 5. Integration model The equations of motion 18) can be rewritten on a form suitable for integration: d dt = d dt 1 = α β γ 2 + β 2 + γ 2 ) sin 2 θ γ δ cosθ sinθ + βτ γ cosθτ θ } d dt θ = θ d dt θ = { { βγ sin 2 θ 1) sinθ 2 2β 2 cosθ sin θ θ + βγ sinθ θ 2 1 α β γ 2 + β 2 + γ 2 ) sin 2 βα + β sin 2 θ) cosθ sinθ θ γ 2 cosθ sinθ θ } 2 + δ α + β sin 2 θ) sinθ γ cosθτ + α + β sin 2 θ)τ θ 2 + 2βγ 1 sin 2 θ) sinθ θ 24) 6. Equilibrium points It follows from inserting = θ = θ, θ θ and in 18) that sinθ β cosθ 2 + δ ) = 25) holds in stationarity. Solving for θ the following equilibrium points are obtained: θ = kπ with k Z for all R ) δ θ = π arccos β, 2 for = o 26) 7. Linearization Rewriting 19) as d ) dt θ = D 1, θ) τ C, θ,, θ) ) θ ) g, θ) 27) 4
and introducing the state variable x = θ θ 28) we get the state equation dx dt = f x,τ ) 29) with f defined appropriately. The linearized model at the equilibrium point x =,, θ, θ ), τ =, ) is obtained from dδ x) dt = f x δ x + f τ τ = Aδ x + Bτ 3) with δ x = x x. For x =,,, ) that gives us 1 δ γ α β γ A = 2 1, B = αδ β γ γ α 31) with eigenvalues { } αδ,, ± α β γ 2. 32) For x =,, π, ) we get 1 δ γ α β γ A = 2 1, B = αδ β γ γ α 33) with eigenvalues { } αδ,, ±i α β γ 2. 34) In the limit case J, m a and m p the modes of a simple pendulum are restored since αδ g α β γ 2. 35) l p 5
8. Linear state feedback control The linearized model 3) can be used to derive a continuous time state feedback controller on the form τ u = Lx 36) with L = l, l, l θ, lθ ). The linear dynamics of the equilibrium point x =,,, ) yields the closed loop characteristic equation s 4 γ l θ β l α β γ 2 s3 γ l θ β l + αδ α β γ 2 s 2 and the dynamics of x =,, π, ) yields s 4 + γ l θ β l α β γ 2 s3 + γ l θ β l + αδ α β γ 2 s 2 + δ l α β γ 2 s δ l α β γ 2 s + δ l α β γ 2 =, 37) δ l α β γ 2 =. 38) Equating the coefficients in 37) and 38) with the coefficients of the desired closed loop characteristic equation s 2 + 2ζ 1 ω 1 s + ω 2 1)s 2 + 2ζ 2 ω 2 s + ω 2 2) =, 39) and solving for the feedback gains gives l = α β γ 2 ω 1 2 δ ω 2 2 l = 2α β γ 2 ω 1 ω 2 ω 1 ζ 2 + ω 2 ζ 1 ) δ l θ = αδ α β γ 2 β γ γ δ ω 1 2ω 2 2 + ω 1 2 + ω 2 2 + 4ω 1ω 2 ζ 1 ζ 2 ) θ = 2α β γ 2 β γ δ ω 1 2ω 2ζ 2 + β δ ω 1ω 2 2ζ 1 + ω 1 ζ 1 + ω 2 ζ 2 ) l 4) and l = α β γ 2 ω 1 2 δ ω 2 2 l = 2α β γ 2 ω 1 ω 2 ω 1 ζ 2 + ω 2 ζ 1 ) δ l θ = αδ + α β γ 2 β γ γ δ ω 1 2ω 2 2 + ω 1 2 + ω 2 2 + 4ω 1ω 2 ζ 1 ζ 2 ) l θ = 2α β γ 2 β γ δ ω 2 1ω 2 ζ 2 β δ ω 1ω 2 2ζ 1 + ω 1 ζ 1 + ω 2 ζ 2 ) 41) respectively. With a sampling period of 1 ms it is verified numerically that the feedback gains of the discrete time controller differ less than 1 % from the gains of the continuous time controller. With such fast sampling it is thus sound to use the continuous time design in a discrete controller. 6
9. Friction The real pendulum exhibits significant friction in the -joint. The friction can be modeled in several ways. Coulomb and viscous friction τ F = τ C sgn + τ v 42) Coulomb friction with stiction τ C sgn τ F = τ u τ S sgnτ u if =, if = and τ u < τ S, otherwise. 43) In simulations the zero condition on the velocity is replaced by < ε, with chosen appropriately. ε 1. Model Parameters The pendulum state equations on integrable form 24) can be coded into a Simulink S-function. Simulations of the free pendulum dynamics reveals that stability is critically dependent on the choice of parameters. Simply setting α = β = γ = δ 1 leads to instability. Physically sound parameters can be found from measuring a real pendulum or from identification experiments. Measured Parameters Examples of physical parameters and model parameters are shown in Tables 1 and 2. Examples of friction model parameters for Coulomb friction with stiction m p [kg] l p [m] m a [kg] l a [m] M [kg] J [kg m 2 ].775.4125.72.25.225.972 Table 1 Real pendulum parameters α [kg m 2 ] β [kg m 2 ] γ [kg m 2 ] δ [kg 2 m 2 /s 2 ].33472.38852.24879.97625 Table 2 Real pendulum model parameters 43), are given in Table 3. Parameter Identification The equations of motion 18) together with the Coulomb and viscous friction 42) can be written on regressor form as y = T θ 44) 7
τ S [Nm] τ C [Nm] ε [rad/s].15.1.2 Table 3 Friction model parameters with T = sin 2 θ + 2 cosθ sinθ θ θ cosθ sinθ 2 y = ) τ u, cosθ θ sinθ θ 2 sgn ) cosθ, sinθ 45) α β γ δ. 46) With suitable low-pass or band-pass filtering the least-squares solution for θ provides a set of model parameters. If the measured velocity and acceleration signals are used, the corresponding scaling constants must be taken into account. τ C τ v 8