Neural and Genetic Control Approaches in Process Engineering

Nowadays, advanced control systems are playing a fundamental role in plant operations because they allow for effective plant management. Typically, advanced control systems rely heavily on real-time process modeling, and this puts strong demands on developing effective process models that, as a prime requirement, have to exhibit real-time responses. Because in many instances detailed process modeling is not viable, efforts have been devoted towards the development of approximate dynamic models.


Introduction
Nowadays, advanced control systems are playing a fundamental role in plant operations because they allow for effective plant management.Typically, advanced control systems rely heavily on real-time process modeling, and this puts strong demands on developing effective process models that, as a prime requirement, have to exhibit real-time responses.Because in many instances detailed process modeling is not viable, efforts have been devoted towards the development of approximate dynamic models.
Approximate process models are based either on first principles, and thus require good understanding of the process physics, or on some sort of black-box modeling.Neural network modeling represents an effective framework to develop models when relying on an incomplete knowledge of the process under examination (Haykin, 2008).Because of the simplicity of neural models, they exhibit great potentials in all those model-based control applications that require real-time solutions of dynamic process models.The better understanding acquired on neural network modeling has driven its exploitation in many process engineering applications (Hussain, 1999).
Genetic algorithms (GA) are model machine learning methodologies, which derive their behavior from a metaphor of the processes of evolution in nature and are able to overcome complex non-linear optimization tasks like non-convex problems, non-continuous objective functions, etc. (Michalewitz, 1992).They are based on an initial random population of solutions and an iterative procedure, which improves the characteristics of the population and produces solutions that are closer to the global optimum.This is achieved by applying a number of genetic operators to the population, in order to produce the next generation of solutions.GAs have been used successfully in combinations with neural and fuzzy systems (Fleming & Purhouse, 2002).
Distillation remains the most important separation technique in chemical process industries around the world.Therefore, improved distillation control can have a significant impact on reducing energy consumption, improving product quality and protecting environmental resources.However, both distillation modeling and control are difficult tasks because it is usually a nonlinear, non-stationary, interactive, and subject to constraints and disturbances process.
In this scenario, most of the contributions that have appeared in literature about advanced control schemes have been tested for nonlinear simulation models (Himmelblau, 2008), while applications with advanced control algorithms over industrial or pilot plants (Frattini et al, 2000) (Varshney and Panigrahi, 2005) (Escano et al, 2009) or even with classical control (Noorai et al, 1999) (Tellez-Anguiano et al, 2009) are hardly found.
Composition monitoring and composition control play an essential role in distillation control (Skogestad, 1997).In practice, on-line analyzer for composition is rarely used due to its costs and measurement delay.Therefore composition is often regulated indirectly using tray temperature close to product withdrawal location.In order to achieve the control purpose, many control strategies with different combination of manipulated variables configurations have been proposed (Skogestad, 2004).If a first-principles model describes the dynamics with sufficient accurately, a model-based soft sensor can be derived, such an extended Kalman filter or its adaptive versions (Venkateswarlu & Avantika, 2001), while inferential models can also be used when process data are available by developing heuristic models (Zamprogna et al, 2005).Artificial neural networks can be considered from an engineering viewpoint, as a nonlinear heuristic model useful to make predictions and data classifications, and have been also used as a soft sensors for process control (Bahar et al, 2004).
Nevertheless, few results are reported when is considered the composition control of experimental distillation columns, and some results are found either by applying direct temperature control (Marchetti et al, 1985) or by using the vapor-liquid equilibrium to estimate composition from temperature (Fileti et al, 2007), or even by using chromatographs (Fieg, 2002).
In this chapter we describe the application of adaptive neural networks to the estimation of the product compositions in a binary methanol-water continuous distillation column from available temperature measurements.This software sensor is then applied to train a neural network model so that a GA performs the searching for the optimal dual control law applied to the distillation column.The performance of the developed neural network estimator is further tested by observing the performance of the neural network control system designed for both set point tracking and disturbance rejection cases.

