Academia.eduAcademia.edu

Matching, linear systems, and the ball and beam

2002, Automatica

A recent approach to the control of underactuated systems is to look for control laws which will induce some specified structure on the closed loop system. In this paper, we describe one matching condition and an approach for finding all control laws that fit the condition. After an analysis of the resulting control laws for linear systems, we present the results from an experiment on a nonlinear ball and beam system.

arXiv:math/0006121v2 [math.OC] 8 Nov 2002 Matching, linear systems, and the ball and beam F. Andreev1,3 , D. Auckly1,4 , L. Kapitanski 1,2,4 , S. Gosavi1,5 , W. White1,5 , A. Kelkar1,6 3 Department of Mathematics, Western Illinois University, Macomb, IL 61455, USA Department of Mathematics, Kansas State University, Manhattan, KS 66506, USA 5 Department of Mechanical and Nuclear Engineering, Kansas State University, Manhattan, KS 66506, USA Department of Mechanical Engineering, Iowa State University, Ames, IA 50011, USA 4 6 Abstract of matching control laws of any linear time invariant system contains all linear state feedback control laws (Theorem 2). We next present the general solution of the matching equations for the Quanser ball and beam system. (Note, that this system is different from the system analyzed by Hamberg, [11].) As always, the general solution contains several free functional parameters that may be used as tuning parameters. We chose these arbitrary functions in order to have a fair comparison with the manifacturer’s linear control law. Our laboratory tests confirm the predicted stabilization. This was our first experimental test of the λ-method. We later tested this method on an inverted pendulum cart, [3]. Consider a system of the form A recent approach to the control of underactuated systems is to look for control laws which will induce some specified structure on the closed loop system. In this paper, we describe one matching condition and an approach for finding all control laws that fit the condition. After an analysis of the resulting control laws for linear systems, we present the results from an experiment on a nonlinear ball and beam system. 1 Underactuated systems and the matching condition Over the past five years several researchers have proposed nonlinear control laws for which the closed loop system assumes some special form, see the controlled Lagrangian method of [8, 9, 10] the generalized matching conditions of [11, 12, 13], the interconnection and damping assignment passivity based control of [7], the λ-method of [6, 5], and the references therein. In this paper we describe the implementation of the λ-method of [6] on a ball and beam system. For the readers convenience we start with the statement of the main theorem on λ-method matching control laws (Theorem 1). We also present an indicial derivation of the main equations. We then prove a new theorem showing that the family 1 Supported 2 Supported grj ẍj + [j k, r] ẋj ẋk + Cr + ∂V = ur , ∂xr (1) r = 1, . . . , n, where gij denotes the mass-matrix, Cr the dissipation, V the potential energy, [i j, k] the Christoffel symbol of the first kind,   1 ∂gij ∂gki ∂gjk [jk, i] = , (2) + − 2 ∂q k ∂q j ∂q i and ur is the applied actuation. To encode the fact that some degrees of freedom are unactuated, the applied forces and/or torques are restricted to satisfy Pji g jk uk = 0, where Pji is a g-orthogonal projection. The matching conditions come from this restriction together with the requirement that the closed loop in part by NSF grant CMS 9813182 in part by NSF grant DMS 9970638 1 Second, λij Pkj and b gij satisfy  ∂λℓ b s r ∂ V gℓs jr + [ℓj, s]λℓr − [rj, i]λis P P j j k \ br + k t gbrj ẍ + [j k, r]ẋ ẋ + C = 0, r = 1, . . . , n, ∂q ∂xr  i ∂λs i ℓ + [ij, r]λ − [sj, ℓ]λ = 0, (6) +g ir s r b and Vb . The matching condifor some choice of gb, C, ∂q j tions read ∂b gnm ∂(λℓr Ptr ) ∂(λℓr Ptr ) λℓr Ptr + gbℓn + gbℓm     ℓ m ∂q ∂q ∂q n bi = 0, b k = 0, P r g ki Ci − gbki C Pkr Γkij − Γ k ij ∂Ptℓ ∂Ptℓ ℓ partialgnm ! + +g g . (7) = P ℓn ℓm t (3) ℓ m b ∂q ∂q ∂q n r ki ∂V ki ∂ V Pk g = 0, −b g ∂q i ∂q i Although the proof of this proposition may be found in [6], [4], and [5], for convenience, we include an k where Γij is the Christoffel symbol of the second kind, indicial notation derivation of equations (6) and (7). b k into Substitute equations (2), (4) for both Γkij and Γ ij k kℓ Γij = g [ij, ℓ]. (4) the first of equations (3) and multiply the result by the scalar 2 to obtain: If the matching conditions (3) hold, the control law ∂b gℓi ∂b gjℓ ∂b gij g kℓ j − Pkr b g kℓ i Pkr b g kℓ ℓ − Pkr b will be given by ∂q ∂q ∂q system takes the form   b kij )q̇ i q̇ j + Cr − C br ur = grk (Γkij − Γ ! b ∂ V ∂V g ki i . + grk g ki i − b ∂q ∂q = Pkr g kℓ (5) Multiply by g and use that P is self-adjoint i.e., rt Pik gkj = gik Pjk , to get ∂b gij ∂b gℓi ∂b gjℓ − Ptr λℓr j − Ptr λℓr i ∂q ℓ ∂q ∂q ∂gij ∂gri ∂gjr = Ptr r − Ptr j − Ptr i . ∂q ∂q ∂q Ptr λℓr b = The motivation for this method is that H 1 i j b g b q̇ q̇ + V is a natural candidate for a Lyapunov 2 ij d b H = −b gij b ci q̇ j . Following [6], infunction because dt k troduce new variables λi = gij gbjk . We have gℓi Use Ptr λℓr ∂b ∂qj = b satisfy (3) Theorem 1 The functions b gij , Vb , and C in a neighborhood of x0 if and only if ∂(Ptr λℓr g bℓi ) ∂qj − gbℓi (∂Ptr λℓr ) ∂qj λℓr b gℓi = gri   bi = 0, g ki C Pkr g ki Ci − b ! b ki ∂V r ki ∂ V Pk g = 0, − gb ∂q i ∂q i (8) and (9) in (8) to obtain (7). To derive (6), first, differentiate (9) with respect to q j to get λℓr ∂λℓ ∂gri ∂b gℓi = −b gℓi jr . j j ∂q ∂q ∂q (10) Substitute equation (10) into equation (8) and obtain and the following conditions hold. First, there exists a hypersurface containing x0 and transverse to each of the vectorfields λℓi Pji ∂/∂xℓ on which b gij is invertible and symmetric and satisfies gki Pℓk = λjk Pℓk b gji . ∂gij ∂gℓi ∂gjℓ − Pkr g kℓ j − Pkr g kℓ i . ℓ ∂q ∂q ∂q   ∂λℓr ∂λℓr gij ℓ ∂b gℓi j + b b gℓj i + λr ℓ ∂q ∂q ∂q  (11)  ∂grj ∂gri ∂gjr ∂gij ∂gri r . + − − + = Pt ∂q j ∂q i ∂q j ∂q i ∂q r Ptr 2 also symmetric. The symmetry of Vbℓj will follow if Multiply by −Pks λis , use (9) and (10) to obtain we have   ∂λℓr ℓ ∂gjs i ∂gij s r Pk Pt gℓs j + λr ℓ − λs r gbℓp g pr (Vrj − arj ) − b gjp g pr (Vrℓ − arℓ ) = 0, ∂q ∂q ∂q (12)   ∂λi ∂λℓ and, therefore, we need to find a symmetric, nonde= Pks Ptr gbij λℓr ℓs − λis b gℓj ri . ∂q ∂q generate matrix b gℓp satisfying this equation. The existence of such matrix is guaranteed by the following Finally, to obtain (6), add to equation (12) an equasimple observation. tion obtained from (12) by interchanging k and t, r and s, ℓ and i. 2 Lemma 1 Given any real n × n matrix R, there is a nondegenerate symmetric matrix X so that Matching and constant coefficient linear systems RX − X T RT = 0. Indeed, setting X = QY QT , results in the following In this section, we prove that for linear time invariant equation for Y : systems any linear full state feedback control law is Q−1 RQY − Y T (Q−1 RQ)T = 0. a solution to the matching equations. Theorem 2 When applied to linear, time- Hence, without loss of generality we may assume that −1 independent systems, the family of matching Q RQ is a real Jordan block (see [14]),   control laws contains all linear state feedback laws. λ 1 0 ...  0 λ 1 . . . Choose coordinates q i so that the desired equilibrium is at the origin, V = Vij q i q j + vk q k , and ... Ci = Cij q̇ j , where gij , Vij , vk , Cij , and Pkr are conor   stant, and Pkr has rank nu . Clearly, gbij , Vb = Vbij q i q j , a −b 1 0 0 0 . . . bi = C bij q̇ j is a solution to the matching equab and C a 0 1 0 0   0  . bij are constant provided 0 a −b 1 0 tions when gbij , Vbij , and C    . . .   0 0 b a 0 1 r ki ki gbij and Vbij are symmetric, Pk g Vij − b g Vbij = 0,   ... ... ... ... bij = 0. Let uk = vk + aki q i +   g ki C and Pkr g ki Cij − b 0 ... 0 1 i bki q̇ be an arbitrary linear control law, satisfying 0 . . . 1 0   solves the In each case Y =  Pkr g kℓ uℓ = 0. Comparison with equation (3) gives   ...   1 0 ... 0 grk g ki Vij − gbki Vbij = arj , equation. Note that the result of Lemma 1 is true for matrices and   with coefficients in any field. This is proved in [15]. ki ki b grk g Cij − gb Cij = brj . Thus, and 3 Vbℓj = gbℓp g pr (Vrj − arj ) bℓj = b C gℓp g pr (Crj − brj ). Example: Beam The Ball and In order to demonstrate the approach described It remains to check that we can find a symmetric, above, we have implemented one of the control laws nondegenerate matrix b g ki so that the resulting Vbℓj is from the family of control laws described in the first 3 ℓb = length of the beam ℓl = length of the link rg = radius of the gear rB = radius of the ball mB = mass of the ball mb = mass of the beam ml = mass of the link Table 1: The physical = 0.43m = 0.11m = 0.03m = 0.01m = 0.07Kg = 0.15Kg = 0.01Kg parameters of the system. 2 = ball inertia IB = 52 mB rB Ib = inertia of the beam Is = effective servo inertia g = gravitational acceleration s0 = desired equilibrium position c0 = inherent servo dissipation s = 4.25 × 10−6 Kg m2 = .001Kg m2 = 0.002Kg m2 = 9.8m/s2 = 0.22m = 9.33 × 10−10 Kg m2 /s and the dissipation is C1 = 0, C2 = c0 θ̇. After rescaling, we get α (1 − cos(α) − a2 (1 − cos(θ)))2 + (sin(α) + a1 − a2 sin(θ))2 = a21 , θ T = 1 2 1 ṡ + (a4 +(a3 +5/2 s2)(α′ (θ))2 )θ̇2 +α′ (θ) ṡ θ̇ , C1 = 0 , 2 2 V = a5 sin(θ) + (s + a6 ) sin(α(θ)), C1 = 0, and C2 = a7 θ̇, where the ak are the dimensionless parameters, Figure 1: The ball and beam system a1 = ℓl , ℓb rg (Ib + IB ) Is , a3 = , a4 = , ℓb IB IB ml rg ℓb (mb + ml ) a5 = , a6 = , 2mB rB 2mB rB  12  5 c0 . a7 = 3 2 rB g mB a2 = section on a ball and beam system, Figure 1 (this system is commercially available from Quanser Consulting, Ontario, Canada). The s−coordinate is unactuated, the θ−coordinate is actuated by the servo, and the objective is to bring the ball to the center of the beam. The physical paThe notation ′ is used to denote a derivative of a rameters of the system are given in Table 1. function of one variable. For general underactuated One can express α as a concrete function of θ from systems, the use of the powerful λ-method to solve the kinematic relation the matching equations is discussed in [6, 5]. For 2 (ℓb (1 − cos(α)) − rg (1 − cos(θ))) systems with two degrees of freedom, the λ-method 2 produces the general solution to the matching equa2 + (ℓb sin(α) + ℓl − rg sin(θ)) = ℓl . tions in an explicit form, [4]. When applied to the The kinetic energy of the system is ball and beam system, the explicit family of control laws is given by equation (5) with the following ex1 1 1 2 1 1 ṡ) + Ib α̇2 + Is θ̇2 . pressions for b T = mb s2 α̇2 + IB (α̇ + b where g, Vb , and C, 2 2 rB 2 2   Z α dϕ The potential energy is 2 , gb11 = ψ (α) h(y(s, θ)) + 10 ′ 2 0 µ1 (ϕ)ψ (ϕ) 1 1 V = ml g rg sin(θ) + (mb + ml ) g ℓb sin(α) 1 1 2 2 g12 = (g11 − σb b g11 ), b g22 = (g12 − σb g12 ), µ µ + mB g s sin(α) , 4 C2 = Vb (s, θ) =w(y) + 5(y + s0 ) −5 Z 0 α sin(ϕ) ′ µ1 (ϕ)ψ(ϕ) b1 = (g1i b C g ) i1 −1 where  Z α 0 Z sin(ϕ) dϕ µ′1 (ϕ)ψ(ϕ) chose µ1 (α) = 1.0849 exp(4.7845 sin(α)) h(y) = 1.1031, w(y) = 0.0023y 2, ϕ ψ(τ ) dτ dϕ, b2 (s, θ, ṡ, θ̇) = −b C g12 · (1 + ṡ2 + 10θ̇2 )(−µṡ + σ θ̇). 0 These functions produce the control law, u, in rescaled units. The values of the constants a1 through a7 are as follows  b2 , C1 − g1j b g C j2 a1 a2 a3 a4 µ′1 (α(θ)) , 5s g12 1 ′ σ(s, θ) = µ1 (α) − µ1 (α), Z α 5s µ1 (κ) dκ}. y = ψ(α) s − s0 + ψ(τ ) dτ, ′ µ1 (κ) 0 µ(s, θ) = Experimental Results Our experiments were conducted on the Quanser ball and beam system. The control signal is a voltage supplied to the servo and the sensed output of the system is s and θ sampled at 300 Hz. A Quanser MULTIQr data acquisition card is used for the analog signal input and output. The velocities are computed via numerical differentiation using the forward difference algorithm. The control law produces a voltage signal and is supplied through the D/A converter to the DC servomotor via an amplifier. The relation between the control voltage, vin , and the torque, u (= u2 in 2 equation (5)), is Km Ng2 θ̇, where Rm = armature resistance = 2.6 Ω, Ng = gear ratio = 70.5, Km = motor torque constant = 0.00767 Volt·sec. Any stabilizing linear control law for this system is specified by four constants. The nonlinear control laws in our family are specified by the four arbitrary b2 (s, θ, ṡ, θ̇). We functions: µ1 (α), h(y), w(y), and C 0.2547 0.0588 236.294 471.126 a5 = 0.1889 a6 = 42 a7 = 5 × 10−6 The final control signal is obtained by converting back into MKS units and using the formula in the preceding paragraph to get the input voltage. These choices were made from the following considerations. The form of the function µ1 was chosen to simplify the integrals in the expressions for y, ψ, and b g11 . The b2 was chosen to ensure that C b1 ṡ+ C b2 θ̇ would form of C b to be a Lyapunov function). Fibe positive (for H nally, the coefficients in these functions were chosen so that the linearization of the nonlinear control law would agree with the linear control law provided by the manufacturer. Extensive numerical simulations done using Matlabr confirm that the nonlinear control law stabilizes the system. The linear control law appears to stabilize the system for a wider range of initial conditions than the nonlinear control law. This is an empirical observation, not a mathematical fact. Finding an adequate mathematical framework to compare different control laws is a very interesting unresolved problem, see [4]. Usually, given two locally stabilizing control laws, there exist initial conditions stabilized by one but not by the other. For example, one set of physically unrealistic initial conditions with a large angular velocity θ̇ = 3.6 (or 158 rad/sec in physical units) is stabilized by our nonlinear control law but not by the linear one. We have implemented the nonlinear control law in the laboratory. The laboratory tests confirm the predicted behavior of the nonlinear controller. Figures 2 and 3 show a comparison of the time histories of the ball position (s) and angular displacement (θ) for the Here h(y), w(y), µ1 (α) are arbitrary functions of one b2 is an arbitrary function which is odd variable, and C in velocities. 4 = = = = 5 1.2 0.04 Linear control law Nonlinear control law 0.03 Linear control law Nonlinear control law 1 0.02 0.8 Angle (rad) Position (m) 0.01 0 −0.01 0.6 0.4 −0.02 0.2 −0.03 0 −0.04 −0.2 −0.05 −0.06 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 −0.4 5 Time (sec) 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time (sec) Figure 2: Ball position response Figure 3: Angular displacement response linear and nonlinear control laws. In both cases the control laws will perform better. This is an imporcontrol signal reached the saturation limit for a short tant problem that must be resolved. duration during the initial rise of the response. The difference in the steady-state values of the responses is attributed to a lack of sensitivity of the resistive References strip used to measure the ball position. [1] F. Andreev, D. Auckly, S. Gosavi, L. Kapitanski, A. Kelkar, and W. White, Matching, linear systems, and the ball and beam, 5 Conclusions http://arXiv.org/abs/math.OC/0006121 [2] F. Andreev, D. Auckly, L. Kapitanski, A. Kelkar, W. White, Matching control laws for a ball and beam system, Proc. IFAC Workshop on Lagrangian and Hamiltonian Methods for Nonlinear Control , Princeton (2000) 161-162; The λ-method produces explicit infinite-dimensional families of control laws and simultaneously provides a natural candidate for a Lyapunov function. When this method is applied to linear time-invariant systems, the resulting family contains all linear state feedback control laws (Proposition 2). In this paper we also present the results of the first implementation of a λ-method matching control law on a concrete physical device, the ball and beam system. The experimental results agree with theoretical predictions and numerical simulations. In our experiments we observe that the linear control law performs better than our nonlinear control law for the ball and beam system. However, in a later experiment with an inverted pendulum cart, [3], we found that a properly tuned λ-method matching control law performed better than the corresponding linear one. At the moment, it is not known for which systems matching [3] F. Andreev, D. Auckly, L. Kapitanski, A. Kelkar, W. White, Matching and digital control implementation for underactuated systems, Proceedings of the American Control Conference, Chicago, IL, (2000) 3934-3938. [4] D. Auckly, L. Kapitanski, Mathematical problems in the control of underactuated systems, CRM Proceedings and Lecture Notes 27 (2000) 41-52. [5] D. Auckly, L. Kapitanski, On the λ-equations for matching control laws, submitted 6 [6] D. Auckly, L. Kapitanski and W. White, Control of nonlinear underactuated systems, Communications on Pure Appl. Math. 53 (2000) 354-369. [7] G. Blankenstein, R. Ortega and A. J. van der Schaft, The matching conditions of controlled Lagrangians and interconnection and damping assignment passivity based control, Preprint (2001) [8] A. Bloch, N. Leonard and J. Marsden, Stabilization of mechanical systems using controlled Lagrangians, Proc. IEEE Conference on Decision and Control, San Diego, CA (1997) 2356-2361. [9] A. Bloch, D. Chang, N. Leonard and J. E. Marsden, Controlled Lagrangians and the stabilization of mechanical systems II: Potential shaping, Trans IEEE on Auto. Control 46 (2001) 15561571. [10] A. Bloch, N. Leonard and J. Marsden, Controlled Lagrangians and a stabilization of mechanical systems I: The first matching theorem, IEEE Trans. Automat. Control 45 (2000) 22532270. [11] J. Hamberg, General matching conditions in the theory of controlled Lagrangians, in Proc. IEEE Conference on Decision and Control , Phoenix, AZ (1999) [12] J. Hamberg, Controlled Lagrangians, symmetries and conditions for strong matching, Proc. IFAC Workshop on Lagrangian and Hamiltonian methods for nonlinear control , Princeton, NJ (2000) 62-67. [13] J. Hamberg, Simplified conditions for matching and for generalized matching in the theory of controlled Lagrangians, Proc. ACC , Chicago, Illinois (2000) 3918-3923. [14] R. Horn and C. Johnson, Matrix analysis, Cambridge University Press, Cambridge, 1985. [15] O. Taussky and H. Zassenhaus, On the similarity transformation between a matrix and its transpose, Pacific J. Math., 9 (1959) 893-896. 7