INTRODUCTION
Many chemical processes exhibit significant nonlinear behavior dynamic. If
these processes are operated at a nominal steady state, the effects of the nonlinearities
may not be severe and hence traditional control schemes based on local linearized
models can provide satisfactory control performance. However, if the processes
are required to work over a wide range of conditions, conventional linear control
approaches cannot handle the system nonlinearities. Under such situations, closedloop
stability can be guaranteed only when the controllers are sufficiently detuned,
leading to degradation in closedloop performance (Henson
and Seborg, 1997; Zhang and Guay, 2005; Fourati
et al., 2008).
A reasonable mathematical model with good estimated parameters is essential
for designing a highperformance control system. However, in modeling a chemical
process, there unavoidably exist uncertainties due to poor process knowledge,
nonlinearities, unmodeled dynamics, unknown internal or external noises, environmental
influence and time varying parameters. The presence of uncertainties and parameters
changes can make a mismatch between the formulated mathematical model and the
true process. This degrades the control performance and may lead to serious
stability problems especially when the process is nonlinear. Therefore, it is
a great challenge and of highly importance for control engineers to design robust
and adaptive controllers for nonlinear processes subject to model uncertainties
and parameters changes (Chen and Dai, 2001).
Control schemes based on feedback linearization technique provide larger dynamic
operation range than the conventional Jacobian linearization method which is
based upon an operating point. Furthermore, the benefits of linear control techniques
can be utilized via feedback linearization (Chen and Dai,
2001).
In recent years, many interesting results for chemical process control have
been reported in the literature on the basis of feedback linearization scheme
(Zhang and Guay, 2005; Henson and
Seborg, 1990; Lee and Sullivan, 1988; Kravaris
and Chung, 1987). These feedback linearization strategies often require
exact mathematical models of the plant dynamics. However, it is generally difficult
in practice to obtain an accurate model because of the inherent complexity of
the chemical processes or the lack of a priori informative process knowledge.
Adaptive control scheme is a viable choice to deal with such uncertainties which
has drawn a great deal of interest. The conventional adaptive control, however,
is limited to linearly parameterized model uncertainty. The limitation can be
overcome by introducing neural network as a black box modeling tool to tackle
with nonlinear parameterizing uncertainty (Zhang and Guay,
2005; Henson and Seborg, 1994; Marino
and Tomei, 1995; Kar and Behera, 2009).
The study presents two different techniques for adaptive control of nonlinear chemical processes via combining feedback linearization and a Neural Network (NN) methodology to cope with nonlinearity and uncertainty. The first technique utilizes an adaptive NN as a black box to completely model an unknown chemical process. While, the second technique incorporates both a priori process knowledge and an adaptive NN to identify the difficulttomodel part of the process dynamic, leading to a semimechanistic or greybox model representation.
For this purpose, a Globally Linearizing Control (GLC) approach based on an inputoutput linearization technique is derived for a CSTR benchmark process and the resulting control structure is incorporated with some adaptation mechanisms including NN to evaluate its performances under different conditions. The final section gives the concluding remarks derived from this study.
CONVENTIONAL FEEDBACK LINEARIZATION SCHEME
In the case of continuoustime processes, there is a vast amount of theory for developing feedback linearization of affine processes, where the process input (u) appears in linear form in the state space equation as follows:
where, x = [x_{1},…,x_{n}]^{T} is the state vector, u is the manipulated input and y is the controlled output of the process. In general, f, g and h are assumed to represent smooth vector fields.
The objective of inputoutput linearization is to obtain a nonlinear control law in the following form:
in such a way that the resulting controlled process, shown in Fig. 1, be linear. So, the inputoutput linearization results in a linear transfer function between v and y:
where, r denotes the relative degree of the nonlinear system. This relative degree at the operating point x_{0} is defined by the integer r which satisfies:

Fig. 1: 
Schematic block diagram of a GLC scheme 
where, L_{g} and L_{f} are Lie derivatives defined as:
While, the higherorder Lie derivatives can be written as:
The time derivatives of the system output can be expressed as algebraic functions of these Lie derivatives:
The preceding equations show that the relative degree (or relative order) represents how many times the output must be differentiated with respect to the time to recover explicitly the input u.
The GLC is an inputoutput linearization technique for processes of arbitrary relative degree. From the Eq. 8, the feedback control law can be expressed as:
Figure 1 shows that the scheme of GLC contains a linear feedback controller which controls the linearized system. In most process control applications, the objective is to maintain the output at a nonzero setpoint despite the presence
of model error and unmeasured disturbances. Consequently, the linear controller
is usually a PI or a PID controller (McLellan et al.,
1990). If, for example, a PI controller is applied as:
where, the gain K_{c} and the time constant T_{i} are additional controller tuning parameters, then the complete GLC control law yields the following closedloop transfer function for setpoint changes:
Certainly, one can use other linear controller, especially for systems that
have high relative degree. If the relative order of the system is 1 or 2, the
PID controller is a good choice; but for higher relative orders, it may be more
useful to design the linear controller directly from the linearized system.
FEEDBACK LINEARIZATION TECHNIQUE USING BLACKBOX NEURAL NETWORK MODEL
In case the process is unknown, a model can be estimated from historical inputoutput data by letting two separate neural networks approximate the functions f and g as follows:
or
Where:
where, θ indicates a vector containing the weights and biases, φ
is the regression vector and and
are
the estimated nonlinear functions used to predict the output, n_{a}
and n_{b} denote the number of past outputs and inputs, respectively,
used to determining process output prediction and nk is time delay.

Fig. 2: 
Discrete inputoutput feedback linearization with neural networks 
The closedloop system consisting of controller and process to be controlled is shown in Fig. 2. Derivation of a training method for determination of the weights in the two neural networks used for approximating f and g in Eq. 1 is straightforward.
The prediction error approach requires knowledge of the derivative of the model output with respect to the weights. In order to calculate this derivative, the derivative of each network output with respect to the weights in the respective network must be determined as:
The derivative of the model output with respect to the weights is often composed of derivatives of each network in the following manner:
With this derivative in hand, any of the training methods can be used without
further modification. Any smooth nonlinear function can be chosen for approximating
the unknown functions f (φ(k), θ) and g (φ(k), θ). In this
study, two feedforward NNs with a hidden layer including nonlinear function
(i.e., tanh(.)) have been selected for this purpose. The resulting process model
is known as nonlinear autoregressive moving average model (NARMAL2) which can
be expressed by Narendra and Mukhopadhyay (1997):
where, f^{1}(x) = g^{1}(x) = tanh(x) and f^{2}(x) = g^{2} (x) = x represent activation functions of the hidden layer and the output layer, respectively. The quantities a^{0}, a^{1}, a^{2} are the outputs of input, hidden and output neurons, respectively. The weights of hidden and output layers are denoted by W^{1}_{f}, W^{1}_{g} and W^{2}_{f}, W^{2}_{g}, respectively.
It’s highly recommended to remove the mean and scale of all the measured signals to the same variance (usually zero mean and variance 1). Because, the signals are likely to be measured in different physical units and without scaling, there is a tendency that the signal of largest magnitude will be too dominating. Moreover, scaling makes the training algorithm numerically robust and leads to a faster convergence. Since, the network model is a threelayer neural network with linear output units, it is straightforward to rescale the weights after completion of the training session. In this way, the final network model can work on unscaled data.
Neural network learning speed is very important for real time system identification. To realize fast learning, a recursive LevenbergMarquardt minimization method is used in this study. It is an intermediate method between the steepest descent and GaussNewton, having good convergence properties. The online training algorithm is derived so as to minimize the following criterion:
where, denotes
the prediction error, y_{r}(k) is the actual plant output and θ_{k}
includes all the neural network weights. The NN weights are adjusted as follows
(Hagan et al., 1996):
where, G is the Jacobian matrix i.e., (∂F(θ_{k})/ ∂ θ_{k}) and I is the identity matrix and λ_{k} is a constant. This algorithm reduces to the steepest descent method with small learning rate as λ_{k} is increased. If λ_{k} is decreased to zero, the algorithm approaches the GaussNewton method. Thus, the algorithm provides a nice compromise between the speed of Newton’s method and the guaranteed convergence of steepest descent.
Control of a CSTR benchmark process with online feedback linearization technique: Figure 3 shows the schematic of a cooled exothermic CSTR benchmark process. The reaction is first order in reactant A. A wellmixed cooling jacket surrounds the reactor to remove the heat of reaction. Cooling water is added to the jacket at a rate of F_{j} and an inlet temperature of T_{j0}. The volume V of the reactor contents and the volume V_{j} of water in the jacket are both assumed to be constant. So, it can be written:

Fig. 3: 
Schematic of CSTR 
Table 1: 
Nominal values of the model parameters 

u = F_{j} = F_{j0
}F_{0} = F 
(20) 
The firstprinciples model of the CSTR process is:
where, CA (mol m^{3}) is the concentration of the A component in the reactor, T(°C) is the temperature of the reactor and T_{j}(°C) is temperature of the reactor jacket, while the process input is the flow rate of the cooling water u (m^{3} min^{1}). The controlled output of the process is the reactor temperature. The parameters and their nominal values of the model are shown in Table 1.
Because of the CSTR nature, the model adaptation is completely necessary in system identification. It is very common that one of the parameters of the process like feed flow rate, feed temperature, concentration of components in feed and inlet temperature of coolant change with time. Thus, by incorporating them in online process identification, the controller can compensate for these changes.

Fig. 4: 
Unscaled (a) output and (b) input data 

Fig. 5: 
Scaled (a) output and (b) input data 

Fig. 6: 
Model’s output and real output for a set of test data.
Solid line: output, dashed line: one step ahead prediction 
In the first stage, inputoutput data should be generated for obtaining the
NARMAL2 model of the process (Fig. 4a, b).
It is clear that more information about the system is obtained by using a very
long and powerful input signal. This is relevant for industrial processes which
typically have slow dynamics and high level disturbances. On the other hand,
the cost of the experiment becomes low by keeping the experiment time short
and the signals small. From an industrial and economical perspective, the test
data must lead to a suitable model within an acceptable time period in order
to deviate as little as possible from normal operation. The inputs of the NARMAL2
were selected as y(k1), y(k2), u(k1) and u(k2).
It should be mentioned here that for making the training algorithm numerically
robust and having a faster convergence, the inputoutput data have been scaled
to zero mean and variance 1 (Fig. 5a, b).
Figure 6 shows the model’s output and the real process output for a set of test data, while Fig. 7 shows the error between the model’s output and real process output. It can be seen that the validity of the NARMAL2 model is acceptable.

Fig. 7: 
Error between model’s output and real output 

