Design of multivariable controller based on neural networks

Design of multivariable controller based on neural networks

ELSEVIER Computers and Chemical Engineering 24 (2000) 937-943 Computers &Chemical Engineering www.elsevier.com/locate/compchemeng Design of multiva...

434KB Sizes 0 Downloads 93 Views

ELSEVIER

Computers and Chemical Engineering 24 (2000) 937-943

Computers &Chemical Engineering www.elsevier.com/locate/compchemeng

Design of multivariable controller based on neural networks L. Ender a,,, R. Maciel Filho b a Department of Chemical Engineering, Regional University of Blumenau, Blumeanu/SC, Brazil b Department of Chemical Processes, School of Chemical Engineering, State University of Campinas, Campinas/SP, Brazil

Abstract

This work presents a new multivariable control strategy using neural networks. The proposed control strategy uses past and present process information to design the best controller, as well as to generate the new control actions. At each sampling time the controller is optimized, using the future error of the closed loop, generated by a neural model of the process. The proposed control algorithm was tested in the control of a fixed bed catalytic reactor, which has a complex dynamic behavior. Such system presents inverse response and it is a distributed parameter system, so that its control is not a trivial task. The results have shown the potential of the controller to deal with the non-linearity of the process for the several tested disturbances. © 2000 Elsevier Science Ltd. All rights reserved. Keywords: Multivariable controller; Neural networks; Catalytic reactor

1. Introduction

Process control has been by far the most popular area of neural network applications in chemical engineering (Baughman & Liu, 1995). The neural networks can learn sufficiently accurate models and give good nonlinear control when model equations are not known or only partial state information is available (Psichogios & Ungar, 1991). Neural network approach allows taking into account in an elegant and adequate way process non-linearities as well as variable interactions. Multilayered feedforward neural networks represent a special form of connectionist model that performs a mapping from an input space to an output space. They consist of massively interconnected simple processing elements arranged in a layered structure; the strength of each connection is characterized by its assigned weight. The input neurons are connected to the output neurons through layers of hidden nodes. The processing of information in each neuron is performed through its activation function. When the hidden units have a

* Corresponding author.

nonlinear activation function the mapping is nonlinear (Psichogios & Ungar, 1991). The feedforward architecture constitutes, probably, the more used between all the architectures, having the ability to approach complex functions. This technique allows the development of a controller based on neural networks but it requires the computer aid for the generation of the control action as well as to take the appropriate decision. Additionally, considering the calculation potential of the computers, it can be said that they have been, in some way, misused. In fact, most of the advanced control algorithms have controller parameters set-up off-line and the computer plays a marginal task in terms of real time controller parameters identification. This means that in this case, the control action is based on off-line analysis, which m a y not reflect the process changes, and obviously the operating decisions are not the best ones. Exceptions are the self-tuning algorithms that have not yet been used in extensive way in industrial units, maybe due to their inherent complexity. In process control applications neural networks can be incorporated in the control strategy in either direct or indirect methods. In the direct method, a neural network is trained to represent the inverse dynamics of

0098-1354/00/$ - see front matter © 2000 Elsevier Science Ltd. All rights reserved. PII: S0098-1354(00)00373-2

938

L. Ender, R, Maciel Filho / Computers and Chemical Engineering 24 (2000) 937-943

the system. In this case, given the current state of the dynamic system and the target state for the next sampiing instant, the network is trained to produce the control action that drives the system to this target state. In the indirect method the neural network is trained with input-output data from the dynamic system to represent the forward dynamics; given the current state and the current control action, the network learns to predict the next state of the system. This paper presents a control strategy using the direct method to obtain the controller and the indirect method to generate a neural model of the process. The neural network of the controller is optimized on-line at each sampling time using the global error of the closed loop, obtained through the neural model of the process in the optimization routine. The neural model of the process is also on-line trained at each sampling time using process input-output data. The aim of this work is to present a procedure which explore the computer potential to persuade on-line control through a systematic approach to follow the process dynamics and the controller in a real time fashion.

3. The control strategy using neural networks A process can be written in a discrete form as follows (Bulsari, 1995): Y ( k + 1) = f ( r ( k ) . . . . . Y ( k -

n + 1), U ( k )

x . . . . , U ( k - m + 1))

(1)

with Y ( k ) = [y(1, k ) . . . . y(i, k)] U ( k ) = [u(1, k ) . . . . u( i, k)]

(2)

