Adaptive Controller for Fast Processes Implemented on a Signal Processor

Adaptive Controller for Fast Processes Implemented on a Signal Processor

Copyright © IFAC Low Cost Automation 1989 Milan. Italy. 1989 ADAPTIVE CONTROLLER FOR FAST PROCESSES IMPLEMENTED ON A SIGNAL PROCESSOR P. Hulliger, R...

1MB Sizes 0 Downloads 139 Views

Copyright © IFAC Low Cost Automation 1989 Milan. Italy. 1989

ADAPTIVE CONTROLLER FOR FAST PROCESSES IMPLEMENTED ON A SIGNAL PROCESSOR P. Hulliger, R. Longchamp, A.C. Tuncelli Control Laboratory, EPFL, DME-IA, Swiss Federal Institute of Technology CH 1015 Lausanne. Switzerland

A bst ract. A parameter-adaptive controller for fast processes is discussed in this paper. Its application to a hydraulic machine tool axis is presented. This non linear system is identified on-line with a reduced order model using a recursive least squares algorithm. The controller is based on self-tuning pole placement with feed forward control. An original supervision algorithm is designed to generate an on/off signal for the identification and to control the update of the controller parameters. The algorithms are implemented on a TMS32010 signal processor. Keywords Hydraulic machine placement. signal processor.

tool

axis

control.

parameter-adaptive

controller.

pole

I. INTRODUCTION In typical machine tool axis applications. the main objective of the control system is to track a predctermined trajectory as closely as possible. The effects of changing inertia. friction or the use of hydraulic motors introduce some serious nonlinearity problems that make it extremely difficult. even impossible. to design a robust pole plaeement controller. Actually. for many industrial machine tools. the tuning of the controller parameters is still a problem which has not been solved rigorously. Robustness often results in deereased control and steady-state performances. General purpose microprocessors are still used for the implementation of these algorithms. In this paper. we present a modern approach to the axis control problem by using an efficient adaptive controller. We discuss its implementation on a fast signal processor. which is more suitable than a general purpose machine due to the nature of the operations. The control system algorithms described below are implemented in assembly language on a T\1S3~()IO signal processor. The computation time per cycle is less than 25011 s. A real hydraulic machine tool axis controlled by these algorithms gives extremely satisfactory results.

required

Fig. I.

Assume that model

and

co\'ariancc

the system

is described

B(q-I) u(k-d)

the

+

by

the

C(q-I) w(k)

ARMAX

(I)

where u(k). y(k) and w(k) denote the system input. output and disturbance signals. respectively. and d the time delay which is at least one sampling period. Defining q-I as the delay operator. A(q-I). B(q-I) and C(q-I) are polynomials representing the discrete-time system poles. zeros and disturbance dynamics. respectively.

In addition to the classical output feedback. a second control loop is introduced by the identification of the system parameters which is performed using a recursive least-squares algorithm with a fixed factor

The indirect adaptive scheme with supervision loop.

3. THE POLYNOMIAL CONTROL LAW

2. THE ADAPTIVE CO:-''TROL SCHE\lE

forgetting

performances

Two objectives are desired tracking and position control. The first component of the control signal is generated by an open-loop feed forward control based on the knowledge of the trajectory to be tracked and on the identified system parameters. To ensure a good dynamic performance and also 10 eliminate the steady-state and residual errors. a second component of the command signal IS generated by a pole placement scheme.

resetting.

To ensure closed-loop stability. it is essential that the parameters converge. If the estimated parameters represent correctly the system. or if there is insufficient excitation. the estimator must be stopped. An original on/off criterion. based on the reference. the input and the output signals. detects any output divergence and supervises the estimation algorithm in a third control loop. On the other hand. the estimated system parameters must be validated before generating the new regulator parameters. a task which is also performed by the supervision algorithm. as shown in Fig. I.

The polynomial control law is given by weighting the command u(k). the output y(k) and the reference signal Yre[(k). by the polynomials R(q-I). S(q-!) and T(q-I). following

:,l)

respectively (sec AstromI984). In the relationships. a polynomial p(q-I) is

6()

P. Hulliger, R. Longchamp, A.C. Tuncelli