Fig. 8: 
Setpoint, Plant Output, Desired Polynomial Output and flow
rate 
In this case, the desired polynomial has been selected to corresponding to two stable poles.
Figure 8 shows he resulting setpoint tracking performance of the CSTR process.
FEEDBACK LINEARIZATION TECHNIQUE USING NEURAL NETWORK AND SEMIMECHANISTIC MODEL
Neural Networks (NN’s) provide suitable tools to model plant uncertainties that
are in form of unknown functions if appropriate input/output data is available
(Widrow et al., 1994; Bazaei
and Majd, 2003). In Nikolaou and Hanagandi’s (1993) contribution, feedback linearization has been applied to continuoustime recurrent
NN’s. In Braake et al. (1998) study, some databased
Exact Feedback Linearization (EFL) and Approximate Feedback Linearization (AFL)
schemes in discretetime via NN’s have been developed. In the feedback linearization
mentioned in the previous section, the NN’s are used as a blackbox model of
the plant and no part of the plant dynamic equations are assumed a priori known.
Hence, the blackbox NN model may have poor extrapolation properties and its
validity may remain within the range of the training data.
The models totally generated by the first principles knowledge o the basis
of general physical rules governing the plants are called whitebox models.
Although, these models have good extrapolation properties, their generation,
if possible, is expensive in general (Van Can et al.,
1996).
It may possible to generate models based on a combination of first principles knowledge of the plant and neural, fuzzy, or other types of models, resulting in what is called firstprinciplesbased gray box, hybrid, semimechanistic, or semiphysical models.
The greybox models can be classified into parallel and serial types. In the
parallel greybox models discussed by Lee et al.
(2002), Cote et al. (1995) and Su
et al. (1992), the NN’s are placed in parallel to the first principles
models. This type may have better interpolation properties compared to the blackbox
one. In serial graybox models, the NN is trained to model the unknown or uncertain
part of the plant dynamics. The serial type may yield better dimensional extrapolation
property than that of the blackbox and the parallel greybox types. However,
when the available mechanistic model, derived from the process knowledge, is
not sufficiently accurate, the parallel hybridmodeling scheme may exhibit better
extrapolation, we mean that some variables or parameters of the plant, which
have been fixed during model training, are allowed to change during the use
of the model without need for retraining (Van Can et
al., 1996).
Because in serial graybox modeling the identification effort is only on the known part of the plant, the training time as well as the modeling error will decrease while the validity domain (i.e., the range extrapolation) of the resulting model will improve compared to those of the blackbox model.
By the proposed method we take the advantages of feedback linearization technique, first principles knowledge and greybox neural modeling to improve the control performance.
The underlying philosophy of semimechanistic modeling is that blackbox models, like neural networks, can be used to represent the otherwise difficulttoobtain parts of firstprinciple models. Fortunately, a firstprinciple model can be easily extended by exchanging parts of the model. In chemical engineering, firstprinciples models are mostly derived from dynamic mass, energy and momentum balances. These balances are based on conservation principle and for lumped process systems; they lead to differential equations formulated as:
where, x_{i} is a conserved extensive quantity, for example mass or energy.
In chemical engineering, usually the last two terms of Eq. 22 (i.e., amount of generated components in a chemical reaction) are especially difficult to model, but the first two terms (i.e., inlet flow or heat transfer) can be obtained more easily. Certainly, it always turns out in the modeling phase which parts of the firstprinciple model are easier and which parts are more laborious to obtain.
Firstprinciple linearization control for CSTR: Here, the control law of GLC is derived on the bases of the first principle model of the controlled process. The statevariables x = (x_{1}, x_{2}, x_{3}) are: x_{1} = CA the concentration of A component, x_{2} = T the reactor temperature and x_{3} = T_{j} the jacket temperature. The manipulated input u is the coolant flow rate while the controlled output y is the temperature in the reactor. So, the model equations of this affine system can be represented by:
Then, the relative order of the system can be determined based on:
So, the relative degree of the system is r = 2. Therefore, the feedback control law can be formulated as follows:
with the following Lie derivatives:
Where:
In the ideal case, Eq. 25 on the basis of inputoutput feedback linearization results in the following secondorder transfer function:
But, Eq. 28 cannot be perfectly realized in practice due to some practical difficulties. The first difficulty is that the manipulated input is constrained. However, this is not significant if âi parameters are selected appropriately. The second is that the model parameters are not known accurately; and the third is that the state variables cannot be measured perfectly. These difficulties influence the performance of the GLC controller.
The linear controller can be designed using Eq. 25. Assuming that the desired closedloop transfer function is a firstorder filter represented by:
where, y is the output, y_{sp} is the setpoint and T_{c} is the filter timeconstant; then the transfer function of linear controller becomes:
Actually, Eq. 30 is a classical PID controller with the gain K = β_{1}/T_{c}, the integral time constant T_{i} = β_{1}/β_{0} and derivative time constant T_{d} = β_{2}/β_{0}.
The parameters of feedback linearization (i.e., β_{0}, β_{1} and β_{2}) were set by trialanderror method. Adjusting these parameters is easy because the meanings of these parameters are very simple, representing the linear parameters of the desired trajectory. Virtually, tuning of these values is necessary only because the manipulated input is constrained.
So, these parameters must be tuned in such a way that the calculated manipulated input will approximately satisfy these constraints during the control. The selected parameters were set to β_{0} = 1, β_{1} = 10 and β_{2} = 5. The PID
parameters were determined by direct synthesis Eq. 30 as K_{c} = 1, T_{i} = 10 and T_{d} = 0.2. It should be noted here that both the first principle and the semimechanistic GLC controller had the same parameters.
Semimechanistic GLC for CSTR: The firstprinciple GLC controller builds upon the complete firstprinciple model of the process. There may be situations when some parts of the firstprinciple model are not available. In contrast to firstprinciple GLC, the key strength of semimechanistic GLC is that it does not need a complete firstprinciple model. In the followings, an example will be presented that illustrates this problem through the application example of CSTR.
The controlrelated model of CSTR consists of two conservation equations:
The heat balance of the reactor and the heat balance of the jacket. The first balance is associated with the controlled variable (i.e., reactor temperature):
while the second balance is associated with the manipulated variable (i.e., flow rate of coolant):
The mathematical formalization of these terms is wellknown in chemical engineering. Certainly, during the formalization of the model terms, some assumptions must be made with respect to certain a priori knowledge, e.g., the heat transfer coefficient was assumed to be constant.
But, it is not enough to provide an exact description of each term, the model parameters must be provided, too. In the course of modeling of chemical reactors, the parameters of chemical reaction rate are generally problematical. In this application example, it is assumed that this part of the model is not available. Hence, the neural network will model the heat released by the chemical reaction. Therefore, the semimechanistic model of CSTR can be written as:
where, f_{NN} is the neural network, z is the input of this neural network (i.e., temperature of the reactor), x_{2} = T is the reactor temperature, x_{3} = T_{j} is the jacket temperature. It can be seen that the semimechanistic model Eq. 33 does not contain the x1 state variable. It means that the semimechanistic GLC controller does not need to measure the concentration in reactor.
In the followings, the above described semimechanistic model will be utilized in the GLC design scheme. The procedure is the same as the first principle model.
For the sake of simplicity, the state variables will be denoted in the same way: x_{2} is the reactor temperature, x_{3} is the jacket temperature and thus the state vector is denoted by x = (x_{2}, x_{3}). The manipulated input u is the coolant flow rate, while the controlled output y is the temperature in the reactor. Therefore, the model equations become:
It should be noted that Eq. 32 assumes that the input of the neural network is a function of state variables, i.e., z = f z(x); for example, the input of neural network is composed of measured statevariables.
The relative order of the semimechanistic model can be determined through Lie derivatives:
So, the relative degree of the system is r = 2. The Lie derivatives of the semimechanistic model are:
with the following partial derivatives:
The relative degree is r = 2, thus the feedback control law is identical to Eq. 25 (but the Lie derivatives differ from each other), that is:
It is important to consider that for applying the obtained u by feedback linearization method, the stability of the internal dynamics and zero dynamics should be checked. But, by using the semimechanistic modeling r is obtained equal to 2 and because the system order also reduces to 2, there is no need for doing stability analysis.
Hence, the linear controller of semimechanistic GLC controller is the same, i.e., it will be a PID controller.
Now, suppose that some parameters of the system change. It’s necessary to apply a method that our controller recognizes these changes for performing the compensatory strategies. From Eq. 34, the Parameters of the plant are Q, V, U, A, ρ, c_{P}, V_{j}, T_{jf}, T_{f}. It is supposed that V, V_{j}, A, are always constant and they never change but it’s possible that the inlet temperature of feed T_{f}, the inlet temperature of coolant T_{jf} and the feed flow rate Q change. It is also possible that the parameters ρ and c_{P} and U don’t remain constant. Clearly the changes of parameters T_{jf}, T_{f} and Q can be measured online by sensors from plant and then they can be incorporated in the controller.
Adaptation for any change in Q: In practical applications, assumption of invariability of feed flow rate is totally inaccurate and almost it is impossible to fix the feed flow rate in a desired value.
In the first experiment, without using adaptation, the feed flow rate (Q) decreased
by 10% at time = 600 (i.e., 90% decreasing). It can be seen that because of
the nature of feedback, the system would tolerate this deviation and remain
stable (Fig. 9a, b).
Now, by applying adaptation in the controller and online applying of the change
in the feed flow rate to the controller, the results in Fig.
10a and b would be obtained. It can be seen that in this
case, the performance of the system is not much better than before.
Now, if the value of flow rate goes 40% more than its nominal value at time
= 600, without applying adaptation the results in Fig. 11a
and b would be obtained. It is clear that in spite of lack
of adaptation, the plant remains stable.
And if adaptation is applied, the results are shown in Fig.
12a and b.
For more changes in Q, because of the physical limitations (e.g., saturation
in the flow rate), the system with or without adaptation can not work properly
(Fig. 13a, b).

