Robust Adaptive Controller with Fine Grain Parallelism

Robust Adaptive Controller with Fine Grain Parallelism

Copyright @ IFAC Adaptive Systems in Control and Signal Processing, Glasgow, Scotland. UK. 1998 ROBUST ADAPTIVE CONTROLLER WITH FINE GRAIN PARALLELIS...

1MB Sizes 0 Downloads 76 Views

Copyright @ IFAC Adaptive Systems in Control and Signal Processing, Glasgow, Scotland. UK. 1998

ROBUST ADAPTIVE CONTROLLER WITH FINE GRAIN PARALLELISM J. Schier J. Kadlec J. Bohm

Institute of Information Theory and Automation Academy of Sciences of the Czech Republic p.a. Box 18, 18208 Prague 8, Czech Republic tel.: (420)(2)6605 2251, fax: (420)(2)688 4903 e-mail: [email protected]

Abstract : Two issues associated with an adaptive linear quadratic controller are addressed in the paper: numerical robustness of the adaptive estimator with respect to low excitation in the closed control loop and rather high computational complexity of the controller. The algorithm presented in the paper uses The estimator used in the paper is based on the inverse-updated square-root recursive least squares (SR-RLS) identification algorithm (Moonen and McWhirter 1993). To increase numerical robustness of the algorithm for weak excitation, the regularized exponential forgetting is used. The multi-step control design uses an autoregression system model with exogenous input (ARX model). Computational complexity of the resulting algorithm is reduced by using the systolic paradigm for its implementation. Copyright ©1998 IFAC Keywords: adaptive systems, identification algorithms. linear quadratic regulators, parallel processing, array processors

1. INTRODUCTIOi\

tics of the controlled system . The first is achieved by an on-line adaptive identification of the controlled system. the second by modelling the time evolution of the identified system in some way.

Discrete LQ controllers have been in centre of research for several decades (Peterka 1984. Karn}' et al. 1985) . They are characterized by the following features :

The model most often used to approximate the evolution of the system is the well-known exponential weighting. which assigns an exponentially decreasing weight to each data measurements. This is the most often used method . mainly for its simplicity. A major drawback of exponential weighting , if used in adaptive controller. is that it suppresses all past data uniformly. The estimator requires proper excitation of the identified system (white Gaussian noise is assumed in its derivation) while the goal of the controller is to dump the disturbances in the control loop. This may result in numerical collapsing of the adapti w controller.

• The linear description of the controlled s\'stern can be applied to a wide range of practical applications . • A lot of practical requirements can be formulated in terms of a quadratic control loss. Adaptive controller adds to these properties also the ability to adapt the control strategy of the controller to characteristics of a partiallv unknown controlled system or to the changes of characteris: This wo rk was partially supported from th e E SPRIT project No. 235-14

409

multiplication of single n 'ctor element with single matrix element is performed in one cell of the array, with the partial result being passed to the next cell. Since all cells of the array compute in parallel. original computational complexity of O(n 2 ) (for the square or triangular matrix of dimension n ) transforms to the latency of O(n) between entering of an element at the input and getting corresponding result at the output.

To (\\'old t his problem. several advanced data weighting schemes have heen proposed. With directional weighting (Kulhavy 1986. Kulhan 1987). data is forgotten only in the direction of !lew information . Regularized exponential forgetting (Kadlec 1993) modifies the forgetting step bv weighting the data distribution of the identified system with an alternative distribution (possiblv based on the prior knowledge of the system I. which can be placed in the stability region.

lx

~ ~

The increased robustness of an adaptive estimator comes at the expense of increased computational complexity, generally not desirable for the real-time control. This paper shows how the computational complexity of the adaptive LQ controller can be reduced by using the systolic paradigm for its implementation. The design of the adaptive controller, presented in the paper, uses the inverse-updated square-root recursive least squares (ISR-RLS) estimator (Moonen and McWhirter 1993) and the multi-step control design based on the autoregression system model with exogenous input (ARX model) .

...

o

.

.

y

Array for vector-matrix multiplication x]

Yi, j-I~i'] A · t,]

The organisation of the paper is following: first , the principle of the regularized exponential forgetting is reviewed in brief. Then, the implementation of this type of forgetting in the systolic ISR-RLS algorithm is described , and finally the complete scheme of a systolic adaptive controller is presented.

Xj Yi,j

=

Ai,jXj

+ Yi ,j - I

