A Self-tuning Controller for MIMO Nonlinear Systems

A Self-tuning Controller for MIMO Nonlinear Systems

Copyright © IF'-\C .-I.daptin' S,st c ms ill COlltrol a nd Signal Processillg. LUlld . S"ed ell . l'I ~ l i A SELF-TUNING CONTROLLER FOR MIMO NONLINE...

1MB Sizes 1 Downloads 109 Views

Copyright © IF'-\C .-I.daptin' S,st c ms ill COlltrol a nd Signal Processillg. LUlld . S"ed ell . l'I ~ l i

A SELF-TUNING CONTROLLER FOR MIMO NONLINEAR SYSTEMS Mukul Agarwal and Dale E. Seborg DfPartlllnlt of Clmlli((l/ and Sur/far Engin fering, L'ni,'enit)· of Ca/ijiJrnia, Santa Barba/"{J , CA 93106, L'SA

ABSTRACT

2.

A new self-tuning control (STC) strategy for multi-input, multi-output control nonlinear, problems is proposed , This strategy is applicable to a broad class of nonlinear systems which can include arbitrary nonlinear functions of the old inputs and outputs as we 11 as the products of these functions and any powers of the most recent inputs, Simulation results for a two-link robot manipulator demonstrate that the new nonlinear STC strategy provides significant improvement over conventional STC's based on linear models . 1.

SYSTEM DESCRIPTION

Consider the nonl inear discrete-time multiinput , multi-output system N

(r . )

A(z-1)y(t) = L K(z-1)[B.u i=1 1

1

(t)Y . (t)] 1

(l)

where Yi(t)

INTROOUCTION

= gi[yq(t-j),

j = 0,1,2, . .. , q=1,2, . . . n;

up(t-h), h = 1,2,3, ... , P = 1,2, . . . m],

Self-tuning control systems based on 1inear process models have been remarkably successful in contro 11 i ng many non 1i near processes b)b treating them as time-varying linear processes (Astrom and Wittenmark , 1973; Clarke and Gawthrop, 1975, 1979 ; Koivo, 1980; Seborg, Edgar and Shah, 1986) . However, linear-model based controllers are far from optimal for rapid, large changes in the operating point of the system. In practical app 1i cat ions , the major sources of non 1i nearity are often known from first principles or are readily identified by empirical means . Hence, improved control can be expected by exploiting the nonlinear structure of the model . In a few special situations, self-tuners based on nonlinear models have provided significant improvements over standard se If-tuners based on 1i near models (Anbumani, Patnaik , and Sarma, 1981 ; Lachmann, 1982 ; Svoronos, Stephanopoul os, and Ari s, 1981) . However, the applicability of these algorithms is limited to processes with specific nonlinearities such as polynomials in the manipulated input and bilinear products of output and input .

(r.)

u

1 (t)

