Modeling Lumped-Distributed Systems Using Neural Networks

Modeling Lumped-Distributed Systems Using Neural Networks

Copyright @ IF AC Advanced Control of Chemical Processes, Pisa, Italy, 2000 MODELING LUMPED-DISTRIBUTED SYSTEMS USING NEURAL NETWORKS M.P. Vega*, E...

1MB Sizes 0 Downloads 167 Views

Copyright @ IF AC Advanced Control of Chemical Processes, Pisa, Italy, 2000

MODELING LUMPED-DISTRIBUTED SYSTEMS USING NEURAL NETWORKS

M.P. Vega*, E.L. Lima and J.C. Pinto

Program a de Engenharia Quimica / COPPE, Universidade Federal do Rio de Janeiro, Cidade Universitaria, CP: 68502, Rio de Janeiro, RJ, Brasil, e-mail: [email protected].

Abstract: Neural network based models (NNBMs) performance was studied for an alcohol continuos stirred tank fermenter and a tubular polymerization reactor, acting as a lumped-distributed system, depending on the recycle rate employed, through simulation and experiments. Bifurcation diagrams were computed in order to investigate the agreement between the processes and the NNBMs, of paramount importance for implementing model based controllers. Copyright © 2000 IFAC. Keywords: Stability analysis, Neural networks, MIMO, Predictive control, PID control.

1. INTRODUCTION

This paper describes the evaluation of neural network based models (NNBMs) for biological and polymeric processes: a Continuous Stirred Tank Fermenter · (CSTF) with cell recycle and a tubular polymerization reactor. Fonseca (1998) pointed out that the CSTF is now receiving a revived interest because of the environmental benefits of using alcohol as motor fuel. The styrene polymerization in toluene, initiated by benzoyl peroxide, in a continuous loop-tubular polymerization reactors is also studied. The loop reactor, operating with a recycle ratio of 35, can be considered as a continuous stirred tank reactor (CSTR) with perfect mixing (lumped system). In the other hand, using a zero recycle ratio, the system acts as a distributed tubular polymerization reactor. Heat transfer capacity is usually large in tubular reactors (distributed system), as they present high surface/volume ratios. Due to the simplicity of the tubular design, this configuration leads to small fixed and operational costs. Loop reactors (lumped systems) represent a promising alternative for polymer reactions, as they offer the advantages of the tubular technology, also presenting faster dynamic responses .

• Author to whom correspondence should be addressed

803

Using the methodology proposed by Vega, et al. (1998), bifurcation diagrams were computed with AUTO (Doedel, 1997) in order to investigate if the NNBMs and the processes presented similar dynamic and steady-state behavior, of paramount importance for identification and model based controller implementation purposes. Feedforward artificial neural networks (FANNs) and hybrid neural models (HNMs), based on the principle of the identification science of never trying to identify a phenomena that is well known, were built for the fermentation unit producing ethanol. These models were investigated in order to compare which methodology would present better results for identification purposes. In addition, taking into account the complexity of the polymerization reactor, HNMs for the loop - tubular polymerization reactors were built. The lumped characteristic of the loop reactor allowed an efficient use of a lumped HNM structure. The tubular polymerization reactor is a system whose mathematical model comprises partial differential equations. However, a simple lumped HNM structure was employed. The main objective was investigating if the HNM could successfully be used for modeling the distributed process and a experimental polymerization unit, even though being structured as

a lumped model. The use of HNM as the internal model of a multi variable nonlinear predictive control loop is also shown. Besides, a standard PID controller with a dynamic decoupler is studied for this algorithm is based on well-established linear techniques. The objective was to evaluate if the model based predictive controller operates as safe as the PID controller. As a result, NNBMs are validated in terms of traditional methods (Pollard, et aI., 1992), in terms of their static and dynamic behaviors, as proposed by Vega, et al. (1998), and in terms of the resulting predictive controller performance.

2. PHENOMENOLOGICAL MODELS 2.1.

Continuous Stirred TankFermenter