i = number of control loopwhere U ( k ) and (k = 0, 1.... ) are input and output vectors at a time instant k, respectively, and f is an unknown function. Consider a construction of an approximate function o f f by using a neural network. Let Y ( k + 1) and Y ( k ) . . . . . Y ( k - n + 1), U ( k ) . . . . . U ( k - m + 1) be outputs and inputs of the neural network, and W be a set of the connection weights and the thresholds of the neural network. This network can construct an approximate dynamic model by adjusting W. Y(k)

l~(k -t- 1) = f ( Y ( k ) . . . . . Y ( k - n -t- 1), U ( k )

2. The neural networks For the development of this work the feedforward architecture with backpropagation learning were used (Bhat & McAvoy, 1990; Bhat, Minderman, McAvoy & Wang, 1990. The feedforward architecture has shown to be very robust when compared to other possible arrangements and its ability to approach complex functions as well as to deal with noise data, making it to be very interesting tool (Bulsari, 1995). In all the used neural network configurations, one hidden layer was considered. Hecht-Nielsen (1989) proved that any continuous function could be approached for any degree of precision using a backpropagation neural network with three layers, since there is an enough number of active neurons in the hidden layer. The historical input-output data were used to train two neural networks. The first network learned the forward system dynamics, giving the process model. The inputs to the network were the current and past values of the controlled and manipulated variables and the outputs of the network were the one step ahead prediction of the process outputs. The other neural network was trained to represent de inverse process dynamics. The inputs were setpoints of the controlled variable for the next sampling time; past controlled and manipulated variables and the outputs of the neural network were manipulated variables for the next sampling instant. These neural networks were used in the control algorithm, which will be described later on.

x ..... U(k-m

+ 1); W)

(3)

This is a forward dynamic modeling previously denominated of indirect method. Solving Eq. (1) with respect to U(k), one can get

U(k) = q } { Y ( k + 1), Y ( k ) . . . . . Y ( k - n +

t,

.... U ( k - m +

1), U ( k - 1 ) .... "~ 1) J

(4) where ¢ is an unknown function. This function presents an inverse dynamics of the process. As the function ~b is unknown as well as the function f, it is not possible to evaluate Eq. (4). A neural network is used to generate an approximate function of ¢. This is given by:

O(k) =~{Y(k + I), r(k)..... Y(k-n+ I), U(k- I), ...~ .... U ( k - m +

1); W

]

(5) Consider a control problem in which the output Y ( k ) tracks a series of setpoints R ( k ) . Then: r ( k + 1) = R ( k + 1)

(6)

is desired at a next time interval. Substituting Eq. (6) into Eq. (5), the desirable input to the process is given by:

L. Ender, R. Maciel Filho/ Computers and ChemicalEngineering 24 (2000) 937-943

O(k) = q ~ f R ( k + 1), r ( k ) ..... Y ( k - n + 1), U ( k - 1 ) .... "~ \ .... U ( k - m + 1); W

)

(7) The dynamic model is constructed by using input and output data of the process. It is well known that the forward dynamic model has the sufficient accuracy if a large number of input and output data are available (Bulsari, 1995). The inverse model network receives the inputs of the current and past system outputs, the reference signal (R(k)) and the past values of the system input. The nonlinear input-output mapping given by the network inverse model is given by the direct method, described in Eq. (7). Fig. 1 shows the control strategy. The controller is based on a neural network that represents the inverse dynamics of the system, which is trained on-line through an optimization routine. The optimization routine adjusts the weight of the neural controller using the global error of the closed loop at each sampling time, based on a dynamic model of the process, represented by a neural network with on-line learning. The dynamic model of the process is on-line trained with inputs/outputs data of the process. The on-line learning of the neural network presents limitations due to the number of necessary iterations to attend the error criterion adopted as well as the necessity of the learning to be in real time. A maximum number of iterations were allowed to outline these limitations. A vector formed by a defined number of the last information of inputs/outputs of the system was used as patterns of the on-line learning. To guarantee the good dynamic representation of the process through neural networks, a strategy formed by three nets acting parallel was adopted. The first is formed by weights of the off-line learning, here denominated of standard weights; the second, is initialized with the standard weights and it is submitted at the on-line learning. Whenever the standard weights present better performance, this net

Y"

YP

Controller Optimization

939

has its weights substituted by the standard weights. The third is initialized with the standard weights and continually is submitted to the on-line learning at each sampling time. The neural network that presents the smallest quadratic error in the representation of the vector that contains the last inputs/outputs of the process is used in the control strategy in this sampling time. The controller design uses the same inputs of the neural controller at each sampling time. This optimization routine adjusts the weights of the controller neural network in such way to minimize the estimate global error (el = rsetpoint yprediction)of the closed loop generated by a model of the process. For this, it is necessary to have a model that represents, with fidelity, the dynamic behavior of the process. When the quadratic error of the neural model outputs is smaller than the desired tolerance, this model is used in the optimization routine. If the quadratic error becomes larger to a determined error the controller makes use of the standard weight (weight of the off-line learning) to generate the control action for this sampling instant. In the optimization routine the neural controller uses three neural networks, similar to that of the neural process model described earlier. The neural controller that presents the smallest quadratic error is used as controller for this sampling time. It is not possible to apply the global error (el) backpropagation directly because of the location of the process. The global error is propagated back through the plant using the Jacobian matrix of the process. This Jacobian matrix can be determined by changing each input of the process model slightly at the operation point and measuring the change at the output. A first order filter was used in the reference of the process (Setpoint) and a penalization in the control action (2(i,k)) was used, in agreement with the equation: u(i, k) = 2(i, k)u(i, k -- 1) + (1 -- 2(i, k))u(i, k)

(8)

Initially, the neural networks of the controller and the process model were off-line trained with input-output response data from the process. This initial training ensures that the neural controller will be able to provide relatively accurate control output signals and process output response. Another possible alternative for the initial learning of the controller neural network could be the use of the Specialized Learning Network Training technique, proposed by Psaltis et al. (1988).

4. The process Vl

I

Seti~int Fig. 1. C o n t r o l strategy.

The process considered is the fixed bed catalytic reactor for production of acetaldehyde by ethyl alcohol oxidation, over Fe-Mo catalyst.

L. Ender, R. Maciel Filho / Computers and Chemical Engineering 24 (2000) 937-943

940

0 Oz (pfVf) = 0

Table 1 Stationary parameters of the reactor Parameter

Stationary value

Parameter

Stationary value

Tfo Tro

445.15 K 445.15 K 4500 kg h - i 25 3.0 m h -1 1 atm

Dt Dp L T(1) a T(3) a

0.017 m 0.002 m 1.0 m 453.21 K 451.30 K

GMo R Ur Po

(12)

The cooling fluid equation COTR

-- UR COTR

CO----t--

L

~z F

(T(1, z) - TR)

with t h ~ l l o ~ i n g boundary and initial conditions: r= 0 - 0 (symmetry) (14)

Or

a Output variables.

r=l

COr

cox

~r =0'

=Bih(Tw-

These kinds of reactors are equipment used often in the chemical industry, mainly in catalytic reactions. For the effective control of such type of system is fundamental to obtain safe operations, especially when high performance is desired. This control problem is not an easy task, since fixed bed catalytic reactor is non-linear distributed parameter and time-varying system. The equations that describe the dynamic behavior of the catalytic fixed bed reactor were set in the model proposed by McGreavy & Maciel Filho (1989), developed with the following considerations: • variation of the physical properties of the fluid (density, viscosity, thermal conductivity, heat capacity, enthalpy of the reaction, molecular weight), and heat and mass transfer coefficients along of the reactor; • plug-flow reactor; • negligible axial dispersion.

for all z

The mathematical model that describes the dynamic behavior of the reactor is built up through the mass, energy and balance equations. These equations are solved by the method of lines, where the axial and radial coordinates were discretized by orthogonal collocation. The integration in relation to the time was solved by the Gear method, because the equations are stiff. Mass balance:

PET

R + 1 + 0.5X P

PAC

R + 1 + 0.5X P

z=0

cot

g

r

GMocoX F (1-- t)PMpB Rw 8pf

(9)

Momentum balance:

COP COt-

GM°FCOP+ f l pfL L~z

(10)

Energy balance: COt --

CmR2 r ~r L ~ J +

(1 - -

e)pB( -- AHR) CmTre f

TR)

(15)

X = O, T= Tfo/Tref, p =Po/Pref, TR = TRo/Tref (16)

for all r

Rw =

2KIK2Po~PET K3KIPETPAc + KIPET + 2KzP% + K3K4PAcPrt~7 )