simply written as P. Generally, the measured output Ym (k) contains disturbance term v(k), thereby defining Ym (k) as y m (k) = y(k)

a

(2)

+ v(k)

R = R' B

In this case, becomes

The polynomial control law is written as

(11 )

the

closed-loop

system

polynomial

A*

(3)

= TYref(k+d)

Ru(k)

another formulation is introduced by eliminating the polynomial B in closed-loop relations which means a cancellation of zeros. This can be performed by defining R as a factor of B :

A * = R'A + S q-d The term U w (k) in (3) compensates system disturbances. Note also that polynomials Rand S are related to the feedback control whereas T generates a feedforward control, as shown in Fig. 2.

( 12)

This method must be used carefully : the polynomial B is eliminated in the error (8) and output (4) , but not in the expression of the c1oscd -loop control signal (5). Therefore, in the particular case of non-minimum phase systems, the control signal is unstable. The choice of the closed-loop system poles is still a problem to explore. We may intuitively impose on the A m zeros certain dynamics which are faster than the modeled system poles but slower than the unmodeled ones. These poles are selected to respect certain margins; in an adaptive context. they can be adapted on-I ine.

Feedforward control

Feedback control

4. DISTURBANCE ELIMINATION

2.

Fig.

The polynomial controller.

Using (I), (2) and (3), the closed-loop governed by: A * y(k+d) =

Now , if we take a close look at the right hand side of equation (8), it is possible to say that system output is

TBYrer
Buw(k)

(4) and the control signal by :

B *Yref(k+d) RC w(k+d) SBv(k)

represents the tracking error, the system disturbances error and the output measurement error.

Then eo(k) can be represented by : (13 )

A * u(k) = TAYref(k+d) - CSw(k) - SAv(k) - Auw(k) (5) where the roots of A * = RA + BS q-d represent

(6)

the closed-loop system poles.

Defining the objective error as : eo(k) = where signal, by :

y(k)

(7)

P Yref(k)

P is a polynomial filtering the reference the closed-loop objective error is represented

A *co(k+d) =

B*Yref(k+d) + RCw(k+d) - SBv(k) +

Generally, the measurement errors v(k) can be considered as white noise whose effects are negligible. The use of an incremental sensor decreases the disturbance effects on the measurements. However, in some cases, such as the representation of an acceleration term from the position measurement with high sampling frequency, the measurement disturbances can be significant. In these cases, the output measurements must be filtered or approximated. The use of a reduced order model and arithmetic increases the importance of disturbance term e w (k), which must cautiously.

fixed point the second be treated

Buw(k) (8 )

Here, B * is defined as

Two methods are propo sed by Hulligcr(1987) th e first one consists in integrating the measured error term corn (k). defined as

(9)

B* = TB - A*P

( 14) By looking at equations (4), (5) and (8), we see that the closed-loop system poles are the zeros of A *. Having defined the closed-loop output. command and error equations, we introduce now the polynomial pole placement. The use of a pole placement controller consists in imposing user defined dynamics to the closed-loop system poles. This is introduced by a characteristic polynomial Am' such that (10)

I':ow, the problem is to determine the coefficients of the polynomials Rand S. A unique solution of this Diophantine equation exists provided that certain conditions concerning the order of Rand S are satisfied (sce Landau 198 8, Astrtim 1984). In

order

to

simplify

the

computation

of Rand

S,

and the generation of a control

Uw

(k) with (15 )

where gi is the integration constant. This is an efficient method but ha s the disadvantage th a t the closed-loop poles are modified and the sys tem can become un stable. The new poles are determined from the polynomial Ai * given by

(16 ) Figure 3 illustrates the effect of the integrator. where the mea surements are taken from the hydraulic work table de sc ribed in section 8.

ADAPTIVE CONTROLLER FOR FAST PROCESSES cc :,~-::a ;".c.

600

5.:.;::a 1

6\ (23)

5a~p l es

whereas with no cancellation of zeros. P is given by : P = S/B( I) and T is calculated as

l [>-----'

(24)

T = Amj / S(1) where

Amj (q - 1)

is

the

reduced

order

polynomial

calculated from Am '(,';). 3 ?c:'es