A CSTF with cell recycle fonseca, 1998), which produces ethanol, using Saccharomyces cerevisiae as biomass and sugar cane molasses as substrate, is analyzed. The model can be written as shown in Equations 1-6.

d.X

= -cOX + ~S,P)X dt dS dt"=O(So-S) -~S,p)X -

dP dt

(1)

(2)

-=-OP+~S P)X

(3)

~S'P)=-t-!s[l-..L ] Ksx +S Kpx

(4)

C(S,P)=[-L+~ } YplS

(5)

'

Y XlS

(6) \(S,p) =i:!s[l-..L] Ksp +S Kpp where ~.... = O.088h- ' , v.. = I.Oh- ' , Y XlS = O.l8g / g, YplS = O.5lg / g, Ksx = O.05g/l, Ksp = O.5g /I, K"" = 66.57g / I and Kw = 78.72g / I.

2.2.

3. NEURAL NETWORK BASED MODELS During the last decade, the use of neural networks for identification and control purposes has increased and being successfully applied in many chemical processes f3hat et aI., 1990). A F ANN has the potential of representing non-linear systems, this type of model being called "black box" model. By combining simple phenomenological model with a FANN, this "gray box" type model (HNM) may gather the best characteristics of both phenomenological and empirical approaches. This hybrid methodology uses a simple and flexible model (based on well-known balance equations) coupled with a neural network that models both nonlinear characteristics and uncertainties of the system being studied.

3.1.

For HNM and "black box" model building purposes, F ANNs with 1 hidden layer were considered. Each neuron in the input, hidden and output layers had a sigmoid activation function . The biases of the neurons in the first layer were assumed to be zero. The architecture 2-4-1 (2 inputs, 4 hidden neurons and one output) was employed for the "black box" model. An architecture that gives an one-step-ahead prediction of biomass concentration as a function of the actual values of biomass concentration and recycle rate was used (Equation 9). Besides, an HNM approach for the fermenter system was considered by including mass balance restrictions. A FANN with two hidden neurons was used to represent the nonlinear future reaction rates (Equations 4 and 6), using as inputs actual substrate concentration, actual product concentration and c (recycle rate), the continuation parameter (Equation 10). The reaction rate shown in Equation 5 was obtained by combining the FANN outputs. All neural parameters for the fermenter were obtained from Fonseca (1998).

X k+1 = «Xk ,c k)

Loop-Tubular Polymerization Reactors

[~+I'Vk+IJ = «Sk ,Pk,C k)

The tubular reactor model (Vega, et al., 1997) can be written as shown in Equation 7. The loop model uses reacted feed (the recycled line at the output of the reactor) beyond of the usual fresh stream at the reactor entrance (Cabral, 1998), Equation 8.

oC

at

i

j

3.2.

I

(9)

(10)

Loop-Tubular Polymerization Reactors

HNMs (lumped models) were employed for modeling the lumped-distributed polymerization systems and investigating the potential of this methodology, very attractive, as produces simple internal models for control purposes. FANNs with one hidden layer, using hyperbolic tangent activation function, were adopted in the HNMs. Each neuron in the output layer had a linear activation function. F ANNs, giving an one step ahead prediction and

+v OC j = R.

%az

Continuos Stirred TankFermenter

(7)

=I,M ,S,Ao ), I ,A 2 (8)

804

trained with simulated and experimental data, were employed.

(15)