1,2, .. . , N _ diag[z

-k

-k

1, z 2 , .. . ,z

where t is the sampling instant, t = 1,2,3, .. . ; PRrameters N, r . are known integers (rin? 0); YE R is the me1sured output u E K is the manipulated input; d E Rn is the unknown disturbance ; ~ E Rn and {~(t)J is a sequence of equally distributed random vectors, with zero mean and unknown covari ance, independent of previ ous inputs and outputs; g . , i = 1,2, ... ,N, are known single-valued , time-inhriant functions involving known parameters; k , q = 1,2, . . . ,n, is the known minimum time delay 'between any input and the qth output, expressed as an integer multiple of the sampling period

Thi s paper presents a new se If-tuni ng controller for multiple-input, multiple-output (MIMO) processes based on a general process model containing a broad class of nonlinear terms . The analysis provides an extension of the nonlinear STC for 5150 systems that was developed in an earlier paper (Agarwal and Seborg, 1985) to MIMO systems.

kq = min [k qp ' p = 1,2, ... ,m] :: 1, q = 1,2, ... , n where k is the time d~lfY between the qth output and th~P pth input . z is the backward shi ft operator with the following properties Xz-jtfJ(t) = M(t-j)

j = 1, 2,3, ...

Xz-j[V$(t)$(t)] = XV$(t-j)$(t-j)

The paper is organized as follows : Section 2 presents the general nonlinear model used to describe the process and the quadratic performance criteri on ; Section 3 develops the control scheme for the new self-tuning controller and then combines it with on-l ine estimation of the controller parameters; Section 4 provides an evaluation of the new algorithm based on simulations of a robot manipUlator ; finally, Section 5 states the conclusions .

where X and V are constant matrices, $ is a vector of appropriate dimensions , and $ is a scalar . In Eq. 0), B., i = 1,2, ... ,N _are nxm matrices satisfying t~e con~ition that A B. is nonsingular, where the matrix B. is obtained ~y replacing each element of B. by 1 its absolute value, and the operator A is befined as (2)

119

Mukul Aga rw al and Dale E. Seborg

120

However, it may be more convenient for the user to specify pi and P" separately.

A is an nxn polynomial matrix given by

-n A(z-l) = I + A z- 1 + . .. + A z A 1 n A

3.

It is assumed that the element in row r and column c of any matrix A. is equal to zero if (k - k ) > i. This assumptiori implies that y (t+k ) i~ n6t a function of y (t+k +j), j=l ,2, . . .r for r any c for which k,c < kC ; ot1Jerwise unknown future inputs would De required in making predictions of Yr(t+k r ) . Such predictions will be required in tne self-tuning control which is derived in Section 3. In othetfords, it is assumed that the polynomial matrix K AK does not contain elements involving positive powers of z. C is an nxn polynomial matrix given by +

-n

C

Z

The new STC algorithm utili zes a predi ct i ve model that expresses y(t+k) in terms of past and present values of y and u at t i me t . This predictive model can be expressed as t(z - l)p(Z-l)y(t+k) = r(z-l)y(t) N

(r . )

+ ~ t(z-l)[B . u i=l 1

1

(t)Y . (t)] 1

where E, t and r are defined in Appendix A. Define the k-step-ahead value of y predicted at time t, y*(t+klt), such that

C

nc

with the assumption that all roots of det C(z-l) lie inside the unit circle in the z-p1ane . Remark 1. The non1inear system model in Eq . (1) 1 s , 1 near wi th respect to the sys tem parameters B. , i = 1, 2, . .. ,N; A; and C. Further, it does not r~qu i re the number of inputs and outputs to be equal .

p(z-l)y(t+k) = p(z-l)y*(t+klt) + K-1(z-1)E(z-1)t(t)

x(t+k) := [Xl (t+k ), x (t+k ) , ... ,xn(t+k )] T n 2 1 2 Then, the performance index to be cons i dered can be written as

(6)

where y*(t+klt)

:=

[y\(t+k1It) ,

Y*it+k2it), ... ,

y\(t+knit)]T

To simplify ~otation , define k such that for any vector x ER,

I =

A NEW SELF-TUNING CONTROLLER

Combining Eqs . (5) and (6) gives

E- {IIp'(z-l)y(t+k) + p"(z-l)lIy(t+k)

- R(z-1)w(t)1I 2 + 11 Q'(z-1)u(t)1I 2 }

(3) (7)

where lIy(t) := yet) - y(t-1) .

S

The notation 1/ vII 2 = vTv is used, i s the expectat i on operator condht i oned wi th respect to data up to time t, w E R is the setpoint, R is an nxn diagonal rational transfer function matrix, Q' is an mxm diagonal rational transfer function matri x , and PI and P" are po 1ynomi a 1s gi ven by -n

+ pi

Z pi

Notice that the on values of y equal to t. assumptiQ~ made matrix K AK is

z. Substituting Eq . (6) index of Eq. (4) yields

npl

+

P"

n p"

=

Remark 2. As suggested by Waller and Gustafsson (1975) in their analysis of continuous-time opt i ma 1 contro 1 prob 1ems, in many si tuat ions the control system performance is improved by i nc 1udi ng the lIy term in the performance index. This is demonstrated in Section 4.

cUIP(z -l)y(t+k) - R(£l)w(t) 11 2

+UQ ' (z-l)u(t)1I 2}

(4)

+IIQ'(z-l)u(t)1I 2 +

P

t: { II K- 1(z-1)E(z-1)t(t)i12}

The mi ni mi zat i on of I can now be cons i dered as a deterministic optimization problem. A necessary condition for an optimum is 31 aum = 0

-n P

Pn z

(8)

I = IIp(z-l)y*(t+klt) - R(z-l)w(t)/1 2

where P is a polynomial given by .. . +

+ K-1(z -l)E(z -l)t(t)

In the above equation, the term K-1(z-1)E(z-1)t(t) is independent of yet), u(t), and previous values of1y and u. This is becau~~ the polynomial matrix K-1 E _~s i n9fpendent 0 f z , j = 0 ,1, ... Thus, K (z )E(z )t(t) is not correlated with the remaining terms on the RHS of Eq. (8), which depend only upon the system conditions at time t and previous sampling instants . Hence, Eq . (8) can be written as

