Mathematics and Computers 0 North-Holland Publishing
in Simulation Company
XX (1978)
250-258
HYBRID SIMULATION OF ADAPTIVE OPEN LOOP CONTROL FOR PARABOLIC SYSTEMS M. AMOUROUX *, J.P. BABARY **, A. EL JAI * and J.P. GOUYON ** Laboratoire d’Automatique
et d’Analyse des SystGmes, 7Avenue
du Colonel Roche, 31400
Toulouse, France
The “adaptive open loop control” is a compromise between the open loop and the closed loop controls. It consists in estimating the state of the system periodically in such a way that the control can be corrected, taking into account the estimated state, the final desired state and the criterion to be minimized. For a hybrid simulation, a linear parabolic system has been considered, with homogeneous boundary conditions and unknown initial condition. The purpose is to reach, in a finite time, a desired state profile, by minimising an energy criterion. The control is applied through a finite number of actuators (pointwise or by zones); the observation is made through a finite number of sensors. By using the eigenfunction method, it is possible to transform the original model into an infinite dimension set of decoupled ordinary differential equations. A hybrid simulation was carried out in real time, involving a truncated differential system simulated on the analog computer; the state estimation and the control being computed on the digital computer.
1. Introduction
A real time simulation of this type of control has been made in a hybrid computer. The principle of the method, the description of the simulation and results obtained from one example are described in this paper.
The problem considered in this paper is connected with the determination of a control law enabling a desired state to be reached at a fixed time, for a linear system assumed observable and controllable from any known or unknown initial state, by minimizing an energy criterion. This problem can be solved: _ either, by determining an open loop control law, the implementation of which is relatively simple; however this type of law cannot react to the perturbations in the controlled system and does not take into account the error in the estimation of the state; - or, by determining a closed loop law, the implementation of which is more complex; this enables the evolution of the system state to be known and in the presence of perturbations, a more accurate state can be obtained at the final time. The “adaptive open loop control method” is a compromise between the above two methods: one estimates the state periodically in such a way that the control can be corrected, taking into account the estimated state, the final desired state and the criterion to be minimized. * Universite Paul Sabatier, Toulouse, France. ** Centre National de la Recherche Scientifique, France.
2. Mathematical
formulation
of the probiem
Let us consider the linear parabolic partial differential equation P aYk t> ----==My(x,t)+Cg~(x,x~>ui(r> at i=l
(1)
for which: tE [to, +I ;
xE!2CRm,
YE WO, tf> = Y : Y and $ELdtO, I u= [Ul , . . . . +lT
tf;LS4)
, I
EL, [to, ff; Rpl >
gi(x, xf) is an integrable function and defines the zone of action of Ui(t) located in xF,M is a self-adjoint. elliptic operator whose spectrum is discrete (Xi: i = 1, .... -). Boundary conditions are homogeneous and defined by:
Toulouse,
Ly = 0 over an 250
(boundary
of R) .
(2)
M. Amouroux
et al. /Adaptive
The problem is to bring the system (1) from an unknown initial state vn(x) =u(x, 0) to be estimated, to a desired state Ye at a given time t = tf, by minimizing the energy criterion:
open loop control
251
(6) The solution of the system (l)-(6) follows:
can be written as
*f
J=
s to
u(t)T u(t) dt .
(3)
X m = [xi,
U(T) d7 ,
(7)
. ..) x,m]TE
(JPf-l
where : Q(t) = [@ij(tlli=l,
cl)Q )
An(t) =.Y(xrn, t)
+ e(t)
really taken
ehif
if i =j
0
if i#j
(
@ii(t)=
(4)
In fact, we assume that the measurements are such that: =Yrn(t)
BtxC)= [bijtX~~li=l,...,
(5)
9
bii(X~)=(gi(X>$),
problem
Considering system (1) with boundary conditions (2) and the optimization criterion (3), the open loop control which minimizes (3) over the time horizon [to, tf] and enables to obtain a desired state yd(x), from an initial state uo(x), can be calculated in a more convenient way if we first transform system (1) into an equivalent model using for example the eigenfunction method. In this manner, we determine an explicit solution of the estimate of the state and the optimal control law. If (Cpi)is the orthogonal eigenfunction basis, then:
Ym (t) = ‘%“)
(8)
Q(t)3
= [Cii(xm)li=l
,..., q;j=l,...,
m
with Cij (X”)
= qj (XT)
.
3. I. Estimation of the state The estimation of a”(to) is carried out in two stages: (1) a measurement stage during (ty - to) sec., and (2) a calculation stage during (t‘j - ty) sec. There is no control over the time interval [to, t:]. If the system is observable, the estimate of the initial state is given by (* denotes the adjoint operator): tm 1 s
@*(t - to) C*(x”) C(x”) @(t - to) dt] -I
*o
Cpih) cp ,
X
ad = [adI> .-IT,
tm 1 a* (t - to) C*(x”) z,(t)
s
dt
(9)
to
where Q(t) = [Ql(t), .-IT >
iPi)~,(n).
where
a”(to> = [
= aw
p
The real output is defined by
C(X”)
3. Mathematical solution of the optimization
ai
-;j=l,...,
with
where e(t) E Rq is a stationary Gaussian white process (whose mean value is zero and whose variance is o*) which depends on the noise degrading the measurements.
Y(X, t, = $
. . . . m;i=l, . . . . m
with
real output of the system at the point xm is given
Z,(t)
- T)B($)
to
In order to calculate the state y(x, t) of the system, we assume that we take measurements at 4 points XT E a. Then, if we set
the
a(t) = @(t - to) a(to) + j@(t
from which we deduce: dx) = [cpl(X), -1
T
,
a”(t”l) = qt;
- to) a”(to) .
(10)
252
M. Amouroux et al. /Adaptive open loop control Ilensurement
Fig.
intervals
1. “Adaptive open loop control” schematised.
Knowing an estimation of the state at time t;, it is therefore possible to apply, from time ti to time tf, the optimal open loop control. In fact, this type of control, although it is relatively simple to implement it, presents a main disadvantage: it does not take into account eventual perturbations on the system. Theoretically speaking, a closed loop control is the best type of control, but its real time implementation is very difficult for systems which have a relatively fast dynamics. Moreover, a mathematical singularity appears at the final time. For these reasons, we use the principle of “adaptive open loop control” [ 11. It consists in estimating the state periodically and readjusting the open loop control law, without interrupting the application of the control according to the following principle scheme (example with 4 periods) (fig. 1): In the case when the system is controlled by u’, the state of the system at time ti is calculated from a similar formulae to (9): #)
=
[jel@*(t -
G”+l
Z@+;l) = @(t;+l - tf) iqtif)
+
$+I
s
3.2. Formulation
of the control
u’(t) = B* (x”) cp*(tf - t) X
rS’@(tf -
7) B(xC)B*(xC) @*(tf - 7) dr] -r
ti” qtf
- ti”) a”($)] .
ff
@(t - 7) B(Y)
with a view of making
(11)
in which j
(13)
C(x")@(t - t;) dt] --I
tf) C*(x”) zk(t) dt ,
- C(x”)
(12)
The constraint on the final state means that we have to determine a control law u(t) which minimises ((ad - a(t with a minimum of ((u((~. If we assume that the system is weakly controllable [2], the optimal control is then given by:
x [ad tif) C*(x”‘)
@(tf+l - 7) B(xC) U’(T)dr .
rf
4. Formulas transformation them applicable
@*(t XJtf
s&(t) = z,(t)
we deduce:
~~(7) dr
Formulas (9)-( 13) cannot be applicable because all vectors and matrices composing them, are infinite dimensional ones. In our case, we may make a truncation. This truncation seems in fact to have a less important effect, from a numerical point of view, than they would for simple open loop control. This can be
M. Amouroux
et al. /Adaptive
explained by the fact that the series of corrections made to the control appear to correct the mathematical imperfection of the truncated model in the same way as for a disturbance affecting the application of the real control. Let us consider the state vector representation of the system. Let m be the number of terms necessary to reconstitute the real state y, n the number of modes for the control ui, and nes the number of estimated modes. Then we obtain new formulas - for the estimation:
open loop control
x
k$
wzk {adk- e*k(‘f-‘f)
Xs’+le’kCz-rf)z~k(t)
dt
(j = 1, . . . . n,)
(14)
rf
with U = R-‘, R a matrix whose components equal to:
are
- for the control:
a”k(tF)}
0’ = 1, .... p)
(16) with tf < t < tF+l, andW = V-r, V being a matrix whose components are equal to:
vii =
5 bik(xi)
e&+~j)h--~~) bjk(xi)
k=l
5. Organization
rm
253
hi +
_ 1
(17) Aj
f
of the real time hybrid simulation
A real-time simulation of the system has been built up on the EAI-680/CII MITRAl.5 hybrid system of LAAS [3], [4]. The analog computer resolves differential equations for which (7) is the solution. The hybrid interface performs analog-digital and digitalanalog conversions, and it generates synchronization pulses to control analog mode switching, converter operations and digital computer running (through interrupt system). The digital computer performs initialization of the problem, and, at run-time, estimation and control computations. We will describe in more detail each of these parts of simulation. 5.1. Analog computer
n
U;(t) =
2
The differential equations are resolved, each one with an analog patching as in fig. 2. Eight circuits like
bzj(xlf) e’~@fmr)
Fig. 2. Analog
patching
for differential
equation
solution
(one mode).
M. Amouroux
254
et al. /Adaptive
open loop control
Fig. 3. Interpolating circuit to provide *u(r).
this are patched (for the first 8 modes). According to the value of n, the switches in circuits 1, .. .. n are closed, and the others (n + 1, .... 8) are open. Control functions are given through interpolating circuits (fig. 3). There are p such circuits (p = 1, 2 or 3). Functions z, are generated, according to equation (S), by summing weighted ai, plus a gaussian noise signal, given by a noise generator. There are 4 such summers (4 = 1, 2 or 3). In the step of problem initialization, some components of the analog patching are automatically set through hybrid interface, according to the parameters of the given problem. These are: switches for n and p, relays and potentiometers for feedback coefficients (ranges and values) of ai .. . 5.2. Hybrid interface The digital clock generates sampling pulses the period of which is At. The first one brings analog mode from “Initial conditions” to “Operate”, by resetting a control line. Every pulse controls ADC and DAC, Track/Store of the interpolating circuit. Furthermore, they start interrupt level 10 on the digital computer [fig. 41. 5.3. Digital computer There are three programs, which run at interrupt levels 0, 10 and 2. Level 0 runs when the analog com-
puter is not in “OP” mode. This background program reads data, performs initial calculations such as hi, matrix C(xm) and B(xC), vector ad, matrix U. Then it prepares the analog patching, sets potentiometers, and starts analog run. When the analog run is completed, this background program passes to a man-machine dialog, that allows printing or plotting, transient or final states of the simulation, modifying parameters, and running again, carrying on, or stopping the simulation. At level 10 lies an interrupt program which is started by every sampling pulse. The mainline flowchart of this program is given in fig. 5. It has a common data section with level 0 and level 2. Variables KT and ISWlO are initialized, at level 0, respectively to 0 and 1. Sl denotes the integral to compute z6( 1 l), and S2 denotes the integral to compute a”(14). Both are arrays, the dimension of which is n. Interrupt program at level 2 is only software-started, from level 10 at t = tf (including t = to) with ISW2 = 1, and at t = tm with ISW2 = 2. Its flowchart is given in fig. 6. At t = tf, this program computes and inverts matrix V for control. At t = tm, it performs all time independent aspects of the control calculation, then computes control u over a time-interval (t’, 2tC - tm). Then level 10 will compute u with an anticipated computation time (t” - t”). Indeed, at the next tm, calculations of u from previous S3 have to be completed, before computing new S3. An example of time-diagram of interrupt programs running is given in fig. 7.
6. Example Consider the case of a system described by the equation Dlqltol 1
Interface )
Analoq
I lo91c
Fig. 4. Mainline logic diagram.
part
1
aY6, t>
-=00.2 at
v+yOr,
t) +&gi(X)Ui(t),
M. Amouroux
25.5
open loop control
et al. /Adaptive
KT+l
Save max. effective of
values
5 and 2
Save 2 and -u every MEN sample period
-l Partial
calculations
for integrals Sl and S2
Last period?
(trapezoidal
32Start level
Initialize
ISWlO ISW2 interrupt 2
calculatipns
Y 2_
method)
I
ISWlO
1-ISW2
Start
interrupt
level
2
,I
Compute u(t+tc-tm)
I
I
Fig. 5. Flowchart of level 10 program.
1-t Close
ISWlO switches
256
7
START
Q
I
Compute matrix V (see formula
(17))
Continue computation ofintegral
I
from
tm
to
tC
I
I
Compute G,
II
time-independent
part of _ u
ICompute
I I
2 from tC to (2tc-tm)
I
Fig.6. Flowchart oflevel 2 program.
I tI
ci
Interface clock pulses
Level 10
Level
2 W matrix
Fig.7.Time diagramof the simulation.
M. Amouroux
.I@, f>=J4 >f> = 0
(boundary
ye,
(initial profile) .
0) = 0
conditions)
This system has 3 action zones respectively
et al. /Adaptive
,
defined by:
1 for 0.09
2.51
open loop control
if
I
=
0 elsewhere ,
T
Fig. 9. Evolution
I
3 SeCO”ds
of the profile
(system
without
perturbations).
1 for0.46SxG0.71, Ax)
=
0 elsewhere ,
A conirois
1 for 0.74 Gx < 0.96 , g.3(x) =
0 elsewhere .
Measurements are assumed to be made through 2 sensors located at points 0.65 and 0.88. The desired profile is a continuous piecewise linear function as shown in fig. 8. For the simulation needs, the output y is reconstructed using 8 terms (outputs of 8 analog integrators). The number of modes considered for the digital computation of the control is n = 4. The number of modes considered for the estimation ofy(x, ti) 1s nes = 4. The system is controlled over 3 periods of T = 1 second (tf = 3 set). Measurement and estimation are made during 0.6 set at the beginning of each period. The system was perturbed at time t = 1.9 set (the perturbation can be made for instance, with a pulse on an input of the integrator corresponding to the main mode of the system).
time
lsec) L
06
Fig. 10. System
I
’
16
control
2
(system
26
without
\
3
perturbations).
/
I
6.1. Simulation results Fig. 9 shows the evolution of the profile ~(x, t) for a non-perturbed system, the norm of the final error
Fig. 8. Desired
profile.
Fig. 11. Evolution 1.9 s).
Fig. 12. System
of the profile
control
(system
(system
perturbed
perturbed
at
at
t=
t = 1.9 s).
258
M. Amouroux
et al. /Adaptive
is equal to 0.025. Fig. 10 shows the corresponding evolution of the 3 control laws; one gets in this case llull = 3.86. Fig. 11 shows the evolution ofy(x, t) when the system is perturbed at time t = 1.9 set; the final error is now 0.024. Fig. 12 shows the corresponding evolution of u(t); the energy has increased, since Ilull = 4.91.
open loop control
[3]
[4]
[S]
References [l] J.P. Yvon, Etude de la mkthode de boucle ouverte adaptke pour le contr6le de systemes distribues. Control theory, numerical methods and computer systems modelling, vol. 10, Springer Verlag 1975. [ 21 M. Amouroux, Localisation optimale de capteurs et action-
[6]
neurs pour la commande d’une classe de systemes h parametres repartis. These d’etat no. 747, Toulouse, 23 fevrier 1977. C. Bourdeau, P. Chausson, J.P. Courtiat, J.P. Gouyon and J.M. Pons, Design and implementation of a hybrid system EAI680/MITRA15 UKSC Conference on computer simulation, Salford (G.B.) 6-8 May 1975. J.P. Gouyon, Systkme hybride CII-MITRA 15/EAId80. Utilisation du systeme en Fortran. Note techniquee LAASSIS No. 76.T. 31, September 1976. R. Vichnevetsky, Use of functional approximation methods in the computer solution of initial value partial differential equation problems. IEEE Trans. on computer, vol 18, June 1969. A. El Jai, Sur la commande avec estimation de 1’6tat initial d’une classe de systemes a parametres repartis. ConsidCrations pratiques. Revue francaise d’automatique, d’informatique et de recherche operationelle. Vol. 11, no. 4, 1977.