The architecture 2-4-1 was used for representing the nonlinear monomer consumption rate (output) using, as input variables, actual conversion and jacket temperature values for the loop reactor. FANNs using actual and five past time history data as input signals were developed for the tubular reactor. This approach minimizes the mode ling errors of representing a distributed polymerization system as a lumped model (HNM) by including all residence time information for training the FANNs . Experimental data from the tubular reactor unit was used in order to build FANNs with architecture 1214-1. Actual and five past values of conversion, obtained from an on-line densitometer, and temperature were used as the input data for predicting the one step ahead monomer consumption rate. A similar NNBM, using simulated data, was built in Vega et al. (1998). HNMs using FANNs, giving an one step ahead prediction and trained with simulated data, were built for the purpose of being used as the internal models of a multi variable nonlinear predictive controller. All FANNS had 14 hidden neurons. The first FANN, representing the nonlinear monomer consumption rate (output), Equation 11, had as input variables the present and five past data on conversion and jacket temperature (Equation 14). The second FANN, predicting the nonlinear first order momentum of dead polymer formation rate (Equation 12), had as input data the present and five past information of the first order momentum of dead polymer and jacket temperature (Equation 15). The third FANN, playing the role of the nonlinear second order momentum of dead polymer formation rate (output), Equation 13, employed present and five past data of second order momentum of dead polymer, jacket temperature and feed modifier concentration (Equation 16). The use of the architecture shown in Equations 14-16 made the neural model injective (one to one relation) also being appropriate to represent the distributed characteristic of the tubular polymerization process.

(16)

4. BIFURCATION DIAGRAMS NNBM, developed to represent non linear process, may present complex and incompatible behavior, due to the nonlinear FANN behavior, even though with satisfactory traditional training and validation data representation. When these NNBMs are used as the internal models of a predictive control strategy, spurious solutions can be found, leading to improper closed loop responses. Recently, Vega, et al. (1998) suggested the study of the stability behavior of NNBMs using bifurcation diagrams for obtaining a confident identification.

5. RESULTS 5.1.

Continuos Stirred TankFermenter

The bifurcation diagram of Figure 1 shows the evolution of cell concentration in the output of the fermenter as c (recycle rate) is varied. It can be seen that the washout point happens with c = 0.88. After this point the only stable solution is the washout one. Figure 2 shows the bifurcation diagram of the CSTF "black box" neural model. A stable steady-state solution branch, similar with the one of the alcohol fermenter (Figure 1) is observed. It can be seen that the NNBM went to washout with c=0.96. Further, the prediction of the bifurcation point (washout) is surprisingly good, since the training data were obtained during open-loop simulations (stable solutions). As expected, the FANN ("black box" model) was not able to predict the washout unsteady branch of the alcohol unit. 60 _

40

R

k.' FANNX