a~

s a ~p Er. q

0 ,6

per:. od

Srr.s.

erro r ...·l.'::.h l. nt. eg-ra to r

6. THE IDENTIFICATION ALGORITHM

I Fig. 3.

Disturbance

elimination

by

10 " " .

integration.

The second method proposed by Hulliger(1987) is to use a perturbation compensator. Assume that the perturbation is represented by the following model : Aw [w(k) - w(k)] = 0

(17)

where Aw represents the dynamics. if it exists. and w(k) the mean value of the perturbation. The effect of the term RCw(k) in (8) can be cancelled depending on the choice of the polynomial R. To do this. we express R in the following manner : (18)

R = Rw R" where

(19)

The factor Aw

in (19)

eliminates

the dynamics and

( 1- q -1) the mean value of w(k). In our implementation. Aw is chosen as I which implies that only constant perturbations are considered. Simulations and experimental tests have shown th at in many cases a slowly varying perturbation can be considered as constan!. However. in other situations . for instance where a periodic disturbance is present. if the frequency is known. then it is possible to cancel this with an appropriate choice of Aw .

5. TRACKING ERROR ELIM INATION

The

tracking

error

Several recursive parameter estimation techniques are discussed in Ljung(1983). They all are particularly well-suited for specific applications with their advantages and disadvantages. Howcver. many of these sop hi s ti cated algorithms are unreali zable in practice due to the comp lexity of the computations and the high sampling frequency which is required. In this paper. we use a simple recursive least squares algorithm with fixed forgetting factor and cova riance resetting. This well-known algorithm is given by

cl(k)

is

related

to

the

term

S "y rcf(k) of (8). In th e case of a pole placement controller. it has the following dynamical equation

This type of error is eliminated by a feedforward control since it depends on l y on the reference signal. Now . assuming that a tracking error of jth order is related to the jth order variation of the reference signal. we fir s t introduce a particular operato r 6. defined as (2 I )

Then the term S"Yrcf(k) is represented by : S" ' (~) Yrc f(k)

(22 )

If we next define th e polynomial coefficients of T in such a way that all the coefficients up to the jth order term in S"'(,';) are cancelled. then the tracki ng errors up to the jth order will also be cancelled. In the case of cancellation of zeros. P= I. and the T polynomial coefficients are

O(k) L(k) P(k) =

L(k) [Ym(k) - oT(k-l) cp(k)]

(25)

[A. + cpT(k) P(k-I) CP(k)]-I P(k-I) cp(k)

(26)

O(k-I)

A.-I [I

+

L(k) cpT(k)]

(27)

P(k-I)

In the se equations.O(k) is the parameter vector. cp(k) the vector of observations. Ym(k) the measured output of the plant and A. the forgetting factor. The diagonal elements of the error covariance matrix P(k) are bounded with a minimum value P min . respecting the following condit ion IF Pii(k) < Pmin THEN Pii (k) = Po AND

Pij (k) = 0 j;ti

The supervision of the algorithm feedback system is discussed nex!.

when

used

in

a

7. SUPERVISION FUNCTION

The supervision of parameter adaptive controllers is a subject wide open to inve s tigation. Some important supervIsion functions are presented by Isermann and Lackmann(1985). In an indirect adaptive scheme the supervision functions are introduced as a third loop level as illustrated in Fig. 1. The aims of this block are three-fold. The first ta s k is the supervision of the identification algorithm . This task has always been considered inherent to the identification algorithm. The problem is treated from a mathematical point of view and many authors proposed a persistent excitation test during estimation whic h requires a s ignificantly high computation time (sce Sripada and Fi s her 1987). The implementation becomes very di fficult for fast processes . The second task of the supervision block is to validate the identified model parameters before being used by the controller. The model validation has been studied by severa l authors for off- lin e identification. For instance. Ackermann( 1988) proposed a finite effect sequence (FES) scheme which is app licable to both linear and nonlinear systems. However . there is not any algorithm which" is applicable for on-line es timation. A lso. the use of a reduced order model complicates the validation problem. At the beginning of the identification algorithm. Ihe system parameters should not be used by the controller until they have re ached their s tead y -state converged values . A minimum number of sampling periods depending on the system model is defined in order to avoid this problem. The third task of the supervision

