Artificial Neural Network Control of Chemical Processes

This paper presents an artificial neural network based control scheme for studying the control of continuous stirred tank reactor, distillation column and neutralization process and this method is compared with conventional proportional/integral-derivative controller. A multi-layer back-propagation neural network is employed to model the nonlinear relationships between the inputs variables and controlled variables of processes in order to regulate the manipulating variables to a variety of operating conditions and acquire a more flexible learning ability. The robustness of this control structure is studied in the case of setpoint changes and load disturbances. The experimental results suggest that such neural controllers can provide excellent setpoint-tracking and disturbance rejection. The neural network based control has higher speed of response and the offset has a smaller average value than that of the conventional controller. The control action based on the neural network controller shows less oscillation and an improvement in the controlled variables stabilization time with respect to the conventional controller and gives a better control performance.


INTRODUCTION
here are three major problems in commercial practice of chemical process control: nonlinear process behavior, constraints on operations, and illbehaved dynamics.The major commercial advanced control approach successfully handles constraints and dynamics, but does not consider the nonlinearity of the process [1].Due to the complexity of nonlinear control problems it is in general necessary to apply various computational or approximate procedures for their solution.A number of neural network-based methods have been suggested for optimal control problems, where the control objective is to minimize a control-relevant cost function.One approach is to apply a neural network to approximate the solution of the dynamic programming equation associated with the optimal control problem [2].
In multivariable processes, unknown models structures and high correlation between process variables are examples of problems that are faced daily.On the other hand, artificial neural networks (ANN) have been successfully used for a number of chemical engineering applications.Many network topologies and learning methodologies have been explored.Among these methodologies, the backpropagation algorithm, gradient descent supervised learning has had an enormous influence in research on neural networks.Neural networks have been used as an alternative to the traditional mathematical models to simulate complex and nonlinear patterns.Basically, the design of a neural network only requires a relatively large set of data to adjust the parameters in the net.The great disadvantage of neural networks is their limited capability to predict situations not considered in their design.Bahat and McAvoy[3],Mrris,et al.[4] and Baughman and Liu[5] have presented overviews of the issues pertaining to the use of ANN for sensor data analysis, fault diagnosis, process modeling, identification and control.An ANN is composed of nets of nonlinear basis functions; it has the ability to T evolve a good process model from experimental data and requires very little or no knowledge of first principles.It has the ability of learning; prediction for nonlinear models, networks has the ability to cope with large volumes and various formats of sensory information, highly parallel structure, has the ability to generalize beyond specific experience and has therefore been used to identify the process dynamics nonparametric by several authors.Composition estimators using ANN for a batch distillation column via tray temperatures and flow rates have been developed by Zamprogna,et al.[6].
In practical applications a neural network can be used when the exact model is not known.It is a good example of a black-box technique.Bhat and McAvoy[7] and Wang et al.[8] used back propagation neural networks to model the dynamic response and pH control in continuous stirred tank reactor.Psichogios and Ungar[9] introduced a hybrid neural network first principles model, applied to a fed batch bioreactor.Molga and Cherbanski [10] also employed this hybrid approach to model liquid-liquid reacting system in batch and semibatch stirred tank reactors.Pollard et al.[11] proposed the use of back propagation neural networks for mapping input-output experimental or simulated data in linear, nonlinear, static and dynamic processes and compared these mappings with classical regression methods.Galvan et al.[12] used neural networks to fit complex kinetics data in fluid-fluid systems.Roj and Wilk[13] used feed forward neural nets for simulating an absorption column used in the process of nitric acid production.Ramani and Miranda[14] employed neural networks to perform a sensitivity analysis on the conversions of pollutants gases as a function of the automobile exhaust catalyst composition and operating conditions.Ramchandran and Rhinehart[15] used neural networks control of two methanolwater distillation columns.The efficient training algorithm based on nonlinear least-squares was used to train the networks.The neural network model-based controllers show robust performance for both setpoints and disturbances, and performed better than PI controller.Dirion et al.[16] developed a neural controller to regulate the temperature in a semi-batch pilot plant reactor.They suggested that such neural controller can provide excellent set point-tracking and disturbance rejection.Farouq [17] applied neural network-based control algorithms to control the product compositions of a agitated extractor and he found that neural network is capable of solving the servo control problem efficiently with minimum controller moves.Zhang [18] proposed neural network based batch-to-batch optimal control of simulated batch polymerization reactor and he concluded that the proposed method can improve process performance from batch to batch in the presence of model plant mismatches and unknown disturbances.Akpan and Hassapis[19] used a series-parallel neural network structure which is trained by a recursive least squares method.This method have been applied to the temperature control of a fluidized bed furnace reactor and the identification and control simulation results show that this method outperforms the other methods at the expense of extra computation time.Ebrahimzadeh et al.[20] investigated several neural networks, such as the multilayer perceptron, probabilistic neural networks, and the radial basis function neural networks and apply it in manufacturing processes.Simulation results show that a high recognition accuracy, about 99.65%, is achieved.Rani et al.[21] design of Levenberg-Marquardt neural networks and adaptive linear network based soft sensors and their application in inferential control of a multicomponent distillation process.The comparison of results shows the efficient and robust prediction capability of the soft sensor and hence neural method proves to be the best controller.Sharma and Singh[22] implemented neural network predictive control to a tertamyl methyl ether reactive distillation column and they found this method give smoother and better control performance than the PID controller for both set point change and ±10% load change in feed flow rate of methanol.Neural network based chemical process control was considered and the application of neural networksbased control algorithms such as model predictive algorithm is justified by the success of these techniques to control complex nonlinear dynamics chemical processes.There have also been many studies on the application of neural controllers on various types of processes in the literatures such as in evaporator [23,24], fluid catalytic cracking unit [25,26], combustion unit[27], heat exchanger [28,29], Mechanical milling process [30], wastewater treatment [31,32,33,34], fermentation [35,36,37], catalytic reactor [38], fluidized bed [39].The application of neural networks control for crystallizer was studied by (Damour et al.[40], Paengjuntuek et al.[41], Suarez et al.[42]).Neural network control of distillation process have been successfully applied by (Lee and Park[43], Fernandez et al.[44,45] ).Alvarez et al.[46] , Ramirez and Jackson[47] The objective of this study is application of an artificial neural network based control of continuous stirred tank reactor, distillation column and neutralization process.A multi-layer back-propagation neural network is employed to model relationships between the inputs variables and controlled variables of processes in order to regulate the manipulating variables to a variety of operating conditions and acquire a more flexible learning ability.