The po 1ynomi a 1s P I and p" can be combi ned such that the performance index in Eq. (3) becomes I =

E. {11 P(z -l)y*(t+k 1 t)

into the performance

- R(z-1)w(t)//2 + 11 Q' (z-1)u(t)1I 2 }

-n p" z

P" o -> 0

predicted value y*(t+klt) depends and u only at times prior to and Thi s is a consequence of the in Section 2 that the polynomial independent of positive powers of

or

Mimo :'>Jonlinear Syste m s

121

If the system model in Eq. (1) is linear with respect to the most recent control input (i.e .• r < 1. i = 1.2 •...• N). then the control law in Eq.i {12) has the explicit representation: u(t) Differentiating Eq. (7) with respec~ to u(t). and noting that C(O) = I. t(O) = POl. glves a[p(z

-1"

)Z

au t

I

~t+k t)]

(r.-l) 1 (t)Y.(t)] 1

= A[P 0B.1r 1.U

(10) (r .-l) where U 1 is an mxm diagonal matrix with the elements

~

= _[~T~

+ (Q'(O))TQ'(z-l)]-l~T~ (13)

= A[POBiYi(t)]

provided that the inverse exists . Remark 1. Since Q'(z-l). which is defined in Eq . (4), appears in the control law of Eq . (12) only in conjunction with Q'(O). the user need only speci fy Q(z-l)

= (Q'(O))T Q'(z-l)

On-Line Parameter Estimation comprising the diagonal . From Eqs . (9). (10). and (7). the resulting control law is (r .-l) T~ -1 -1 -1 {A[POB.r 1 1. U 1 (t)Y 1. (t)]l C (z ) F(z )y(t)

If the model parameters in Eq . (1) are unknown. they can be estimated on-line from input-output data. However. it is more convenient to use the input-output data to estimate directly the parameters required in the control law of Eq. (12) . For this implicit estimation problem. rearrange Eq. (7) as

(11)

(14)

This can be rearranged as (r .-l) (r.) {A[POBiriU 1 (t)Yi(t)]lT{A[POBiU 1 (t)Yi(t)] + ~l + (Q'(O))T Q'(z-l)u(t)

Adding Eqs. (6) and (14) ._!nd pre-multiplying the resulting equation by K(z ) gives

=0 (12)

~

= C- 1(z-1)F(z-1)y(t)

+

+ A[C- 1(z-1)t(z-1) - POI]

N L

(r . )

K(z-l)G (z-l)[u i i=l

1 (t)Yi(t)] + &

[B.u(ri)(t)Y . (t)] 1

N +

L

i=O r.=O 1

1

(r.)

C- 1(z-1)t(z-1)[B . u 1 (t)Yi(t)] 1

where "

ui(z -1 )

= ..,..-1 t(z )B i •

H(z-l)

= [I-C(z-l)]

= 1.2 •... •N

(16) (17)

+ C-l(z-l)t(z-l)K-l(z-l)d - R(z-l)w(t)

& = K(z-1)t(z-1)K- 1(z-1)d

= t(l)d

Here ~ E Rn is the sum of u(t)-i ndependent terms on the LHS of Eq. (11). The control law (12) gives the control action u(t) in the form of polynomials involvlig eleme~ts of u(t) . If thJl model parameters A(z ); Bj'_i = 1.2 .. .. . N; C.Cz :y; and d are known; t~z ). F(z I). and C(z- ) can be calculated as outlined in Appendix A; and the control law (12) can be solved using standard numerical methods. provided that a solution exists . Only the real solutions that satisfy any given constraints on u are If there is more than one relevant re 1evant. solution. the one closest to the previous control action u(t-l). can be selected for u(t) . In case there is no relevant solution. the setpoint. wet). can be altered temporarily as suggested by Lachmann (19B2) .

Due to the nature_f,f ~(t) and the orders of ~he polynomials in E(z ). E(t) is not correlated w1th any of the other te!:'is o!!. th~ RHS. of Eq . (15) . Henc~ parameters F(z ); G. (z ). 1 = 1.2 •... •N; H(z- ); and & can be estimlted from Eq. (15) and input-output data using the standard extended least squares method . For implementation ~f the control law in_~q . (1211 para![1,ters B.. 1 = 1.2 •. ..• N. C(z ). t(z_). F(z ). and b are required. Estima_~s ~f F(z 1) and & are already available . C(z ) 1S £bt~ined from Eq . (17) using the estimate of H(z ) . Eq. (16). with the fact that t(O) = POl.

~llIklll

122

1 -G. (O). Bi = P

o

i

1

= 1.2 •. .. •N

Agan\'al and Dale E. Seborg

(18)

Use of estimates of G. (z-l) . i = 1.2 •... •N. in Eq . (l811yields values of B. • i = 1. 2 •. ..• N. Then . E(z ) is _obt~ined fr~1n Eq. (16) using known parameters Gi(z ). Bi • 1 = 1.2 •.. . •N. Remark 2. Oue to the general ized formulation of the system model in Eq . (1) . several elements of the matri ces B. may be known to be zero in a particular apptication. Let nB be the total numb~r of unk~own elements in thl rth rows of ~he matrlces B. • 1 = 1.2 . ... . N. Furthermore. let K be the numtier of those unknown elements in the rth rows of B. for which the argument corresponds to a one-step-Ahead val ue of the argument of another unknown element in the rth row of any B. . Then. the number of parameters that need to be ~stimated for the implicit STC. nimp ' is nimp

n L ~1

[(n f

r

+ l)n + nK + (n B - nK )k r ] r r r

+ n n2 + n c where nf is as defined ~n Appendi x A. For the typical ~ituation where fr = nA + kmax - 1 - kr • th i s becomes

(19) By compari son . if the parameters of the system model (1) are estimated explicitly. the number of parameters is

no t i me delay . The system was simulated using the fourth-order Runge-Kutta numerical integration method wi th a time step of 0. 001 sec . Random measurement noise uniformly distributed on the interval [-O . OSo.+O . OSO] was added to the outputs . The torque inputs were constrained to an absolute value of 10 N.m in each direction . The system was controlled nonl i near STC based on the model

using

the

new

81(t+1)

a 18 1(t) + a 281(t-1) + b T1(t)Y 1 (t) 1 + b2Y2 (t) + b3T2(t)Y 3(t) + b4Y4 (t) + d1 + ~l(t) 8 2(t+1) = a 382(t) + a 48 2(t-1) + b T (t)Y (t) S1 S + b6Y6(t) + b7T2(t)Y 7(t) + b8Y8 (t) + d2 + ~ 2(t) Y1(t) 1/ [16 / 9 - cos 2 8 (t)] 2 Y2(t) Y1(t)sin 8 (t)[8 (t) - 8 (t-1)][28 (t) 2 2 2 1 - 28 1(t-1) + 8 (t) - 8 (t-1)] 2 2 (22) Y1(t) [2 / 3 + cos 8 (t)] Y3(t) 2 Y4 (t) Y3(t) s in 82(t)[8 1(t) - 81(t-1)]2 Y3 (t) YS(t) Y6(t) Y7(t)

Y2(t)[2 / 3

Y8 (t)

Y7(t)s i n 8 2(t)[8 1 (t) - 81 (t-1)]2

cos 8 2(t)] Y1 (t)[S / 3 + cos 8 (t)] 2 +

The performance of the new STC was compared to the performance of a linear STC that was based on the model

(20) (23) where the inequality results. if kr < km - 1 f~r any r. due to one or more parameters an, A(z ) being known to be zero according to the assumption stated in Section 2. Thus. explicit STC requires estimation of fewer parameters . 4.

SIMULATION RESULTS

Consider the two-link robot manipulator The analyzed by Slotine and Sastry (1983) . manipulator consists of two r igid links of equal length and mass (both normalized to unity) in the hori zonta 1 plane . Choos i ng as the measured outputs the angl e 8 made by the fi rst 1 ink with 1 the x-axi s. and the angl e 8 made by the second link with respect to the first; and as manipulated inputs the torques T and T app 1 i ed to the two joints . the dynamics ~f the ~anipulator are given by 81 = [2 / 3 T' l - (2 / 3 + cos 8 ) T'2] / (16/9 - COS 28 2 ) 2 [-(2 / 3 + cos 8 2 )T'l 2 + 2(5/ 3 + cos 8 )T'2] / (16 / 9 - COS 8 ) 2 2 (21) T' T'

1

2T1 + sin

2 2T2 - sin The above system is unstable in the open-loop condit i on . and has infinite steady-state gain and

The sampling time was chosen to be 0. 02 sec . All parameters were initialized to zero and estimated using recursive least-squares method . The UDU covari ance factori zat i on method of Thornton and Bierman (1978) was employed with a forgetting factor of 0. 98 . The diagonal elements 60f the covariance matri x were i nitialized to 10. For both the 1 inear and the nonl inear controllers. best results were obtained when the covariance matri x was not reset subsequently. The outputs. 8. 8. were initially set to -90°, 170°, r~spectively . The initial perturbation to the system was provided by set~ing the torque.s . T,. T" to . 1. - . 1 N. m. respectlvely. for one lnstant b~fore closing the loop . Slotine and Sastry (1983) report results for tracki ng slow setpoi nt changes when the angul ar velocities are measured as well as the J angles 81 and~. Both the linear and the nonlinear STC's gave comparable results for i dent i ca 1 setpoi nt changes wi thout requi ri ng measurement of the angular velocities . The tuning parameters for bot~ the STC's were P' = 1. P" = O. R = I . and Q = 10 I .

e,. e

was

A set of larger and faster setpoint changes then specifi ed . The performance of the

Mimo :-.Ionlinear Systems nonlinear STC wi~~ P: = 1 - 0: 9Z-\ plI = 1, R. = 0.1I, and Q = 10 I 1S shown 1n F1gure 1. It 1S seen that the outputs track the setpoi nts satisfactorily. Since the angular velocities are pena 1 i zed in the performance index vi a the tJ.y term, the measurement noi se 1eads to rapi d fluctuations in the inputs. By contrast, Figure 2 shows the -'1erformance of the 1 i near STC wi th Pi; = 1 - O. 95z , plI = 1, R = O. 051I and Q = 10 I. Cons i derab 1e interact i on between the outputs is apparent even though the controller has been detuned significantly leading to an overall sluggish response . The inputs (not shown) were also found to be more oscillatory than for the nonlinear STC . Figure 3 shows the effect of iDSreasing the pena 1ty on the inputs to Q = 10 I, for the nonlinear STC. Although this leads to far less oscillatory inputs (not shown) than in Figure 1, the output response becomes worse as expected . When the run in Figure 1 is repeated without penalizing the angular velocities, i.e . plI = 0, the inputs become 1ess osci 11 atory as shown in Figure 4 . However, the output response becomes too oscillatory . This shows that plI is an important tuning parameter that can lead to improved performance . 5.

CONCLUSIONS

A new self-tuning controller has been developed for a general class of nonlinear multi-input, multi-output process models . These models can include arbitrary, known nonlinear functions of the old inputs and outputs as well as the products of these functions and any powers of the most recent inputs . A very general algorithm has been proposed that allows for different numbers of inputs and outputs, and for different time delays for each input-output pair . A new performance index for adaptive control has been introduced that penalizes incremental changes in the outputs . Simulation results for a robot manipulator demonstrate that the nonlinear STC provides significant improvements over the linear STC, and they al so demonstrate the useful ness of the new performance index . ACKNOWLEDGMENTS Financial support from NSF Engineering Research Center grant CDR-842l4l5 and NSF grant CPE-8200274 is gratefully acknowledged. REFERENCES Agarwal , M. and D. E. Seborg (1985). Self-tuning controllers for nonlinear systems. IFAC Workshop Control of Chemical Processes on Adaptive Frankfurt . ' Agarwal, M. , Ph . D. Dissertation, University California , Santa Barbara (in preparation) .

of

Anbumani, K. , L. M. Patnaik and I.G . Sarma (1981) . Self-tuning minimum variance control of nonlinear systems of the Hammerstein model . IEEE Trans . Auto . Control, AC-26, 959-961 . o

Astrom, K. J . and B. self-tuning regulators .

Wittenmark Automatica,

(1973) . On 185-199.

2,

Clarke, D. W. and P. J . Gawthrop (1975) . Self-tuning control . Proc . lEE, 122, 929-934. Clarke, D. W. and P.J. Gawthrop (1979) . Self-tuning control. Proc . lEE, 126, 633-640. Koivo, H.N . (1980) . A multivariable self-tuning controller . Automatica, l£, 351-366.

123

Lachmann, K. H. (1982) . Parameter adaptive control of a class of nonl inear processes . 6th IFAC Sympos i um on Ident ifi cat i on and System Parameter Estimation, Arlington, VA, 372-378 . Seborg, D. E. , T. F. Edgar and S. L. Shah, (1986) . Adaptive control strategies for process control : A survey . AIChE J. (in press) . Slotine, J . J . and 5 . 5. Sastry (1983) . Tracking control of nonlinear systems using sliding surfaces, with application to robot manipulators . Int. J . Control, 38, 465-492. Svoronos, 5., G. Stephanopoulos and R. Aris (1981). On bilinear estimation and control. Int. J . Control , 34 , 651-684. Thornton, C. L. and G. J . Bierman (1978) . Filtering and error ana lys is v i a the UDU covari ance factorization. IEEE Trans., AC-23, 901-907. Waller, K.V.T. and S. E. Gustafsson (1975) . Performance indices for multivariable PI - control with incomplete feedback . Chem. Eng. Sci., 30 1265-1271. -' Wolovich, W. A. (1974). 11 Li near Multivariable Systemsll, Springer-Verlag, New York .

Mukul Agarwa l and Dale E. Seborg

124

10

180

0. Cl!

E

90

~

E

..

.,.,

.,.,

.,10

:J

a

Cl!

1:

>-

L

- 90

0

>-180 0 .0

4 .0

8 .0

12 . 0

-1 0 0 .0

16 . 0

12 . 0

16 . 0

12 . 0

16 . 0

~

r '

..

N

N 10

.,

:J

,

Cl!

>-

8 .0

E

90

E

1:

4 .0

10

180

01 Cl!

-.

a L

L .

-90

0

>- 180 0.0

4 .0

12 . 0

8 .0

Time

16 . 0

4 .0

0 .0

(sec)

8 .0

(sec)

Time

Fig , 1 Performance of the nonlinear STC 180

180

, '- ', .

Cl Q)

0. Q)

90

E .....

E l ._

.....

0

.

.,

III

III

+J Q)

,-.c:

~

90

Q)

.c:

- 90

>-

-1 80 0 .0

4. 0

8 .0

12.0

- 90

- 180 0 .0

16 . 0

8 .0

4 .0

12 . 0

16.0

12 . 0

16 . 0

180

0. Q)

0. Q)

E

E 1_

ru

.

N

III +J

III +J

Q)

.c:

>-

90

Q)

.c:

- 90

-1 80 0 .0

>-

4.0

8 .0

12 . 0

- 180 0 .0

16 . 0

(sec )

Fig , 3 Nonlinear STC with increased weighting on u, 10

180r_------~------~------,_------.

E 90

~

...

...

Cl!

.,10

:J

a

L 0

Cl!

1:

>-

>-

12 . 0

• 0

16 . 0

~

r-

-. -10 0 .0

-1 80~------~------~------~------~

• .0

8 .0

4. 0

Time

Fig. ? Pp.rformance of the linear STC

4.0

!-

(sec )

Time

0 .0

- 90

i

I

'V~

V A.O

0 .0

E

N 10

.,

~ N

o

Cl!

:J

a

L

Q)

1:

>-

o

-90

>-

-.

-1.0~------~------~------~------~

0 .0

A.O

8 .0

Time

12.0

12 . 0

16 . 0

10r-;;----~------~_,r__r,_------.

180~~----~------~------,_------,

90

{\

18.0

Time

(sec)

Fig. 4 Nonlinear STC with no weighting on

6y

(sec)