a lgorithm is related

P. Hulliger. R. Longchamp. A.C. Tuncelli not only to the identification but also to the closed loop performances. When the validated system parameters do not improve the output behavior. the problem may be due to a poor system model or to a bad performance requirement. In this case. the identified system model. the time delay. the closed-loop poles or the sampling period could be adjusted on-line. An adaptation of the system model configuration and time delay could be envisaged by the introduction of a stability test on the identified system parameters. A recent study of adapting closed-loop poles was carried out by Wang and Owens( 1988). Their method consists in defining a robustness condition based on the H~ norm using an extra identificator which increases the computation time seriously. Referring to the same robustness condition a switch-on/switch-off criterion for the identification algorithm is also proposed in Owens and Wang(1988). Yet another original approach . which is not directly related to the identification algorithm but to the system output behavior. is proposed by Hulliger(1987). The identification is started if any output signal variation. which is not due to the reference signal. is detected. The algorithm that we have implemented generates the switching condition of the identification according to the laller method. We consider a signal to be excited if its variation is greater than a certain cut-off value . With this in mind. we detect if the system output and reference signals are excited or not. Then we proceed to identify the system only in the case where the output signal is excited and the reference signal is not excited. Once the identification is started. we wait a certain time before using the estimated parameters. This allows us to avoid the undesirable effects due to the convergence time.

~

,

::,-:, !.5:

~

" 0-

l

5)

f i:.

j 0

,,

..

.. ,

~.:

'

'. ,;~.

"

./" ~ 10

0

15

30

20

Sa.-npli ng dot lm s . ~axil!;·.lt:l cont r ol sign a l Umax=- S12 Work. tabl e ve l ocity in nun/ s

Fig. 5.

35

'0 Time

Co lOV)

Open-loop step responses with different levels of excitation.

Using a recursive least squares algorithm. several system parameters identification tests for different excitation levels and for several model configurations have been performed. Guglielmelli(1987). It has not been possible to find a fixed linear model that allow us to represent closely the hydraulic axis dynamics behavior. In closed-loop. the steady-state error depends on the table working speed . The main problem is due to the non linear characteristic of oil flow in the pipes. If the identified system parameters are kept fixed. the open-loop SImulated system output using these parameters does not follow the measured output with the same excitation signal. On the other hand. if we use real-tIme values of the identified parameters. even using a Simple onc-pole model. the simulated output is close to the measured real output as illustrated in Fig. 6. This suggests that an adaptive controller is of considerable interest to control our hydraulic axis.

8. THE HYDRAULIC AXIS CONTROL

B00 r------------------------------------------

The adaptive controller discussed above is implemented on a TMS32010 signal processor to control a hydraulic machine tool axis. The axis includes a 150 kg. work table together with prestressed low friction guide-ways driven by a 1.5 KW hydraulic motor using a ball bearing screw. The work table position is measured within an accuracy of 0.5 ~ m using an incremental sensor. The motor is controlled by a servovalve (lOO Hz). The system configuration is illustrated in Fig. 4.

600

Servovalvc

Ball bearing

Incremental

Hydraulic

d

400 200

b

\ ------ ------- -- --- - --- ---- --- ---- ---- - - - --- -- - - --- -- - -- - - - --- -- - a

Samp ling a t

l ms.

Time in ms .

a. Id e ntifi ed s y stem pa rameter a l (x 100) b. Identi fie d s ystem paramet er bO (x lOO ) Measu r ed v e locity d. Simt,;,l a tec velocity using id e nti f ied paramete r s

Fig. 6.

Off-line

identification

and

simulation,

motor

10 COMPUTER IMPLEMENTATION

The adaptive controller described below is implemented on a TMS32010 signal proces s or. (Tricarico 1988). The programs arc cross-developed on a V AX750 computer system and executed on a Motorola 68000 based work station. The TMS board is connected to the bus G64 of the station. Fig. 7.

68000 processor board including :

USART TIMER RAM EPROM

Fig. 4.

The machine·tool axis sy stem.

