**1. Introduction**

174 Recurrent Neural Networks and Soft Computing

Lo Piparo, G. (2010). Lightning protection of telecommunication towers, In: *Lightning* 

Manzato, A. (2007). Sounding-derived indices for neural network based short-term

Ni, H. & Yin, H. (2009). Exchange rate prediction using hybrid neural networks and trading

Peppier, R. (1988). *A Review of Static Stability Indices and Related Thermodynamic Parameters.* Illinois State Water Survey Climate and Meteorology Section, USA

Rakov, V. & Uman, M. (2005). *Lightning: Physics and Effects*, Cambridge University Press,

Salhi, M. S.; Arous, N. & Ellouze, N. (2009). Principal temporal extensions of SOM:

Santos, A. ; Souza, J. ; Souza, E. ; Carmo, A. ; Ribeiro, W. & Oliveira, R. (2011). The climatic

Shafer, P. E. & Fuelberg, H. E. (2006). A statistical procedure to forecast warm season lightning

Varsta, M. ; Heikkonen, J. ; Lampinen, J. & Millan, J. (2001). Temporal Kohonen map and the

Voegtlin, T. (2002). Recursive self-organizing maps. *Neural Networks,* Vol.15, Issues 8–

Williams, E. (2008). Charge structure and geographical variation of thunderclouds, In: *The* 

*Processing Letters,* Vol.13, No.3, pp. 237–251, ISSN 1370-4621

9,(October 2002), pp. 979–991, doi :10.1016/S0893-6080(02)00072-2

Technology, ISBN 978-0-85296-780-5, London, United Kingdom

Vol.23, (June 2008), pp. 477-495, doi: 10.1175/2007WAF2007018.1

*Recognition* , Vol.2, (December 2009), pp. 61-84, ISSN 2005-4270

ISBN 978-0-86341-744-3, London, United Kingdom

0925-2312, doi: 10.1016/j.neucom.2008.09.023

ISBN 978-0-521-58327-5, New York, USA

*ICAE*, Rio de Janeiro, Brazil, August 7-12, 2011

280, ESANN'2000

*Protection,* V. Cooray, (Ed.), pp. 723-787, Institution of Engineering and Technology,

thunderstorm and rainfall forecasts. *Atmospheric Research*, Vol.83, Issues 2-4, (February 2007), pp. 349-365, ISSN 0169-8095, doi:10.1016/j.atmosres.2005.10.021 Manzato, A. (2008). A verification of numerical model forecasts for sounding-derived indices

above Udine, Northeast Italy. *Weather and Forecasting* - *American Meteorological Society,*

indicators. *Neurocomputing*, Vol.72, Issues 13-15, (August 2009), pp. 2815-2823, ISSN

Overview. *International Journal of Signal Processing, Image Processing and Pattern* 

context of lightning storms, associated to electric systems power outages in eastern Amazonia, *Proceedings of XIV International Conference on Atmospheric Electricity-*

over portions of the Florida peninsula. *Weather and Forecasting* - *American Meteorological Society,* Vol.21, (October 2006), pp. 851-868, ISSN 0882-8156, doi: 10.1175/WAF954.1 Strickert, M. & Hammer, B. (2005). Merge SOM for temporal data. *Neurocomputing*, Vol.64, (March 2005), pp. 39-71, ISSN 0925-2312, doi: 10.1016/j.neucom.2004.11.014 Varsta, M.; Heikkonen, J. & Lampinen, J. (2000). Analytical comparison of the temporal

Kohonen map and the recurrent self organizing map. In: M. Verleysen (Ed.),273–

recurrent self-organizing map: Analytical and experimental comparison. *Neural* 

*Lightning Flash,* V. Cooray, (Ed.), pp. 1-15, Institution of Engineering and