INVERSE ARTIFICIAL NEURAL NETWORK BASED CONTROL
Artificial neural network (ANN) is a type of artificial intelligence, and an information processing technique, that attempts to imitate the way human brain works.It is composed of a large number of highly inter-connected processing elements, called neurons, working in unison to solve specific problems.The organization and weights of the connections determine the output.The neural network is configured for a specific application, such as data classification or pattern recognition, through a learning process called training.The neural network model and the inverse neural network model are the two important components of the control methodology.The neural network model uses the future process variable as output and the previous process variables and the actuator outputs as input.The future actuator output is the output of the inverse neural network model, while the previous process variables and actuator outputs are the input to the inverse neural network model.Both the neural network model and the inverse neural model control use many inputs and one output for single actuation control.
The inputs for the inverse neural network model are the present variables and previous time steps, while the present manipulating variable is the output of the inverse neural network model.Such assumptions are described and justified henceforth in a systematic order: network topology, training algorithm and network size.Multi-layer perceptron (MLP) networks with biases and a single hidden sigmoid layer are by far the most frequently used network topology, probably because they are capable of approximating any function with a finite number of discontinuities, as long as sufficient training is performed.The dimensionality reduction process was applied to determine high-level variables resulting in enhancement of the information content in the original data set and improved performance of the models.As an alternative way to use neural networks for process control, the use of an inverse neural network model was also considered.In the case of inverse neural network models, the outputs of the network correspond to the future values of the process inputs while the input layer of the net contains, besides the past values of the process inputs and outputs, and the current process output measurement, also the future values of controlled variables (process outputs).The inverse neural network due to its structure eliminates the optimization algorithm from the control movement computation.Using the past values of the controlled and manipulated variables as well as the current measurement, the control movement can be directly obtained from the net when the setpoint values are presented to the network as the future values of the controlled variables [36].
ANN modeling has gained in popularity after the creation of the Back Propagation (BP) training algorithm.BP allows supervised mapping of input vectors and corresponding target vectors.Even if many BP variants have since been proposed to accelerate updating MLP weights and biases.Other topology and training algorithms could always be tested later against this benchmark ANN.Generalization is an ANN quality that is sought following supervised learning.It is the ability to provide accurate output values for input values that have never been seen by the network.Lack of generalization is due to over-fitting.The network has memorized the training examples but has not learned to generalize in new situations.Since over-fitting is in great part associated with the non-linear components of ANNs, it is often proposed to minimize the number of nodes in the hidden sigmoid layer.An artificial neural network is a computational model consisting of simple processors called neurons or nodes with numerous connections between them inspired by the neuronal architecture of the brain.Connections have numerical values called weights associated with them.Each neuron has an activation value that is a function of the sum of inputs received from other neurons through the weighted connections.The first and last layers are for input and output, while the others are the hidden layers.The network is said to be fully connected when any node in a given layer is connected to all the nodes in the adjacent layers.A multi-layer perceptron can learn when presented with input and output pairs.Learning or training involves modifying the connection weights and bias until the network is capable of reproducing the target output for the respective input pattern.Training takes place in an iterative fashion [64].
The back propagation algorithm tries to minimize the sum of squares of error of the network output by adjusting the connection weights of the network.Back propagation is nothing but the steepest descent method of optimization, where the network weights, w i,j 's, are adapted in proportion to their contribution to the error measure.Mathematically, the dynamics of a neuron j in a multilayered network can be represented by the following equations.The input to the neuron, x j (t) is[64]: where I is the number of inputs, w ij (t) is the weight associated with input i and neuron j, x and b j is the bias to account for any offset present in the data.The output of the neuron, y j (t) is calculated using some activation function of the total weighted input typically is used the sigmoid function : The sum of squares of output error of neuron j in the output layer is defined as: Where y dj (t) is the desired output and y j (t) is the actual output of neuron j.The various weights in the network are adjusted in proportion to the negative gradient of their contribution to the network error.The equation, on which the various weight updates are based, is given below: where α is called the learning rate.For simplicity, it is set to be the same for each weight but can be different if required.The gradient of the output error due to weight w ij (t), , can be expanded by chain rule of differentiation as: Then Equation (4) becomes: Based on the above error gradients, the weights are updated as: Again, by chain rule, we have the following equation: If neuron j is in the output layer, then from Equation.3,we have: Therefore, the credit for the jth neuron in the output layer is:


Where L is the number of neuron in the next layer that connect to neuron j in the hidden layer.Hence, the credit for a neuron in the hidden layer is,

 
Due to the nature of the steepest descent algorithm, the back propagation training method exhibits non-smooth changes during learning.To smooth the weight changes over time and to hasten the convergence rate, a momentum term is normally added to the weight change equation.The weight updates Equation ( 8), modified to include the momentum term γ, and is as given below:

EXPERIMENTAL WORK
The performance of the inverse artificial neural network based control strategy is experimentally demonstrated on three lab-scale systems.The systems are distillation column, continuous stirred reactor and neutralization.

Distillation Column
The experiments are carried out in a seven single bubble cap trays, lab-scale, atmospheric continuous distillation column separating a ethanol-water mixture.The distillation unit consists of a 2 m height, 0.05 m inside diameter, thermally insulated seven single bubble cap trays borosilicate glass column with a total condenser and 1.6 kW electrically heated reboiler as shown in  the stirrer of stainless steel which has two-blades.The stirrer operates with range of (0-250) rpm.The liquid level in the tank is maintained at a pre-specified constant level by an outflow pump system.The range of flow of each rotameter is (0 -40 L/hr.) of water at 200 o C and the concentration and flow rate of solutions ethyl acetate are kept constant except for some manual changes to mimic process disturbances.The reactor was heated by hot water, which flows through the jacket around the reactor by using a small pump.The pump was capable of handling about (40 L/hr.) water and was heated by an external electrical heater.The electrical heater was provided with a digital screen to view the temperature.The objective is to control the effluent temperature by manipulating the heating flow rate.Several type-K temperature sensors allow measurement of the temperature inside and outlet the reactor, the inlet and outlet jacket temperatures, and the inlet and outlet temperatures of the cooling loop.A computer (PC LG 2500) equipped with A/D and D/A converters provides real-time data acquisition and control.