=(.!:._~ l..k {~l..k.'_(~ l.. V

~t

r'" ~t r'" r . .·

....."~..._ ' ..... ~ .... AkDlIPlf. . . . . .~I· . . ~~.~1i

-

D

.---JlCi-

~ 20 ><

(11)

V

o+-------~~--~

(12)

-20;-......,........,.-..,..-..,..--1 0.00 020 0.40 0.60

c

(13)

Fig. 1. Bifurcation diagram.

(14)

805

o. ~

1.00

Next, a phenomenological model coupled with a FANN was built in order to investigate its ability in describing the real fermentation process. As it can be seen in Figure 3, the HNM methodology allowed the successful modeIing of the fermenter (Figure 1). In addition, the washout unsteady branch was successfully predicted, for mass balances restrictions were included in this hybrid methodology. 5.2.

Loop-Tubular Polymerization Reactors

The dynamic behaviors of the loop and tubular polymerization reactors (monomer conversion, first order momentum of dead polymer and second order momentum of dead polymer at the output stream of the reactor), as computed from dynamic simulations and confirmed through detailed stability analysis of the process models, are stable and the dynamics are trivial. As it can be depicted from Figure 4, the HNM approach was successfully used to model the loop polymerization reactor (lumped system) for both presented the same S-shaped behavior.

Figures 7-9 were used as the internal models of a nonlinear multi variable predictive control strategy. Nonlinear predictive control refers to a class of optimal control algorithms in which a dynamic nonlinear process model is used to predict the future behavior. A sequence of control moves is computed to mirumize an objective function, which includes predicted future values of the controlled outputs. The predictions are obtained from nonlinear process models, HNMs in this case. The controller solves a nonlinear optimization problem with constraints at each sampling interval. The implementation of a PID controller with partial dynamic decoupler is also studied. Weight average molecular weight and conversion are controlled by manipulating the temperature and feed modifier concentration. The servo and regulatory control tests applied for the PID controlled loops were the same as those implemented when the nonlinear multivariable predictive control strategy was used.

aJ.oo..---------, --

9.ablelDlut.icm

«>.00

It was verified (Vega et al. , 1998) that, for the tubular reactor, 200 data points were needed to train a FANN with correct dynamic behavior. However, this is generally not feasible since experimental data are scarce and expensive to obtain. One way to increase the number of data points for the FANN training is to generate new semi-empirical data, based on a weighted combination of experimental and simulated information, obtained from a phenomenological model. As a result, an augmented data HNM was trained by using a combination of 100 experimental and 100 semi-empirical values. As it can be seen in Figure 5, the HNM built with experimental and augmented data has as-shaped behavior similar to the tubular reactor one. It is important to mention that the HNM built just with 100 experimental data presented spurious complex behavior (Figure 6).

~ 20.00

x" 0.00

......'T"""......~,.....~..._o1

·20 .oo~~

0.40

0.00

0.80

1.20

c

Fig. 2. FANN bifurcation diagram. _

Stable.okaionl

· ·· · -u...eleoolutiano

' 0

o

1boruI bi1\R-.itm

0 .80

0.10

For model based multivariable control purposes three HNMs were built. Figure 7 shows the bifurcation diagram of an HNM, using the temperature as the continuation parameter. A typical S-shaped steadystate stable behavior can be observed. The evolution of the first order momentum of dead polymer, as the jacket temperature increases, is shown in the bifurcation diagram of Figure 8. A stable steady-state solution branch is observed throughout the parameter space. Figure 9 presents stable steady-state solution branches for the second order momentum of dead polymer as the jacket temperature increases, for varying feed modifier concentrations (z). It can be reported that conversion, first and second momentum HNMs predictions were very similar from those obtained by the mathematical model (distributed system) simulations. As a result, the HNMs of

o , lO

c

Fig. 3_HNM bifurcation diagram.

o.

Stable solutions

O.0"r-..c:::;,...---.---r---,...---f m.

lli .

=.

=.

Temperature (K)

Fig. 4. HNM bifurcation diagram.

806

_.

~.

Stable solutions

Stable solutions

c . ~ 0.' ~

a:

0 .5 0 .4

U

Temperature (K)

Temperature (K)

l. '.,____________

Fig. 5. HNM bifurcation diagram. 1. SQ.

Fig. 7. Bifurcation diagram.

~

r8.'.

Stablc.alatiOIll : : : : : U."table fOlutian. • Thoru bifurcation

Stable solutions

."

.8' ....

OL

~

,.,. . ..... -.----- --- _ _________.J us.

Temperature (K)

Fig. 6. HNM bifurcation diagram. Figures 10 shows the performance of the controllers for conversion setpoint changes from 21 to 40% and 40 to 60% and weight average molecular weight servo tests (36400 to 20000 and 20000 to 15000). Besides, a regulatory control test is implemented, rejecting a -70% perturbation of the initiator feed concentration also keeping conversion level at 60% and weight average molecular weight at 15000. Next, a change in the conversion setpoint from 60 to 80% and a +70% perturbation of the initiator feed concentration are implemented, requiring the weight average molecular weight not to leave away from 15000.

Temperature (K)

Fig. 8. Bifurcation diagram. unsteady branch of the CSTF, not found by the "black box" model, was predicted successfully by using HNMs, for mass balances restrictions were included in this configuration. A confident HNM for the loop tubular reactor was built. In addition, an HNM, built with augmented experimental data allows the future development of a robust predictive experimental controller for the traditional tubular polymerization unit. HNMs were successfully used as internal models of a multivariable nonJinear predictive controller for the tubular polymerization reactor. The controller implementation was a complementary method for validating the NNBM building procedure.

The objective of the setpoint tracking and perturbation rejection tests was not to investigate which controller had the best performance, but to evaluate if the model based predictive controller operates as safe as the PlO controller, which, as pointed out by Ray (1983), is used in the great majority of process conditions for being based on linear techniques that are well-established. Besides, the controller implementation is a complementary way to validate the NNBM building procedure.

7. ACKNOWLEDGEMENTS We would like to thank Prof. M.B. De Souza Jr. of UFRJ/EQIDEQ for many stimulating discussions and providing the fermenter unit neural network parameters. This work has been performed under the financial support of CNPQ, Conselho Nacional de Desenvolvimento Cientifico e Tecnol6gico - Brasil.

6. CONCLUSIONS NNBMs were validated by using bifurcation diagrams for identification purposes. A CSTF with recycle producing ethanol and a tubular polymerization reactor with a lumped-distributed characteristic, based on its recycle rate, were the nonlinear systems investigated. It was verified that as the complexity of the process increases, a "gray box" model performed better than a "black box" approach.

8. NOTATION X

The hybrid methodology allowed the successful modeling of the alcohol fermenter. The washout

807

cell concentration.

Db

bleed stream.

c

recycle rate.

S

substrate concentration.

o

dilution rate.

1:1

~

8.

~

S

l.oo~---------,

>OO -r--- ----- ----- =o

NGlI_r,,,*,c iu,,,,...ol

PID".hl · ~.I""c"-=IIII,I.

Stable solution s

2'0

0.80

'0 0

" 0.60

.~ ~ 0.40

1'0

ii ~

1 00

~

' 0

"o

e t5

U 0.20

z-O.OOOl kmollm'

8

. ~--~~ o +-~--~~--,~~-

Jl

Temperat ure (K)

0.00+-... ...-"1""'......-"1""'-1 o so 100 ISO 200 2SO

Sal11Jlilg lUre

1:1

~'OO

8.,..

"D ..

Stable solution s

rd ·,........

,~

1

""'00 '0 ~

150

ii

8

:l OO

e

1:1 ..

1 ""s J!

z-O.OOO9 kmollm' 0

SO

150

200

250

Fig. 10. Controlled variables - conversion and weight average molecular weight.

]'300 ~

Stable solutions

8. 150

100

Samolill!lime

Tempera ture (K)

"0

~ '0 ~

ii

lO O

9. REFERENCES LS O

Bhat, N.V., Minderman, P.A., McAvoy, J.T. and Wang, N.S. (1990). Modeling Chemical Process via Neural Computation. IEEE Control System Magazine, 24. Cabral, P. (1998). M.Sc. Thesis, UFRJ/COPPEIPEQ.

B

lOO

e11

. 0

z-O.OO3 kmoUm' .

~

e

310.

320.

330 .

340 .

360 .

370.

]'0 .