In the last two decades new identification and control tools, like Neural Networks (NN), have been used for biotechnological plants (Boskovic & Narendra, 1995). Among several possible network architectures the ones most widely used are the Feedforward NN (FFNN) and the Recurrent NN (RNN), (Haykin, 1999). The main NN property namely the ability to approximate complex non-linear relationships without prior knowledge of the model structure makes them a very attractive alternative to the classical modeling and control techniques. This property has been proved for both types of NNs by the universal approximation theorem (Haykin, 1999). The preference given to NN identification with respect to the classical methods of process identification is clearly demonstrated in the solution of the "bias-variance dilemma" (Haykin, 1999). The FFNN and the RNN have been applied for Distributed Parameter Systems (DPS) identification and control too. In (Deng & Li, 2003; Deng et al. 2005; Gonzalez et al, 1998), an intelligent modeling approach is proposed for Distributed Parameter Systems (DPS). In ( Gonzalez et al, 1998), it is presented a new methodology for the identification of DPS, based on NN architectures, motivated by standard numerical discretization techniques used for the solution of Partial Differential Equations (PDE). In (Padhi et al, 2001), an attempt is made to use the philosophy of the NN adaptive-critic design to the optimal control of distributed parameter systems. In (Padhi & Balakrishnan, 2003) the concept of proper orthogonal decomposition is used for the model reduction of DPS to form a reduced order lumped parameter problem. In (Pietil & Koivo, 1996), measurement data of an industrial process are generated by solving the PDE numerically using the finite differences method. Both centralized and decentralized NN models are introduced and constructed based on this data. The multilayer feedforward NN realizing a NARMA model for systems identification has the inconvenience that it is sequential in nature and require input and feedback tap-delays for its realization. In (Baruch et al, 2002; Baruch et al, 2004; Baruch et al, 2005a; Baruch et al, 2005b; Baruch et al, 2007a; Baruch et al, 2007b; Baruch et al, 2008; Baruch & Mariaca-Gaspar, 2009; Baruch & Mariaca-Gaspar, 2010), a new completelly parallel canonical Recurrent Trainable NN (RTNN) architecture, and a dynamic BP learning algorithm has been applied for systems identification and control of nonlinear

Centralized Distributed Parameter Bioprocess

Sk,in(t) Qin

z z[0,1] *Space variable*  t D *Time variable* 

Fig. 1. Block-diagram of anaerobic digestion bioreactor

X1 g/L *Concentration of acidogenic bacteria*  X2 g/L *Concentration of methanogenic bacteria* 

S1 g/L *Chemical Oxygen Demand*  S2 mmol/L *Volatile Fatty Acids* 

1 1/d *Acidogenesis growth rate*  2 1/d *Methanogenesis growth rate* 

S1,in g/L *Inlet substr. Concentration*  S2,in mmol/L *Inlet substr. Concentration* 

Table 1. Summary of the variables in the plant model

Identification and I-Term Control Using Recurrent Neural Network Model 177

S1 S2 X1 X2

*Variable Units Name Value* 

Ez m2/d *Axial dispersion coefficient* 1 D 1/d *Dilution rate* 0.55 H m *Fixed bed length* 3.5

 *Bacteria fraction in the liquid phase* 0.5 k1 g/g *Yield coefficients* 42.14 k2 mmol/g *Yield coefficients* 250 k3 mmol/g *Yield coefficients* 134

1max 1/d *Maximum acidogenesis growth rate* 1.2 2s 1/d *Maximum methanogenesis growth rate* 0.74 K1s' g/g *Kinetic parameter* 50.5 K2s' mmol/g *Kinetic parameter* 16.6 KI2' mmol/g *Kinetic parameter* 256 QT m3/d *Recycle flow rate* 0.24 VT m3 *Volume of the recirculation tank* 0.2

S1T g/L *Concentration of Chemical Oxygen Demand in the recirculation tank*  S2T mmol/L *Concentration of Volatile Fatty Acids in the recirculation tank* 

Qin m3/d *Inlet flow rate* 0.31 VB m3 *Volume of the fixed bed* 1 Veff m3 *Effective volume tank* 0.95

SkT