Neutralization Process
A simplified schematic diagram of the pH neutralization system is shown in Figure (3).The process consists of an (base or acid) solution that prepared in a 100 liter feed tank in the base of the equipment, from which it is pumped via a variable area flow meter, and a hand-operated valve, into a stirred mixing vessel of approximately 3.318 liters capacity.The reagent (acid or base) is held in a 50 liter feed tank in the base of the equipment, the whole being constructed in PVC.The reagent is pumped into the mixing vessel via a variable area flow meter, a hand valve, and a pneumatically operated control valve.A dip electrode and a pH transmitter/ indicator monitor the pH of the solution in the mixing vessel.A computer (PC 486) equipped with A/D and D/A converters provides real-time data acquisition and control.

RESULTS AND DISCUSSION
The main objective of this study is to develop and demonstrate the neural network-based model control for controlling the reactor, distillation and neutralization processes.To establish that ANN-based process control is a viable alternative to existing control strategies, a test using a PID controller was conducted.In the case of inverse neural network models, the outputs of the network correspond to the future values of the process inputs while the input layer of the net contains, besides the past values of the process inputs and outputs, and the current process output measurement, also the future values of controlled variables.The inverse neural network due to its structure eliminates the optimization algorithm from the control movement computation.Using the past values of the controlled and manipulated variables as well as the present measurement, the control movement can be directly obtained from the net when the setpoint values are presented to the network as the future values of the controlled variables.The network was trained using a historical experimental data obtained from open-loop operation of the processes.The learning set is then composed of 100 runs of each process.The learning process for the networks is studied after about much iteration on the learning set, the relative mean error stabilizes to a level of approximately 0.1%.The training algorithm described above was implemented in Matlab language.After the completion of the training, the prediction of the network was tested with data which was not included in the training set.Testing of a controller should be performed to ensure some desired performance criteria, such as it is robust, closed-loop system must be stable, rapid, smooth response is obtained, offset and overshoot are eliminated, excessive control action is avoided.However, it is important to evaluate the robustness of these controllers with respect to changes in operating and process parameters.For the reactor, four tests were carried out, two tests for the feed flowrate was increased by 30% of its steady state value at different setpoint.The others tests, the setpoint of reactor temperature was increased from 20 o C to 30 o C and decreased from 35 o C to 25 o C. Figures (5) to 8 present respectively temperature control of the reactor using the neural controller and PID controller.It is seen that the control action is quite smooth with no oscillations, a fast response time, the controller is able to eliminate the offset and the response of the controller a good tracking performance is obtained.This property of the neural controller of the ability to reduce error in the data and it has been demonstrated elsewhere.Figures (7and 8) represents the closed-loop system responding to setpoint changes with the neural controller.It is seen that the controller is able to eliminate the offset in the reactor temperature without any overshoot.However, the neural network model-based controllers can take care of a nonlinear model of the process and also compute the manipulated variables rapidly.
For the neutralization process, four tests were carried out, two tests the acid stream input flow rate was increased by 20% of its steady state value at different setpoint.The other tests, the setpoint of influent pH was increased from value 6 to value of 8 and 7 to 5. A small change in the acid stream input flow will cause the output pH to change significantly in this steep region.Hence, while it would be easier to control the pH value of the process in either the lower or the higher end of the pH scale, it poses quite a challenging problem to control the pH value of the process around the electro neutrality point, where the gain surface is very steep, where a very small change in the process input has a marked effect on the process output.As can be seen from the Figures (9 to 12), the process output follows the desired pH value quite closely with little or no overshoot and the neural controller output is quite smooth with no oscillations and a fast response time.To pose a more challenging control problem, the pH setpoint was varied from an initial value of 6 to a value of 8. From the figures depicts the performance of the closed-loop system with the proposed neural controller.As can be seen from the figures, the controller is able to drive the closed-loop system to the desired value in a short period of time and a good tracking performance is obtained.While there is no oscillatory response for the first change in setpoint, there is some oscillation present in the process response for the second case.
In the distillation column, four tests were carried out, two tests the feed flow rate was increased 40% of its steady state value.The others, the setpoint of top temperature is decreased from 78 o C to 76 o C and the setpoint of bottom temperature was increased from 80 o C to 84 o C. Figs. 13 to 16 show the column performance for a feed flowrate changed and setpoint change in the top temperature.The neural controller are able to eliminate the offset in the top temperature practically without any overshoot.However, the neural network model-based controllers can take care of a nonlinear model of the process and also compute the manipulated variables rapidly.Due to this disturbance, the top temperature start deviating from the setpoint shortly after the introduction of the disturbance.But, the controller is able to bring the temperature back to their setpoint.The quantitative performance values, IAE, for the neural and PID controllers are given in Table (1).The control of reactor temperature, distillation temperature and pH using PIDs are not significantly worse than that of using neural network.The control of the processes using PID showed a large degraded performance, as displayed in figures.From the performance of the PID controller, it can be seen that the pH has severe non-linear dynamics that depends on operating point.illustrate the difficulty in controlling this process with fixed PID.We compare the behavior of PID and neural controller in this Figure .The neural controller responds as quickly as PID.They indicate that the neural give smoother and better control performance than the PID controllers with smaller IAE error values, when disturbances are introduced into the system.The figures illustrate that the neural strategy brought the reactor temperature to the set points by gradual increase of the flow rate which give smooth control response.The PID control in turn brought the reactor temperature to the set point by rigorous adjustment of the flow rate causing overshoot in the process response with a long response time.They indicate that neural controller gives less error and gives better control performances than the PID controllers, similar to the disturbance case study.These results also show the robustness of the neural network models in dealing with disturbances it during training.
The output responses to all set-point changes are similar with small overshoot and, importantly, the control does not exhibit notable oscillations at any of the setpoints.The satisfactory performance is due to the full representation of the nonlinear dynamics of the reactor, distillation and neutralization by the neural network model.Comparing these areas of the results illustrates the significant improvement of controller using a neural network model over PID controller.Figures (7 and 8) show the system response to step change of setpoint of the reactor temperature.The result indicates improved control with the neural control, the result of it combining information regarding the plant dynamics.Figures (11,12,15 and 16) show the same results, but using a disturbance of setpoint of the top temperature of distillation column and the pH of effluent of neutralization process.These Figures   Show that the neural controller presents better control performance than that of the PID controller.To show the effectiveness of neural networks further and it is found that the magnitude of offset is much smaller than that of PID controller.Therefore, the neural networks plays a major role in improving the control performance.