Neural networks for identification
Neural networks offer an alternative approach to modelling process behaviour as they do not require a priori knowledge of the process phenomena.They learn by extracting preexisting patterns from a data set that describe the relationship between the inputs and the outputs in any given process phenomenon.When appropriate inputs are applied to the network, the network acquires knowledge from the environment in a process known as learning.As a result, the network assimilates information that can be recalled later.Neural networks are capable of handling complex and nonlinear problems, process information rapidly and can reduce the engineering effort required in controller model development (Basheer & Hajmeer, 2000).
Neural networks come in a variety of types, and each has their distinct architectural differences and reasons for their usage.The type of neural network used in this work is known as a feedforward network (Fig. 1) and has been found effective in many applications.
It has been shown that a continuous-valued neural network with a continuous differentiable nonlinear transfer function can approximate any continuous function arbitrarily well in a compact set (Cybenko, 1989).

Fig. 1. Feedforward neural network architecture
There are several different approaches to neural network training, the process of determining an appropriate set of weights.Historically, training is developed with the backpropagation algorithm, but in practice quite a few simple improvements have been used to speed up convergence and to improve the robustness of the backpropagation algorithm (Hagan & Menhaj, 1994).The learning rule used here is common to a standard nonlinear optimization or least-squares technique.The entire set of weights is adjusted at once instead of adjusting them sequentially from the output layer to the input layer.The weight adjustment is done at the end of each epoch and the sum of squares of all errors for all patterns is used as the objective function for the optimization problem.
In particular we have employed the Levenberg-Marquardt algorithm to train the neural network used (Singh et al, 2007), which is a variation of the Newton's method, designed for minimizing functions that are sums of squares of other nonlinear functions.Newton's method for optimizing a performance index ( ) is given by where = ( )| and = ( )| are the hessian and the gradient of ( ), respectively, and where is the set of net parameters at time k.In cases where ( ) is the sum of the square of errors ( ) over the targets in the training set then the gradient would be given by where ( ) is the Jacobian matrix formed by elements ( ) .On the other hand, the hessian would be approximated by Then, substituting (3) and ( 4) into (1), it results in the Gauss-Newton method Adding a constant term to ( ) ( ), this lead to the Levenberg-Marquardt training rule so that where is the learning coefficient, which is set at a small value in the beginning of the training procedure ( = 1e-03) and is increased (decreased) by a factor >1 (i.e.= 10) according to the increase (decrease) of ( ) in order to provide faster convergence.In fact, when is set to a small value the Levenberg-Marquardt algorithm approaches that of Gauss-Newton, otherwise it behaves as a gradient descent technique.The neural network was configured to stop training after the mean squared error went below 0.05, the minimum gradient went below 1e-10 or the maximum number of epochs was reached (normally a high number is selected so that this is a non-limiting condition).
The identification of the neural network model occurred via a dynamic structure constituted by a feedforward neural network representing the nonlinear relationship between input and output signals of the system to be modelled.The application of feedforward networks to dynamic systems modelling requires the use of external delay lines involving both input and output signals (Norgaard et al, 2000).
The network input vector dimension was associated with the time window length selected for each input variable, which was dependent on distillation column dynamics and is usually chosen according to the expertise of process engineers (Basheer & Hajmeer, 2000).The hidden layer dimension was defined by using a trial and error procedure after selecting the input vector, while the net's output vector dimension directly resulted from the selected controlled variables.
Therefore, the neural network identification model after selecting the optimal input vector was given by where ( + 1) stands for the predicted value of the neural network corresponding to the actual net input vector ( ) and the state vector ( ) .
The resulting identification model was obtained after selecting the best neural network structure among the possible ones, after a training process.Finally, a neural network validation process was performed by comparing the network output with additional data that were not included in the training data (validation set).