plants with equal input/output dimensions, obtaining good results. The RTNN do not need the use of tap delays and has a minimum number of weights due to its Jordan canonical structure. In the present paper, this RTNN model will be used for identification, and direct control, of a digestion anaerobic DPS of wastewater treatment, (Aguilar-Garnica, 2006), modeled by PDE/ODE (Ordinary Differential Equations), and simplified using the Orthogonal Collocation Method (OCM) in four collocation points of the fixed bed and one more- for the recirculation tank. We needs to use this simplified ODE mathematical model as an input/output data generator for RTNN BP learning instead of the real plant. Furthermore the mathematical model description of the plant help us to understand the work and the meaning of all process variables of this complex biotechnological plant. Here the plant identification by means of RTNN BP learning will be changed by the RTNN Levenberg Marquardt (L-M) second order learning, (Baruch et al, 2009). This distributed nonlinear parameter plant, described by ODE, has excessive high-dimensional measurements which means that the plant output dimension is greater than the plant control input one (rectangular system), requiring to use learning by data fusion technique and special reference choice. Furthermore the used control laws are extended with an integral term, (Baruch et al.2005b; Baruch et al, 2007b), so to form an integral plus state control action, capable to speed up the reaction of the control system and to augment its resistance to noise.

#### **2. Mathematical description of the anaerobic digestion bioprocess plant**

The development of the anaerobic digestion process PDE model is based on the two-step (acidogenesis-methanization) mass-balance and bacterial kinetics involving the Monod equations of the specific growth rates (eq. 1-4). The model incorporates electrochemical equilibria in order to include the alkalinity which has to play a central role in the related monitoring and control strategy of a wastewater treatment plant. The dynamics of the species in the recirculation tank is described by ODE (eq. 7). The parameters of this model are obtained by parameter identification and validation (see Bernard et al., 2001). The biochemical nature of the processes of waste degradation is described in (Schoefs et al., 2003, and Bernard et al., 2001) and in cited bibliography. The physical meaning of all variables and constants (also its values), are summarized in Table 1. The complete analytical model of wastewater treatment anaerobic bioprocess (see Fig. 1), taken from (Schoefs et al. 2003 and Aguilar-Garnica et al., 2006), could be described by the following system of PDE:

$$\frac{\partial X\_1}{\partial t} = (\mu\_1 - \varepsilon D)X\_1, \quad \mu\_1 = \mu\_{1\max} \frac{S\_1}{K\_{S1}X\_1 + S\_1},\tag{1}$$

