Matching, Linear Systems, and The Ball and Beam: RJ J J K R R R

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

arXiv:math/0006121v2 [math.

OC] 8 Nov 2002

Matching, linear systems, and the ball and beam


F. Andreev1,3 , D. Auckly1,4 , L. Kapitanski
3 4 1,2,4

, S. Gosavi1,5 , W. White1,5 , A. Kelkar1,6

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
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 dierent 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 manifacturers linear control law. Our laboratory tests conrm the predicted stabilization. This was our rst experimental test of the -method. We later tested this method on an inverted pendulum cart, [3]. Consider a system of the form grj xj + [j k, r] xj xk + Cr + V = ur , xr (1)

Abstract
A recent approach to the control of underactuated systems is to look for control laws which will induce some specied structure on the closed loop system. In this paper, we describe one matching condition and an approach for nding all control laws that t 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.

Underactuated systems and the matching condition

Over the past ve 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

r = 1, . . . , n, where gij denotes the mass-matrix, Cr the dissipation, V the potential energy, [i j, k] the Christoel symbol of the rst kind, [jk, i] = 1 2 gij gki gjk + q k q j q i , (2)

in part by NSF grant CMS 9813182 in part by NSF grant DMS 9970638

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 1

system takes the form grj xj + [j k, r]xj xk + Cr + V = 0, r = 1, . . . , n, xr

j Second, i Pk and gij satisfy j s Pk Ptr gs

r + [j, s] [rj, i]i r s q j = 0, (6)

for some choice of g, C, and V . The matching conditions read


r r Pk k k = 0, Pk g ki Ci g ki Ci = 0, ij ij r Pk

+gir Ptr r

i s + [ij, r]i [sj, ] s r q j

Although the proof of this proposition may be found in [6], [4], and [5], for convenience, we include an k where ij is the Christoel symbol of the second kind, indicial notation derivation of equations (6) and (7). Substitute equations (2), (4) for both k and k into ij ij k k ij = g [ij, ]. (4) the rst of equations (3) and multiply the result by the scalar 2 to obtain: If the matching conditions (3) hold, the control law gi gj gij r r r Pk g k Pk g k j Pk g k i will be given by q q q gij gi gj r r r = Pk g k Pk g k j Pk g k i . ur = grk (k k )q i q j + Cr Cr ij ij q q q (5) Multiply by g and use that P is self-adjoint i.e., V V rt + grk g ki i g ki i . Pik gkj = gik Pjk , to get q q The motivation for this method is that H = 1 i j 2 gij q q + V is a natural candidate for a Lyapunov d function because dt H = gij ci q j . Following [6], introduce new variables k = gij g jk . We have i Theorem 1 The functions gij , V , and C satisfy (3) in a neighborhood of x0 if and only if
r Pk g ki Ci g ki Ci = 0, r Pk

V g ki i q

V g ki i q

(3) = 0,

gnm ( Ptr ) ( Ptr ) r r + gn + gm m q q q n Pt Pt partialgnm + +gn m gm n . = Pt q q q

(7)

Ptr r

gij gi gj Ptr j Ptr r r q q q i gij gri gjr = Ptr r Ptr j Ptr i . q q q


r (Pt gi ) r qj

(8)

Use Ptr gi = r qj

gi

r (Pt ) r qj

and (9)

gi = gri r

in (8) to obtain (7). To derive (6), rst, dierentiate (9) with respect to q j to get r gri gi r = gi j . j j q q q (10)

g ki

V V g ki i q i q

= 0,

and the following conditions hold. First, there exists a hypersurface containing x0 and transverse to each of the vectorelds Pji /x on which gij is inverti ible and symmetric and satises gki Pk = j Pk gji . k 2

Substitute equation (10) into equation (8) and obtain Ptr gi = Ptr gij r + gj r + r q j q i q grj gri gjr gij gri + + q j q i q j q i q r

(11) .

s Multiply by Pk i , use (9) and (10) to obtain s s Pk Ptr gs

gjs gij r + i r r s j q q q i s i gj r s q q i .

also symmetric. The symmetry of Vj will follow if we have (12) gp g pr (Vrj arj ) gjp g pr (Vr ar ) = 0,

and, therefore, we need to nd a symmetric, nondegenerate matrix gp satisfying this equation. The exFinally, to obtain (6), add to equation (12) an equa- istence of such matrix is guaranteed by the following tion obtained from (12) by interchanging k and t, r simple observation. and s, and i. Lemma 1 Given any real n n matrix R, there is a nondegenerate symmetric matrix X so that