Fig. 9: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in absence of adaptation and 90% decreasing
of feed flow rate (Q) 
Adaptation for any change in T_{f}: If the inlet temperature
of the feed changes 1% at time = 600, in the absence of adaptation the results
shown in Fig. 14a and b will be obtained.
By applying adaptation in the controller, for 1% increasing in Tf the results
shown in Fig. 15a and b are obtained.
It is clear that the controller works a little better than the time that it
is not adaptive. For more increasing in T_{f}, the online controller
may not work properly. This is due to the saturation in manipulated variable.
For 3% decreasing of T_{f} (without adaptation), the results shown
in Fig. 16a and b are obtained.
In case of applying adaptation, the results shown in Fig. 17a
and b are accessed.
Based on the results, it can be concluded that there is a negligible difference between the adaptive and nonadaptive cases.
For more decreasing in T_{f} (with or without applying adaptation),
results shown in Fig. 18a and b are obtained.
It can be seen that the system is not able to track the set point. This phenomenon
is because of lower limitation for manipulated variable. For instance, the input
flow rate of jacket can not be less than zero).

Fig. 10: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 90% decreasing
of feed flow rate (Q) 

Fig. 11: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in absence of adaptation and 40% increasing
of feed flow rate (Q) 

Fig. 12: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 40% increasing
of feed flow rate (Q) 