CONCLUSIONS
The application of a neural network model based predictive controller to a nonlinear multivariable chemical process is investigated.Since the real chemical processes are nonlinear and multivariable interacting systems, which make them difficult to control by using conventional controllers, model based advance control techniques are then required to obtain tighter control.This paper has demonstrated the usefulness and effectiveness of applying neural networks in a model based control strategy to control a reactor, distillation column and neutralization process.The experiment provides a detailed case study in which neural networks were applied to the nonlinear control processes, the process was successfully brought back to the set point after a step disturbance in the feed stream.Both the artificial neural network and PID controllers have been implemented and the controller performance under multiple changes in setpoint and the effect of load disturbance has been investigated.Comparison of performance with the conventional PID controller indicated that neural controller was more robust than the PID controller and gave better results in cases involving disturbances.Better disturbance rejection results were shown by the neural based controller and produced smoother controller moves than its PID equivalent.The ANN based control shows consistently faster speed of response than the PID based control with less offset value and advantages of neural controller is not require any tuning of the control parameters while the PID does require that.
Figure (1) Schematic Diagram of the Distillation Column.
The networks are then implemented on the processes, and are tested as on-line controllers.The block diagram of the inverse neural network model based predictive control of the reactor temperature is presented in Figure (4).For continuous stirred tank reactor, the network used in this study had two hidden layers (with 7 and 5 neurons, respectively), 10 neurons in the input layer and 4 neurons in the output layer.The variables of input layer are one present value T(k) and 3 past values T(k-1), T(k-2), T(k-3) of reactor temperature, 3 future values of setpoint of reactor temperature and 3 past values of flowrate of hot water F(k-1), F(k-2), F(k-3).The variables of output layer are the one present value F(k) and 3 future values F(k+1), F(k+2), F(k+3) of hot water.For distillation column, the network used in this study had one hidden layers with 36 neurons, 40 neurons in the input layer and 8 neurons in the output layer.The variables of input layer are 7 present values and 21 past values of column tray temperature, 6 future values of setpoint of top and bottom temperature and 3 past values of cooling water of condenser and 3 past values of heater power of reboiler.The variables of output layer are the present value and three future values cooling water of condenser and the present value and three future values of heater power of reboiler.For neutralization process, the network used in this study had two hidden layers (with 7 and 5 neurons, respectively), 10 neurons in the input layer and 4 neurons in the output layer.The variables of input layer are one present value pH(k) and 3 past values pH(k-1), pH(k-2), pH(k-3) of output , 3 future values of setpoint of pH output and 3 past values of reagent flow F r (k-1), F r (k-2), F r (k-3).The variables of output layer are the one present value F r (k) and 3 future values F r (k+1), F r (k+2), F r (k+3) of reagent flow.

