Sei sulla pagina 1di 6

Proceedings of the 2001 IEEE International Conference on Control Applications September 5-7,2001 Mexico City, Mexico

Implementation of Servo Systems for Controlling a Double Purpose Nonlinear Plant: Inverted Pendulum and Crane
Arturo Rojas-Moreno Fernando S. MerchAn-Gordillo Leonard0 D. Gushiken-Gibu
Universidad Nacional de Ingenieria Secci6n de Postgrado de la Facultad de Ingenieria EMctrica y Electr6nica AV. Tupac Amaru 210, Lima 33, Per6 postgradofieeQuni.edu.pe arojasQuni.edu.pe http://fiee.uni.edu.pe/Posgrado/index.htrn http://fiee.uni.edu.pe/728681F

AbstractThis paper develops design procedures of Proportional-Integral Servo Systems ( S S s for short) for controlling a double purpose nonlinear plant: Inverted Pendulum and Crane (IP&C). Such a plant can be described by nonlinear differential equations, where t h e nonlinear terms complicate t h e analytical aspects of modeling and controller design. However, based on t h e linearized plant model, we can configurate discrete-time S S s by combining linear controllers with linear observers. Experimental results demonstrate that each S S is able t o stabilize an IP (or a Crane) mounted on a servomotor-driven cart. Three S S s configurations are developed: A Steady-State Quadratic Optimal Controller (SSQOC) with a Quadratic Optimal State Observer (QOSO), a Pole Placement Controller (PPC) with a Full-Order State Observer (FOSO), and a P P C with a Minimum-Order State Observer (MOSO).

Control

y!

Fig. 1. The IP&C plant (IP view).

I. MODELING THE IP&c PLANT


Fig. 1 depicts the nonlinear IP plant, which may be described by the following nonlinear model [l]
- M2(sen6)i2 + M2(COS

Application of the Taylors expansion theorem for the o p eration point (x, ii) into (4) yields

2 = f(z,a) +
(jz,

af(2> 4 dU

- a) + . . .

6)e -

(l) If we choose

(5)

0)=

(0, 0 ) , then equation ( 5 ) becomes

M2g(sen6) - M2S(cos6) - J16 = 0

(2)

F
where: Mi
= m,

= K,

K A U - J22 - B,i

(3)

j,

af(o O ) x + af(o,o)U= A x + B u - f(0,O) = A


d X
~

(6)

dU

+me +mu;

M 2 = mele

+ m,- 1, 2

where

1 0

J 1 = Je

Jv;

Table I describes all variables and parameters of the IP&C plant. Define the state variables x1 = 6, 5 2 = 6, 23 = 2 and 54 = i , where x1 and 5 3 are measurable variables. Then, the expression of x (with S = sin x1 and V = cos X I ) is found to be

The corresponding discrete-time state-space description of (6) for a sampling time T takes on the form

x(k + 1) = Gx(k) + Hu(k); y(k) = Cx(k)

(9)

where IC is the discrete time and y is the output vector. The Crane plant is the Fig. 1 with the rod in resting (stable)
0-7803-6733-2/01/$10.00 0 2001 IEEE

884

'

Symbol

I, 1,
g

me

m,, m,

Description rod length distance earth gravity I sphere mass I rod mass I cart mass

Value/Relat ion 0.767 m not used 9.8 N not used 0.063095 krr 0.92 krr

Fig. 2 shows the SS used in this paper, where r ( k ) is a stepwise reference signal, I is the Identity matrix, z is the shift operator, K is the gain matrix of the state feedback controller, KI is the gain of the integral controller, and 5 is the estimated state vector. For the sequel, let us assume that % = x. The linear model of the IP&C plant in the Fig. 2 is described by

x(k + 1) = Gx(k)

+ Hu(k);

y(k) = Cx(k)

(12)

The control law u(k) is found to be

~ ( k= ) -Kx(k) +Krv(k); K = [Kl K2 where the variable w(k) verifies

... K,] (13)

w(k) = v(k - 1) + r ( k ) - y(k)


The output equation takes on the augmented form

(14)

rp

Jp J,, J, J,,

radius of the pulley m.0.i. of the pulley equivalent m.0.i m.0.i. of the sphere m.0.i of the rod

Jm

0.0648 m mpr9l2 n ' ( J 0 JD)

Using the fact that for k + CO, r ( k ) = r ( k + l ) = ... , then the state-space equation of the SS is found t o be