Genetic algorithms for optimization and control
Genetic Algorithms are adaptive methods which can be used to solve optimization problems.They are based on genetic processes of biological organisms.Over many generations, natural populations evolve according to the principles of natural selection and survival of the fittest.In nature, individuals with the highest survival rate have relatively a large number of offspring, that is, the genes from the highly adapted or fit individuals spread to an increasing number of individuals in each successive generation.The strong characteristics from different ancestors can sometimes produce super-fit offspring, whose fitness is greater than that of either parent.In this way, species evolve to become better suited to their environment in an iterative way by following selection, recombination and mutation processes starting from an initial population.
The control scheme here proposed is based on the different strengths that neural network and genetic algorithms present.One of the most profitable characteristic of the neural networks is its capability of identification and generalization while genetic algorithms are used for optimizing functions.
If an accurate identification model is available, the controller can use the information provided by selecting the optimum input that makes the system as near as possible to the goal to achieve.So one of the main differences between this controller and the rest is the way it selects the inputs to the system.

Fig. 2. Genetic Algorithm Structure
In this way, the function to minimize in each step is the absolute value of the difference between the predicted output (by means of the neural identification network) and the reference.This difference depends, usually, on known variables as past states of the system and past inputs and on unknown variables as are the current inputs to apply.Those inputs will be obtained from the genetic algorithm.

Neural networks for estimation
Most popular sensors used in process control are the ones that measure temperature, pressure and fluid level, due to the high accuracy, fast response properties and their cheapness.On the other hand, some of the most controlled variables, such as composition, present great difficulties in the measurement phase because it should be done off-line in laboratory, by involving both a high delay time and an extra cost due to the use of expensive equipment requiring both initial high investment and maintenance, such as occurs with chromatography.
The composition control is crucial in order to achieve the final product specifications during the distillation process.The use of sensors able to infer composition values from secondary variables (values easier to be measured) could be a solution to overcome the referred drawbacks, being this approach defined as a software sensor (Brosilow & Joseph, 2002).
In this way, an inferential system has been developed for achieving an on-line composition control.As the value of the controlled variable is inferred from other secondary variables, the model should be very accurate mainly in the operating region.The inferential system based on the first principles model approach presents the drawback of increasing computing time as the number of variables increase.
A black-box model approach relating the plant outputs with the corresponding sampled inputs has been used instead.Neural networks have proven to be universal approximators (Haykin, 2008), so they will be used to infer the composition from other secondary variables, defining thus the neural soft estimator.
One of the main difficulties in determining the complete structure of the neural estimator is the choice of the secondary variables to be used (both the nature and the location), selected among the ones provided by the set of sensors installed on the experimental pilot plant.In the literature there are several papers dedicated to the selection of variables for composition estimation and no consensus is reached in terms of number or position of the secondary sensors (here position is understood as the stage or plate where the variable is measured).In (Quintero-Marmol et al, 1991), the number that assures robust performance is +2, where N c is the number of components.With respect to the location of the most sensitive trays, (Luyben, 2006) develops a very exhaustive study and concludes that the optimal position depends heavily on the plant and on the feed tray.In this way, the neural estimator should have as an input the optimum combination of selected secondary variables to determine accurately the product composition.
In order to select the most suitable secondary variables for our control purposes, a multivariate statistical technique based on the principal component analysis (PCA) methodology (Jackson,1991) has been used, following the same approach described by (Zamprogna et al,2005).The resulting neural network estimator is given by where ( ) and ( ) stands for the primary and secondary selected variables.