Figure ( 4 )
Figure (4) Block diagram of inverse-ANN based control of the Process.

Figure ( 5 )
Figure (5) Comparison between PID controller and artificialNeural network controller of reactor temperature forStep change in feed flowrate at setpoint of 30 o C.

Figure ( 6 )
Figure (6) Comparison between PID controller and artificial neural network controller of reactor temperature for step change in feed flowrate at setpoint of 35 o C.

Figure ( 7 )Figure ( 8 )
Figure (7) Comparison between PID controller and artificial neural network controller of reactor temperature for step change in setpoint from 20 to 30 o C.

Figure ( 9 )
Figure (9) Comparison between PID controller and artificialNeural network controller of pH effluent for step change in acid flowrate at setpoint of 7.

Figure ( 10 )
Figure (10) Comparison between PID controller and artificialNeural network controller of pH effluent for step change in acid flowrate at setpoint of 9.

Figure
Figure (11) Comparison between PID controller and artificial neural network controller of pH effluent for step change in setpoint from 6 to 8.

Figure ( 13 )
Figure (13) Comparison between PID controller and artificial neural network controller of top temperature for step change in feed flowrate.

Figure
Figure (14) Comparison between PID controller and artificial neural network controller of bottom temperature for step change in feed flowrate.

Figure ( 16 )
Figure (16) Comparison between PID controller and artificialNeural network controller of top temperature for step change in setpoint.