Cell description Fig. 1. Example of a systolic array

2. SYSTOLIC ARRAYS

3. REGULARIZED RLS ESTIMATOR

Systolic arrays, in general, are special purpose synchronous architectures consisting of simple processors or cells locally and regularly interconnected. The array is data flow-driven and the (blocks of) cells perform the same simple operation on the arriving data. passing the result to the next neighbouring cell. The result of this parallel operation is balance between the processing and the input / output bandwidth.

In this section, the concept of the regularized exponential forgetting is explained and the blockaccumulated modification of the method , suitable for systolic implementation, is described. Let the plant be described by an ARX model 1

Yk

L ;=1

The systolic array is described by connection scheme of the processing cells. which contains also the mapping of variables stored in the cells and of inputs / outputs and by description of the cells.

1+1

a iYk-l

+

L

b;Uk-l

+ ek

1=1

(1)

where

Algorithms suitable for implementation in systolic arrays can be found in digital signal and image processing, linear algebra. pattern recognition . graph problems . etc. More details on general principles and design methodologies of systolic arrays can be found in (Megson 1992) . Good introduction on application of systolic arrays in signal processing can be found in (Kalouptsidis and Theodoridis 1993).

is an m-vector of model parameters. m is the number of parameters. m

= dim(8 ) = 2l .....

1.

(3)

m-vector -,) is the vector past input-output data

