Design of Discrete-Time Adaptive Systems Based on Nonlinear Programming

Design of Discrete-Time Adaptive Systems Based on Nonlinear Programming

Copyright © IF AC Adaptive Systems in Control and Signal Processing . San Francisco. USA 1983 DESIGN OF DISCRETE-TIME ADAPTIVE SYSTEMS BASED ON NONLI...

1MB Sizes 1 Downloads 78 Views

Copyright © IF AC Adaptive Systems in Control and Signal Processing . San Francisco. USA 1983

DESIGN OF DISCRETE-TIME ADAPTIVE SYSTEMS BASED ON NONLINEAR PROGRAMMING C. -B. Feng and H. Li Nanjing Institute of Technology , Nanjing, Jiangsu , People's Republic of China

Abstract. Design method of deterministic discrete-time adaptive system based on nonlinear pro.gramming is studied. A positive definite quadratic cost function is formed by using the vpctor output error betwe pn the identifier and the unknown system, and th€'n di fferent gradi e nt methods are applied to calculate the parameters of the system. In order to increase the convergence speod of the identification process an increase of the dimensi on of the output error vector is su~gesteu. The proposed. method is also applied to design of adaptive control systems. Keywords. Ad a ptive systems; adaptive control; identificati on; INTRODt.; ::: nON Deterministic adaptive systems including adaptive observers and model-refenmce adaptive control systems are usually design on th9 basis ef stability t heo ry. For t his pu r pose the lyapu nov functi on me thod or Popovts hyporstati l ity t ~ eo ry can be used to define the pa rameter adaptation laws (Landau, 1979; Narandra, 198C). Although the global stability of such systems is guaranteed, the convergence of the estimated. pa rameters to th e ir true values depends upon wh e ther the condition of "persistent ~xc i ting" .is pr ov iDed or not CEykhoff, 1977; Morgan, 1977). The para mete r convergence process will be interrupte d Lf the system is no lon!; e r excited. In gene ral,the convergence s peed of the parameter estimation proc es s is very low. Vecter output error is used by Kr c isselmeier (1977) to incre a s e tnp spped o.f parameter estimation for adaptive observers, which is an i:npo rtant im prov p:ment. Application of nonlin e ar I?rogramming is suggested by Feng (1g e2 ) to determine the unknown parameters of continuous-time systems. A convex function can be easily formed by using the vector output error. Then different gradient methods of nonlinear programming can be used to determine the system parameters. There is a wide choice of methods. In this paper this method is used to determine the parameters of the discrete aDaptive observers and of the controllers . The application of non in ear programming to design of adaptive observers is first discussed in this paper.• Design schemes for state-variable model and ARMA model are given respectively. A po si tive de289

finite quadratic cost function is formed by using the vector output error between the observer and the original system, and then different gradient methods are applied to calculate the parameters of the identified system. A comparison of the's e methods is dis'::ussed. In order to increase the speed of convergence of the iterative calculation a method of improving the cost function is suggested.The proposed method is also applied to the design of model-reference adaptive control systems. Two feasible design schemes are sug gested. DrsIGN Of ADAPTIV ':

OBS~V'R

Designs for state-variable modpl and ARMA model of single-input and single-output systpms are given respectivoly. The output error equation be'hJepn the observer and identified sust~m is first established. Frcm this equation the output error vector is obtained. ~rror

Equation

State-variable model. Assume that the state-variable equation of a singl p -inpuh and single-output systpm is as follows: x(k+l }=Ax(k)+bu(k), x(O}=x o

1 (1)

y(k)=cTx(k) where x( k} E Rn is the state vector, u(k} and y(k) are the scalar input and output. Assume that the sytem is completely controllable and observalbe. Without loss of generality the matrices A, b and c can be expressed in the canonical form as:

C.-B. Feng and H. Li

290

From (2) and ( 8 )

A=r : I n-l]E Rnxn La :" -Cl --

4'( k )=S T (k )CE R2n .