Temperature (K)

'*

Fig. 9. Bifurcation diagrams.

Doedel, EJ., Champneys. A.R., Fairgrieve, T.F., Kuznetsov, Y.A.,Sandstede, B. and Wang, X. (1997), AUT09 7: Continuation and bifurcation software for ordinary differential equations. Technical Report, Computational Mathematics Laboratory, Concordia University.

substrate feed concentration. ethanol concentration.

So P ~

lh concentration of the i component. initiator.

M

monomer.

s

solvent. feed modifier.

z

Fonseca, E. (1998). M.Sc. Thesis, UFPE/MEQIDEQ. Pollard, J.F., Broussard, M.R., Garrison, D.B. & San, K.Y. (1992). Process Identification Using Neural Networks. Computer Chem. Engng, 16, 4,253-270. Ray, W.H. (1983). in: ACS Symposium Series, 226, 101, American Chemical Society, Washington D.C., USA. Vega, M.P., Lima, E.L. and Pinto, J.C. (1997). Modeling and Control of Tubular Solution Polymerization Reactors. Computer Chem. Engng, 21,13,S I049-S1 054. th Vega, M.P., Lima, E.L., Pinto and lC. (1998). In: 5 IFAC Symposium on Dynamics and Control of Process Systems (DYCOPS-5), Corfu (Kerkyra), Greece.

zero order momentum of dead polymer. first order momentum of dead polymer.

loo Al A2 R k+1

FANN

second order momentum of dead polymer. FANN prediction of kinetic rate. monomer concentration at actual time. feed monomer concentration. molar feed flow rate. sampling time.

V

volume of the tubular reactor.

x

conversion.

808