Problems in Chemical Reactor Analysis with Stochastic Features Control of Linearized Distributed Systems on Discrete and Corrupted Observations 1.M. Pell, Jr.,l and R. Aris Department of Chemical Engineering, University of Minnesota, Minneapolis, Minn. 55456
The stochastic control problem for linear first-order partial differential equations has been solved by Denn, but his solution requires a knowledge of the state a t all times and places. Here we consider the problem of estimating the state a t all places from measurements made a discrete set of points. A set of filtering equations of structure similar to the usual Riccati form may b e developed and used in the optimal control. Calculations for a tubular interchanger with constant wall temperature are exhibited, in which measurements are made a t three points.
W
H A T n e present tiere is an extension and application of the Rork of Denri (1968). I n that paper he solved the optimal control problem for a :.>stem of fir%t-orderpartial differential equations and quadratic performance criterion, 11ith stochastic inputs entering both a t the boundary and a? bodv terms. The control was derived in the form of a linear feedback law requiring perfect knol+ledge of the state at all places and times. I n this paper we find a filter to take noise-corrupted observations made a t discrete points and use them to obtain estimates of the entire state. The estimation and control problems are uncoupled, so that this estimate ma) he ujed in a control identical to Denn's. T h e linear distributed system that n e consider can arise mo-t naturally as the linearization of a tubular reactor about its nominal steady st,tte, though me here consider only a rather simpler application, the heat exchanger problem which Koppel (1967) and Koppel and Shih (1968) have uted. Thau (1968) has coriiidered systems \+ith measurementi taken a t a single point and Seinfeld (1969) has proposed a useful approximate filter when measureinelits at all times and places are available.
The System Our system is de-cribed by the follouing equations, n hich we lay out in a notation conforming as far as posible nith Denn's. For time in the interval 0 6 t 6 0 and a ipace variable r i n the interval [0,1], the state of thp I)rocesq, an n-vector x(r,t),is governed by
ax --
at
+ V-axdr = AX + Biui(t) + wl(t)
+
ioiisobtained by the limit'ing process are
a? ai - + V - = A? br
dt
+ Blul + po&,t)HTR-'{ y - HfoS]
BlT(r)po(r,t)d(t) dr
u,(t) =
B2TVT(0)
-r2-I
I'
p(r,O,t)x(r,t)dr -
r2-l B~TVT(O) po(o,t)d ( t )
Equation 29 for U' leads us in the limit t o the following set of partial differential equations
a a (pV) + ATp + pA 3 + - (Vu) + at dr 3P
-
y(r,0)V(0)B*r2-1B2TVT(0)p(0,p) - h(r)b(r -
4- G--'po,ob(t)HTR-'{Y(t)
- Hiob}
(51)
(44)
and dh - = Dd(t) dt
(50)
and
(41)
The boundary conditions are provided by p(r,O,t)
rl-'
(40)
= 0
(52)
poT(0)V(0)Bzr2-1B2TVT(0)po(0)= 0
(54)
p)
(45)
where
P ~ o ( ~ ,=C [P(r,rl,t), . . ~ ( r , r ~ , t ) l ,
(46)
and PO,Ob(t)
= [PO(Tl,t),
, ,
.Po(fm,OI
(47)
The initial and boundary conditions are
d(0)
=
do, ?(r,O)
=:
i o , i(0,t) =
G
h(t) + B ? ~ z ( t )
(48)
The Controller
The form of the controller may alqo be derived as the limit of the discrete case. The matrix U' in Equatioii 28 is partitioned into
U'
=
U '',
UOl'
UlO'
U11'
.. , .
UOS' UlS'
1
The boundary and terniiiial ronditionq are p(l,p,t) (lY,P,t.f)
=
v(r,l$) = po(1,t) = 0
=
vo(r,t,)
=
vrMitr)
=
(55)
0
'I'heie equation< arc ea.ier to wire than the filtering eqii;Ltioils, \itice po doe- not appear iii the equation for p. The controllrr niay he ,-.ntheaized by iubstituting tlir soliitioni VOL. 9 N O . 1 FEBRUARY 1970
16EC FUNDAMENTALS
17
of Equations 44 and 45 into 50 and 51. Finally the loss fuiirtion can be computed from
L(t) = W(t)
+ h.(t)poo&t) + 2
s,'
then
bx
-
bt
dyt)po(r,t)i(r,t)dr t
+ y bx -= 3r
- ax + u(t)
is the unperturbed equation. If we now suppose that the wall temperature and inlet temperature are subject to random disturbances, we should write
and
bx -
at
+ v -axbr
=
-
+ u(t) + &(t)
az
while
x(t,O)
=
- TJO))
d ( t ) = { T(O,t) - TJO)]/{
(62)
The disturbance d(tj is generated by filtering Gaussian white noise d
-
dt
An Example
These equations are sufficiently horrendous to make a worked example reassuring. For this we use the tubular heat exchanger with constant wall temperature as the simplest possible physical system. The equations for a tubular reactor linearized about the steady state would have a t least two independent variables and position-dependent coefficients. This would greatly add to the complexity of the solution, though it would not be wholly unmanageable. For the temperature T(r,t)we have
bT bt
+
1,
bT - = a ( T w- T ) br
where v
= velocity of fluid
a
= a form of heat transfer coefficient
E[tbo(t)WOT(7)]
l&EC FUNDAMENTALS
(63)
-
(64)
= po6(t
tion function po exp
-
-a 0
I 1). T
VOL. 9 NO. 1 FEBRUARY 1970
7)
The disturbance
thl
is
white noise with E[G,(tj
2i$T(7)]
= q6(t
-
7)
(65)
Let us further set R = r01, A = 6(1 - T ) , rl = 0.5, r2 = OX so that we are assuming uncorrelated measurement errors and wish to control the exit temperahre wit'h some penalty for control variations, but no control of the inlet' temperature. Measurements of temperature are t,o be made a t r1 = 0, rz = 0.5, r3 = 1, so H = I, m = 3. By letting 0 be large, we may consider an exchanger that has been operating for some time and then the kernels such as p ( ~ , p , t )become independent of time. The control scheme is shown in Figure 1. The functions p ( r , p ) , po(r), and poo are first calculated from Equations 38, 39, and 40 and u(r,p), u0(r) from Equations 52 and 53. The observations are fed to the filter (Equation 44), which gives the estimate i ( r J t ) and this is fed to the controller which gives ul(t) by Equation 50. The control equation may be written as
J' r b ( r ) i ( r , t ) d r+ r,d(t)
.--2 r r t)-J .__--L
Figure 1 . 18
c
+ tbo(tj
This gives a Gaussian random variable with autocorrela-
u,(t) =
I,
d(tj = -aod(t)
Control scheme
(66)
The equations for the covariance relations are harder to solve, for they are
where
B u t with
rl = 0.5, u and uo satisfy
These equations were turned into integral equations for p(r,rn) by the method of characteristics. Thus with u(r,l)
== u(1,p) =
uo(l)
=
0
These are the same equations as Denn's (1968) and we follow the method of solution he suggested-namely, the use of characteristics and iteration, which proves to be suitably convergent after four t o six iterations. Figure 2 shows r b ( r ) for two values of the velocity, v . The corresponding values of the constant r, are 0.0223 and 0.00267 for 0 = 1 and 5 , respectively . -2 0
-
Figure 2. velocity
r
0 0
and
I
0
1 .2
I
I
.4
.6
I
I
.e
1.0
r
Feedback weighting function and effect of fluid
0.0
0. Figure 3.
2
.4
By substituting from Equation 74 into 73 we obtain three integral equations for p(r,rn), n = 1, 2, 3, and although these must be discretized they still represent a n economy of effort in comparison with the lumped system. For the latter the Riccati equations are S 2 in number; for this discretization there are 3N equations or more generally m X . Equation 7 3 is valid for r > p ; the solution for r < p can be obtained from Equation 73 by interchanging r and p . For the curves showii in Figure 3 a value A' = 25 was used with the parameters a = uo = QO = 1, q = rl = 0.5, 0 = 5 , ro = 0.1. After seven K'ewton-Raphson iterations the maximum residual among the 7 5 = 3 X 25 equations was 0.002 and this was accepted as adequate. A period of some 30 seconds computation time on the CDC 6600 was required. The form of the covariance functions is as would be expected, I n a further series of experiments the loss function was calculated for various values of T O , the variance of the noise in the observations. As t o+ &Le., the observations become
.6
8
I.
I
Covariance of error in estimates of x along tube VOL. 9 NO. 1 FEBRUARY 1970
l&EC FUNDAMENTALS
19
precise-the loss decreases, but because of the term 2irl we still cannot reproduce z ( r , t ) perfectly. On the other hand, when ro is large the noise effectively blanks out the signal.
= spectral density of = spectral density of = space variable
Conclusions
= Epectral density of = time = final time
=
Though the derivation of the filtering equations has only been adumbrated here, the same equations can be derived from a modification of the Wiener-Hopf equation. For unobserved systems the quadratic summations in the equations for p , po, and p m disappear and we are left with linear equations, to be exploited in another paper giving an analysis of the parametric sensitivity of the tubular reactor. The extension to more than one space variable is feasible but exceedingly messy in its notational and algebraic details.
=
=
=
= = =
= =
= =
= = =
= = = =
= parameter in Equation 58
20
= = = = = = = = =
= =
+
I&EC FUNDAMENTALS
VOL. 9 NO. 1 FEBRUARY 1970
temperature steady-state wall temperature boundary control
= feedback term defined by Equation 29 = a partition of U’(t) = parameter in Equation 1
Nomenclature
parameter in Equation 63 A(r,t) coefficient matrix in Equation 1 A ’ ( t ) = defined by Equation 18 A , ( t ) = A ( i A , t ) ,i 5 S B = defined by Equation 19 Bl(r,t) = coefficient matrix in Equation 1 B i , , ( t ) = B ( i A , t ) ,i 5 N B 2 ( t ) = coefficient matrix in Equation 6 d(t) = Z-dimensioned boundary disturbance D = coefficient matrix in Equation 7 G = coefficient matrix in Equation 6 H = coefficient matrix in Equation 11 = the n(i - 1) 1through nith columns of H, i = defined by Equation 24 Elj 1 = dimension of d ( t ) L(t) = loss function defined by Equation 14 L ’ ( t ) = loss criterion for discrete system m = total number of observation points n = dimension of x(r,t) N = number of equations in discrete system P = dimension of y ( t ) p ( r , [ , t ) = covariance of error in x(r,t) and x(E,t) po(r,t) = covariance of error in x ( r , t ) and d ( t ) poo(t) = covariance of error in d ( t ) p,e(r,t) = n x nm composite of matrices p(rJr2,t) PO,ob(t) = 1 X nm composite of matrices po(rl,t) P ’ ( t ) = covariance of estimation error in x’ Po(r,p) = covariance of x(r,O) and x(p,O) Q ( t ) = spectral density of \irl(t)
wi.,(t)
= defined by Equation 16 = body control term
R e are indebted to the National Science Foundation for support of this work (GK 1367X) and to the Computer Center of the University of Minnesota for the grant of free computer time. We are very grateful t o J. H. Seinfeld, who gave the paper a most careful review and suggested several corrections and improvements.
a0
observation point in discrete system
= steady-state temperature in heat exchanger = wall temperature
Ac knowledgmenl
a
Wlf(t)
w4(t)
= = =
=
5m
=
v ( i A , t ) ,i 5 I white noise body disturbance white noise shaping filter disturbance observation noise defined b y Equation 20 defined by Equation 57 defined by Equation 31 n-dimensioned state variable state of discrete system defined b y Equation 10, nm-dimensioned an estimate of x(r,t) expected value of x(r,O) p-dimensioned observation vector parameter in Equation 14 parameter in Equation 14 defined by Equation 27 feedback weighting function feed forward weighting term 1/‘V parameter in Equation 14 defined by Equation 26 parameters in linear control law parameters in linear control law parameters in linear control law space variable an estimate refers to discrete system transpose
literature Cited
Denn, A I . AI., IND.ENG.CHEM.FUXDAMENTALS 7, 410 (1968). Koppel, L. B., IND. ENG.CHEM.F U N D A M E N6,T299 ~LS (1967). 7, Koppel, L. B., Shih, Y. P., IND.ENG.CHEM.FUND~MENTALS
__-
414 (\---.-,. 19fiX)
Lapidus, L., Ind. Eng. Chem. 59, N o . 4, 28 (1967). Seinfeld, J. H., Chem. Eng. Sci. 2 4 , 75 (1969). Thau. F. E.. Proceedings of Joint Automatic Control Conference, p. 610, 1968. Wonham, W. Rf., “Some Applications of Stochastic Differential Equations to Optimal Nonlinear Filtering,” RIAS Tech. Rept. 64-3 (February 1964). I
RECEIVED for review May 19, 1969 ACCEPTEDOctober 20, 1969