February 11, 2010 9:29 S0129065710002267
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
International Journal of Neural Systems, Vol. 20, No. 1 (2010) 75–86 c World Scientific Publishing Company DOI: 10.1142/S0129065710002267
A NEW NEURAL OBSERVER FOR AN ANAEROBIC BIOREACTOR R. BELMONTE-IZQUIERDO Department of Electrical Engineering and Computer Sciences, Cinvestav del IPN, Unidad Guadalajara, Av. Cient´ıfica 1145, Col El Baj´ıo Zapopan, Jalisco 45015, Mexico
[email protected] S. CARLOS-HERNANDEZ Grupo de Investigaci´ on en Recursas Naturales y Energ´eticos, Cinvestav del IPN, Unidad Saltillo, Carr.Saltillo-Mty Km 13 Ramos Arizpe,Coahuila 25900, Mexico
[email protected] www.cinvestav.edu.mx/saltillo E. N. SANCHEZ Department of Electrical Engineering and Computer Sciences, Cinvestav del IPN, Unidad Guadalajara, Av. Cient´ıfica 1145, Col El Baj´ıo Zapopan, Jalisco 45015, Mexico
[email protected] www.gdl.cinvestav.mx In this paper, a recurrent high order neural observer (RHONO) for anaerobic processes is proposed. The main objective is to estimate variables of methanogenesis: biomass, substrate and inorganic carbon in a completely stirred tank reactor (CSTR). The recurrent high order neural network (RHONN) structure is based on the hyperbolic tangent as activation function. The learning algorithm is based on an extended Kalman filter (EKF). The applicability of the proposed scheme is illustrated via simulation. A validation using real data from a lab scale process is included. Thus, this observer can be successfully implemented for control purposes. Keywords: Recurrent high order neural observer; anaerobic digestion; extended Kalman filter.
1. Introduction
as pH, temperature, overloads, etc. In addition, some variables and parameters are hard to measure due to economical or technical constraints. Then, estimation and control strategies are required in order to guarantee adequate performance. In biological processes there exist hardly measurable or immeasurable variables which are necessary for process control.2 Furthermore, the last two decades have seen an increasing interest to improve the operation of bioprocesses by applying advanced control schemes.3–5 Hence, observer design is a major problem to be solved in addition to adequate sensors selection. In the literature, different observers
The rapid increase of raw wastewater due to domestic, industrial and agricultural water use requires careful consideration of all society sectors. One of the more adequate methods for wastewater treatment is anaerobic digestion. It provides a wide variety of advantages including environmental benefits, as well as economic ones. Anaerobic processes are very attractive because of their waste treatment properties and their capacity for generating methane from waste materials, which can be used for electrical energy generation.1 However, this bioprocess is sensitive to variations on the operating conditions, such
75
February 11, 2010 9:29 S0129065710002267
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
76
R. Belmonte-Izquierdo, S. Carlos-Hernandez & E. N. Sanchez
have been proposed. The asymptotical observer, proposed in Ref. 6, uses a non-linear model; it is robust in presence of parameter uncertainties, but the convergence rate depends on operating conditions. In Ref. 7, the authors propose closed-loop observers in order to improve the asymptotical one; but tuning and implementation could be difficult. The interval observer proposed in Ref. 8 is a good alternative against uncertainties; however, the estimation convergence rate cannot be tuned; also an overestimation effect on the estimated intervals can be induced. The observer developed in Ref. 9 is devoted to estimate unmeasured inputs and also unknown state variables; it is designed on the basis of a tangent linearization, which could limit the operation range. Last years, fuzzy algorithms have been used to design observers and controllers for bioprocesses,10–13 since this approach allows the empirical knowledge to be incorporated to the control structures; in addition, fuzzy controllers and observers are easy to design and to implement. A Takagi-Sugeno observer is proposed in Ref. 14; it is easy to design and tune; however, it is sensitive to fast changes on input substrates and the model structure must be known since local observers are designed for linearized model around different operating points. Finally, a recurrent neural networks observer for anaerobic processes is proposed in Ref. 15; however, the kind of activation function used, do not allow a fast dynamics learning; also parameters variation influence on its performance. As can be seen, complete knowledge of the system model is usually assumed in order to design nonlinear state estimators; nevertheless this is not always possible. Moreover, special nonlinear transformations are proposed, which are not often robust in presence of uncertainties. An interesting approach for avoiding the associated problem of model-based state observers is the neural network observer. Neural observers require feasible outputs and inputs measures and a training algorithm in order to learn the process dynamics, and the model knowledge is not strictly necessary.15–19 In this paper, a new neural observer is proposed in order to estimate biomass, substrate and inorganic carbon in an anaerobic process for paper mills effluents treatment. This process is developed in a CSTR with biomass filter. The observer structure is based on hyperbolic tangent as activation functions and is trained using an EKF algorithm. The main
advantage of this observer is a good performance and a low design and tune complexity. Also, this observer requires only feasible measures such as pH, dilution rate and biogas production; besides, the knowledge of the model structure is not necessary. Next section describes the considered anaerobic digestion process. Succeeding section explains the neural networks, deepening in the recurrent neural networks and the extended Kalman filter as a training method. In section four, an improved neural observer for anaerobic processes is presented and tuning guidelines are proposed. After that, the proposed approach is tested via simulations on a model experimentally validated and a discussion of the results is presented in section five. Finally conclusions are stated in section six.
2.
Anaerobic Digestion Process
Anaerobic digestion (AD) is a biological process by which organic matter (substrate) is degraded by anaerobic bacteria (biomass), in absence of oxygen. Such degradation produces biogas, consisting primarily of methane (CH4 ) and carbon dioxide (CO2 ), and stable organic residues.
2.1. Process description AD is a complex and sequential process which occurs in four basic stages: • Hydrolysis. Initially, hydrolytic bacteria, converts complex organic materials into simpler organic ones. • Acidogenesis. During this stage, soluble monomers are transformed into organic acids, alcohols and volatile fatty acids (VFA) by acidogenic bacteria. • Acetogenesis. In this third stage, acetogenic bacteria convert VFA into acetic acid, CO2 and hydrogen. • Methanogenesis. Finally, there are two ways in order to synthesize methane; the first one by acid acetic cleavage, which produces methane and carbon dioxide; and the second one by CO2 reduction with hydrogen, which generates CH4 and water. The acetate reaction is the primary producer of CH4 because of the limited amount of hydrogen available.20
February 11, 2010 9:29 S0129065710002267
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
A New Neural Observer for an Anaerobic Bioreactor
Each stage has a specific dynamics. Hydrolysis, acidogenesis and acetogenesis are fast stages in comparison with methanogenesis, which is the slowest one; it imposes the dynamics of the process and is considered as the limiting stage. Then, special attention is focused on methanogenesis.
77
solid support, e.g. zeolite, other minerals or biologic materials. As it is shown, the substrate Sin is fed to the reactor with a flow rate Qin (L h−1 ); hence, the dilution rate Din = Qin /V can be determined, where V (L) is the reactor volume. Finally, the treated water goes out at the same flow rate as the input, in order to keep a constant volume, that is: Qout = Qin .
2.1.1. Operating conditions A variety of factors affect the rate of digestion and biogas production. A detailed comparative summary of research on the inhibition of anaerobic processes is presented in Ref. 21. Some of the most important factors are discussed briefly hereby. • Temperature. Anaerobic bacteria communities can endure temperatures ranging from below freezing to above 57.2◦ C, however they thrive best at about 36.7◦C (mesophilic conditions). pH. The substrate pH is an important parameter for the adequate growth of bacteria and then for the wastes transformation. For methanogenesis, the optimal range of substrate pH is between 6.6 and 7. Bicarbonate ions and VFA concentration have an influence on the pH. A pH value higher than 8 causes an inhibition of the bacteria activity, while a value under 5 for a long time causes irreversible damaged and death of the bacteria stopping the process due to acidification.22 Retention time. In a mesophilic system, ranges from 15 to 30 days are required to waste treatment20 in order to achieve the complete degradation of the organic materials. Figure 1 shows the case of AD in a CSTR with biomass filter, which is used to improve the substrate treatment.23 In practice, the biomass is fixed in a
2.1.2. Mathematical model A functional diagram proposed first in Ref. 24 and then modified in Ref. 25 is shown in Fig. 2. Biomass is classified as: X1 , corresponding to hydrolytic, acidogenic and acetogenic bacteria and X2 , corresponding to methanogenic bacteria. On the other hand, the organic load is classified in S1 , the components equivalent glucose, which model complex molecules andS2 , the components equivalent acetic acid, which represent the molecules directly transformed in acetic acid. This classification allows the process to be represented by a fast stage, which involves hydrolysis, acidogenesis and acetogenesis and a slow stage, which corresponds mainly to methanogenesis. Thus, a mathematical model of the process is deduced as follows. On one side, the biological phenomena are modeled by ordinary differential equations (1), which represent the dynamical part of the process. dX1 dt dS1 dt dX2 dt dS2 dt
= (µ1 − kd1 )X1 , = −R6 µ1 X1 + Din (S1in − S1 ), = (µ2 − kd2 )X2 , = −R3 µ2 X2 + R4 µ1 X1 + Din (S2in − S2 ), Output Gaseous CH4 phase CO2
Biomass
CH4 Qin
Product
CO2
Substrate
Qout = Qin
Sin
Sout S1,S2 X1,X2
Biomass Filter(zeolite)
Fig. 1. filter.
S1
R6µ1
Fast stages
Liquid phase
X1
R4µ1
R1 Slow stage R2µ2 R1µ2 IC X2 S2
R5µ1 S-
λR R3
Alkalinity
H+
HS
B
H+
CO2d
Acid/base Equilibrium
Completely stirred tank reactor with biomass Fig. 2.
Functional diagram of the anaerobic digestion.
February 11, 2010 9:29 S0129065710002267
78
R. Belmonte-Izquierdo, S. Carlos-Hernandez & E. N. Sanchez
dIC = R2 R3 µ2 X2 + R5 µ1 X1 − λR1 R3 µ2 X2 dt Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
+ Din (ICin − IC), dZ = 0, dt (1) where µ1 is the growth rate (Haldane type) of X1 (h−1 ), µ2 the growth rate (Haldane type) of X2 (h−1 ), kd1 the death rate of X1 (mol L−1 ), kd2 the death rate of X2 (mol L−1 ), Din the dilution rate (h−1 ), S1in the fast degradable substrate input (mol L−1 ), S2in the slow degradable substrate input (mol L−1 ), IC inorganic carbon (mol L−1 ), Z the total of cations (mol L−1 ), ICin the inorganic carbon input (mol L−1 ), λ is a coefficient considering law of partial pressure for the dissolved CO2 and R1 , . . . , R6 are the yield coefficients. On the other side, the physical-chemical phenomena (acid-base equilibria and material conservation) are modeled by algebraic equations (2). HS + S − − S2 = 0, H + S − − Ka HS = 0, H + B − Kb CO2d = 0,
(2)
B + CO2d − IC = 0, B + S − − Z = 0, where HS is non ionized acetic acid (mol L−1 ), S − ionized acetic acid (mol L−1 ), H + ionized hydrogen (mol L−1 ), B measured bicarbonate (mol L−1 ), CO2d dissolved carbon dioxide (mol L−1 ), Ka is an acid-base equilibrium constant, Kb is an equilibrium constant between B and CO2d . Finally, the gaseous phase (CH4 and CO2 ) is considered as the process output: YCH4 = R1 R2 µ2 X2 .
(3)
YCO2 = λR2 R3 µ2 X2 .
(4)
2.2. Problem statement As stated before, methanogenesis is considered the limiting stage because is the slowest and the most important for process stability.25 Methanogenesis is very sensitive to variations on substrate concentration and the increase of biomass can be stopped by an excessive substrate production in the previous stages.2 Depending on the amplitude and duration
of these variations on substrate concentration, the environment can be acidified so much that biomass growth is inhibited; hence, the substrate degradation and the CH4 production can be blocked. Biomass growth, substrate degradation and CH4 production, are good indicators of biological activity inside the reactor. These variables can be used for monitoring the process and to design control strategies. Some biogas sensors have been developed in order to measure CH4 .26 However, substrate and biomass measures are more restrictive. The existing biomass sensors are quite expensive, are designed from biological viewpoint and then, they are not reliable for control purposes. Furthermore, substrate measure is done off-line by chemical analysis, which requires 3 h. Then, state observers are an interesting alternative in order to deal with this situation. 3.
Neural Networks
An artificial neural network (NN) is a massively parallel distributed processor, inspired from biological neural networks, which can store experimental knowledge and makes it available for use.27 An artificial NN consists of a finite number of neurons (structural element), which are interconnected to each other. It has some similarities with the brain, such as: knowledge is acquired through a learning process, and interneuron connectivity named as synaptic weights are used to store this knowledge.28 Recurrent neural networks are different from a feedforward neural structure because the recurrent ones have at least one feedback loop. This recurrent structure has a large impact on the learning capability of the network and on its performance.27,29,30 This structure also offers a better suited tool to model and control nonlinear systems.16 Using neural networks, control algorithms can be developed to be robust to uncertainties and modeling errors.18,31–33 RHONN are a generalization of the first-order Hopfield networks; they are proposed in Ref. 34. RHONN have characteristics such as17,35 : • • • •
Efficient modeling of complex dynamic systems Easy implementation Relatively simple structure Be able to adjust parameters on-line.
Likewise, discrete RHONN have similar characteristics as the continuous ones.
February 11, 2010 9:29 S0129065710002267
A New Neural Observer for an Anaerobic Bioreactor
3.1. Discrete-time RHONN
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
Let consider a MIMO nonlinear system: xi (k + 1) = F (x(k), u(k)),
(5)
y(k) = Cx(k),
where x ∈ Rn , represents state variables, u ∈ Rm is input vector, F ∈ Rn × Rm → Rn is a nonlinear function, y ∈ Rm is the output vector and k is the kth sample. Let consider also the following discrete-time RHONN: x(k), u(k)), x ˆi (k + 1) = wiT zi (ˆ
i = 1, . . . , n,
(6)
where xˆi (i = 1, 2, . . . , n)is the state of the ith neuron, n the state dimension; wi is the respective online adapted weight vector, u = [u1 , . . . , um ]T is the x(k), u(k)) external input vector to the NN and zi (ˆ is given by Eq. (7), with Li the respective number of higher-order connections, {I1 , I2 . . . , ILi } a collection of non-ordered subsets of {1, 2, . . . , n + m}, dij non-negative integers, and ρi defined as in Eq. (8). di (1) ρ j j∈I ij 1 dij (2) zi1 ρi zi2 j∈I2 j (7) x(k), u(k)) = . = zi (ˆ , .. .. . ziLi di (Li ) j ρij j∈ILi
yi = [ρi1
...
yi = [S(ˆ x1 )
ρin ...
ρin+1
S(ˆ xn )
ρin+m ]T
... u1
...
um ]T .
(8)
In (8), S(•) can be chosen from different alternatives depending on the kind of application. For instance, it can be defined as threshold, piecewise-linear or sigmoid function (logistic function, hyperbolic tangent function). The system (5), can be approximated by the next discrete-time RHONN parallel representation17,36 : χi (k + 1) = wi∗T zi (χ(k), u(k))+ ∈zi ,
i = 1, . . . , n,
y(k) = Cχ (9) where χi is the ith component of the NN state vector χ, ∈zi is a bounded approximation error, which can be reduced by increasing the number of adjustable
79
weights.34 Assume that there exists ideal weight vector wi∗ such that ∈Zi can be minimized on a compact set ΩZi ⊂ RLi . The ideal vector wi∗ is an artificial quantity required for analytical purpose.34 It is assumed that this vector exists and is constant but unknown. 3.2. Training methods The best well-known training approach for recurrent NN is the back propagation through time algorithm.37 However, it is a first order gradient descent method and hence its learning speed could be very slow.38 Then, training methods are an active research topic.39–41 EKF based algorithms have been introduced to train NN improving the learning convergence.38,42 The Kalman filter (KF) is a set of mathematical equations, which provides an efficient computational solution to estimate the state of a linear dynamic system with additive state and output white noises.43 For KF-based NN training, the network weights become the states to be estimated. In this case, the error between the NN output and the measured plant output can be considered as additive white noise. If, however, the model is nonlinear, the use of KF can be extended through a linearization procedure; the resulting filter is the well-known EKF. Since the NN mapping is nonlinear, an EKF-type is required. The training goal is to find the optimal weight values, which minimize the predictions error. In this work, an EKF-based training algorithm 28,35,36 described by (10) is used. wi (k + 1) = wi (k) + ηi Ki (k)ei (k), Ki (k) = Pi (k)Hi (k)Mi (k), Pi (k + 1) = Pi (k) − Ki (k)HiT (k)Pi (k) + Qi (k), i = 1, . . . , n, (10) with: Mi (k) = [Ri (k) + HiT (k)Pi (k)Hi (k)]−1 , ei (k) = y(k) − y(k),
(11)
where ei (k) ∈ Rp is the observation error, Pi (k) ∈ RLi ×Li is the prediction error covariance matrix at step k, wi (k) ∈ RLi is the weight (state) vector, Li is the respective number of NN weights, y ∈ Rp , is the plant output, yˆ ∈ Rp is the NN output, ηi is the learning rate, Ki (k) ∈ RLi ×p is the Kalman gain
February 11, 2010 9:29 S0129065710002267
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
80
R. Belmonte-Izquierdo, S. Carlos-Hernandez & E. N. Sanchez
matrix, Qi (k) ∈ RLi ×Li is the NN weight estimation noise covariance matrix, Ri (k) ∈ Rp×p is the error noise covariance, and; Hi (k) ∈ RLi ×p is the matrix for which each entry (Hij ) is the derivative of the ith neural output with respect to ijth NN weight, (wij ), given as follows:
∂ y(k) Hij (k) = ∂wij (k)
T ,
(12)
where i = 1, . . . , n and j = 1, . . . , Li . Usually Pi , Qi and Ri are initialized as diagonal matrices, with entries Pi (0), Qi (0) and Ri (0) respectively. It is important to remark that Hi (k), Ki (k) and Pi (k) for the EKF are bounded; for a detailed explanation of this fact see Ref. 43. Now let y(k) denote the NN state space representation: y(k) = φ(χ(k), u(k)),
3.3. Neural observer design It is considered the following discrete-time nonlinear system, which is assumed to be observable: x(k + 1) = F (x(k), u(k)) + d(k),
(17)
y(k) = h(x(k)),
where x ∈ Rn is the state vector of the system, u ∈ Rm is the input vector, y ∈ Rp is the output vector, h(x(k)) is a nonlinear function of the system states, d(k) ∈ Rn is a disturbance vector and F (•) is a smooth vector field and Fi (•) its entries; hence (17) can be also expressed component wise as: x(k) = [x1 (k) · · · xi (k) · · · xn (k)]T , d(k) = [d1 (k) · · · di (k) · · · dn (k)]T , xi (k + 1) = Fi (x(k), u(k)) + di (k),
i = 1, . . . , n,
y(k) = h(x(k)).
(13)
(18)
where φ is a function of the NN states, and in a general case, a function of the external input vector to the NN. Applying the chain rule, Hij (k) must be calculated as:
Comment 2. The system is discretized because the NN observer, as a component of a control system, is intended to be implemented in real time. Hence, a discrete time representation is more adequate. For system (18), a RHONO is proposed in Ref. 36, with the following structure:
∂ y (k) ∂ y(k) ∂χ(k) = . ∂w(k) ∂χ(k) ∂w(k)
(14)
i (k) · · · x n (k)]T , x (k) = [ x1 (k) · · · x
Rewriting (9) as (15); in such form as to be linearized with a routine of recurrent derivates,37,44 giving as a result the dynamical system in Eq. (16). χi (k + 1) = T (χ(k), u(k), w(k)).
(15)
Consequently: ∂T (χ(k), u(k), w(k)) ∂χ(k + 1) = ∂w(k) ∂χ(k) ∂T (χ(k), u(k), w(k)) + , ∂w(k)
x(k), u(k)) + gi e(k), x i (k + 1) = wiT zi ( y(k) = h( x(k)),
(19)
i = 1, . . . , n,
with gi ∈ Rp , zi and ui as in Eq. (7); the weight vectors are updated on-line with a decoupled EKF described by (10). The output error is defined by: e(k) = y(k) − y(k).
(16)
where T (•, •, •) is a nonlinear function of χ(k), u(k) and w(k); and determines the state transition of the neuron. Because it is assumed that the initial state of the network has no functional dependence on the weights,37 then Hij (0) = 0. Comment 1. It is worth to notice that, in this paper the EKF is used only for the NN weight learning. Due to the fact that the NN is nonlinear mapping an EKF is required.
(20)
Comment 3. For more details on the design and the stability analysis of this RHONO please see Ref. 36. In Fig. 3, the proposed observer scheme is displayed. d (k ) u (k ) F (•, •)
+ +
x ( k + 1)
z −1
x (k )
y (k )
C + -
Unknown system
RHONO
u (k )
Fig. 3.
e( k )
Observation scheme.
y (k )
February 11, 2010 9:29 S0129065710002267
A New Neural Observer for an Anaerobic Bioreactor
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
4. Neural Observer for an Anaerobic Process A discrete-time neural observer is proposed to estimate the variables of methanogenesis stage: biomass, substrate and inorganic carbon. The observability property of AD is analyzed in a previous work.2 It is concluded that substrates (S1 and S2 ), biomasses (X1 and X2 ) and inorganic carbon (IC ) are observable states. 4.1. Observer development ˆ 2 (k)) + w12 S 2 (X ˆ 2 (k)) ˆ 2 (k + 1) = w11 S(X X
81
Comment 4. As discussed in Ref. 44, for NN learning Pi , Qi and Ri can be selected and initialized as diagonals. The covariance matrices also verify: Pi (0) > Ri (0) > Qi (0).
(25)
This condition implies that a priori knowledge is not required to initialize the vector weights.44 In fact, higher entries in Pi (0) correspond to a higher uncertainty in the a priori knowledge. It is advisable to set Pi (0) between 100–1000 and so on for the other covariance matrices satisfying (25). Hence, the covariance matrices for the EKF are initialized as diagonals, with nonzero elements:
ˆ + w13 S(I C(k)) ˆ2 (k))Din (k) + g1 e(k), + w14 S 2 (X
P1 (0) = P2 (0) = P3 (0) = 1000,
Sˆ2 (k + 1) = w21 S(Sˆ2 (k)) + w22 S 2 (Sˆ2 (k)) ˆ + w23 S(I C(k))
R1 (0) = R2 (0) = 10,
R3 (0) = 1,
Q1 (0) = Q2 (0) = 1,
Q3 (0) = 0.1.
(26)
with α = β = 1 is used as the activation function.
An arbitrary scaling can be applied to Pi (0), Ri (0) and Qi (0) without altering the evolution of the weight vector. As aforementioned, since the NN outputs do not depend directly on the weight vector, the matrix H is initialized as H(0) = 0. The weights values are initialized randomly with zero mean and normal distribution. The learning rate (η) determines the magnitude of the correction term applied to each neuron weight; it usually requires small values to achieve good training performance, to this end, it is bounded as 0 < η < 1; moreover, η is far reaching on the convergence. Thus, if η is small then the transient estimated state is over-damped; if η is large then the transient estimated state is underdamped; finally if η is larger than a critical value then the estimated state is unstable. Therefore, it is better to set η to a small value and edge it upward if necessary. More details are discussed in Ref. 44. This neural observer has a structure similar to one proposed by Luenberger for linear systems.45 For this reason, we named it as a Luenberger NN Observer. The gain (g) is set by trial and error; unfortunately there is a shortage of clear scientific rationale to define it. However, it is bounded to 0 < g < 0.1 for a good performance on the basis of training experience.
4.2. Tuning guidelines
5.
2
(21) + w24 S (Sˆ2 (k))Din (k) + w25 S 2 (Sˆ2 (k))S2in (k) + g2 e(k), ˆ ˆ ˆ + 1) = w31 S(I C(k)) + w32 S 2 (I C(k)) I C(k ˆ 2 (k)) + w33 S(X ˆ + w34 S 2 (I C(k))D in (k) 2 ˆ + w35 S (I C(k))ICin (k) + g3 e(k), First, system (1)–(4) is transformed to discrete time obtaining a form similar to (17). After, a RHONO is proposed in order to estimate X2 , S2 and IC with the structure shown in equations (21). The outputs are given as: ˆ2, YˆCH4 = R1 R2 µ ˆ2 X
(22)
ˆ 2 R3 µ ˆ2. YˆCO2 = λR ˆ2 X
(23)
As it is displayed in (21), the proposed observer has a parallel configuration. Besides, the weight vectors are updated on-line with an EKF (10). The hyperbolic tangent: S(x) = α tanh(βx),
(24)
Since EKF training algorithms require the setting of a number of parameters, the next procedure is developed in order to tune the proposed observer.
Results and Discussion
5.1. Validation via simulation The process model and the observer are implemented using Matlab/SimulinkTM . The observer is
February 11, 2010 9:29 S0129065710002267
R. Belmonte-Izquierdo, S. Carlos-Hernandez & E. N. Sanchez
initialized at random values to verify the estimation convergence. In order to test the observer sensitivity to change on inputs, a disturbance on the input substrate (30% S2in increase) is incepted at t = 200 h and eliminated at t = 500 h. The on-line measurement of pH, YCH4 , YCO2 and the process inputs are supposed. The scheme proposed in this paper is compared with that one described in Ref. 15, as shown in Fig. 4. Even though the observer is initialized randomly, the convergence in both schemes is evident in the beginning of the simulation. Other results were obtained with different initialization, not presented here for brevity, they exhibit a different transient initial phase but lead to a similar final state; hence, the initial conditions do not influence the observer performance. Besides, the observer developed in Ref. 15 is able to do a good qualitative estimation of X2 , but it is unable to estimate adequately IC and S2 . Meanwhile, excellent estimations of X2 and S2 are obtained with the RHONO proposed in this paper; IC is estimated with a transient error which is eliminated in the steady state. This error could be due to the observer structure, it is possible that the NN is not able to learn all the nonlinear dynamics related to IC; this is not a relevant problem since IC could be measurable.
It is important to remark that concerning the structure, the proposed scheme in this paper is simpler; also, the activation function is defined as a hyperbolic tangent, whereas in Ref. 15 is defined as a logistic function; hyperbolic tangent derivative is easier to obtain. On the other hand, observer tolerance to change on system parameters is tested; the parameters variations take place on the biomasses growth rates. A 30% positive variation in µ2 max , a 30% negative variation in µ1 max and a disturbance of 100% in input S2in are considered. The performance of the proposed RHONO is illustrated in Fig. 5. After the convergence, IC is estimated with a negligible error in transient state. On the other side, X2 and S2 are well estimated during all of the simulation. Thus, the robustness of the proposed RHONO to parameters variation is verified. Moreover, a disturbance in the input S2in and noise on the outputs are considered in Fig. 6. This noise represents the uncertainties or error of measurement in CH4 and CO2 . It is important to mention that noise is only used in order to test the robustness of the proposed observer. As can be seen, under these conditions, there exist an error in IC estimation; however, X2 and S2 are well estimated during the whole simulation.
0.12
10.5
x 10
0.11
X2 (AU)
S2in (mol L-1)
X2 System
0.1
X2 Estimated
9
X Estimated in Ref. 15 2
7.5
0.09 0
500
1000
6 0
1500
500
Time (h)
1000
1500
Time (h)
0.208
0.021
0.198
0.188
0.178 0
IC System IC Estimated IC Estimated in Ref. 15 500
1000
Time (h)
Fig. 4.
1500
S2 (mol L-1)
S2 System
IC (mol L-1)
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
82
S2 Estimated
0.016
S2 Estimated in Ref. 15
0.011
0.006 0
500
1000
Time (h)
RHONO comparison considering a disturbance in S2in .
1500
February 11, 2010 9:29 S0129065710002267
A New Neural Observer for an Anaerobic Bioreactor
0.15
10.8
x 10
83
-3
0.09
500
1000
X2 Estimated
9.2
X2 (AU)
S2in (mol L-1)
0.12
0.06 0
7.6
6 0
1500
500
Time (h)
1000
1500
Time (h)
0.0828
5.5
x 10
-3
S System
S2 (mol L-1)
IC (mol L-1)
2
0.0812
0.0796
S Estimated 2
4
2.5
IC System IC Estimated 0.078 0
500
1000
1 0
1500
500
Time (h)
Fig. 5.
1000
1500
Time (h)
RHONO performance considering variation in µ1max , µ2max and a disturbance in S2in .
11
0.0335
x 10
-3
0.029
X2 (AU)
YCH4 (mol h-1)
X2 System
0.0235
0.018 0
500
1000
7
5 0
1500
X2 Estimated
9
500
Time (h)
1000
1500
Time (h)
0.086
0.012
S2 (mol L-1)
S2 System
IC (mol L-1)
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
X2 System
0.081
0.076
S2 Estimated
0.008
0.004
IC System IC Estimated 0.071 0
500
1000
Time (h)
Fig. 6.
1500
0 0
500
1000
1500
Time (h)
Performance considering noise on the measures.
5.2. Experimental validation Finally, an experimental validation is done in order to verify the proposed RHONO performance. Real data are obtained from a bioreactor of 5L used to treat substrates similar to paper mills effluents, see Ref. 14 for more details. The experiment is performed as follows: a continuous configuration is developed
considering an input flow rate Qin = 0.4L h−1 and a substrate at 5g COD L−1 in order to reach the steady state. Afterwards, a second continuous configuration stage with an input flow rate Qin = 0.4L h−1 at 7.5g COD L−1 is performed to simulate a step on S2in . Variables X2 , S2 and IC are calculated using the model (1)–(4) and the on-line pH measures. The
February 11, 2010 9:29 S0129065710002267
6.8 6.6 6.4 6.2 0
193
386
Measured biogas (molh-1)
Measured pH
R. Belmonte-Izquierdo, S. Carlos-Hernandez & E. N. Sanchez 2.7 2 1.3 0.6 0
193
Time (h)
386
Time (h) -3
10
X2 (AU)
S2in (molL-1)
0.083 0.072 0.061 0.05 0
193
x 10
8
4 0
386
193
386
0.08
S2 (molL-1)
0.015 IC Calculated IC Estimated
0.055
S2 Calculated 0.01
S2 Estimated
0.005
0
193
Time (h)
Fig. 7.
386
0 0
193
386
Time (h)
Experimental validation of the proposed RHONO.
result of this calculation is compared with the values obtained from the observer. Such comparison is shown in Fig. 7. The sample time for the discretization of the process model is T = 1 h. As can be seen, X2 is estimated with a negligible error during all the simulation; when the step on the input substrate is incepted an error in the estimated X2 can be remarked. This error could be induced by the abrupt change in the conditions of the system; the estimation converges to the state anyway. Since pH measure is directly related to IC, this variable is estimated with a negligible error during all the simulation. In contrast, S2 estimation presents a transient error, which is eliminated in steady state. In general, these estimation errors could be due to the observer structure, which is a simple one. Despite the errors in transient state, the RHONO is able to estimate adequately the three variables of methanogenesis stage. Thus, it can be noticed that the neural observer is a good alternative to estimate those important states of the considered anaerobic process. 6.
X2 Estimated
Time (h)
0.105
0.03
X2 Calculated
6
Time (h) IC (molL-1)
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
84
Conclusions
A RHONO based on RHONN, which is trained with an EFK and structured by hyperbolic tangent functions, is proposed in this paper. The objective is to estimate the biomass concentration, substrate
degradation and inorganic carbon production in an AD process considering a CSTR with biomass filter, which is operated in continuous mode. The training of the RHONO is performed on-line. The variables are estimated from CH4 and CO2 flow rates, which are commonly measured in this process. Also, pH and system inputs measurements are assumed. Simulation results illustrate the effectiveness of model adaptation to system disturbance and robustness of the proposed RHONO. Besides, experimental validation of the proposed RHONO illustrates the applicability of this scheme. Since one of the limiting factors for the implementation of the control strategies is the lack of on-line sensors, these neural observer outcomes are an interesting alternative to be applied to continuous bioreactors, Research will be proceeded in order to evaluate the application of the proposed observer in a slaughterhouse wastewater treatment process. For future works, in order to improve the RHONO performance, a dynamical learning rate depending on the system operating conditions can be proposed in order to improve the NN learning capability. Furthermore, the observer scheme can be complemented by adding more terms on the proposed structure; this situation aims the observer to tolerate a larger parameters variation.
February 11, 2010 9:29 S0129065710002267
A New Neural Observer for an Anaerobic Bioreactor
Acknowledgements
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
This work was supported by CONACyT Mexico project 57801Y. References 1. K. F. Roos, Profitable alternatives for regulatory impacts on livestock waste management, in National Livestock, Poultry and Aquacultural Waste Management National Workshop (Kansas, MI, USDA Extension Service, 1991). 2. S. Carlos-Hern´ andez et al., Modeling and analysis of the anaerobic digestion process, in Proceedings of IFAC Symposium on Structures Systems and Control (Oaxaca, Mexico, 2004). 3. K. Yamuna Rani and V.S. Ramachandra Rao, Control of fermenters, Bioprocess Engineering, SpringerVerlag 21 (1999) 77–78. 4. J. B. Van Lier et al., New perspectives in anaerobic digestion, Water Science and Technology, IWA Publishing 43(1) (2001) 1–18. ´ 5. V. Alcaraz-Gonz´ alez and V. Gonz´ alez-Alvarez, Robust nonlinear observers for Bioprocesses: Application to wastewater treatment. Book Chapter in Selected Topics in Dynamics and Control of Chemical and Biological Processes. Springer Berlin, Heidelberg (2007), pp. 119–164. 6. G. Bastin and D. Dochain, On-Line Estimation and Adaptive Control of Bioreactors (Elsevier Science Publications, Amsterdam, 1990). 7. O. Bernard and J. L. Gouz´e, Closed loop observers bundle for uncertain biotechnological models, in Journal of Process Control 4(7) (2003) 765–774. 8. V. Alcaraz-Gonzalez et al., Software sensors for highly uncertain WWTPs: A new approach based on interval observers, in Water Research 36(10) (2004) 2515–2524. 9. D. Theilliol et al., On-line estimation of unmeasured inputs for anaerobic wastewater treatment processes, in Control Engineering Practice 11(9) (2003)1007– 1019. 10. A. Muller et al., Fuzzy control of disturbances in a wastewater treatment process, in Water Research, Elsevier Science Ltd. 31(12) (1997) 3157–3167. 11. E. Giraldo-Gomez and M. Duque, Automatic startup of a high rate anaerobic reactor using a fuzzy logic control system, in Fifth Latin-American WorkshopSeminar in Wastewater Anaerobic Treatment (Vi˜ na del Mar, Chile, 1998). 12. O. Bernard et al., Advanced monitoring and control of anaerobic wastewater treatment plants: Software sensors and controllers for an anaerobic digester, in Water Science and Technology, IWA Publishing 43(7) (2001) 175–182. 13. A. Pu˜ nal et al., Advanced monitoring and control of anaerobic wastewater treatment plants: Diagnosis and supervision by a fuzzy-based expert system,
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26. 27.
28.
29.
85
in Water Science and Technology, IWA Publishing 43(7) (2001) 191–198. S. Carlos-Hern´ andez et al., Fuzzy observers for anaerobic WWTP: Development and implementation, in Control Engineering Practice 17 (2009) 690– 702. D. Urrego-Patarroyo et al., Recurrent neural networks observer for anaerobic processes, XIII Latinamerican Congress of Automatic Control (M´erida, Venezuela 2008). A. S. Poznyak et al., Differential Neural Networks for Robust Nonlinear Control, World Scientific Publishing Co. (Singapore, 2001). L. J. Ricalde and E. N. Sanchez, Inverse optimal nonlinear high order recurrent neural observer, International Joint Conference on Neural Networks (Montreal, Canada, 2005). G. G. Rigatos, Adaptive fuzzy control with output feedback for H∞ tracking of siso nonlinear systems, in International Journal of Neural Systems 18(4) (2008) 305–320. G. Puscasu et al., Nonlinear system identification based on internal recurrent neural networks, in International Journal of Neural Systems 19(2) (2009) 115–125. F. Monnet, An Introduction to Anaerobic Digestion of Organic Wastes. Technical Report (Remade Scotland, 2003). Y. Chen et al., Inhibition of anaerobic digestion process: A review, in Bioresource Technology Elsevier Science 99(10) (2007) 4044–4064. S. Carlos-Hern´ andez, Integrated intelligent control strategy for wastewater treatment plants by anaerobic digestion, in French, Ph. D. Thesis, INPG (France, 2005). V. Otton et al., Axial dispersion of liquid in fluidized bed with external recycling: two dynamic modeling approaches with a view to control, in Biochemical Engineering Journal 4 (2000) 129–136. A. Rozzi, Modelling and control of anaerobic digestion process, in Transactions Instrumentation, Modelling and Control 6(3) (1984) 153–159. J. F. Beteau, An industrial wastewater treatment bioprocess modelling and control, in French. Ph. D. Thesis, INPG (France, 1992). http://www.bluesens.de, visited on April 13th 2009. S. Haykin, Neural Networks: A Comprehensive Foundation, 2nd edn. (Prentice Hall, New Jersey, USA, 1999). E. N. Sanchez et al., Recurrent neural networks trained with Kalman filtering for discrete chaos reconstruction, in Dynamics of Continuous, Discrete and Impulsive Systems Series B (DCDIS B) 13 (2007) 1–18. B. Zhang et al., Delay-dependent robust exponential stability for uncertain recurrent neural networks with time-varying delays, in International Journal of Neural Systems 17(3) (2007) 207–218.
February 11, 2010 9:29 S0129065710002267
Int. J. Neur. Syst. 2010.20:75-86. Downloaded from www.worldscientific.com by CENTRO DE INVESTIGACION Y DE ESTUDIOS AVANZADOS DEL IPN (CINVESTAV) SERVICIOS BIBLIOGRAFICOS on 10/19/12. For personal use only.
86
R. Belmonte-Izquierdo, S. Carlos-Hernandez & E. N. Sanchez
30. B. Zhang et al., Relaxed stability conditions for delayed recurrent neural networks with polytopic uncertainties, in International Journal of Neural Systems 16(6) (2006) 473–482. 31. M. Gao, Robust exponential stability of markovian jumping neural networks with time-varying delay, in International Journal of Neural Systems 18(3) (2008) 207–218. 32. M. Liu and S. Zhang, An LMI approach to design h∞ controllers for discrete-time nonlinear systems based on unified models, in International Journal of Neural Systems 18(5) (2008) 443–452. 33. A. M. A. Haidar et al., An intelligent load shedding scheme using neural networks and neuro-fuzzy, in International Journal of Neural Systems 19(6) (2009) 473–479. 34. G. A. Rovithakis and M. A. Chistodoulou, Adaptive Control with Recurrent High-Order Neural Networks (Springer-Verlag, Berlin, Germany, 2000). 35. E. N. Sanchez and A. Y. Alan´ıs, Neural Networks: Fundamental Concepts and Applications to Automatic Control, in Spanish (Pearson Education, Madrid, Spain, 2006). 36. E. N. Sanchez et al., Discrete Time High Order Neural Control Trained with Kalman Filtering (SpringerVerlag, Germany, 2008). 37. R. J. Williams and D. Zipser, A learning algorithm for continually running fully recurrent neural networks, Neural Computation 1 (1989) 270–280.
38. C. Leunga and L. Chan, Dual extended Kalman filtering in recurrent neural networks, Neural Networks 16 (2003) 223–239. 39. M. D. Asaduzzaman et al., Faster training using fusion of activation functions for feed forward neural networks, in International Journal of Neural Systems 19(6) (2009) 437–448. 40. H. T. Huynh et al., n improvement of extreme learning machine for compact single-hidden-layer feedforward neural networks, in International Journal of Neural Systems 18(5) (2008) 433–441. 41. G. Grossi, Adaptiveness in monotone pseudoboolean optimization and stochastic neural computation, in International Journal of Neural Systems 19(4) (2009) 241–252. 42. K. A. Kramer and S. C. Stubberud, Analysis and implementation of a neural extended Kalman filter for target tracking, in International Journal of Neural Systems 16(1) (2006) 207–218. 43. Y. Song and J. W. Grizzle, The extended Kalman filter as a local asymptotic observer for discrete-time nonlinear systems, in Journal of Mathematical Systems, Estimation and Control 5(1) (1995) 59–78. 44. S. Haykin, Kalman Filtering and Neural Networks (John Wiley & Sons, N.Y., USA, 2001). 45. D. G. Luenberger, An introduction to observers, in IEEE Transactions on Automatic Control 16(6) (1972) 596–602.