PN 2

R + 1 + 0.5X P

0.79R

(18)

0.21R - 0.5X P% - ~-~- ~ ~ ~ - ~ P

(19)

X Pu2o - R + 1 + 0.5X P

(20)

1-X

COX_ D,___flCOlraXI

(13)

X

(21) (22)

where P is the e total pressure and Po., PET, PI%O, PAC are partial pressures of the oxygen, ethanol, water and acetaldehyde, respectively, and Ki are the kinetic constants of Arrhenius type. Table 1 shows the stationary parameters for the accomplished simulations (Maciel Filho & Domingues, 1992; Toledo, 1999). Fig. 2a and b, present the dynamic behavior of the process, in which inverse response and non-linearities can be seen. This typical behavior lead the control of such system to be very difficult, so that conventional control techniques tend to fail when high operational performance is required.

5. R e s u l t s

CmL

COz

Rw ( R --[- l )

where: Cm = e(pfCpf) + (1 - e)(psCp~) Continuity equation

(11)

To verify the potentialities of the proposed multivariable control algorithms, disturbances were generated in relation to the steady state of the system and load changes in Tro and Tfo were applied, in the analyzed cases. In all the cases the manipulated variables were the feed mass flow rate (GMo) and the air/ethanol

L. Ender, R. Maciel Filho/ Computers and Chemical Engineering 24 (2000) 937-943

relationship (R) and the observed variables were the temperature of the first T(1) and third T(3) orthogonal collocation points in the reactor. The servo problem is presented in Table 2, and the results are shown in Figs. 3 and 4. Looking at the results of the Fig. 3, it can be said that an excellent performance of the proposed control strategy was observed, in spite of the process to present a complex dynamic behavior. Fig. 4 presents the results for the servo problem with stochastic noise and a good performance was also verified.

941

°--t I__.T,,, - -

453.00

,

Tim~

T(3)

---

452.00 i

451,00 -

p-

I

450.00 -

458.00 449.00

,

[

0,00

I

0.20

'

0.40

I

'

0.80

I

I

0.80

1 .IX)

Time (hour) 456.00

Fig. 3. Servo problem.

454.00 E

454.1111 I

- -

TempemtumT(t) 1 Tempemlute T(31

452,00

j_

453.00 -

A

450.00 0.00

(a)

6.10

0,30

0.20

m

458,00

~

456.00

- -

~+40%

----

R+2~¢.

---

Tm+4K

- -

Tfo÷~

454.00

/---

e

451.~

-

450.00"

/

/

f

//

,

,~0.00

/

'

I

6.00

'

020

/ /!

452.00

I

'

0.40

I

'

0.60

Time (hour)

/

I-

I

I

0.80

1.00

Fig. 4. S e r v o p r o b l e m w i t h s t o c h a s t i c noise.

/

.~

456.00 (b)

452.00"

T i m e (hour)

/

"~ ~/- -

0.00

460.00--

j 0.10

I Time (hour)

'

0.20

- - ----

I 0.30

458.00 -

Fig. 2. (a) O p e n - l o o p r e s p o n s e o f the t e m p e r a t u r e to step disturb a n c e s . (b) Open-loop r e s p o n s e o f the t e m p e r a t u r e to step disturbances.

456.00

~

Table 2

I '-;--..s:: ....

7

I

,

,

':

//

-

454.00

Temp.T(I) ~ ~ml~l~ Temp.T(3) wilh ~ b d / ~ ' TemP.T(t)~outconbol~ Temp,T(3) ~ ~

I

'I' , /

D e v i a t i o n o f the o u t p u t references T i m e (h)

0.0-0.2 0.24).6 0.6-0.8 0.8-1.0

T ( 1 ) (K)

449.71 449.71 449.71 453.21

T ( 3 ) (K)

451.30 450.30 451.30 451.30

Deviation

Deviation

T(1)

T(3)

-3.50 - 3.50 -3.50 0.00

0.00 - 1.00 0.00 0.00

452.00

// i 450.00

' 0.00

I 0.20

'

I 0.411

'

I 0.60

'

I

'

0.80

Time (hour)

Fig. 5. Regulator problem: d i s t u r b a n c e in Tro.

I 1.00

942

L. Ender, R. Maciel Filho/ Computers and Chemical Engineering 24 (2000) 937-943

Fig. 5 depicts the results for the regulator problem obtained by changing the cooling fluid temperature (Tro) of the reactor, according to the relationship: Tro = Tross+4K; for 0.1 < t < 0 . 6

(23)

This disturbance generates a considerable inverse response, turning the problem more complex. The Fig. 6 presents the results for the regulator problem, obtained by changing the feed temperature (Tfo) of the reactor, according to the relationship: Tfo = Tr% + 5K; for 0.1 < t < 0.3

(24)

An efficient result can be verified in the control for these regulator problems. For these cases it is important the use of the on-line learning of the neural networks for the controller as well as for the process model because these nets were not submitted to these disturbances during the off-line learning. Considering that the load disturbances were measurable, they could be part of the inputs of the used neural networks. In this way a feedforward effect is incorporated in the control strategy. It is considered that the load disturbances are non-measurable what is in fact a realistic situation in many industrial plants.

conditions. This lead to conclude that the approach considered here has great potential to be applied in process with complex and non-linearity dynamics, even when very severe operation conditions are required. The modeling and control using neural networks in a changing environment is an important problem. The learning capability of neural networks suggests their incorporation in adaptive control techniques.

Appendix A. Notation

B/h

C~R Def

f GMo hw L P

Po 6. Conclusions Pref

The neural networks offer a feasible alternative as system identification or controller design tools when there are no good and reliable deterministic mathematical models valid in all the operation conditions or only historical input-output data are available. The control of fixed bed catalytic reactors has been considered as case study in this work. Such systems present a complex dynamic behavior and even so the performance of the proposed control strategy has shown to be very good in a large range of operation

PM r

R T

~w T~ TRO

T~ef

I

- -

460.00

UR

TemP. T('I) wl~ cmltmkr T ~ e . T(3) w~h

Vr

Temp. T(1) w(qhou~~ l l ~ r Temp. T(3) wi~out oonlroller

x z

f/

E

456.00 •

2ef

Po P,, PR

452.00 -

4

PB

Rw 0.00

0.10

0.20 0.30 Time (hour)

0.40

Fig. 6. Regulator problem: disturbance in Tfo.

0.50

biot number; specific heat of the gas, catalyst and cooling fluid (Kcal KgK-1); effective radial diffusivity (m h-l); friction factor; feed mass flow (Kg m -2 h-l); film coefficient in the wall interns (Kcal (hm 2 K)-I); length of the reactor (m): total pressure of the reactor, dimensionless; entrance pressure of the reactor, dimensionless; reference pressure (atm); medium molecular weight (Kg Kmol- 1); the radial length of the reactor (m); air/ethanol relationship; reactor temperature, dimensionless; feed temperature, dimensionless; wall reactor temperature, dimensionless; cooling fluid temperature, dimensionless; entrance cooling fluid temperature; reference temperature; cooling fluid velocity (m h-1); superficial velocity (m h-l); conversion; axial length of the reactor (m); porosity; effective radial conductivity, (Kcal m-1 h-I K-l); molar enthalpies (Kcal Kmol-1); density of the reagent fluid, catalyst and cooling fluid, (Kg m-3); apparent density of the bed (Kgcat m-3);

ethanol oxidation rate to acetaldehyde over Fe-Mo catalyst (Kmol reagente mixture/h Kg cat., Maciel Filho, 1985).

L. Ender, R. Maciel Filho / Computers and Chemical Engineering 24 (2000) 937-943

References Baughman, D. R., & Liu, Y. A. (1995). Neural networks in bioprocessing and chemical engineering. New York: Academic. Bhat, N., & McAvoy, T. (1990). Use of neural nets for dynamic modeling and control of chemical process systems. Computer and Chemical Engineering, 14, 573-582. Bhat, N., Minderman, P. A., McAvoy, T., & Wang, N. S. (1990). Modeling chemical process sytems via neural computation. IEEE Control Systems Magazine, 10(3), 24-30. Bulsari, A. B. (1995). Neural networksfor chemical engineers. Amsterdam: Elsevier. Hecht-Nielsen, R. (1989). Theory of the backpropagation neural network, IEEE International Conference on Neural Networks. (pp. 593-605). vol. I, San Diego. Maciel Filho, R. (1985). Oxida~o catalitica de Etand a acetaldeido

943

sobre catalisador de 6xido de ferro-molibd6nio, M. Sc. Thesis, UNICAMP, Campinas, Brazil. Maciel Filho, R., & Domingues, A. (1992). A multitubular reactor for obtain of acetaldehyde by oxidation of ethyl alcohol. Chemical Engeneering Science, 47, 2571-2576. McGreavy, C., & Maciel Filho, R. (1989). Dynamic of fixed bed catalytic reactor, IFAC - - Symposium of dynamic and control of chemical reactor, distillation columns and Bach process, (pp. 119-124). Maastricht, The Netherlands. Psaltis, D. et al. (1988). A multilayered neural network controller, IEEE Control System Magazine, 8 (2), 17-21. Psichogios, D. C., & Ungar, L. H. (1991). Direct and indirect model based control using artificial networks. Industrial Engineering & Chemical Research, 30, 2564-2573. Toledo, E. C. V. (1999). Modelagem, simula~ao e controle de reatores cataliticos de leito fixo, Ph.D. Thesis, FEQ/UNICAMP, Campinas, Brazil.