Neurogenetic control structure
As an accurate neural network model that relates the past states, current states, and the current control inputs with the future outputs is available, the future output of the system can be predicted depending on the control inputs through a non linear function.In this way, the function to be minimized in each step is a cost function that is related to the absolute value of the difference between the predicted output and the desired reference to follow.This difference depends, usually, on known variables such as past inputs and past states of the system and on unknown variables such as the current control inputs to apply, which will be obtained from the genetic algorithm.
In this way, the optimization problem for controlling the distillation plant can be stated as the problem of finding the input that minimizes the norm of the difference, multiplied by a weighting matrix between the reference command to follow and the neural network model output, considering the input and the past and current states of the system.This procedure can be stated as ‖ • ( − ( , ))‖, with representing the reference command to follow, is the neural network model output, represents the past and current states of the system, ∈ is the control action and is the universe of possible control actions and is a weighting matrix.
In the present case, the reference command will be given by the desired composition variables together with the desired level variables, while ∈ represents the optimum neurogenetic control action, and the weighting matrix penalizes the errors in composition twice the errors in level, since composition control is more difficult to achieve than level control.In Fig. 3 the neurogenetic control strategy that is used here is shown, together with the neural composition estimator.

Fig. 4. Pilot distillation plant configuration
The condenser provides the necessary cooling to condense the distilled product.The condenser contains the cooling water provided by an external pump.The flow of the cooling liquid is regulated through a pneumatic valve with one flow controller, which as a last resort depends on the variable water flow supply.Two temperature sensors measure the temperature of the inlet and outlet flows.
Once the top stream is condensed, the liquid is stored in an intermediate reflux drum, endowed with level meter, temperature sensor and recirculation pump for reflux stream.The reflux to distillate ratio is controlled by 2 proportional pneumatic valves for and distillate respectively, each flow measured through the corresponding flow meter with display.
The main body of the distillation column is composed of 9 bubble cap plates distributed into 3 sections.Two of them are connected to the feeding device, and can either function like feeding or normal plates, selecting each one through a manual valve.Four temperature sensors measure the temperature in each section junction.
The boiler provides the required heat to the distillation column by actuating on an electric heating thermo-coil located inside the boiler.A temperature sensor is located inside the boiler and a level meter measures the liquid stored in an intermediate bottom drum.A differential-pressure sensor indicates the pressure changes throughout the column which is operated at atmospheric pressure.The bottom flow is controlled by a proportional pneumatic valve and two temperature sensors measure the temperature of the inlet and outlet flows before cooling, with corresponding flow meters with display.
The feeding ethanol-water mixture is stored in a deposit, whose temperature is controlled by a pre-heating electric thermo-coil.The mixture to be distilled is fed into the column in small doses by a feeding pump with temperature controller (TIC3) and sensors installed to measure the temperature of the inlet and outlet feed flows.
The whole instrumentation of the distillation pilot plant is monitored under LabVIEW platform and is connected to the neural based controller designed under MATLAB platform, through a communication system based both on PCI and USB buses, with up to four control loops.In this experimental set-up, boiler heat flow Q B , reflux valve opening V R , distillate valve opening V D and bottom valve opening V B constitute the set of manipulated variables, while light composition C D , bottom composition C B , light product level L D and heavy product level L B define the corresponding set of controlled variables (Fig. 5), while the feed flow temperature T F is considered as a disturbance.It is important to highlight that a dynamical model has not been derived to represent the pilot column behavior, instead of this we have made use of an approximate neural network model to identify the plant dynamics starting from selected I/O plant data operation.

