- Email: [email protected]

Cop\T i ~ ht

PAPERS OF CE :-.JE RAI. ASPECTS

HEURISTIC ADAPTIVE PROCESS COMPUTER CONTROL J. / I/.I/i/II/I'

0/

Marsik and V. Strejc

I II/omlt//IIJJ! 7 !t1'1Il)" alld . ~ ltlOII/(tI/IJJ! , C:I'r/IO.,.jIll'aR . ~ ('(trll'l/I) '

0/ Snf-II{l'I ,

p/(~I[/{I', C:f'r!tO.I!Oi 'a!;/({

Abstract . Three heuristic approaches of discrete adaptive control proposed and verified in the last years in the Institute of Information Theory and Automation are described . Their good properties, the extremely low number of arithmetical operations needed a nd applicability for a very large c l ass of processes and control pro blems anticipate a broad ut i lisat i on . Keywords. Adaptive contro l, gain cont rol. digital systems. INTR ODUCTION What is an adaptive control? Ove r the years there have been many attempts to define the adaptive control . Unfortunately, the different definitions, when compared , do n ot clarify the basic principle of adaptive control, but demonstrate the very different subjective notions relating to the subject of adaptive co ntrol . In this paper the authors will accept ano recommend the definition that the adaptive controller, irrespective whether it is in the feedback or in the feedforward , can change its behaviour, i.e. its parameters in response to changes in the dynamics of the process and the input variables, e.g . command variables, disturbances or others . This definition makes clea r that the co n ventional co nstant feedback regulator should not be included in the family of adaptive regulators.

In the first case the parameters of the controller are changed in accordance with the measurement of appropriate auxiliary variables, if such a measurement is achiev able . In the second case the differen ce between the actual process output and the ideal reference model output is applied in the adjustment mechanism of the regu lator parameters . In the third case the parameters of the controlled system are first estimated by an appr op riate identification procedure and the estimates are then used for regulator design . The common property of all these three approaches of adaptive control is the non linearity of the closed control - loop in the wtlole . The non - lineari ties are intro duced mainly by the multiplication of par ameters by variables , both of them being unstationary in time . This is the reason for a slow development of the respective theory giving the appropriate insight into the mechanism of adaptation . Between the open problems as e . g . stability consider ations, convergence and quality of adap tation belongs a very important problem o f ccntrol concepts and the respective control schemes and their adequacy t o the adaptive control.

In 195 0 was presented the first patent on an adaptive controller by Caldwell and since that time many contributions in the control theory have been elaborated which may be used for or at least can facilitate the understanding and the design of adapt ive con trol. I t can be said that now a re markable attention is paid to the development of the field both at cesearch insti tutes and in industry . There are also sev eral surveys on adaptive control . The most extensive bibliography covering about 7 00 contributions and papers is that one by Asher, Andrisani and Dorato ( 1976) . We do not make a serious mistake when saying that all contributions and papers on adaptive control deal with approaches based on conventional mathematical control t h eory relating to an ordinary feedback control loop with a process and a regulator with adjustable parameters . The final aim is to find the way how to change the par ameters of the controller i n respo n se to changes of the process and of its input variables. In this framework it is poss i ble to d i stinguish the p r ocedure of gain schp.d uling model, reference adapt i ve systems , explicit and implicit self tuning regulators.

347

The next sections are devoted to heuristic approaches of adaptive control elaborated in the Institute of Information Theory and Automation of the CzAS . In the mentioned institute there were attained very inte resting results belonging to the category of self- t u ning regulators , but in parallel heur i stic procedures we re developed . It is , of course , very diff i cult to find the boundary between the conventional mathemat i ca l control theory and heuristic procedures . In th e first approach it is o f te n necessary t o deci d e according to t h e expe r ience e .g. wh en s e lecting the cost function , weight i ng factors , a u xiliary var i ables and ot h ers and on the other hand the eva l uat i o n of he uri stic a p proaches requires often sufficiently p rofound know ledge of the theory o f contro l in order to

J.

Ma rsik a nd \ '. Strcjr

find the right concept for the solution of the given problem. Instead of heuristic approaches it might be better to speak about unconventional approaches of adaptive con trol and to eliminate in this way the dis putation about the contribution of the math ematical theory and the experience or brains . When applying the adaptive control of any kind , it is always necessary to take advan tage of the professional inference supported by the theoretical concept rather than to rely exclusively on experience or on theory.

c ontro l and the errors e may increase in stead of being suppressed . Consequent l y , the gain g must no t force the control to the marginal frequency and to cause high overshoots. All above mentioned fa cts are considered by the described adaptive control . The mean value E [ ey ]

l:

i=O

e.y. 1

( 2.1 )

1

where The heurist ic approaches present certain ad vantages which can be very useful in prac tical applications. These are simple algor ithms of adaptation needing only few arith metical operations . Some heuristic approaches do not need identification of process parameters and avoid in this way the most dif ficult problem appearing in self-tuning regulator systems. 2 . PROCESS OF INPUT - OU TPUT ORTH OGONALIZAT I ON

Extremely simple adaptive control can be achieved by the control loop configuration give n in Fig. 1 . No parameter identifi cation and no adapted models are needed . By inspection of Fig. 1 it is obvious that be sides the conventional control loop consist ing of the process P and the controller C a n additional branch composed of two multi pliers Ml and M , a prefilter F and a sum 2 mator S for automatic adapting the controller gain g is attached.

(2 . 2)

For all phase shifts 0 < e < . /2 the i values eiYi are positive and for

./2 < ' i < 3. / 2 are negative.

It is evi-

dent that the low -fr equency components o f the command signal w influence the mean v a lu e E [ ey : in the positive sense and in consequence of this the gain in creases . However, due to the generation of the high frequency components when approaching to the frequency b oundary value the further increase of the gain slows down and stops finally at a cer tain value. Such an equilibrium gai n value is reached even if the error e ca nn ot vanish com pletely due to the permanent c h anges o f the command variable or of the disturbances , resp ectively . If the gain is too high , oscillations arise whose phase shift ~i > "/2 , the values eig

The process may be linear or nonlinear, con tinuously acting or discrete and of an arbi trary order. Only o ne requirement must be met: the process itself, i.e . without con trol , has to be stable . If the command sig nal w is sufficiently exciting, no additional test signal is needed. For the adjustment of the controller gain two signals are used, i.e. the controlled variable y and the error e. The products of these variables modified by the factor A aloe calculated by the multiplier Ml in t he individual instants of sampling and are added in the summator S . The output o f t his summator represents the contro l ler gain fed into the main control loop by the multiplier M . The ratio of the controller parameters 2

corresponding to the proportional, summing and differentiating actions is fixed , but all these parameters are multiplied by the adapted gain g . The expediency of the filter F will be discussed later . The basic idea of this adaptive control system was presented for a continuously acting system by J. Marsik [ 2 ] in 1970 . Eac h of the spectral components of e appears at the process output with a certain a mpli tude attenuation and phase shift dependi n g on its frequency and on the dynamics of the control l er and the process, respectively. The phase shift equa l to n radians caus e s that the signal is fed back with the posi t ive sign and the contro l may b e unstable. Such a frequency component r epresents just the boundary of the f requency b a n d - width useful f or control . All frequency components exceed i ng the boundary value interfere the

are negative and the ga in de i creases until an equilib r ium state is achieved. The fllter F is used for the select i on of the quality of cont r ol . The respective transfer function is F(z)

=

1 -

z

-m

(2 . 3)

For low values of m the control loop re tu rn s oscillations which may not be sufficiently damped a n d in the cont rary, higher values of m return well damped transient responses. The stability of the system can be co nsidered by means of the gai n increment I1 g. I t holds that 6g( k )

=

g(k+l) - g ( k l

=

~g ( k):~ ( k ) -y ( k , g) l '

(2 .4 )

It is a difference equat i o n g(k+l) - {l + ) [ v/(k) - y(k , g): :y ( k,g)-y (k - m, g) j' , H)g(k) = 0 g(k+l ) - il+ Ah(k,g))g(k )

0,

(2 . 5)

where h(k , g) = [ w(k) - y (k , g)][y(k,g) - y(k - m, g) ] H. If in the equilibrium state a{[l+Ah(k , g )]g( k ))

I < 1

ag

(2 . 6)

3-19

Heuristic Adaptive Process Computer Control holds, then the adaptive control system is stable. It is convenient to introduce the normalis ation of 6g(k) by 1 + i h(k,g) i in order to contract the range of possible changes of 6g(k) .

Consequently , r i opt corresponds to the stability margin of the controller parameter r with respect to both boundary i values r i min and r i max' respectively.

maximu~

Finally '-'le have >.h ( k,g ) g ( k ) g(k+l)

(2.7) k

l+ i h ( k , g ) I

F

S

M,

4

C

p

~

y

r; min

Fig . 2 A similar curve may be found for each par ameter of the controller and their optimum values lie near the middle or, in many cases , just in the middle of the stability range.

Fig. 1 3 . MAXIMUM STABILITY MARGIN OF CONTR OLLER PARAMETERS The concept of adaptive control described in this section is based on the relation be tween the controller parameters and the quality of control. A three terms controll er is considered having the individual parameters for the setting of the summing , proportiona l and differentiating actions , respectively. Let us denote these parameters by r. , i ~ ~ - 1, 0, +1. The quality of c ontrol 1 has to be expressed as a function of one of the controller parameters. E . g. such a function may be the Hurwitz determinant H(r ) or some other convenient function of i r and of the closed control loop parameters. i It is assumed that the process to be con trolled is linear and stable. Hence , the de terminat H(r ) is a function of all par i ameters of the characteristic polynomial of the system, too . The typical relation H(r ) is expressed by i Fig. 2.It has a shape of a parabola with a vertical axis. It is well known that the closed control loop is stable, if H(r ) > 1 . i For H(r ) ~ the system is on the boundary i of stability and for H(r ) < 1 the system i is unstable. The stability range in Fig. 2 is given by (r i min' r irrax ) and the optimal

°

value r i opt corresponds to the maximum value of H(r ). In the example of Fig. 2 i 1

r i opt

DCA - Li~

(3.1 )

It is clear that the optimum value of the stability margin gives the maximum of the determinant H(r ) and it can be expected i that it is simultaneously the optimum of control. Thanks to these coherences it is possible to get in a certain sense an optimum control by maximizing the deter minant of the denominator o f the closed control loop transfer function with respect to the individual controller parameters instead of minimizing the cost function evaluating the complete transfer function. The maximum stability margin corresponds to the maximum value of the determinant H(r.) exactly for low order systems only, e.g: if the determinant is a quadratic parabola having a strictly symmetric form. Fortunately, in the case of higher order systems, when the determinant is a parab ola of higher degree, the deviations from the symmetry are negligible, and, in addition, the maximum is flat enough to compensate the non - symmetry. In the stable range of the higher order parabolas more maxima can be expected, nevertheless, all properties mentioned before remain un changed. Apart from the above mentioned results, the basic idea of the described approach can be considered as a formulation of a new optima l ity criterion taking advantage of the maximum stability margin of the con troller parameters. Unlike the usual notion of maximum stability referring to the roots of a characteristic polynomial, the mentioned idea concerns the stability extent with respect to the controller parameters . The criterion is in full conform ity with the common control philosophy. It

J.

350

Marsik and V. Strejc

guarantee s a stab l e control desp i te the possible process parameter changes and keeps good contro l behaviour.

u

~

3 . Switch off the relay and reset the c han nel of the adjusted parameter into the normal operation mode.

y

p

er;

2. Measure the amplitude A at the rel ay in put and calc ul ate the optimal value ac cording to Eq . (3 . 4) . Set the parameter equal to th i s value.

4. Repeat steps 1 . - 3 . successively for the other parameters and if all par ameters have been adjusted then reiter ate the whole procedure until negligible changes in parameter settings are achieved. Mostly 2 - 3 adjusting cycles are sufficient .

rI

More details and examples of simulation can be found in literature [3 }. Fig. 3 .. In view of the very small value of r lmln in comparison with the r it is poss imax ible to set it equal to zero when calculat ing the maximum stability margin. The value of r can be f ound by means o f simple imax experimental approach. As indicated in Fig. 3 for one controller parameter r it can be i realized on line by generating a limit cycle by an ideal relay ele me nt applied in the outp u t chann el of the contro ller par ameter to be adjusted . During this identi fication per io d the output of the relay is

M

=

Bsign ( e r i ) .

(3 .2 )

4 . APPLICATION OF THE DEGREE OF THE PROCESS OSCI LL AT ORY BEHAVIOUR This sect i on deals with a different cost function re turning similar properties of control as the previous approach of maxi mum stability margin , but not needing the limit cycle excitation. Observing the zero crossing frequencies fe and fv of the control error e and of its first difference v o r the cor resp ond ing numbers of zero - cross ings Ne and Ny ' respe ctiv el y , it is possible to find the rela tion [ 4 } between

The out put amplitude M of the relay must be sufficiently small in order not to decrease the safe operation of the process . Applying the well known theory of the de scribing functions it is possible to deter mine the required boundary value as

r. lmax

(3 .3 )

where r

is actual va lu e o f the adjusted i parameter. A is the relay input and M the relay outp ut amplitude of the signals. The value M must be properly chosen . It must be great enough so that the limit cyc le be dis tinctive and small enough in order not to impair the contro l. Thus, the optimum value r is o ne half of r or , without ob imax iopt servable loss of the contro l quality, the optimum value o f the parameter can be ex pressed by the simplifi e d relation

F

(4 . 1)

and e . g. the cont roller gain g . Meanwhile , only the common gain of a PSD controller is conside r ed while adaptation of the othe r parameters will be discussed later . The ratio F is roughly proportional to the gain reaching its upper limit value equal to one, if the system becomes unstable. Thus, the possible range o f F is from zero to one: small values indicate an over damped co ntr ol , high values test ify to an oscillating one . As in the case of maximum scability margin the optimum va lue of F is approximately equal to one half . Accepting the mentioned proportionality it is possible to apply the following simple relati on (4 . 2)

(3 .4 ) For r

= r it follows that A = M/2. iopt i Consequently, we can seek r by trial iopt and error approac h as well, un ti l the needed cond it ion i s met .

In co n cl u sio n it is possible to summarize the main steps of the described parameter adaptation:

where k is the instant of sampling . Re l ation (4 . 2) may have also the following form ( 4.3 ) or

(4 . 4) 1 . Switc h on the relay in the c hannel o f the controller parameter to be adjusted, set a co nvenient relay output amplitude M and wa it until the limit cyc l e is reached .

where the fa ctor (4 .5 )

Heuristic Adaptive Process Computer Control

:~5 1

was inserted to modify the speed of adap tation.

?(k)

e'(k)+T(k -1 )e!(k - 1) 1+T\k- 1)

Difficulties arising by direct measuring the frequencies fe and fv or the number of

V'TkT

v'(k )+T( k - 1)v!(k - 1) l+T\k - ll

a'TkY

a' ( k )+T( k - 1 )a !(k-l ) 1+ dk -ll

zero - crossings Ne and Nv ' respectively , can be avoided by calculating them by means of the control error e and its first and second differences. This calculation returns useful data at every sampling instant so that a very fast adaptation can be obtained. The calculation is based on the formula for zero - cro ssings of a continuous Gaussian random signal with zero mean

wi th 2

T( k)

f

number of zero-crossings o f e

e

and f

e

@

v

V~)

v

take now the form

e'fk)

(4 . 6)

derived by S . O.Ri ce [ 5 J . In ( 4.6) f ollowing notations were used:

(4 . 12)

fv

Frequencies f

f T

( 4 .11 )

(4 . 13)

V'TkT

On substitution of (4 . 13) into (4 . 1) , (4 .4 ) and (4 . 5) the formula of the gain in crement takes the f orm

observation time

T

6g ( k) the values of autocorrelation fun ctions of t he error e and of its derivative, e = w - y 0'

dispersions o f e and of its derivative

0'

e

v

For the zero - crossing frequen cy we obtain N

e

(4.7)

T and in a similar way we have

f

~

~

v

where

(4.8)

v

a

In the case of sampled signals we can calculate the dispersions approximatively as mean values of squares of error e(k) and of its first and second differences 6e(k) and ~'e(k) , respectively. Hence, we can write that

It has to be mentioned t hat the procedure of ca l culat in g the number of zero - cross in gs accord ing to formula (4 . 6) includes not o nly the actual crossings but ap proaches to zero axis, too . Consequently, the procedure may be applied not only for random changes of the error e but also in the case o f single step disturbances . In view of this fact the procedure is very universal . Let us consider now the structure of the PSD co ntroller in the form k

k

(4.9)

e

and similarly for fv. Substituting the last

k

~l:e' (k) l:( 6'e(k))' k

(4.10)

k

In order to update the controller parameters sufficiently fast it is necessary to suppress the influence of the old measurements. This is performed by a first order filter with a time constant T(k). If on the input of this filter act e', (6e)'and (6'e)' it returns the average output values e', ~ = V' and (6 'e )' = a', respectively, correspond ing to the following relations

v(k)+r a(k) J (4.15) 1

=

r 1 Va 2 (k)

(4 . 16 )

and consequently

Ve:Y

ro

relations for fe and fv in (4.1) we have l: (6e( k)) , F

0

where u(k) is the contro ller o utput, g ( k) is the gain and ro and r are the par 1 ameters of the proportional and difference terms, respectively. The proposition is to set all three terms to an equal value in order to establish an effe ctiv e control . Hen ce ro VV'(k)

l: (6e (k)) , f

n

u (k) = l:g( k ) [e(k ) +r

second derivative of e.

1

g ( k )i

. (0 , 5 Va'TkYe'Tk! _ 1) (4.14) v' (k)

denotes the dispersion of the

0'

=

r

1

=

(4 .1 7)

(4.18)

Exact mathematical justification of the proposed controller structure is not evaluated except for the phase improvement reaching the value of about n/2. Nevertheless, the responses obtained show to be very good. Many examples were tested both on digital and hybrid computers. The simulated processes were nontriv ial, of up to forth order , with non - minimum phase and with transportation lags, too. Random d isturbances as well as steps or ot her deter -

J.

352

Marsik and V. Strejc

ministic s i gnals were used . For step disturbances the optimum setting was reached after 2 - 4 steps, even if the initial value of the gain was very far fr om the optimum . 5 . CONCLUSION The described heuristic approaches o f discrete adaptive control attract by their sim plicity and good performance . They raise the question whi c h of the three pro c edures is the best. Unfortunately, there is not a common criterion enabling to answer in a unique way . All three approaches have simi lar quality and it is really difficult to give pri ority to one of them. Only in feri or properties, e.g . the number of numerical operations needed, may give some guidance for the classifica ti on . The discussed adaptive procedures have been tested not on ly in the laboratory scale , but they are ap plied in real operating con ditions . REFERENCES [ l J Asher, R. B . , D.A. Adrisani and P.Dorato (1976). Bibliography on adaptive cont r ol systems . IEEE Proc., 64 , 1126. [2J Marsik, J. (1970) . A simple adaptive contro ller. Preprints of the IFAC Symposium on Identificati o n and Process Parameter Estimation, Prag , vol . I, paper 6 . 6 . [3J Marsik , J . , P . Cerny and S . Blaha (1979) . A simple algorithm for automatic optimum setting of controller parameters . Preprints of the 2nd IFAC/IFIP Symposium on So ftware for Computor Control SOCOCO 79 , Prag, paper A - XII. [4 J Marsik, J. (1983). A new conception o f digital adaptive PSD control . Pro blems of Control and Informatio-n--Theory , 12, 267 279 . [ 5J Rice , S . O. (1944, 1945). Mathematical analysis of random noise. Bell Techn. Journal 23 , 282 - 332 and 24, 46 - 15 0 .

Copyright © 2021 COEK.INFO. All rights reserved.