$$\frac{\partial X\_2}{\partial t} = \left(\mu\_2 - \varepsilon D\right) X\_{2'} \quad \mu\_2 = \mu\_{2s} \frac{S\_1}{K\_{S2} X\_2 + \frac{S\_2^2}{K\_{I2}}} \, , \tag{2}$$

$$\frac{\partial S\_1}{\partial t} = \frac{E\_z}{H^2} \frac{\partial^2 S\_1}{\partial z^2} - D \frac{\partial S\_1}{\partial t} - k\_1 \mu\_1 X\_{1'} \tag{3}$$

plants with equal input/output dimensions, obtaining good results. The RTNN do not need the use of tap delays and has a minimum number of weights due to its Jordan canonical structure. In the present paper, this RTNN model will be used for identification, and direct control, of a digestion anaerobic DPS of wastewater treatment, (Aguilar-Garnica, 2006), modeled by PDE/ODE (Ordinary Differential Equations), and simplified using the Orthogonal Collocation Method (OCM) in four collocation points of the fixed bed and one more- for the recirculation tank. We needs to use this simplified ODE mathematical model as an input/output data generator for RTNN BP learning instead of the real plant. Furthermore the mathematical model description of the plant help us to understand the work and the meaning of all process variables of this complex biotechnological plant. Here the plant identification by means of RTNN BP learning will be changed by the RTNN Levenberg Marquardt (L-M) second order learning, (Baruch et al, 2009). This distributed nonlinear parameter plant, described by ODE, has excessive high-dimensional measurements which means that the plant output dimension is greater than the plant control input one (rectangular system), requiring to use learning by data fusion technique and special reference choice. Furthermore the used control laws are extended with an integral term, (Baruch et al.2005b; Baruch et al, 2007b), so to form an integral plus state control action, capable to speed up the reaction of the control system

**2. Mathematical description of the anaerobic digestion bioprocess plant** 

The development of the anaerobic digestion process PDE model is based on the two-step (acidogenesis-methanization) mass-balance and bacterial kinetics involving the Monod equations of the specific growth rates (eq. 1-4). The model incorporates electrochemical equilibria in order to include the alkalinity which has to play a central role in the related monitoring and control strategy of a wastewater treatment plant. The dynamics of the species in the recirculation tank is described by ODE (eq. 7). The parameters of this model are obtained by parameter identification and validation (see Bernard et al., 2001). The biochemical nature of the processes of waste degradation is described in (Schoefs et al., 2003, and Bernard et al., 2001) and in cited bibliography. The physical meaning of all variables and constants (also its values), are summarized in Table 1. The complete analytical model of wastewater treatment anaerobic bioprocess (see Fig. 1), taken from (Schoefs et al. 2003 and Aguilar-Garnica et al., 2006), could be described by the following

> 1 1 1 1 1 1max

2 1

 

*X S D X <sup>t</sup> <sup>S</sup> K X*

> 2 1 11 2 2 11 1 , *S SS Ez D kX*

*t t H z*

2 2 22 2

 

*X S D X t KX S*

11 1

2

(2)

2

*I*

*K*

(3)

, , *S*

, , *<sup>s</sup> S*

(1)

2 2

and to augment its resistance to noise.

system of PDE:

Fig. 1. Block-diagram of anaerobic digestion bioreactor


Table 1. Summary of the variables in the plant model

Centralized Distributed Parameter Bioprocess

1

 

**3. Description of the RTNN topology and learning** 

where

and local input RTNN vectors.

**3.1 RTNN topology and recursive BP learning** 

topology is described in vector-matrix form as:

given in Haykin, 1999. If we define the cost function of learning as:

input, we could write the following delta rule of neuron learning as:

Identification and I-Term Control Using Recurrent Neural Network Model 179

*A A*

 

The reduced plant model (8)-(16), could be used as unknown plant model which generate input/output process data for centralized adaptive neural identification and control system design, based on the concepts, given in (Baruch et al., 2008; Baruch & Mariaca-Gaspar, 2009).

The more general BP rule for single neuron learning is the delta rule of Widrow and Hoff,

( ) (1 / 2) ( ), ( ) ( ) ( ) *k e k ek tk y k*

signal, t(k) is the neuron output target signal, w(k) is the neuron weight, x(k) is the neuron

*wk wk wk wk ekxk* ( 1) ( ) ( ), ( ) ( ) ( )

We could generalise this delta rule and applied it for learning of multilayer feedforward, recurrent or mixed neural networks if we design and draw its topology in block form. Then using the diagrammatic method (see Wan & Beaufays, 1996) we could design the adjoint NN topology. The NN topology is used to execute the forward pass of the BP learning so to compute predictions of the input signals of NN weight blocks. The adjoint NN topology is used to execute the backward pass of the BP learning so to compute predictions of the error signals of the outputs of that NN weight blocks. So having both predictions we could execute the delta learning rule layer by layer and weight by weight. In the following part we will apply this simple methodology for the two layered RTNN topology and learning given in vector matrix form where the delta rule is generalized as vector product of the local error

The block-diagrams of the RTNN topology and its adjoint, obtained by means of the diagrammatic method of (Wan & Beaufays, 1996), are given on Fig. 2, and Fig. 3. Following Fig. 2, and Fig. 3, we could derive the dynamic BP algorithm of its learning based on the RTNN topology and its adjoined using the generalized delta rule, given above. The RTNN

( ) *k* is the cost function, e(k) is the neuron output error, y(k) is the neuron output

12 1 2 ( 1) ( ) ( ), , *T T X k AX k BU k B B B U U U* (17)

2

*A A*

*K K*

2,1 2,

(13)

(14)

*i N ml N* 2, 2, , 1, 2. (16)

 

2, 2 2, 2 , , *<sup>N</sup> N i i N N N N*

 1 2 , , 1 , *<sup>l</sup> A*

 <sup>1</sup> 3 1 , , , , , 12, , *l l B*

*m l l zm*

*ml ml l lz z m ml m*

(15)

$$\frac{\partial S\_2}{\partial t} = \frac{E\_z}{H^2} \frac{\partial^2 S\_2}{\partial z^2} - D \frac{\partial S\_2}{\partial t} - k\_2 \mu\_1 X\_{1\prime} \tag{4}$$

$$S\_1(0,t) = \frac{S\_{1,in}(t) + RS\_{1T}}{R+1}, \quad S\_2(0,t) = \frac{S\_{2,in}(t) + RS\_{2T}}{R+1}, \quad R = \frac{Q\_T}{DV\_{eff}},\tag{5}$$

$$\frac{\partial S\_1}{\partial z}(1,t) = 0, \quad \frac{\partial S\_2}{\partial z}(1,t) = 0,\tag{6}$$

$$\frac{dS\_{1T}}{dt} = \frac{Q\_T}{V\_T} \left( S\_1(1, t) - S\_{1T} \right), \quad \frac{dS\_{2T}}{dt} = \frac{Q\_T}{V\_T} \left( S\_2(1, t) - S\_{2T} \right). \tag{7}$$

For practical purpose, the full PDE bioprocess model is reduced to an ordinary differential equations system using the OCM (Bialecki & Fairweather, 2001). The precision of the orthogonal collocation method of approximation of the PDE model depended on the number of measurement (collocation) points, but the approximation is always exact in that points. If the number of points is very high and the point positions are chosen inappropriately, the ODE model could loose identifiability.

Here, the ODE plant model is used as a plant data generator, illustrating the centralized neural identification and control of the DPS, so, the point number not need to be too high. Our reduced order model have only four points, (0.2H, 0.4 H, 0.6H, 0.8H), but it generated 18 measured variables as: X1 (acidogenic bacteria), X2 (methanogenic bacteria), S1 (chemical oxygen demand) and S2 (volatile fatty acids), and the following variables in the recirculation tank: S1T (chemical oxygen demand) and S2T (volatile fatty acids). So the plant input/output dimensions are M=2, L=18. The reference set points generated for all that variables keep the form but differ in amplification due to its position. The plant ODE system model, obtained by OCM is described by the following system of ODE:

$$\frac{dX\_{1,i}}{dt} = \left(\mu\_{1,i} - \varepsilon D\right)X\_{1,i'} \quad \frac{dX\_{2,i}}{dt} = \left(\mu\_{2,i} - \varepsilon D\right)X\_{2,i'} \tag{8}$$

$$\frac{dS\_{1,i}}{dt} = \frac{E\_z}{H^2} \sum\_{j=1}^{N+2} B\_{i,j} S\_{1,j} - D \sum\_{j=1}^{N+2} A\_{i,j} S\_{1,j} - k\_1 \mu\_{1,i} X\_{1,i} \tag{9}$$

$$\frac{dS\_{2,i}}{dt} = \frac{E\_z}{H^2} \sum\_{j=1}^{N+2} B\_{i,j} \mathbf{S}\_{1,j} - D \sum\_{j=1}^{N+2} A\_{i,j} \mathbf{S}\_{2,j} - k\_2 \mu\_{1,i} \mathbf{X}\_{2,i} - k\_3 \mu\_{2,i} \mathbf{X}\_{2,i} \tag{10}$$

$$\frac{dS\_{1T}}{dt} = \frac{Q\_T}{V\_T} \left( S\_{1,N+2} - S\_{1T} \right)\_V \quad \frac{dS\_{2T}}{dt} = \frac{Q\_T}{V\_T} \left( S\_{2,N+2} - S\_{2T} \right)\_V \tag{11}$$

$$S\_{k,1} = \frac{1}{R+1} S\_{k,in}(t) + \frac{R}{R+1} S\_{kT}, \quad S\_{k,N+2} = \frac{K\_1}{R+1} S\_{k,in}(t) + \frac{K\_1 R}{R+1} S\_{kT} + \sum\_{i=1}^{N+1} K\_i S\_{k,i'} \tag{12}$$

1 2 0, , 0, , , 1 1 *in T in T T*

1 2 1, 0, 1, 0, *S S t t*

 1 2 1 1 2 2 1, , 1, . *T T T T*

For practical purpose, the full PDE bioprocess model is reduced to an ordinary differential equations system using the OCM (Bialecki & Fairweather, 2001). The precision of the orthogonal collocation method of approximation of the PDE model depended on the number of measurement (collocation) points, but the approximation is always exact in that points. If the number of points is very high and the point positions are chosen

Here, the ODE plant model is used as a plant data generator, illustrating the centralized neural identification and control of the DPS, so, the point number not need to be too high. Our reduced order model have only four points, (0.2H, 0.4 H, 0.6H, 0.8H), but it generated 18 measured variables as: X1 (acidogenic bacteria), X2 (methanogenic bacteria), S1 (chemical oxygen demand) and S2 (volatile fatty acids), and the following variables in the recirculation tank: S1T (chemical oxygen demand) and S2T (volatile fatty acids). So the plant input/output dimensions are M=2, L=18. The reference set points generated for all that variables keep the form but differ in amplification due to its position. The plant ODE system model, obtained

> 1, 2, 1, 1, 2, 2, , , *i i ii ii*

2 2

*dS <sup>E</sup> BS D AS k X*

*dS <sup>E</sup> BS D AS k X k X*

*N N*

*j j*

1 1

*T T dS Q dS Q SS SS*

*RR RR*

*D X D X*

2 , 1, , 1, 1 1, 1,

2 , 1, , 2, 2 1, 2, 3 2, 2,

*<sup>i</sup> <sup>z</sup> <sup>i</sup> j j <sup>i</sup> j j i i*

*<sup>i</sup> <sup>z</sup> <sup>i</sup> j j <sup>i</sup> j j ii ii*

 1 2 1, 2 1 2, 2 2 , , *T T T T N T N T*

,1 , , 2 , ,

*k k in kT k N k in kT i k i*

*<sup>R</sup> K KR S S t S S S t S KS*

<sup>1</sup> , , 11 11

*dt V dt V* (11)

1 1

(12)

(10)

 

(9)

(8)

,

1

*N*

*i*

1

,

 

*dX dX*

 

*dt dt*

2 2

*N N*

*j j*

1 1

*R R DV*

*S t RS S t RS <sup>Q</sup> S t S t <sup>R</sup>*

*T T*

*dt V dt V* (7)

(4)

(6)

*eff*

(5)

2 2 22 2 2 21 1 , *S SS Ez D kX*

*t t H z*

*z z*

*T T dS Q dS Q S tS S tS*

inappropriately, the ODE model could loose identifiability.

by OCM is described by the following system of ODE:

1,

2,

*dt H*

*dt H*

1, <sup>1</sup> 2, <sup>2</sup>

$$K\_1 = \frac{A\_{N+2,1}}{A\_{N+2,N+2}} \quad K\_i = \frac{A\_{N+2,i}}{A\_{N+2,N+2}} \tag{13}$$

$$A = \Lambda \phi^{-1}, \quad \Lambda = \left[ \left. \phi\_{m,l} \right\vert \right] = \left( l - 1 \right) z\_m^{l-2} \tag{14}$$

$$B = \Gamma \phi^{-1}, \quad \Gamma = \begin{bmatrix} \tau\_{m,l} \\ \end{bmatrix}, \quad \tau\_{m,l} = \left(l - 1\right)\left(l - 2\right)z\_{m}^{l-3}, \quad \phi\_{m,l} = z\_{m}^{l-1}, \tag{15}$$

$$\mathbf{i} = \mathbf{2}\_r \dots \mathbf{N} + \mathbf{2}\_r \quad m, l = \mathbf{1}\_r \dots \mathbf{N} + \mathbf{2}. \tag{16}$$

The reduced plant model (8)-(16), could be used as unknown plant model which generate input/output process data for centralized adaptive neural identification and control system design, based on the concepts, given in (Baruch et al., 2008; Baruch & Mariaca-Gaspar, 2009).
