Copyright © IFAC Low Cost Automation 1986 Valencia, Spain, 1986
SOFTWARE FOR SIMULATION OF ROBUST ADAPTIVE CONTROL SYSTEMS I. I. Tomov Higher Institute for Electrical and Machine Engineering Students' Town, Sofia 1156, Bulgaria
K. I. Kolev Bulgarian Industrial Association, 134 Rakovski St., Sofia 1000, Bulgaria ~~~~~~~~.
The implementation of the adaptive regulators is obstacled at present by the too high requirements to the plant's model, especially by the requIrement for precIse knowledge of it's order. The paper studies easy-to-realize approaches for decreasing the effect of the unmodelled dynamics in the plant's model. A method for evaluation of an unmodelled coefficient and greater delay in the difference equation of the plant for the indirect algorithm of Goodwin and others (1980) is discussed. The implementation of adaptive control systems necessiates the development of s~itable software for testing the performance and the robustness propertIes of the already known adaptive control algorithms. Two program systems for microcomputer realization of the algorithms of Goodwin and others (1980), Narendra and Lin (1980) Egardt (1979), as well as their modifications, are described. '
~~~_~~~~~.
Adaptive control, stability, computer-aided system design, computer software, direct digital control, robustness I NTRODUCTI O:-l
The problem of ensuring good robust properties of the adaptive regulators is the most important and still unresolved problem in the theory and practice of model-reference adaptive control systems (MRAS) concerning their stability (Landau, 1982: Rohrs, 1984: Kosut, Friedlander, 1985). The research made in literature (Rohrs and others, 1984) shows bad robust properties of all known algorithms for adaptive control. On the other hand the availability of cheap and reliable microprocessor devic~ for control and the development of the personal computers during the past few years make possible the quick and simple realization of the adaptive algorithms both during the stage of initial adjustment and testing of their performance and in their application in practice of real time control of technological processes. Among the proposed in literature methods for synthesis of stable MRAS however the practical limitations on their applicability from the microprocessor realization are rarely taken into consideration. The test examples, designated to confirm the efficiency of one or another adaptive algorithm, usually are simulated on a mainframe computer. That is why it is necessary to develop a software for research, experimentation and implementation of the adaptive regulators in practice.
ERROR MODELS OF THE ADAPTIVE SYSTEM WITH UNMODELLED DYNAMICS The existence of unmodelled dynamics puts the question for the application of already known analitical proofs of stability in the case of unprecise plant modelling. Assume a state space representation of the plant's model x(k+1)=A(k)x(k)+B(k)u(k) y (k) =Cx (k) ,
( 1)
where : x(k) - n-dimensional state vector u(k) - scalar input y(k) - scalar output Without loosing generality it is assumed that plant's coefficients can be directly adjusted. This assumption can easily be changed with adjusting the coefficients 9(k) in the feedback matrix and elk), i.e.
x (k + 1) = [A - B9 (k) ] +1J r(k) .
x (k)+ B [9 0 (k) +
( 2)
The unit in the expression B [9 o (k)+] is added for to prevent zero reference signal. The reference model is given by (3)
where: )f;{k) - scalar output m(k) - additional signal, leading to normalization in the adjusting laws (Narendra, Lin (1980~.
In literature there are no sufficient results on the influence of the unmodelled dynamics on the process quality and especially on the rate of decrease. Such results can be obtained after detailed experimentation with an analogue model of a real plant with a laboratory microprocessor adaptive system.
The error is given by the equation
(4) For the dynamical model of the error is obtained
219
220
I. I. Tomov, K. I. Kolev
e (k +1) ; am e (k) + tr (k) w(k) +m (k) , where: trek);
U l (k),
(S)
where'i(k) is a resul t from the presence of an unmodelled dynamics, and
fo(kU
((C k);
[amC-CA(k) ,bm-CB(k)] T
T
w (k); [x (k) ,r(k)] From (S) follows that for the asymptotic stability of e(k) for any vector w(k), the fulfilment of t a 1 and lim..J (k);O is needed. Satisfyi~g the secon8 requirement leads to the condition
re~ ; [~o"
y k) . . . y (k - n +1 ) ,u (k) ... u (k - m- d ~ "n-l ' ~o " '~m +d-,]
The control structure in the adaptive case willTbe determined by the equation
1<
TT'
[
T
%
T
( 10)
the equation for the adjustment law Kill be
The observability matrix is T
f(k);8*-8(k)
(6)
CA;amC
Q
If the parameter error is defined as
11-1]
C C A C A..... C A
(7)
Taking into account equation (6) it could be seen that the first two lines are linearly dependent from which follows that the error model is unobservable. Consequently Lyipunov's function and the hyperstability will not prove stability for the unobservable states. The analytical proofs for adaptive systems ' stability are very often based upon the requirement for a positive reality (Ljung, 1981) of the transfer function of the closed-loop system. The presence of unmodelled dynamics makes this requirement unrealizable. The following approaches may be proposed in order to decrease the effect of the unmodelled dynamics in practical applications: (1) Selection of a great sampling interval (2) Adaptive laws with impure integral action (3) Slow adaptation speed The fulfilment of requirement (1), which leads to mutual compensation of the influence of the zeros and the poles in the plant's discrete model resulting from the existence of unmodelled dynamics, is hindered by the deterioration of the control's quality. Requirement (2) leads to the adjustment halt in the presence of a residual error, as the problem of falling into this stable zone has not been solved yet (Ioannou and Kokotovich, 1982). Requirement (3) is deduced for the linearized models of the adaptive systems. The lineraization of the adaptive system description makes possible to use the welldeveloped methods for linear systems research but the problem of the efficiency of the nonlinear nonstationary adaptive system is still open.
T
J'f (k - d)[;(k) -
fCk) ;f(k-l) T
T'
C(k-d)8(k-l )] 1 + If (k -d)lf(k-d)
; [1- r(((k;d) f(k-d)
]f{k-l) + 1 + (j9(k-d)f'(k-d)
T
+ rCf(k-d) ~(k-d)
( 11 )
T
1+ If(k-d)lf(k-d)
r:: r
T
"> 0
A necessary condition for stability of th e parameter error is the input signal restriction in the model (11). In the simplest case, if conditions for its anullment are looked for, the requirement for a zero coefficient b will be obtained, which is absurd, and/or the corresponding to the unmodelled dynamics coefficients to be equal to zero, which means unconsidering of the plant's higher order. In order to retain MRAS efficiency, on the basis of the estimation (k), the adjustment law (11) is modified in the following way r
"
f (k) ;f(k - l) J'I(k-d )[ y (k) - t(k-d ) -Cf (k -d )8(k-41 1 + liCk-d) lI(k-d ) T
;[l_r'l(~-d)Cf(k-d)
]f (k - l) +
( 12)
1 +'f(k-d)Cf(k-d) +
rt/(k-d) [t(k-d) - i rk -d)] r 1 + C( (k-d)lf(k-d)
MODIFICATIO~ OF THE I~DIRECT ALGORITHM OF GOODWIN
The manner in which the control unit structure in the algorithm of Goodwin and others (1980) is formed makes possible to obtain an estimation of the effect of an unmodelled coefficient and of a greater delay in the plant's model. This estimation is used for modification of the adaptive law as well as of the control unit structure. From (1) the predictive form of the equation of the plant's model could be obtained y (k +d);
T
Cl' (k) e+
~ (k) ,
(8)
Fpr sufficiently small e rror E (k -d)/:. (k-d) it cou ld be stated that the parameter error f(k) is limited. The control structure is found from the equation T
"
(((k)8(k ) +t (k) ;Ym (k +d)
( 13)
Case 1. Consider a plant model with a n unmoaelled coefficient of the t ype y(k);aly(k-l)+bu(k-2)+~k)
( 14)
221
Simulation of Adaptive Control
- with indirect adjustment --least-square ~gradlent procedure B) Algorithm of Narendra and Lin (1980) C) Algorithm of Egardt (1979) The predictive form of (14) is
where~0=al+a2;~0=b;~1=alb;l(k)=ala2y(k-l)
The solution of (15) in the adaptive case gives "
a 1 (k)
=
~ 1 (k) ~o(k)
~ A
1
(k)
a (k)= " (k)-(-__ )Z 2 o ~o(k)
( 16)
Two interactive program systems have been respectively developed: for a personal com· puter PC/XT on PASCAL and for a microprocessor configuration on the basis of MC6800 microprocessor on ASSEMBLER. The first system is for initial selection of the free coefficients and filters, adjustment and testing of the adaptive procedure's efficiency with a programly realized plant's model. The necessary memory is 180 Kbytes. The second system is designed for real-time simulations. With the purpose of a greater speed a Z-byte fixed-point arithmetics is used. The used scale is the following:
The following result is obtained from the estimation of 1G(k) A
~
(k)
I)
(k)
t (k)=_l_ [ .... (k)_(_l_ )z]y(k -l) SoCk ) 0 ~o(k)
(17)
Case 2. If apart from an unmodelled coefficlenf-fhe plant's model also contains unmodelled delay, then again the adjustment of only three coefficients -01.0) PO) p". leads to a possibility to obtain an estimation of t(k), which in this case is
external representation -----------------------0 1/ Zno .. 1 .. L2 15 - J }'Zn o The bigger the no's value, the smaller the number's range which could be represented in the microprocessor. On the other hand, the decrease of no means loss of accuracy, which leads to a residual error in the preset regime. Therefore, the selection of no is a matter of compromise between accuracy and representation range. A criterion is also taken into account for eval~ation of the adaptation 's quality, of the following type: N
I = 1 N
2K=l
l
e (k) Y11) y,.,
I
,
where N is the number of samplings in one semi-period of the reference signal. The value of I is reset to zero at the end of each semi -period . The performance index gives information both for the transient time - the number of semi -p eriods for which the error falls in the 5% zone and for the adaptation's quality - the sum of the values of I for all the semi -periods. In comparison with ~he original algorithm of Goodwin the number of divisions is reduced with d and the number of summations with 2dlf the unmodelled delay is greater, again an estimation for l(k) could be obtained as it is a function of the available estimations of the plant's parameters. The introduction of the estimation in the adjustment law and in the adaptive control unit structure as well, will obviously positively influence ~RAS's stability also in the case when the plant's difference equation has more than one unmodelled coefficient, leading in the predictive form to signals with the same sign as f (k) . SOFTWARE
ORGA~ISATIOS
The software permits simulation and investigation of the robust properties of the following adaptive algorithms: A) Algorithms of Goodwin and others (1980) - with direct adjustment
The necessary hardware includes: - Microprocessor M6800 - Memory type ROM - 8 Kbytes - Analog -t o -digit al convertor - 12 bytes - Digital-to-analog convertor - 8 bytes - Display The adaptive coefficients adjustment is realized on the basis of a numerically stable square-root algorithm, which gives an opportunity for higher order MRAS simulation with acceptable accuracy. The software block-scheme is shown on Fig. 1. The software is structured in the following functional blocks: 1. Initialization block 2 . Computation block 3. Visualization b l ock Three types of reference signals are provided: 1. Step function 2. Sinusoidal function 3. Rectangular function
222
I. I. Tomov, K. I. Kolev
COMPARATIVE ANALYSIS OF THE ROBUST PROPERTIES OF THE ADAPTIVE ALGORITHMS The covergence speed is investigated for 4-th order plant model
W(p)=
where ters
K(T]+p+1) (T2p+1) ? p(T 3P+l) [(p/w n )2+ 1 (f/ wn )p+l]
k.~,
( 18)
( 19) K=2; T 1 =0.1335;T 2 =0.4s;T 3 =0.2s The adaptive procedure is synthesised for a 2-nd order model
(20) where W =15s- 1 is the nominal value of the n natural frequency of the plant, and (=0,707 is the nominal value of the dinmensionless damping ratio. The real plant model consists of a sequentially connected model and a fixed unmodelled dynamics
f=
C/2K '{K/M'
algorithm
On Fig. 2 are shown the pole-zero patterns of the analogue model for different couples (w , f ), corresponding to the decreasing o¥ M. The respective situation of the poles of the discretized system for a period of discretization To=100 ms is illustrated on Fig. 3, in which case the plant is non-minimum phase. ·4
Parameters
semiperiods
6~~~11~~~3;
value of I
10
0 . 035
13
0.062
9
0.043
~=0.l,i=l,9
Egardt
From equation (22) follows that both w and f are inversely proportional to tHe square root of the mass.
(~,f)
Plant 4-th;Reference;T o =100ms;(w n ,! )=(15, order ;model 4th; 0. 707) ;order ;
(2.T)
(n)
=
m
Narendra, Lin
The transfer function (20) describes a mechanical system with a mass (M), spring (k) and damper (C). The input to the system is the force applied to the mass, and the output is the displacement of the mass from the equilibrium. The undamped natural frequency wn and the damping ratio fare
Wn=~K/M
Km (23) (T P+l)n m where n=2 + 4, T =0,25, k =1. The values of the free coef~icients Tn each algorithm are choosen on the basis of the linearized models of the adaptive systems in order to ensure equal basis for comparison. The algorithms of Narendra and Lin, Egardt, and Goodwin and others are studied . The algorithm of Goodwin is with best convergence speed but the quality of the convergence of the algorithm of Narendra and Lin is superior. (See Table 1) TABLE i. W (p)
T2 and T3 are constant parame-
Wn(p)- K(TJp+1) CT Zp+l) p(T 3P+1)
The process is subjected to an abrupt load increase which decreases both wnandJ . For the control of the plant are applie respectivelly adaptive procedures of second, third and fourth order. The transfer function of the reference model is
ll=Pl=P2=P ; 0.1;j' . =0.f, i= 1,9 1
Goodwin andri=0.1,i=l,8 others
The convergence quality of the error at the existence of unmodelled dynamics is calculated on the basis of the normalized value of the index for 10 periods of the reference input. The performance of each adjustment mechanism for different couples respectively for abrupt increase of the mass is compared in Table 2. The initial values of the signals and coefficients for every pair (w , f ) are the terminal values of the resBective variables for the preceeding pair. Experiments show that the convergence of the algorithm of Goodwin significantly deteriorates. With best performance is the propos e d modification of the indirect algorithm of Goodwin and others. TABLE 2 . Plant - ;Reference model - ; To=100ms 4th order;3rd order
1=(155,0.707) -, 2=(105,0.471) -4 3=(7.5s,0.354) 4=(5s ,0, 235) -4 5=(3s,0.141)
Algori thm Parameters12...
-.
= '::.
~
':' =.-: =
Narendra Lin
=.
~
~
11=Pl=P2=
~ ~ _3_ Ji n 0.70.4 7 0.350.14 f = ':. '= :.::. -.::::: __ ~
~
.0 7 .09 .1 2
~
~
s
.14
= .1f=1; J"'i =1 i~ 1, 7 -+ -Ill -tlTt -ff7i "/i If
x
le
""
Fig.2
-+
Egardt 11:Pl=.~2=.1 it -. ,t- T , 7 Goodwin/i=·1,i=1,6
. 1 2 un st . 10 . 24 un 5 t . 2 2 . 27
un 5 t
Modification
=========t~:~~~!:~~~=~~~~=~~~=~~==~~~=====
223
Simulation of Adaptive Control
lomov, 1.1., K. I . Kolev (1986) Microcomputer Simulation of Robust Model Reference Adaptive Control Systems, IFAC / IMAC Int. Symposium on Simulation of Control Systems, Vienna 1986.
If there is a greater structural difference, the values of I considerably increase but again the modification provides improvement over the original algorithms. (See Table 3) TABLE 3. Plant ;Reference 4th order;2nd order
model-
;T o =100 ms
Algorithm Parameters ~ ~ ~ _3__ wn 0 . 70 .4 70. 35 0.141 Narendra t =P1=0.1; 1 Lift .6 J'i = 1 ; J'i = . 1 . 24 .4 2 .45 i=l,5 Egardt 11=P1=0:1 i'i=0.l,l=l,5 unst unst .3 2 1 .1 2 Goodwin ii =0 . 1 , i = 1 ,4 unst .35 .6 2 .82 Modification ii=0.l,i=l,4
--l
INITIALIZATION BLOCK 1.Initialization of the plant 2.Reference model initialization 3.Reference signal initialization ,' 4.Algorithm initialization 5.Input data initialization :6.correction of input data initialization and bUffe¥J II. 7.Time-scale (results) initialization _ _ ___ __ ______ __ __ _ !
.5 2
.3 7
.35
.65
CONCLUSIO NS The developed software can be used for research, simulation and practical implementation of modern MRAS. There are studied also some approaches that ar e prog . ramly realized for decreasing the influence of definite kinds of unmodelled dynamics upon the performance of the adaptive control systems. Also there are compared the robust properties of th e proposed modification and some of the most often discussed algorithms in literature.
COMPUTATION BLOCK
J
11.Reference signal forming I 2.Simulation of the plant behaviour i_ 3.Input signal formation ! .Recording of results 5.Moving results in time .Finding eventual instability
I i
..
VISUALIZATION BLOCK
,......-----------'-------- -- - - - , 1.Value representation. of variables and signals 2.Graphic representatlon
----- - ---- -------
REFERENCE Egardt, B. (1980) Stability Anal y sis of Discrete-Time Adaptive Control Schemes, IEEE Tr. on AC, Vol. AC-25, No.4 Goodwin, G.C., J. Ramadge, P.E.Cain e s (1980). Discrete Multivariable Adaptive Control, IEEE, Tr . on AC, Vol. AC-25, pp. 451-461 Ioannou, P.A., P.V. Kokotovich (1982), Adaptive Systems with Reduced Models, New York: Springer-Verlag Kolev, K.I., I.I . Tomov (1985) Microcomputer Realization of Adaptive Control Systems, Proc. of the First National Conference on Personal Computers, PERSCOMP'85, Sofia Kosut, R.L., Friedlander, B. ( 1985) Robust Adaptive Control: Conditions for Global Stability, IEEE on AC, Vol. AC-30, N. 7
Landau, I .P., R.L. Ortega, L. Praly (1985) Robustness of Discrete-Time Direct Adaptive Controllers, IEEE Tr . on AC, Vol. AC-30, N.12, 11 79-118 7 Ljung, L. (1981) On the Positive-Real Condition in Adaptive Control, Proc. of the 2nd Yale Workshop on Adaptive Systems Narendra, K.S., Y.H. Lin (1980) Stable Discrete Adaptive Control, IEEE Tr. on AC, Vol. AC-25, pp.451-461 Rohrs, R.C., L. Valavani, M. Athans, G. Stein (1982) Robustness of Adaptive Control Algorithms in the Presence of Unmodelled Dynamics, Proc. 21-st IEEE Conference on Decision and Control, Orlando, FL Rohrs, R.C. (1984) Stability ~lechanisms and Adaptive Control Proc. of the 23rd CDC, Las Vegas
NO
Pig.
1
--
-- -
' j