((k

+ 1) = CZ(k) + Hw(k);

w(k) = -K((k)

(16)

m 2 I3

position. Following the outlined procedure, then A and B matrices for the Crane plant result

1 0

1
111. THEPOLE PLACEMENT CONTROLLER (PPC)
The state feedback gain matrix P P C can be calculated from [2]

k = [K

- K I ] of the

a = [0

0 *.. 0

1 ]iM-%(G)

(21)

@(e) = G n + alGn--l + . . . + a 4 G + a,I


11. THEPI SERVOSYSTEM(SS)

(22)

where n = 5 is the order of the SS (note that the order of the IP&C plant is 4). The controllability matrix M needs to be of full order, i.e.,

rank M = rank [
The parameters
a1,

fi

GH

... G"-'fi ] = n

(23)

. . . ,a, can be obtained from

( z - PI).. . ( 2 - p,) = z n + a1zn-l

+ . .. + a,-12

+a,

Fig. 2. The PI servo system (SS for short)

where P I , . . . , p, are the desired closed-loop poles of the SS. For both SSs, one with the IP plant and the other with the Crane plant, the desired poles are chosen to be: / ~ 1 , 2 = 0.9967 f O.O058i, p3,4,5 = 0.98.

885

IV. THESTEADY-STATE QUADRATIC OPTIMAL CONTROLLER (SSQOC) Assuming that: The SS is completely state controllable (i.e., equation (23) is satisfied), Q is a n x n positive semidefinite real symmetric matrix, and R is a positive constant, then the minimization of the following quadratic cost function

leads t o the steady-state Riccati equation

P = Q + GTPG - G T P H [ R+ HTPH]-'HTPG
and t o the the steady-state feedback controller

(25)

Fig. 3. The full-order state observer (FOSO).

K
(26) VI. THEMINIMUM-ORDER STATEOBSERVER (MOSO) Let us consider that the state vector x(k) in (27) can be partitioned into two parts: A pvector xa(k) containing the measurable states (in our case, states z 1 and z3) and a ( m - p)-vector xb(k) holding the unmeasurable states. Therefore, the partitioned state-space description of the linear IP&C plant becomes

[ R+ HTPH]-'HTPG

Q may be a diagonal matrix. For the 1P case R is set t o 100 while diagonal elements of Q are set to 200, 0, 100, 0, 0.01. For the Crane case R is set to 1 while diagonal elements of Q are set t o 500, 0, 200, 0, 0.1.

V. THEFULL-ORDER STATEOBSERVER (FOSO)


Fig. 3 depicts the block diagram of the FOSO, where

x(k + 1) = Gx(k) + Hu(k);


ji(k

y(k) = Cx(k)

(27)

xa(k + xa (k) [ Xb(k+ ] [ 2: 2;] [ Xb(k) ] [2]


1) 1)
=
+

(28) Note that K , is the state observer gain matrix. Define

+ 1) = (G - K,C)ji(k) + Hu(k) + K e y ( k )
e(k)= z ( k )- Z(k)

(35)

(29)

Subtracting (28) from (27) and using (29), we can obtain the error equation of the FOSO

K O= @(Gbb)

e ( k + 1 ) = (G - K,C)e(k)

(30)

Gab GabGbb

- - 1 ,

0
0
'

The K, matrix needs to be chosen such that the eigenvalues of the characteristic equation of the FOSO

=o-' .
0

det[zI - G + K,C] = 0

GabGE-P-2 - GabG;-'-' -

(31)

- 1>

make the error e ( k ) zero with sufficient speed. Such a matrix K, can be computed from [a]

K , = @(G)N-l [ 0 0 ... 0 1 @ ( G )= G"

1'

(32)

(33) where m = 4 is the order of the linear IP&C plant The observability matrix N needs t o be of full order

+ Q ~ G ~+ -' * .. + ( Y , - ~ G + CW,I
... (GT)"-lCT]

provided that the rank of matrix 0 is m - p . For our case, p = 2. Parameters 6 1 , . . ,&m-p can be obtained from the characteristic equation of the MOSO
- Gbb

+ KOG,bI =

(2

- pi). . . (Z - p m - p ) =

rank N = rank [CT GTCT


and the parameters
(z-p1)...(.-prn)
01,.

= m (34)

. . , cr,

can be obtained from

zrn-' &~z"-'--I . &m-p-l~ (38) where , ~ ~ l , . . . , p are ~ the ~ desired eigenvalues of the MOSO. For the IP plant, the desired poles are chosen to be: p1,2 = 0.7165, while for the Crane plant are: p1,2 = 0.1353.
VII. THEQUADRATIC OPTIMAL STATEOBSERVER

+.. +

= Z"+LY1Z"--1+...+LYm_1z+cr,

where
p1,2

p1,.

. . ,p m are the desired closed-loop poles of the

(QOSO)
The QOSO employs the configuration of the FOSO depicted in Fig. 3. From equation (31), we can formulate
d e t [ t I - G + K,C] = det[zI - G~

FOSO. For the I P plant the desired poles are chosen t o be; = 0.7165, p3 = 0.9, p4 = 0, while for the Crane plant
are:
pl,2 = 0.1353, p3 = 0.9, p4 = 0.

+c ~ K , T ]

(39)

886

On using (16), the characteristic equation of the SS is found t o be

ciet[zI - G + fiK1

(40)

Comparing equations (40) and (39), dual expressicns of equations (25) and (26) can be obtained replacing GT by G, H by C T , K by KT, and P by Pe, i.e.,

The designed SSs were simulated using MATLAB for testing control performance and SS behavior before implementation. All source files for real-time implementation ware written in C-code. Unavoidable inherent nonlinearities, like servomotor saturation and coulombic friction, ware compensated by software.

IX. EXPERIMENTAL RESULTS


Pe
= Qe+GPeGT-GPeCTIR,+CPeCT]-lCPeGT (41)

K , = [Re+ CPeCT]-lGPeCT

(42)

To determine on-line Pe (or P given by equation (25)), we can use the recursive form of the Riccati equation

Pe(k + 1) = Q e GPe(k)GT GPe (k)CT [Re CPe(k)CT]-'CPe (k)GT

+ +

(43)

Re and Qemay be chosen to be diagonal matrices. For the IP case, diagonal elements of Re are set t o 1, 10 while for Qe are set to 1, 0, 1000, 0.9, 1000. For the Crane case, diagonal elements of Re are set to 1, 1 while for Q are set
t o 1000, 1500, 100, 1500. VIII. HARDWARE A N D SOFTWARE OF THE SS Fig.4 depicts the hardware configuration of the SS, which includes a DC servo motor, a H-type PWM (pulse Width Modulation) amplifier, a sensor block with two optical encoders for sensing signed rod and cart positions, a LabPC+ Input/Output interface card, and a Pentium PC. The information from the sensor block is transmitted in form of two pulse trains, one of them leading the other by 7r/2 rad.

All experimental results were obtained by setting the reference position of the cart to 1.5 m and the sampling frequency t o 200 Hz (0.05 ms). Rod up and and rod down positions correspond to zero angular positions of the I P and of the Crane, respectively. The following figures illustrate cart and rod positions for each designed SS. Recall that the acronyms PPC, SSQOC, FOSO, MOSO, and QOSO stand for pole placement controller, steadystate quadratic optimal controller, full-order state observer, minimum-order state observer, and quadratic optimal state observer, respectively. Observe that all the designed SSs are able to stabilize either the IP or the Crane mounted on a servomotor-driven cart. X. CONCLUSIONS In light of the experimental results, we can assure that it is possible to find a linear process model capable of c a p turing significant features of the actual nonlinear process. Such a process model permit to employ linear controllers and observers. Despite the restriction imposed by the linearization procedure, we found that the designed SSs are able to stabilize angular positions of the rod up to 20". Experimental results demonstrated that the control performance of the configurations IP+ SSQOC+QOSO (figures 9 and 10) and Crane+SSQOC+QOSO (figures 15 and 16) are superior than the control performance of the other configurations.

ANALOG OUTPUTS

PLANT : INVERTED
' & CRANE 2

MOTOR SENSOR DIGITAL PORTS FOR INPUTS & OUTPUTS


16 bits

PB PB7

ROD SENSOR

c ._

I
05t

PC6 PC7

I I
Fs SAMPLING FRECUENCY

COUNTER / TEMPORIZER

Fig. 5. Cart position (m). SS: IP+PPC+FOSO.


Fig. 4. Hardware implementation of the SS.

887

05 04-

B 03-

-02-03-04-

-0'5k
Fig. 6. Rod position (rad). SS: IP+PPC+FOSO.

Time ( 5 )

10

1 ;

lh

16

lb

d0

Fig. 8. Rod position (rad). S S : IP+PPC+MOSO.

2,

-0 5

Time (s)

10

12

14

16

18

20

Fig. 7. Cart position (m). S S : IP+PPC+MOSO

Fig. 9. Cart position (m). SS: IP+SSQOC+QOSO.

REFERENCES
[l] A. Rojas-Moreno, Control Avanzado - Diserio y Aplicaciones
en Tiempo Real, Independent Publication, Lima, Perd, 2001, http://fiee.uni.edu.pe/728681F. (21 K. Ogata, Designing Linear Control Systems with MATLAB, Prentice Hall, Englewood Cliffs, New Jersey 07632, 1994.
04 5 5

q,
-0 50
2

,
4

,
6

,
8

,
Time ( 5 )
10

,
14

,
16

,I
18

12

20

Fig. 10. Rod position (rad). SS: IP+SSQOC+QOSO.

888

06-

9 - 04L

02-

4
-02

-04-

-06-

Fig. 11. Cart position (m). SS: CranefPPCtFOSO.

Fig. 14. Rod position (rad). SS: Crane+PPC+MOSO

15-

E
C

1-

0
0

05-

-0 O 50

8 Time 10 (s) 12

14

16

18

Fig. 12. Rod position (rad). SS: Crane+PPC+FOSO

Fig. 15. Cart position (m). SS: Crane+SSQOC+QOSO.

06

o r
-0 5 0
2 4

Time (s)

10

12

14

16

18

Fig. 13. Cart position (m). SS: Crane+PPC+MOSO.

Fig. 16. Rod position (rad). SS: Crane+SSQOC+QOSO.

889

Potrebbero piacerti anche