-,)[-1

= [Uk-I , Yk-I. Uk-2 .·· · . .. Yk -l. l1 k-I- t!

As a trivial example of asystolic array. theyectormatrix multiplication is shown in Fig. 1. Each

Finalh-. e is the Gaussian white noise.

410

( -!)

Let .l be the iwst squares error rntenon \\'iT,lI minimum in the position of parameter estimate

.l (0 ) =

1

L

LL

fkl~

"\'here : is the prediction error and gain \'eCTOr.

K

is the Kalman

( .) )

:3 ,2 Sqllarf -1'00t versiou of th e algorithm

1,=1

L

', = L1 " ~ IYk

-

eT>

-

(6)

-'?,T

Let R be an upper triangular factor of the covariance matrix P

1,=1

where

e represents the parameter estimate.

P =RR T

As follows from the least squares algorithm . J (e ) can also be expressed as a quadratic form of parameters e determined by statistics (parameter estimate) and P (covariance matrix)

l'sing this factorization. it is possible to rewrite the ISR-RLS algorithm in the form of orthogonal rotations of the factorized matrix

e

J(e) = [0 - e]Tp-l[E> - e]

+A

( 15)

(7) a-- - RT k-l'Pk

Let J* =: J(e*) be an alternative cost function

s [

with parameters

e* and P* introduced by user.

= /3nQ

1

-

[1 0 ] T a R k- 1 "'ktk

(17) ,

(18) (19)

where Q is an orthogonal rotation matrix, and is composed as follows

/3n

=

= /3 Jk-dE» + (1 - /3 2 )J(e*) + e%, - T 2 ek = (Yk - E>k-l 'Pk) , 2

where

SI / 2KT]

T R k1k -

eHl = e k

The update step can be described as a weighted sum of these two cost functions Jde)

S~2

= 1 + aa

(16)

T

(20)

(9)

/3 2 E (0,1) is the weighting coefficient.

Im is an m x m unit matrix , m is the dimension of matrix R.

e*

It follows that the parameters and P* represent limit values for the parameters e and P for the case of non-informative data. Note that for = 0 and P* -+ 00, the update step degenerates to the standard exponential forgetting. and p. , it is possible By suitable choice of to keep the parameter estimates in the stability rel!;ion also for non-informative input data.

The proof of (18) can be easily obtained by pre-multiplying both sides of the formula with transposed matrices.

e*

e*

The above given equations are suitable for systolic implementation. Detailed derivation of the rorrespondinll; arrav can be found e.g. in (Moonen and ~lc\\,hirt e r 1993 ), In this paper. only the extension for implementation of the regularized weighting will be described .

3.1 Inverse-updat ed square-root RLS In this section. the principle of the inverseupdated square-root RLS algorithm (ISR-RLS) will be reviewed. It will serve to prepare ground for description of implementation of the regularized exponential forgetting in this algorithm.

3.3 Block-accumulated regularization The modification of standard regularization ",.-as. for the QR filter. introduced in (Kadlec 1993) . It is necessary in order to preserve the data pipelining in the systolic implementation of regularized forgetting . The idea of the method is that . assuming that the regularising parameters e* and p. stay constant oyer AI 2: m periods of identification (m is the length of the data regressor), the addition of the regularising part of the cost criterion J (e·) i 8) can be performed in one batch after M steps of identification. instead of adding it in each step of identification .

Before the square-root version will be described. let us first recall the inverse-updated RLS algorithm (the data update step)

=- k -Y - 'I, -

e- Tk <,:Jk

( 10 )

k9k

(11 )

+ (d- 1P k'r'k

(12 )

-

Tp

~k= :P k "-k

= -(1

ek~l , k

=e k -

PHI )k

= Pk

"- kCk

- (l

+ (d"-k K [

(13)

(14) 411

<)1' the ciata is shown in Fig. 3. The control matrix is used to switch the function of the array cells between the data processing and the regularisation.

The \\·pight of .J (e") has to be changed accordingly. The resulting weight is given bv relation M-I

/\\1

=

I: [.\ ( 1 I

.\)]

(21 )

The data samples enter the array through the diagonal cells. Parameter estimates are computed in the bottom row. This row. which corresponds with fig. 2. is used also to enter the regularising vPctors. leftmost element first. The vectors are multiplied here with the regularising estimate and then shifted up through the array. The product of multiplication is shifted rightwards to the ('ell denoted as " 1". When the regularising data reaches the diagonal celis. the celis are switched to process it. The control matrix is used to switch the multiplication in the bottom row and the data entry of the diagonal celis.

1=0

3.-1 Addition of the regularising parameters as processing of an artificial data

The square-root algorithm implements the addition of the regularising parameters as processing of m vectors of artificial data. Let V" be an upper triangular factor of inverse of the regularising covariance matrix:

(po)-l

= (V"fU".

(22)

Let Vi, i = 1, . .. , n be the rows of matrix V" and let ui = Vie". The addition of the regularising quadratic form J" can be implemented as a sequence of n rank one updates by "artificial data" represented by vectors Vi. The parameter estimate e" is entered through the product

1

(23)

ab

Choosing e k := this product can be computed using parameters estimates computed by the ISR-RLS algorithm. The equations (10) and (16) then read Ci

=u;

=

u:e k

a = -V;R k -

1

(24) 1

(25)

Identification

where k is the time of the last data update before processing of the regularisation block.

R egularization

For input of e" into the systolic array. the relation is used which can be easily derived from tiw RLS formulae . Scalar u" is entered in the same position of the data vector. as the system output y.

Regularizing data The arrows ill the left part of the figure show the alignment between the control matrix and input data. Fig. 3. \Iapping of variables and inputs in the regularized estimator

3.4.0.1. Systolic implementation. Systolic computation of the product (23 ) is schematicall y' drawn in Fig. 2.

~.........._a...............~~

-1. SYSTOLIC SQUARE-ROOT LQ CONTROLLER

In this section. a s:-;stolic implementation of the square-root algorithm for LQ control optimization \vill be outlined . An LQ output regulation problem for a single input. single output (SISO) plant . using the receding-horizon control strategy, is considered.

Fig. 2. Systolic computation ofu"

Portionin g the data vector ';/, The mapping of the inverse updated square root RLS algorithm to the sy'stolic array and loading

(26)

412

the ARX model may be transformed to the statf:space form: XI+l

Yt

= AXf + BUt + C e l+l' = C T XI ,

Rf

( 27)

Rf = R~ o Rf . -

- b ]

(39)

when' Rr is a scalar. R~ is a transposed vector and Ri is an upper triangular matrix .

(28 )

Using this partitioning , it is possible to write: A=

(29)

[Rn] ooM= [wn]

(40)

00'

Let K be the optimized recursive cost functwn :

'1'=

2

+Ot ey ,t eu,t-l

2 2 2 2 + qyey,t + queu ,t-l

( 42)

(31)

= Yt - Wy,t

(32)

= Ut-l

(33)

- Wy,t-l

(41)

The row vector wa contains the first row, and the upper triangular matrix wb the rest of the matrix W. Scalar ii a contains the first element, and the vector nb the rest of the vector n.

and Wu,t-l are the set-points of Y and u, respectively, in times t and t - 1; R is an upper triangular matrix.

Wy ,t

The square-root of the last term in (30) reads:

The one step of the LQ control synthesis consists of minimization of the cost function W.r.t . e 2 , expectation and second minimization W.r.t. For the certainty-equivalence strategy, the expectation step equals to multiplication of the state vector by the parameter estimates. Minimizations are realized as QR updates of matrix R.

e!.

queu ,t-l

= qu(Ut-l = quUt-l

- wu,t-d

+ du,t-l

(44)

It is added to the cost function in the same way as in (38):

Using the state-space model (28), it is possible to express the first term in (31) as a function of Ut-l and Xt-l

= Rt(But-1 + AXt-d + nt, qyey=qy[b1Ut-1 =qy[b 1

d y .t

+E>;Xt-l

e;J [~:=:]

-wy ,tl

+d lf l ,

= -qylL'y ,t

The addition of QR rotation:

qye y

( 45)

1J =

[R t nt][xt

The mlmmlzation of the cost function is performed by the third orthogonal rotation by reducing the vector [w a iiaJ :

(34) (35) (36)

lr o

['I' a rl a ]

T

(37)

'l1

b

11 '

8

[

=

P l.t _ 1

P2 .t- l

T

0

R t-

0

o

I

I ] .(46 ) 10t-1 mf-l

' n t -l

is computed using standard By repeating the whole procedure till the beginning of the control horizon, we get the control law [S(ko) So (ko)J to be used to compute the control action u.

(38)

R , nand 0 compose an upper triangular matrix. the symbol - denotes the resulting "alues.

4.1 Systolic implementation of the LQ controller

Expectation: Let matrix M be composed of the parameter "ector e and a shift matrix :

M

(43)

= [I

eT

The above described LQ control optimization is mapped on an m x m triangular systolic array.

0]

The mapping of variables is shown in Fig. 4.

021-l x 2 0

01 x m

1

The elements of n are. between the iterations. shifted up along the diagonal - the same way as t he elements of RC. The penalties d y and du are calculated in the upper left cell of the array.

Let the matrix RI, resulting from the QR update. be partitioned into three parts:

413

The controller works with a constant control law until new law is available in the buffer. The estimator and control law synthesis are docked in the same pace. faster than the controller. because the estimator has to process the regularising data in addition to the data samples from the system .

n a and mathbfn b Fig. 4.

~Iapping

of the LQ array 6. CONCLUSIONS

5. COMPLETE SCHEME OF THE CONTROLLER

Systolic implementation of an adaptive controller with a block regularized parallel estimator and an LQ control optimization is outlined in the paper. The algorithm has increased robustness to weak excitation and can improve stability of the control loop. In the same time, the systolic implementation gives potential of an order decrease of computation time.

The complete scheme of the regularized adaptive controller is given in Fig. 5. The parts of the

u

S

y

The efficiency of the array which implementing the LQ control design, is about 33%. A higher efficiency would be achieved by grouping several systolic cells on one processor.

7. REFERENCES Kadlec, J. (1993) . The cell level description of systolic block regularised QR filter. In: IEEE Workshop on VLSI Signal Processing. Koningshof, Veldhoven, Netherlands. pp. 298306. Kalouptsidis, N. and S. Theodoridis (1993). Adaptive System Identification and Signal Processing Algorithms. Prentice Hall International Series in Acouctics, Speech and Signal Processing. Prentice Hall International Ltd. Karny, M. et al. (1985). Design of linear quadratic adaptive control: theory and algorithms for practice. Kybernetika (Prague). Supplement to No . 3, 4. 5, 6. Kulhavy, R. (1986) . Directional tracking of regression-type model parameters. In: Preprints 2nd IFAC Workshop on Adaptive Systems in Control and Signal Processing. Lund. pp. 97-102. K ulhavy , R. (1987) . Restricted exponential forgetting in real-time identification. Automatica1. IFAC 23, 589-600. \Iegson. G. ?vL (1992) . An Introduction to Systolic Array Design. Oxford University Press, C.K. \1oonen, :\'1. and J.G. McWhirter (1993) . Systolic array for recursive least squares by inverse updating . Electronics Letters 29(13), 12171218. Peterka, \'. (1984). Predictor-based self-tuning control. Automatica-1. IF.4C 20(5) , 39-50.

L --

q,~w~~~_,

Symbol -+--

denotes one step delay element

Fig. 5. Complete scheme of the adaptive LQ controller adaptive controller are marked in the following way: I -estimator. C - LQ control optimization. Lcontroller and S-controlled system. The mput buffer is necessary because the processing of the input data is stopped during the regularisation procedure.

414