Fig. 13: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 45% increasing
of feed flow rate (Q) 

Fig. 14: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in absence of adaptation and 1% increasing
of feed temperature 

Fig. 15: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 1% increasing
of feed temperature 

Fig. 16: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in absence of adaptation and 3% decreasing
of feed temperature 

Fig. 17: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 3% decreasing
of feed temperature 

Fig. 18: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 5% decreasing
of feed temperature 

Fig. 19: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in absence of adaptation and 3% decreasing
of inlet jacket temperature 

Fig. 20: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 30% decreasing
of inlet jacket temperature 
Adaptation for any change in T_{jf} : In the absence of adaptation,
by decreasing the feed temperature of the jacket more than 3% at time = 600,
the system becomes unstable (Fig. 19a, b).
By applying adaptation, even when the feed temperature of the jacket decreases
100%, the system remains stable (Fig. 20a, b).
It should be noted that by increasing T_{j} more than 5%, even in presence
of adaptation and having no constraint for manipulated variable, the system
goes to unstable mode (Fig. 21a, b). This
is because of the existence of T_{j} in denominator of manipulated variable
(u). The physical explanation is due to the fact that if the temperature of
jacket increases more than a specific amount, the water in the jacket can not
absorb the heat generated during the reaction with any possible flow rate.
Estimation of heat of reaction by neural network: In Eq. 33, fNN is the model of heat generated during the reaction which can be described by:
By using NN, generated heat in the reaction can be estimated without any need to online measuring of concentration. By using this approach, any small changes in the parameters of heat equation can be considered and also there is no need to have the exact values of the involved parameters (H_{r}, k_{0}, E_{a}).
It can be seen from Fig. 22 that the neural network would be trained according to the error between the greybox model output and the actual plant output. Since the other parameters changes would be compensated instantaneously by the controller, it can be expected that the NN reflects the heat of reaction with a good accuracy and its online training would be mostly influenced by changes in heat of reaction parameters and not the other plant parameters.

Fig. 21: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 6% increasing
of inlet jacket temperature 