c= [1 ,0, .. . , OJT E Rn para~etpr

Thp Lupnbprgpr observer of this system has the following form x(k+l )~Fx(k2+Ply(k)+P2u(k), x (C) =xC ) (2) y(k)=cTx(k) where x(k) is an estimate of x(k); Pl' P2ERn a re the parameter vectors of the observer to bp determined; FER nxn is a known stable matrix which has the form f=tf "f 2 , ' , f J

1

If Pl and P2 satisfy the ditions, WP have

matchin~

con-

T

F=A-p,c , or Pl=a-f, (3) P2=b. Thprefor p , when f is given, the systpm paramoters can be determined only when P, and P2 are found. Fr om (2) we have k

k-I

~ Fk- j -1 (.) u J P2 J=- 0

+ ?--

t

k

. ,

S2(k)= t:F -J- u(j) FO

T

,-

k

Xo '

(l r\

T k

y(k)=


(11 )

3ubtrac tins (11) rr (;c ( j ) ',: c output error e(k):

~(k )=4I (k )8"

'c T FkXr" ,.

wherp. 'ij=§-Et doncte s th o ~er-:l n' et"r error vector, x(k)=x(k)-x(k) dcn c te s the st~te error v"ctor. 2ecau s " F is a s tarle matri x the error d UD t o th" initiRl st dt " "rror Xc will f ade aw a y to zer o . ~hen u(k) an d y(k) a r a mcasurahlD,~(k) is known. Then the identific a ti on o ~ the s ystpm is ch ~ n Q cd to thp prohJem of finding P, and P2 which fit the rAram~ter matching conditi c ns so as t o make ~ a nd ~(k ) ~qual to zero. ARnA model. T:., e

~; en"ral

forrr of t'le',;W4

modpl is i" I

(4 )

(S)

(6)

S 1 ( k + 1 ) =FS 1 ( k ) ... , n y ( k ), S, (0) =C 1

(7) S2(hl )=FS 2 (k)+'n u (k), S2(0)=0 Usin S (5) and (6), ~q. (4) can bp expu>ssod as

x ( k )=Sl(k)P1TS2(k)P2+FkxO ~ ( k ) '" e+F k~ Xo

..

x ( k)=S(k)8 +F

rn

;= I J

1

loss of genpra l ity we may Jet m=n. Thp unknown s y s tPfT' parametpr veCtors ar!": ~ithout

rho s o two matrices satisfy thp. foll owing oquations res pectively;

=.;.

1

n

Define two nxn-dimensional ma trices S,(k) and S2(k) as follows; S,(k)=t=>k- j -l yU )

~qs. ( 8 ) a nd (9) defino the rarametrized observer for discrete-~i~e s ystem a s given by Takashi and co-w o rkers (19 80 ) . ~ ~T •TJT t~cw lot e Pl' P2 d enotes the nar 3:Get ·.-.r '.' '' c-:: o:: ·..k~::~ ·· satisfies t'le matching conditi on (3), then the sy st em state x(k ) an d output y( k ) may bo e xpr es s ed respectivoly as follows:

y(k)=l::a.y( k-i)+ 1: t.u(k-j ) , ( 13)

k . 1

x(k)=F x O+ ~F -J- yU )p,

k

(9;

where

1

r=[f:_~r].·J oJ,

can ohtRin

y(k)=~T(k)e+cTFkxc'

a=[a ,a2,,,.,a~TE Rn 1 b=[b ,b 2 .. ·.,bJE Rn whpre a and b are unknown vpct o rs.

WP

(e)

J

a= [a 1 ' a 2 , . . . , a T

bS

b= [b 1 ' b 2 , . . , For Al MA modal an observer with th" same s tructur~ as the origin a l system is ado~tpd. Its equation is y(k)= whpre and b

a

n

L a.y(k-i ) .,. i=1

1

n '"

~ b.u(k-j),

Ft

J

( 14 )

and b are the estimates of a

resp"ctiv~ly.

SuLtracting (13 ; from (1 1,; we have

where c:?(k;:[y(k-l ), . . ',y(k-n ) ,u ( k:-l);", u (k-n)] T Ne-I-:-' . ~ 1:: . . . ~b IT _~(~ )T (0(' ,TJT la" ' ,a n ,vl' • nJ =t a-a, a-b ; (15) and l'2) ar" similar in form. Thpy

Design of Discrete-time Adaptive Systems

arp the sam~ when the error due to the initial state error has faded away.Becaus~ F is stable the error due to the initial state error will surely fade away to zero. In practical application the adaptive observf>r can be first excited, and when this initial error has practically faded away to zero, then data are registered for identification calculation.For conciseness the term cTFKx will be omitted in the fOllowingaMalysis. Thus the error equations for these two models are the same in form and formulae for calculation of parameters arf> also the same.

291

The formulae of recursive calculations for different gradient methods are as follows (Avriel, 1976). Steepest descent method(SDM). 8t=8t_l-AtVL(8t_l) (21) T T At=VL (8 t _ 1 )VL(8 t _ 1 )I'VL CEL)R\k)'VL(Pt_~ ~

A

(22)

Here 8 t denotes the value of e after . .1 t era t'lon. D ' t th recurslVe urlng t h e recursive calculation k remains unchanoed.

e

Cost Function

(21) defines the correction of instead of the correction of A. But since

Define an output error vector as

§t-~t_l=(8t-8*)-(©t_1-8~)=et-et_l' Therefore tho correction of § is equal to the correction of ~. This is the same for all the formulae in the following.

E(k)~(k-2n+l l," ·,e(k)JT~R2n. \.Jp have E(k)=W(k)8

( 16)

\.J( k )14>~ (k-2n+l ) et> (k-2n+2)

(1?)


A positive definitf> quadratic cost function is formed by using (16) L(8)=tE T(k)QE(k)=te T\.JT(k)QW(k)8 =tSTR(k)S

(13)

~(k)=WT(k)CW(k) E R2nx2n, Q=QT>O. In the 2n-dim e nsional 8 vector space ~q. (18) represents a perfect hyperellipsoid with its center at the origin. Application Of Nonlinpar Programming From (18) we know that R(k) is symmetric positive d~finite_and L(e) has its minimum at 8=0. L(8) is a strictly convex function, whose mini~um is uniquP. Therefor o if the value of 8 which minimizes L(~) is found, thf>n the true values of the system parameters are obtained. Thus the parameter idf>ntification is converted to a problem of minimization of the cost function. This problem can be solved by using different ~radient methods of nonlinear programming. The partial~derivatives of L(e) with respect to 8 are

oL(e) 10 G~vL( e)=R (k) 8=W T( k) QE ( k) ( 19 ) o2L(8)/a82~~L(8)=R(k)

(20;

All the partial derivatives of order 3 and higher are equal to zero.

Conjugate aradient mcthod(CGM ; A

A

et=et_l~tZt

(23)

~t=-Z~'VL(8t_l) ! z~R(k)Zt

(24)

Zt+l=-'VL(8t)+~tzt

(25)

~t=VLT (S~'VL(&,)/'VLT (St_,)'ilL(.8t -V

(26'

2n where ztER denotes the vector for one dimensional optimization, which satisfies z~R(k)Zj=O (i~j). [qs. (23)-(26) define a complete algorithm for unconsbained minimization. Theoretically the conjugat o qrndient method guarantees that the true pArameters can be obtained after 2n iterations, where 2n is the number of the parameters to be estimated. But in practice because of tho round-off error of com~uter the trup parameters C8n be obtained after 2n iterAtions only when the condition number of R(k; is not too large. Newton method(NM)

~t=§t_l-R-l(k ) QL(~t_l)

(27)

From (19) and (27 ) we obtain ~

~

-1

~

*, ..

RtJt _,=8t _,- Et_,-e .: =6. t This equation shows.that ~he tru~ rgr?meters will be obta~ned wlthout lteration. But for this purpose the inverse of R(k) should be calc~lated. There may be some trouble if the dimension of R(k) is high. 6 =8t _,-R

;>(

( '"

Variable metric method(V~M) 9t=8t_l+A.tZt

(22)

A.t=-Z~VL(et_l;/z~~(k)Zt

(29)

C.-B. Feng and H. Li

292

(30 )

The following conclusions can be drawn upon analysisof the simulation results:

(31)

(i).The value of ~ has a strong influence on the convergence property o~ the calculation.

(32) (33 )

method has a specific feature: Ht begins wLth idpnti ty matrix and scalar optimization is carried out along the conjugate dirpcti~~ and aftl"r 2n-1 it~­ rations H2n _ 1=R(k) is obtained. Finally thp lat~r is idpntical to the Newton direction. ThereforE the true parameters can be obtained after 2n iterations. ~his

Simulation

~esults

Simul a tion has bAon mado on a digital c o m~uter with 48 bits for a systpm of 2nd ordpr. ~=1 is taken and 1 kinds of in ~ ut si gnal arp use d : u2(k)=Sin( C .5k~T1 C Sin(k)

u 3 (k)=2 Eo(l (k-1 Cn)-1 (k-1Cn-5)] ThA initi a l pa r ametprs of the adaptive obse r ver for the stat"'-variablp model a rp t a kl"n to be Er=[-f 1 ,-L" C,C]. Simulao L T ti on rpsults f or different. f=[f 1 ,f 2]are listed in Table 1. For ARMA mo dpl the initi a l par ampters of the ad ~ ptive observer is taken to be C. The simulation results a r e listed in Table 2. In these tablps fl=Cond( I~ ) dpnotes the condition number of matrix R. Cond(R)=)..ml1J«(R)/t min(Rl wher'" ).."'IV« ~ ) and A.mi"(~) arl> th~ laqjest a nd smallest oigenva lues of ;I . tJj denotes the value after ith iteration. ~imulation

(iii).Conjugate gradient method and variable metric method possess good Convergence property. The convergence property of the variable metric method Seems even better. (iv). In our example Newton method appears to be very effective. Hence it should be considered to be a good m~thod for systems of low order. Improvement of The Cost Function

u 1 (k)=Sin( C.2K)TSin( C.5K)

TA 2LE

(ii). Conv~rgence of the steepest descent ~ethod is very poor.

Simulation shows that the condition number of matrix R strongly affect the convergence of the iteration calculation. The convergence speed will be increased by reducing this condition number. We know R(k)=o,l(k)QW(k), when. W(k) depe~ds upon the input and can't be chanQe arbitrarily. Reducing the condition number by a proper choice of Q is also very difficult. Usually for simplicity Q is taken to be the identity matrix. Then we have R(k)=w1k)W(k). In this case from (1 we have

n

~

or

R(k)= ~~(k-i)~(k-i) 04 ) t- 0 This equation shows that R(k) is composed of 2n symmetric p'ositive semidefinite matrices CP(k-i)ctJ(k-iHi=O,l,"', 2n-l). Suppose that the vector ~(k-i)'s are linearly independent. Then all the semidefLni.te pos.i tive matrices ilre all

Re s ults of State-Variable Mod"'l

f;o [1.49,- O.55f ,. 8=[C.03,-0 .05, C.43,-0.35] ;r ::GM Y/=41 24[u,,(k)] 844=[C .02 9 9,-C.C499, C .4299,-0.349~ ,.. t1= 15 624[u , (k)] ~ e55=[ c .030 8 ,-C.05C,0.430,-0.350~

11= [O.5,-0.S5f ,. 5= [1.02,-0.C5, C.43,-0.35J

" (2=2618 u (k) ,. 6 4 =Q .0199,-C.0499,C.430,-0.350]

rz=15624[u, (k))

NI~

81=[ 0 .03,- O .OS,0.4299,-0.349~ T ~D LE

2

Simulation Kesults of ARMA Model

8 * = [ 1.52,-0.6,0.43,-0.35J T CGM }1=6372 [u,(k))

g8=~·5199,-0.5999,0.4299,-O.349~

SDM

T

8*=[0.4,-0.03,0.89,-0.65J" }2=2190 u(k) T 8 8 =[0.40,-0.030,0.8899,-O.6499J ",fI.-27 [u;(k}]

8407=[0.3385,-0.1088,0.9017,-0.593~

T

Design of Discrete-time Adaptive Systems

different. Fnom the view point of geometry we can obtain a perfect hyperellipsoid in the 2n-dimensional parameter error vector space from matrix R(k).This hyperellipsoid is exanded in all 2n independent directions. from each pas! tive semidefinite matrix we obtain an imperfect hyperellipsoid which is not expanded in some directions. Hence its condition numb(lr is 00. Since all the ~(k-i)'s are independen~ therefore the directionsin which each imperfp.ct hyperellipsoid is no.t expanded are different. Thus these 2n differpnt imperfect hyperelUps.oids all together form a perfec.t hyperellipsoid which is expanded fully and its condition number is finite. ~w let us in~ cr",ase the dimension of output error vector Eik) by one. We have

293

parameter identification can equally applied to the design of adaptive controllers. Since we are dealing with deterministic systp.ms, the system parameters under the closed loop condition can be identified by the foregoing method and then dl fferent kinds of sel f-tuning controller can be designed. aut the foregoing method can also be directly applied to the dE-sign of model-reference adaptive control systems(MRACS). Two feasible schemes of design are presented below. MRACS Scheme I The design scheme shown in Fig. 2 is adopted.

R( k }=~ CP( k-! )(f(k-i) l

~-I

Suppose that 4>(k+1) is also independent of the other vec.tors.Then the unexpanded directions of the hyperellipsoid formed by ~(k+1)~lk+1) are also different from the unexpanded direc.tions of all those iimpErfect hYl?erellipsoids. Thus the addition of .p(k+1 )q;'(k+1) t o the former R(k) causeS the perfect hyperellipsoid to be mor~ "stout" and I:.f"duces its condition number. Simulation has be __ n made to verify the for~going argument. Calculation has bepn done for the state-variable model with u,(k) as input. The result is shown in Fig. 1. Curve I shows the change of the cond Hion numben of R(k) with the dimension of E(k) unchanged. CurVe 11 shows thp change of the condition number of R(k) with the dimension of E(k) continuously increased. (ond( R)

fig. ]he controlled object is defined by B.(q-I)/A(q-I) which is unknown. Assume that -I)

-I

-n

1

A( q =1+a 1q + ··+anq (36 ) a( q-I)=b +b q-I + .. '+bnq-n O 1 where B(q-I) is stable. The reference model is defined by D(q-I)/C(q-'), where

1

C(q-I)=1+c q-1+ "'+cnq -n 1 (37) D(q-IJ=d +d q-1 +. "+dnq-n o 1 The parameters of the controller are to be determined as follows: Assume that L( q -1) -10+11 q -1 + ·· +ln q -n

(38 )

15 0 0 0

I

10 0 00

5000 6

i

8 q

n

10

11

12

k

13 ·14. 15

Fig. Simulation shows tha.t the increse of the dimension of E(k) is truely an effective method for reducing the condition number of R(k). Considering the foregoing discussion we can change the mE-thod of identification calculation as follows~ If the system pa~ameters can't be obtained during a definiteinterval of time (for example, during 1 sampling period) we can increase the dimension of E(k) by one and continue the calculation as before. DESIGN OF ADAPTIVE CONTROLLER The foregoing method of calculation for

H(q-1 )=h q-1 + -"+hnq-n 1 If A and B are kno~n, then. take L=B and A+H::C, we have y~t)=J(t), 'it. In order to obtain the parameters of the controlled object we apply our method to identify the following system : B(q-l )z(t)=A{q-1 )y(t)

(39)

This equation can be changed to L(q-l )z(t)=[C(q-1 )_H(q-1)] yet) (40) or

(41)

where 4>T (t)=fy(t- I)," ., y(t-n) , z( t) .. . . , z(t- n)] (42)

8 T~hl_cl' h 2 -c 2 ," . , h n -c n ' 10 ,' . , 1nl (43) Parameters h.1 and 1.1 can be determined

C.-B. Feng and H. Li

294

by solving (41), using the method proposed in this paper. Thus the parameters of the controller can be determinecj directly. MRACS Scheme-II Another scheme of design is shown in Fig. 3.

~(t)

u(t)

The proposed me-thod has the following advantages: (i). The parameters of the identifier or of the controller can determined from only 2n or a few more input and output sampling data. The condition of " persistent e xciting" is avoided. The later is usually necessary for the convergence of recursiv~ identification process. (ii). S.ince the parameters can be determined by using limited sampling data, thereforp the identificati on and control of unstablo systom bocome possible,

Fig. 3 From this block diagram we

convergence of the identification process. Increase of the dimension of the output error vector Eik) is effective for reducing the condition number of R(k).

ha~e

y(t) =to (q~ / [ A(ql) 0 (ft ~~( q~ll H(ql~) U( t) (44) Let this equation be identically equivalent to the following equation:

then we- have B(q-1 )=O(q-1 )+L(q-1)

(46)

A(q -1 ) =C (q -1 ) -ti (q -1 )

(47)

where O(q-1) and C(q-1) are given. No.w use- z(t) and yet) as input and output and solve the following e~uation: LD(q"")+L(ql] z(t)=f(cf')-H(cf')J yet) (48) then the operators L(q-1) and H(q-1) can be determined. CONCLUSION Application of non linear programming to the design of identifier and adaptive controller for discrete-time system is presented in this paper. The convergence propertie's of the different gradi'ent methods are analyz.ed and compareD with each other. Simulation shows that if the number of parameters to be identified is not too large and the irrverse of the matrix R(k) is easy to obtain, then the NP'Wton method is a good one. If the inv~rse of R(k) is di fficul t to calculate, then the conjugate gradient method and variable metric method may be applied. They possess good convergence property, while the convergence property of the steepest de-scent method is usually very poor. The condition number of the matrix R(k) has strong influence on the sp~ed of

~iii) .. When the ada~tive control ~ys tem 1S des1gned on the basis of recursive calculation, .th e question of olobal stabi~ity should be answered.~This pro blem lS a hard one. In our des ion the whole system is linear before and after tho chanse of the controller parameters, and the parameters aro chan0~d only once. Tr.erpfore the problom of' global stability is avoidpd. T~is is somewhat likp thp hybrid adapt ivo control recently dev~loPQd (~l'ictt, 1~821

RfTERENC[

Av ripI, M. (1976) . NonlinDar r r ocra~ ­ ming. rrpntico-Hall, Inc. ":l1iott, H. (1982). ~yt' riG Adapt ive Control of Continuous Timn Systoms. I~[r Tr. ~C-27, 419-426. r.:ykhoff, P. ( 1977;. Systom Idontifica~. JO :ln ;·:il py and Sons. Fong, \.0 .- 8 . (1982). IdDntifior do si(1 n via Timo-Varyinq Nonlinpar Pr00~am Tins . Rocont Do~olop~onts in Contro] Trc~ry and It s Appl icati ons. Cord or. and Broach , Scionce rubJishors, Inc. 311-318. Krpisselmt:>ier, G. (1977). Adaptiv o Ob sorvo r with ~xponential Rato for Convergonc~. I[~[ Tr. AC -22, Ne . 1. Lan dau , 1.0. (1979). Adaptiv o Cont rol. Dekker, Inc. ~arendra, K. S ., Y.-H. Lin, L.S. Valvani (1980). Stablo Adaptivo Controllor O~sign--Part 11: Proof of Stability. 18[[ Tr. AC-25, 440-449. Narondra, K.S., Y.-H. Lin (1980). Stable Discretp Adaptivp Control. 1[[[ Tr. AC-Z'), 4%-461. Taka~uzuki, Takumi Nakamu ra, Masanori Koga, (1980). Discreto Adaptive Obsprver with Fast Con vergence. Int. J. Control, Vol. 31, No. 6.