9 . STEP RESP01'SE

Open-loop step responses with different levels of excitation are pre sented in Fig . 5. This figure clearly shows that the proce ss is nonlinear. In the case of a low level excitation. a significant oscillation results. If the excitation amplitude increases. then the system output becomes smoother. This is due to the hydraulic pump which cannot deliver instantaneously the required oil flow.

development system for : Modula-2, TMS 320 and ~1C6 8 000

Fig. 7.

Computer station,

ADAPTIVE CONTROLLER FOR FAST PROCESSES Fixed point a rithmcti c problems hav e been s tudied by Kassapoglou ( 1987), while a classical leas t sq u ares algorithm ha s been implemented o n a TMS 320 I 0 signa l procc sso r by Kassapoglou and Hull ige r(19 86). It re sulted in a systcma tic definition of scale factors. Concc rning the execu t ion t ime of the a lgorithm s with a model including 2 parameters, a com putati o n cycle is performed in less than 250 ~s. An impl eme ntation o n a Mo torola 68000 microprocessor is also avai lable . The reduc t ion of the computing time u sing the TMS32010 processor is around a factor of 10. A comparison of executio n times between different a lgo rithm s is presented in Figure 8. TMS320 program Execution limes in ~ s length in Bytes TMS320 MC68000

RLS identification Controller's para meters compulin~

Gain TMS /68000

4538

90

1400

IS

1946

50

310

6

646

65

400

6

205

2110

10

Contro l signal gene rating

TMS320 board initiali$ing

132

TOlal

Fig. 8.

7262

Comparison of exec uti o n tim es,

I!. CONCLUSIONS In thi s paper, we have prese nted a modern ap proac h to the de s ign o f an adapt ive control ler and the app li cat ion of the resu lting polynomial control law to a h ydra uli c machine-tool axis. The se a lgorithms are implemented on a TMS32010 signa l processor and th e result s arc ex treme l y satisfacto r y. For further development we are intere s t ed in improving th e supervision a l gor ithm and finding practically app licable fa s t methods th at ens ure a certain stability margin. Moreover, for the compute r imple men tati on, the use of a transputer based system is also c urrently und e r st udy .

12. REFERENCES ASlrbm, K. J. and B. Willenmark ( 1984) . Computer controlled systems. Prentice Hall, 1984. Guglielmclli, P. (1987). Etude de eomportement dynamique d'u n axe de machine-oulil commandc par un moteur hydrauiique. Student work. EPFL, DME-IA Lausanne Switzer la nd. Hulliger, P. (1987). Commande adaptative pour system cs dynamique rapide. Thesis No. 687. EPFL, DME-IA Lau sa nne Switzerland. Isermann, R. and K.-H. Lachmann (1985). Parameter-adaptive control

with conriguration aids and supe rvision

functions.

Automatica, Vol.2!. No. 6. pp.625-638.

Ka ssapoglou, K. and P. Hulliger (1986). Implementation of re cu rsi ve least squares identification algorithm on the T\lS 320. Signal Processing Ill : Th eory and Applications Elsevier Science Publishers B.V. North Holland Kassapoglou. K. (1987). A formal approach to scaling for digital processing implementations. Submilled to IEEE Transactions on Acoustics, Speech and Signal Processing. Ljung, L. and T. Sbderstrbm (1983). Theory and practise of re cursi ve idcntific~lI io n. The ~11T press. Landau. 1. (1988) Ide ntification et commande des systemcs. Herm ~s. Lausanne (1988).

(,3

Owens D.H. and L. Wang (I988). Switch_off/Switch_on algorithms for robust adap tive contro l. 8th. IFAC Symposium on Identification and Parameter Estimation. Beijing, China, 1988. Sripada R. and D .G. Fisher (1987). Improved Least Squares Identification. Int. J . Control, vo1.46. No.6, 1889-1913. (1988) . Implementation de regulateur adaptatif Tricarico, V. sur un TMS 32010. Student work . EPFL, DME-IA , Lausanne Switzerland. Wang, L. and D.H. Owens (1988). Robust Pole-assignment adaptive controllers wi th on- line tuning parameters. lEE international conference Control 88, Oxford UK