Fig. 22: 
Training diagram for Neural Network (the box is shown inside
the dotted line) 
The NN should be able to converge so as to make the following estimation error equal to zero:
From the structure of the model, the output of NN is:
Theoretically, the difference between the plant output and the model output
should be zero. So, by inserting de/dt = 0 and T_{plant} =T estimate
in Eq. 41, the desired output of the neural network should
be:
For initial training of the neural network in offline mode, the appropriate inputoutput dada should be collected.
In this case, the input of the neural network is temperature of the reactor and its output is the reaction heat which can be obtained from Eq. 42.
The results of using NN for reaction heat estimation are shown in Fig.
23a and b. In this case, the controller can detect up
to 29% fall in k_{0} and keep the process in the stable mode.
Determining the changes of U/ρc_{P}: Fouling phenomena can change the value of U (i.e., heat transfer coefficient). In addition, the values of ρ and c_{P} are somehow dependent on the temperature and also the concentration of the product inside the reactor. So, assumption of changing the term U/ρc_{P} is not unrealistic.
In addition, it can be supposed that the deviation of this parameter is not too much and even negligible. But, for considering the generality of the study, a method for online determination of term U/ρc_{P} is presented here.
Up to now, it has been assumed that the semimechanistic model and some of the system equations of our system are accessible. One of these equations is heat balance equation of the Jacket which is as follows:
By defining UA/ρc_{P} = α and t_{s} as the sampling
time, it can be written:

Fig. 23: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of neural network for estimation
of heat of reaction when k0 falls to 80% of its initial value 

Fig. 24: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semimechanistic modeling in presence of adaptation and 10% decreasing
of in the model 

Fig. 25: 
(a) Temperature and (b) jacket flow rate of CSTR obtained
by semi mechanistic modeling in presence of adaptation and 15% change in
k0 and U and also 10% change in Ea 15% 
So, α can be estimated as:
Therefore, α can be updated at each sampling time. By this technique up
to 19% reduction in α would be tolerable and the stability of the system
has been verified by simulation studies. As a typical demonstration, the result
for 10% reduction in α has been shown in Fig. 24a and
b.
Although, by this method, UA/ρc_{P} can be estimated very accurate and fast, since its variation is very slow due to the nature of UA/ρc_{P}, the observations show that it is not necessary to measure this term in each sample for practical applications.
In Madar et al. work (2005), the results have
been reported for the uncertainty of 3% in k_{o}, 2.5% in E_{a}
and 10% in U. Whereas, in our proposed method, the controlled system remains
stable, as shown in Fig. 25a and b, even
for 15% change both in k_{0} and U and 10% change in E_{a} all
being exercised at t = 600.
CONCLUSIONS
In this study, two different methods for adaptive control of nonlinear processes using neural networks were presented. The main benefit of these techniques is the online capability in order to incorporate any changes of the plant’s parameters in the controller implementation.
The first method is adaptive feedback linearizing control technique which is based on blackbox modeling of the plant. The main advantages of this method are:
• 
Implementation is simple 
• 
It can use a nonlinear model of the system without a priori
knowledge 
The second method is adaptive feedback linearizing control technique which is based on a semimechanistic modeling of the plant. It was practically observed that the power of setpoint tracking of this method is more efficient than the first one, giving a better characteristic as well.
It should be mentioned again that semimechanistic modeling approach for feedback
linearization allows the user to combine blackbox modeling with whitebox modeling
in such a way that a posteriori modeled element replaces the uncertain part
of a priori model. In the proposed semimechanistic model, a neural network
replaces the difficulttomodel part of the priori model.
When precise knowledge about some parts of the uncertain plant exists, it may be used in forming partial structure of the model and the modeling capability of the NN can be focused on the unknown parts. This can be achieved using a serial neurograybox model which is more accurate than the blackbox one while it takes shorter training time. Although, serial graybox schemes can only be used for the plants with some a priori partial knowledge, the resulting validity domain is larger than that of the blackbox method.
For the methods in which a blackbox model replaces the plant, any changes in parameters can be identified by neural network. But, in the semimechanistic feedback linearization beside the use of a neural network for modeling the difficulttomodel part of the plant, extra sensors and transmitters are needed for online estimation of the plant parameters.
So, although the performance of the semimechanistic feedback linearization is better than the other methods, its implementation can be more expensive and so a tradeoff compromise should be taken to select the proper method for practical applications.
In the semimechanistic modeling technique, although the plant parameters’ changes of the plant can be distinguished accurately and fast so as to be used in the controller implementation, the plant output may go to an unstable mode mainly due to the manipulated variable saturation.