Monitoring and control interface system
The monitoring and control interface system requires a communication system between the sensors and actuators on the one hand and the computer on the other hand throughout I/O modules, whose specifications are settled by the instrumentation characteristics utilized (Table 1 and 2).
In order to manage the I/O signals, USB and PCI buses have been chosen.On the one hand, the PCI bus enables the dynamic configuration of peripheral equipments, since during the operating system startup, the devices connected to PCI buses communicate with the BIOS and calculate the required resources for each one.On the other hand, the USB bus entails a substantial improvement regarding the 'plug and play' technology, having as main objective to suppress the necessity of acquiring different boards for computer ports.Besides this, an optimal performance is achieved for the set of different devices integrated into the instrumentation system, connectable without the needing to open the system.Table 1.Sensors characteristics for the pilot distillation column The acquisition system configuration for the monitoring and control of the pilot plant is constituted by the next set of DAQ (Data Acquisition) boards: NI PCI-6220, NI-PCI-6722, NI-USB-6009, NI-USB-6210 for analog voltage signal acquisition and NI-PCI-6704 for analog current signal acquisition, all supplied by National Instruments (NI).Measurements obtained from the sensors have been conditioned to operate into the standard operational range, and signal averaging for noise cancelation has been applied using specific LabVIEW toolkits (Bishop, 2004).
The monitoring and control interface system developed for the pilot plant is configured throughout the interconnection of the NI Data acquisition system with both the LabVIEW monitoring subsystem and the neurogenetic controller implemented in MATLAB (Fig. 6), both environments linked together through the Mathscripts and running under a Intel core duo with 2.49 GHZ and 3 GB of RAM.The process control scheme developed in each operation cycle implies the execution of five different actions: system initializing, buttons control reading from VI (Virtual Instruments), reading plant data from instruments, control action calculation and writing control data to instruments.

Neural composition estimator and neurogenetic controller
The complete controlled system is composed of a neural network model of the process and a control scheme based on a genetic algorithm which utilizes both the composition and the level variables to get the quasi-optimal control law, by using the neural composition estimator (Fig. 3) for both determining and monitoring the composition of light and heavy components from secondary variable measurements.
After applying the selection method, the inputs to the neural estimation network turned out to be four secondary variables, namely, three temperatures , , , each corresponding to reflux, top and bottom temperatures, and differential pressure drop DPD, while C D and C B the required references in composition but is a bit slow in its response.The response obtained with the PID approach presents a bigger settling time and overshoot and a poorer response to changes in the targets in the coupled variables.In fact, the ISE (integral square error) which characterizes the accuracy of both control schemes during tracking of reference commands, is significantly lower for the neurogenetic control as compared to the PID control both controlled variables, with a _ = 4719.9(%) • , In Fig. 8 are displayed the changes in control actions V R , V P , V H (in % of opening) and Q B (in % of maximum power) corresponding to the set point changes on top and bottom composition as described formerly for the neurogenetic control scheme.It must be emphasized that all control signal are within the operating range with minimum saturation effects, mainly due to mild conditions imposed to the time response profile during the neurogenetic design.

Conclusions
Adaptive neural networks have been applied to the estimation of product composition starting from on-line secondary variables measurements, by selecting the optimal net input vector for estimator by using PCA based algorithm.Genetic algorithms have been used to derive the optimum control law under MATLAB, based both on the neural network model of the pilot column and the estimation of composition.This neurogenetic approach has been applied to the dual control of distillate and bottom composition for a continuous ethanol water nonlinear pilot distillation column monitored under LabVIEW.
The proposed method gives better or equal performances over other methods such as fuzzy or adaptive control by using a simpler design based exclusively on the knowledge about the pilot distillation column in form of I/O operational data.It is also necessary to highlight the potential benefits of artificial neural networks combined with GA when are applied to the multivariable control of nonlinear plants, with unknown first-principles model and under an experimental set-up as was demonstrated with the distillation pilot plant.
Future work is directed toward the application of this methodology to industrial plants and also towards the stability and robustness analysis due to uncertainty generated by the neural network identification errors when the plant is approximated.

Fig. 6 .
Fig. 6.Monitoring and control interface for pilot distillation plant %) • for bottom composition respectively.These facts imply a better performance even when changing conditions are present (variable feed changes), due to the adaptive nature of the neurogenetic controller.

Fig. 7 .Fig. 8 .
Fig. 7. Response of top and bottom composition for set point changes in ethanol purity in (a) 60-70 % range on top (b) 5-12 % range on bottom for pilot distillation column under decoupled PID and neurogenetic control

Table 2 .
Actuators characteristics for the pilot distillation column