s = Pk Ptr gij r

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 Q1 RQY Y T (Q1 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 ... r Ci = Cij q j , where gij , Vij , vk , Cij , and Pk are con or r stant, and Pk has rank nu . Clearly, gij , V = Vij q i q j , a b 1 0 0 0 . . . b and Ci = Cij q j is a solution to the matching equa a 0 1 0 0 0 . 0 a b 1 0 tions when gij , Vij , and Cij are constant provided . . . 0 0 b a 0 1 r ki ki gij and Vij are symmetric, Pk g Vij g Vij = 0, ... ... ... ... r and Pk g ki Cij g ki Cij = 0. Let uk = vk + aki q i + 0 ... 0 1 i bki q be an arbitrary linear control law, satisfying 0 . . . 1 0 solves the r In each case Y = Pk g k u = 0. Comparison with equation (3) gives ... 1 0 ... 0 grk g ki Vij g ki Vij = arj , equation. Note that the result of Lemma 1 is true for matrices and with coecients in any eld. This is proved in [15]. ki ki grk g Cij g Cij = brj . Thus, Vj = gp g pr (Vrj arj ) and Cj = gp g pr (Crj brj ).

Matching and constant coefcient linear systems

RX X T RT = 0.

Example: Beam

The

Ball

and

In order to demonstrate the approach described It remains to check that we can nd a symmetric, above, we have implemented one of the control laws nondegenerate matrix g ki so that the resulting Vj is from the family of control laws described in the rst 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
s

Table 1: The physical = 0.43m = 0.11m = 0.03m = 0.01m = 0.07Kg = 0.15Kg = 0.01Kg

parameters of the system. 2 2 IB = 5 mB rB = ball inertia Ib = inertia of the beam Is = eective servo inertia g = gravitational acceleration s0 = desired equilibrium position c0 = inherent servo dissipation

= 4.25 106 Kg m2 = .001Kg m2 = 0.002Kg m2 = 9.8m/s2 = 0.22m = 9.33 1010 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 = a2 , 1 1 2 1 s + (a4 +(a3 +5/2 s2)( ())2 )2 + () s , C1 = 0 , 2 2 V = a5 sin() + (s + a6 ) sin(()), C1 = 0, and C2 = a7 , where the ak are the dimensionless parameters, T = C2 =

Figure 1: The ball and beam system a1 =

section on a ball and beam system, Figure 1 (this system is commercially available from Quanser Consulting, Ontario, Canada). 1 2 5 c0 The scoordinate is unactuated, the coordinate . a7 = 3 g 2 rB mB 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 s) + Ib 2 + Is 2 . pressions for g, V , and C, where T = mb s2 2 + IB ( + 2 2 rB 2 2 The potential energy is 1 1 V = ml g rg sin() + (mb + ml ) g b sin() 2 2 + mB g s sin() , 4

l , b

rg (Ib + IB ) Is , a3 = , a4 = , b IB IB ml rg b (mb + ml ) a5 = , a6 = , 2mB rB 2mB rB a2 =

g11 = 2 () h(y(s, )) + 10
0

d () 2 () 1

g12 =

1 1 (g11 g11 ), g22 = (g12 g12 ),

V (s, ) =w(y) + 5(y + s0 )


0

sin() d ()() 1 ( ) d d,

chose 1 () = 1.0849 exp(4.7845 sin()) h(y) = 1.1031, w(y) = 0.0023y 2, C2 (s, , s, ) = g12 (1 + s2 + 102 )(s + ). These functions produce the control law, u, in rescaled units. The values of the constants a1 through a7 are as follows a1 a2 a3 a4 = = = = 0.2547 0.0588 236.294 471.126 a5 = 0.1889 a6 = 42 a7 = 5 106

5
0

sin() ()() 1
i1 1

C1 = (g1i g ) where

C1 g1j g C2 ,

j2

(()) 1 , 5s g12 1 (s, ) = 1 () (), 5s 1 1 () d}. y = () s s0 + ( ) d, 1 () 0 (s, ) = Here h(y), w(y), 1 () are arbitrary functions of one variable, and C2 is an arbitrary function which is odd in velocities.

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 MULTIQ data acquisition card is used for the analog signal input and output. The velocities are computed via numerical dierentiation using the forward dierence algorithm. The control law produces a voltage signal and is supplied through the D/A converter to the DC servomotor via an amplier. The relation between the control voltage, vin , and the torque, u (= u2 in 2 2 equation (5)), is Km Ng , where Rm = armature resistance = 2.6 , Ng = gear ratio = 70.5, Km = motor torque constant = 0.00767 Voltsec. Any stabilizing linear control law for this system is specied by four constants. The nonlinear control laws in our family are specied by the four arbitrary functions: 1 (), h(y), w(y), and C2 (s, , s, ). We 5

The nal 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 g11 . The form of C2 was chosen to ensure that C1 s+ C2 would be positive (for H to be a Lyapunov function). Finally, the coecients 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 Matlab conrm 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 dierent 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 conrm 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

0.04

1.2

0.03

Linear control law Nonlinear control law

Linear control law Nonlinear control law

0.02

0.8
0.01

Position (m)

0.01

Angle (rad)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

0.6

0.4

0.02

0.2
0.03

0
0.04

0.05

0.2

0.06

0.4

Time (sec)

0.5

1.5

2.5

3.5

4.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 dierence 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 The -method produces explicit innite-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 rst 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 6 [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; [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] 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 rst 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, Simplied 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, Pacic J. Math., 9 (1959) 893-896.

You might also like