Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

7.1 Objectives and Conventional Automatic Control of Chemical Processes

The chemical industry represented and continues to represent a dynamical division of the world economy. On the terms of competitive markets, the justification of this dynamics is conferred by the fact that the products provided by the chemical industry represent basic materials to a number of other industries.

It is important to underline that producing conventional or renewable energy, computers and means of communications would not be possible aside from the existence of the products provided by the chemical industry. We can add amongst the essential products of the chemical industry fuels, medicines and different type of plastic.

Although the ecologists are skeptic regarding the chemical industry, we have to underline the fact that this industry offers new perspectives in respect of processing waste products, obtaining non-pollutant fuels, producing biodegradable plastic, etc. In the first part of this section we will identify the objectives of chemical processes and the necessity of controlling these processes and in the next sections we will approach aspects concerning the conventional automatic control of some categories of chemical processes.

7.1.1 Objectives of Chemical Processes

Frequently met processes in the chemical industry are those associated to the phenomena of transfer and to chemical reactions. In the category of transfer processes, there are classified the ones of mass, thermal energy and impulse transfer. Known as unitary processes, these develope in specific installations, such as fractionating columns, heating furnaces, heat exchangers, condensers, reboilers, chemical reactors, gas compressors.

In chemical plants there are complex processes whose finality is represented by products used as such or which constitute basic materials for other plants. Irrespective of the character of a (complex or unitary) process, this does not represent a goal by itself but it is subordinated to some objectives, amongst which representatives are the ones of quality, efficiency and security.

The quality objectives are presented as specifications such as, for example, the compositions of separated products in the case of mass transfer, the temperatures of heated (cooled) products in the case of thermal transfer or the conversion degree of reactants associated to the chemical reactions.

Regarding the objectives of efficiency, these refer to the profitability of the process, respectively to the existence of a positive difference between the income obtained from the sale of a chemical product and the costs, necessary for its production. Concerning the objectives of security, these imply the deployment of the process so that the safety of the people, of the environment or of the related facilities should not be affected.

The control of a process implies the supervision of a process so that the objectives imposed to it should be achieved. If, for the design of a process, the objectives represent starting points, in the case of the control, these are targets.

The automatic control is based on the following functions of automation: automatic monitoring, automatic control, automatic optimization, automatic safety.

The function of monitoring offers the possibility of identifying the state of a process. Practically, monitoring implies the determination of the values of the parameters associated to a process, which can be achieved by measurement and/or by computation. In Fig. 7.1 it is represented a hierarchical approach, in which the inferior level (level 1) includes systems of measurement and the superior level (level 2), the relations for calculating the values of the parameters which are not measured. Normally, the number of parameters which are measured represents the number of the degrees of freedom of the respective process [1].

Fig. 7.1
figure 1

Hierarchical monitoring system x i process parameters, x im measurement results, x ic computed variables, MS i Measurement System, CM Computing Module

With reference to the function of control, a process is considered adjustable if it can be brought and maintained in a state of reference. Reaching and/or maintaining the state of reference imply the application of commands to the process.

From the point of view of complexity, the automatic control systems (ACS) can be conventional or advanced. A conventional ACS is usually associated to a single parameter. Based on the manner of action, corrective or preventive, these ACS can be: feedback systems (effect), respectively feedforward systems (cause), considered fundamental types of ACS, specific to the level of conventional automation.

The functioning of a conventional ACS dictates the existence of the functions of measurement, command, execution, achieved, in order, by transducers, controllers and final control elements FCE. Usually, the three elements are considered grouped in the automatic device (AD). Thus, it can be considered that, from a structural point of view, an ACS is composed of AD and Process. Another approach, concerning the structure, identifies at the level of an ACS a fixed part and a variable one. The fixed part includes the process, the transducer (for a feedforward ACS the transducers) and the FCE, while the variable part is represented by the controller.

Figure 7.2 presents a hierarchical structure of conventional control, in which at the inferior level it is present feedback control of the parameter y 1 and at the superior one the feedforward control of the parameter y 2.

Fig. 7.2
figure 2

Hierarchical conventional structure: SProc1, SProc2 subprocesses, FF_AD Feedforward Automatic Device, FB_AD Feedback Automatic Device

Evolved structured ACS (advanced control) have associated extended objectives at the entire process. In the case of extended objectives, the controlled variables can be represented by synthetic parameters whose values are determined by computation. The advanced control does not exclude the conventional control, the two categories coexisting within the hierarchical control systems. The functions of monitoring are implied in the achievement of the quality objective and partially, of the security one.

After it has been indicated, among the objectives of a process there is the one which refers firstly to the protection of the human factor and of the environment, to the emergence of some events generated by an abnormal evolution of the process. The Automatic Systems of Protection (ASP), which can have information functions and/or intervention functions, assure the achievement of this objective. The functions of correct information are specific to the Automatic Warning Systems (AWS) and the ones of intervention are achieved by means of Automatic Blocking Systems (ABS) and Automatic Systems of Command (ASC).

AWS have an open structure and have also the role of informing the personnel implied in supervising and operating the process about the momentary state of a plant or about the apparition of an event. ABS assures the supervised removal of a plant or section of a plant from functioning, whereas it has not been intervened duly after the warning of prevention. Practically, the removal from functioning implies the blockage of supplying with energy and/or with raw material. A peculiarity of ABS is represented by the fact that these operate only when removed from functioning and not when reconnected. ACS are open systems, components of ASP, which assure the conditioned start of some plants or their normal stop (not in case of a breakdown). The conditioning of the start infers the authorization of reconnecting a facility only after it is observed the achievement of all the specified conditions.

All the three types of APS contain a Logical Block of Command (LBC) to whose level the logical functions which describe the sequences associated to the warning, blocking and command programs are implemented. LBC from the current APS have the related programs implemented exclusively in a programmed type of logic.

Beginning with the functions carried out in a SAP, we can assign to this a hierarchical structure on two levels, illustrated in Fig. 7.3, in which, at the first level, we find the informational systems, represented by AWS and at the second level there are the systems of intervention, represented by ABS and ACS.

Fig. 7.3
figure 3

Hierarchical structure of an AWS (Automatic Warning System): ABS Automatic Blocking System, AWS Automatic Warning System, ACS Automatic Command System

The optimal control supposes the application to the process of those commands which bring to extreme an objective function (criterion or function of performance). The optimal commands are obtained by means of solving a problem of optimization which also assumes, besides the objective function, the existence of a method of searching the optimum, usually in the presence of some restrictions.

By optimal control, it is assured the achievement of the objective of efficiency, the objective function (functions) usually having an economical element or with economical implications.

The optimal control is situated at a hierarchical level, superior to the conventional automation, receiving values of information from this level and sending values of coordination to this one.

A particular case of control by fixing the values of reference is the one in which these values appear as a result of solving a problem of optimization. In the Fig. 7.4 there is represented the hierarchical structure organized on two levels, in which the first level concerns the conventional automation and the second one the optimization.

Fig. 7.4
figure 4

Hierarchical structure of an optimal control system with fixed reference values

7.1.2 Conventional Automatic Control of Fractionating Processes

The fractionation represents one of the separation methods of a mixture in components or in groups of components. The main objective of a fractionation process is represented by conformation to the quality specifications for the products obtained by fractionation, which can be quantified in their compositions.

In the case of a fractionation column with a single feed flow rate, made up of n components and without side draw, the minimum number of parameters which must be measured for a complete knowledge of the column state is F = (n + 2) + 10 [1].

Regarding the control, for the exact conformation to the quality specifications, we should control the compositions on each tray of the fractionating column. Considering that the internal liquid and steam fluxes between the plates are not accessible, only the compositions of the products extract from the column can be controlled. Under these conditions, in case of a fractionating column without lateral fractions, there can be controlled only the compositions at the top of the column (distilled) respectively at its bottom (residue).

Another important parameter, determining for the fractionation is the pressure at which this process occurs. Thus, it is necessary also the control of this parameter. Beside the compositions and the column pressure, it is also necessary the control of the liquid stock on each tray, in the base of the column and in the reflux drum. Of reasons similar to the ones highlighted at the control of the compositions, it appears that only the accumulations of liquid (the stocks) from the base of the column and the from the reflux drum can be controlled. These are indirectly controlled, by means of the levels of the liquid H B in the base of the column and H RD in the reflux drum.

The control of a parameter is possible only for a fractionation column with a single feed flow rate and without intermediate products, the five control agents can be: the outputs of the products extracted from the column D (distilled) and B (residue), the reflux flow rate L and flow rates of the heating agent Q st and cooling agent Q c. In the Fig. 7.5 the five parameters which must be controlled have associated transducers (T) and to the five available commands we assign control valves. In the same figure, x D and x B represent the concentrations of the light component in the top product and in the bottom product.

Fig. 7.5
figure 5

Controlled variables and manipulated variables for a fractionating column, x D x B the concentration of light component in the top product and bottom product

The Relative Gain Array (RGA) [1] method is used to obtain an optimal pairing (i.e. minimum interactions between control loops) between the manipulated variables and controlled variables. Because the mass transfer (respectively the fractionation) is influenced by the liquid L and steam V fluxes that come into contact, it appears that for the quality control of the products extracted from the column, we must intervene upon the reflux flow rate L and/or the heating agent in the reboiler Q st.

Reasons concerning material balance [2] impose the inclusion of the one of the manipulated variables: distilled (D) or residue (B) [2] among the manipulated variables associated to the control of the compositions. There are several possible pairs, in the Fig. 7.6 being represented the structure of control based on the pair L-B.

Fig. 7.6
figure 6

L-B structure for dual concentration control of light component in top product and bottom product

This structure uses as manipulated variables for the control of the compositions x D and x B the reflux flow rate L respectively the residue flow rate B. This structure is of type with direct material balance because one of the product flow rate, respectively the residue flow rate, is used as command for the control of one of the compositions. The levels H B and H RD are controlled by means of the residue flow rate B and the heating agent flow rate in the reboiler Q st.

All the control systems in the Fig. 7.6 are feedback systems. In the case of the control systems for the compositions (the AC controllers) the durations of the transient regime are determined by the dynamics of the mass transfer (of the order of hours). In order to avoid the very long duration of the transient regime, during which the distillation products compositions are varying, we can use the feedforward control. In the Fig. 7.7 it is presented a structure of feedforward control, in which there are considered the disturbances represented by the feed flow rate F and the concentration of the light component in the feed x F.

Fig. 7.7
figure 7

Hierarchical control system of a fractionating column ACP dual feedforward concentration controller

The system illustrated in the Fig. 7.7 allows the determination and the application to the process of values of the manipulated variables L and B, so that the influence of the disturbances F and x F upon the compositions x D and x B should be rejected. The stationary value of the command B is obtained from the relations associated to general balance and component balance,

$$ F = B_{\text{st}} + D_{\text{st}} $$
(7.1)
$$ Fx_{\text{F}} = B_{\text{st}} x_{\text{B}} + D_{\text{st}} x_{\text{D}} $$
(7.2)

Solving the system formed of the Eqs. (7.1) and (7.2) it results:

$$ B_{\text{st}} = F\frac{{x_{\text{D}} - x_{\text{F}} }}{{x_{\text{D}} - x_{\text{B}} }} $$
(7.3)

The output value L st can be determined using a simplified rapid design method adapted for control. One of these models is Douglas-Jafarey-McAvoy [3], that is based on a double expression of the separation factor S respectively:

$$ S = \left( {\frac{{\alpha_{\text{m}} }}{{\sqrt {1 + 1/(Rx_{\text{F}} )} }}} \right)^{N} $$
(7.4)
$$ S = \frac{{x_{\text{D}} /x_{\text{B}} }}{{(1 - x_{\text{D}} )/(1 - x_{\text{B}} )}} $$
(7.5)
$$ \left( {\frac{{\alpha_{\text{m}} }}{{\sqrt {1 + 1/(Rx_{\text{F}} )} }}} \right)^{N} = \frac{{x_{\text{D}} /x_{\text{B}} }}{{(1 - x_{\text{D}} )/(1 - x_{\text{B}} )}} $$
(7.6)

In the relations (7.4) and (7.5), α m is the mean relative volatility of the light component in comparison, N the number of theoretical trays and R the reflux ratio. From the relation (7.6) we determine R, and implicitly L st considering that the reflux ratio is defined as the ratio between the outputs L and D (R = L/D).

In order that the effect of the disturbances should be synchronized with the one of the manipulated variables, the stationary model is completed with first order, deadtime elements, which ensure a delay of the commands application, respectively:

$$ a_{\text{B}} \frac{{{\text{d}}B(t)}}{{{\text{d}}t}} + B(t) = B_{\text{st}} (t - \tau_{\text{B}} ) $$
(7.7)
$$ a_{\text{L}} \frac{{{\text{d}}L(t)}}{{{\text{d}}t}} + L(t) = L_{\text{st}} (t - \tau_{\text{L}} ) $$
(7.8)

In the differential equations (7.7) and (7.8), the time constants a L and a B as well as the deadtimes τ L and τ B are determined by respecting the delays caused by the hydraulic phenomena from the column. By solving these equations in real time we obtain the dynamic values of the commands L(t) and B(t) which are applied as set points to the associated controllers.

The stationary model of control represented by the Eqs. (7.1)–(7.6) is valid only in the proximity of a mean functioning point of the process. When this point changes, the model must be adapted, variables used in adaptation being the relative volatility α and the number of theoretical trays N.

The structure of feedforward control, concisely presented above, has been successfully implemented in industry for a propylene-propane separation column [4, 5]. The results of the implementation have been quantified in the growth of conform propylene production correlated to the decrease of the separation effort, respectively of the flow rate of the steam in the reboiler of the column.

A parameter that directly influences the fractionation is the pressure. The processes of fractionation are designed taking into account a certain functioning pressure, for which reason this parameter must be maintained at a precise reference value. Usually the control of the pressure is achieved by intervening upon the quantity of thermal energy extract from the column. Because the biggest part of the thermal energy is given by the condensation of the steam, it appears that we can control the pressure by intervening upon the process of condensation.

In the case of the control structure presented in Fig. 7.5, the pressure is controlled by intervening upon the flow rate of the cooling agent Q c. This solution is vulnerable due to the emergence, over a certain value of the flow rate Q c of the phenomena of condensation saturation and implicitly of the possibility to control the pressure.

Much more efficient is the control of the pressure by intervening upon the condensation area from the steam space of the condenser. In the Fig. 7.7 it is presented this solution for the situation in which the condenser is situated under the reflux drum of the fractionation column. As it can be observed, the vapor flow Q V is divided, the secondary vapor flow Q S being used as command for the pressure control. We demonstrate [1] that the difference between the liquid levels from the reflux drum and the condenser can be controlled through the flow rate Q E as manipulated variable. Considering that the level in the reflux drum is controlled, it appears that, by modifying the flow rate Q E we can control the measure of the condensation area and implicitly the pressure.

7.1.3 Conventional Automatic Control of Heat Transfer Processes

Heat represents a form of energy specific to chemical processes. The processes that absorb heat are called endothermic and the processes that generate heat are called exothermic. Usually, thermal processes implies the production, exhaust and the transfer of heat. Taking into account the importance of heat exchange for chemical processes, we can admit that thermal processes have a strong interaction with chemical processes. As part of the technological equipment used by the thermal processes we can enumerate heating furnaces, steam generators, reboilers, condensers, etc.

No matter the type of thermic process, the quality objective depends on the amount of produced heat, exhausted or exchanged. From the control point of view, the most important parameter of a thermal process is represented by the temperature. Regarding efficiency, it is quantified by indicators like combustion efficiency, heat recovery rate, etc. Security objectives relate avoiding of environment pollution by dangerous emissions, explosions avoiding, etc.

The control function corresponding to these processes relates especially to temperature. In the following it will be presented as examples two control structures for heating furnaces with gas fuel. In such a furnace, the combustion process represented by the exothermic reaction between a fuel and an oxidant develops, the two components being also actuating quantities.

As the first control structure it is presented Fig. 7.8 in which the temperature is controlled in a feedback manner. As it can be observed, the temperature is controlled with the aid of combustion flow Q fuel. The combustion is controlled by adjusting air flow with the aid of the ratio block RB, as a function of fuel flow. Closed loop control of temperature presents the disadvantage of a non-steady state in the case of set point change or disturbances.

Fig. 7.8
figure 8

Temperature and air/fuel ratio feedback control structure for a heating furnace: RB Ratio Block; K i reference ratio

The second variant, presented in Fig. 7.9 obtains temperature control by a feedforward structure, taking into account the disturbances represented by the feed flow Q p and its temperature T 0.

Fig. 7.9
figure 9

Temperature and air/fuel ratio feedforward control structure for a heating furnace: RB Ratio Block; K i reference ratio

The algorithm associated with the controller TC is, in this case, process dependent and reflects the heat transferred to the product heated by burning the fuel as expressed in the following thermal balance equation:

$$ Q_{\text{fuel}} q_{\text{fuel}} = Q_{p} c_{\text{p}} (T_{\text{i}} - T_{ 0} ) + W_{\text{l}} $$
(7.9)

where:

  • Q fuel—fuel flow rate

  • q fuel—fuel thermal value

  • Q p—product flow rate

  • c p—product specific heat capacity

  • T i—temperature reference value

  • T 0—product temperature at the furnace input

  • W l—flow rate of heat losses

From Eq. (7.9) it can be obtained the stationary state fuel flow rate:

$$ Q_{{{\text{fuel}}\_{\text{st}}}} = Q_{\text{p}} \frac{{c_{\text{p}} }}{{q_{\text{fuel}} }}(T_{\text{i}} - T_{ 0} ) + \frac{{W_{\text{l}} }}{{q_{\text{fuel}} }} $$
(7.10)

where: Q p and T 0 are measured and T i, c p, q fuel and W l are considered known constants.

In order to obtain the dynamic regime output it is necessary to solve the following differential equation associated with the dynamics of heat transfer process:

$$ a_{\text{T}} \frac{{{\text{d}}Q_{\text{fuel}} (t)}}{{{\text{d}}t}} + Q_{\text{fuel}} (t) = Q_{{{\text{fuel}}\_{\text{st}}}} (t - \tau_{\text{T}} ) $$
(7.11)

The dynamic section of the model, represented by (7.11) is justified by the necessity of applying the output value, that means the changing of fuel flow rate respectively in accordance to the heat transfer process dynamic behavior.

7.1.4 Conventional Automatic Control of Chemical Reactors

The control of a chemical reaction poses problems regarding the stoichiometry, thermodynamics and kinetics of the reaction. Deciding the appropriate control structure depends also on the type of reactor in which the chemical reaction takes place.

Stoichiometry of the chemical reaction allows fixing the ratios between the amounts of reactants that make the reaction possible. From the automatic control point of view, it is necessary to provide a certain ratio between the reactants flow rate.

Applying thermodynamics tools to a chemical reaction allows the evaluation of the reaction heat and of the equilibrium conversion rate, respectively [1]. The development of a chemical reaction at equilibrium requires meeting certain values for temperature and pressure, automatic control of these parameters respectively.

Chemical reaction kinetics studies mainly the reaction rate of the reaction development. When maintaining a certain reaction rate, temperature control is essential. The existence of catalysts provides, in certain conditions, an increase in the reaction rate. From the point of view of automatic control, the ratio of reactant flow rate and of catalyst flow rate can represent a process action for the reaction rate automatic control.

As far as the chemical reaction equipment host is concerned, chemical reactors respectively, there are diverse types of reactor from which we mention the Continuous Stirred-Tank Reactors and the Tubular Reactors.

From the automatic control point of view, continuous stirred-tank reactors are treated as concentrated-parameter systems. In other words, inside the reactor, parameters values (temperature, composition of reactants, conversion rate, pressure, etc.) are only functions of time and not of spatial coordinates.

As shown in Fig. 7.10, in order to control the temperature inside a continuous stirred-tank reactor there should be varied the heat carrier flow by means of a cascade temperature-temperature of the heat carrier control system. Cascade control provides the advantage of compensating all the disturbance effects that affect heat carrier temperature. The reactor load is also controlled when using the A1 reactant flow rate as a control action and the reactor’s holdup, actuating upon the reactor’s output flow rate.

Fig. 7.10
figure 10

Control structure of a Continous Stirred-Tank Reactor

For the reactors for which the number of moles of substance is changing, such as the polymerization reactions, it is necessary to control the pressure, such an example being presented in Fig. 7.11.

Fig. 7.11
figure 11

Pressure control for a Continous Stirred-Tank Reactor

In order to control the pressure, the reaction product flow rate is used as a control value. Also, the flow rates of the reactants are controlled in order to maintain a proper development of the reaction.

Tubular reactors are distributed parameter systems characterized by variable parameters, as functions of both time and spatial coordinates. Specific to such a reactor are the following parameters: temperature, composition, conversion rate, etc.

For such a reactor, the main objective of the automatic control is represented by the fulfillment of quality specifications of the reaction product. Among these specifications, a special parameter is considered the composition of the product. Because composition measurement poses several difficulties, including high inertia, it is preferred the control of the reaction with the aid of temperature. Practically, it is necessary to control the temperature profile along the reactor, the reactor itself being a composition profile indicator.

For these reactors, in which strong exothermic reactions take place, it is necessary to consider the injection of the cooling medium in many points.

It can be observed in Fig. 7.12 that every injected flow rate is used as an action control for controlling the temperatures from different points of the tubular reactor.

Fig. 7.12
figure 12

Temperature profile control along a tubular reactor

7.2 Computational Intelligence Techniques for Process Control

The most advanced process control strategies are model-based and make use of some artificial intelligence techniques, usually applied to non-algorithmic problem solving, such as expert systems, artificial neural networks, genetic algorithms etc. Computational intelligence was introduced in 1994 [6] as a paradigm that combines three main complementary computing technologies: fuzzy computing (based on fuzzy logic and fuzzy sets), neural computing (based on artificial neural networks) and evolutionary computing (based on genetic algorithms and evolutionary strategies). Recent developments in this area revealed the efficiency of using the new computational intelligence techniques such as those provided by swarm intelligence (e.g. particle swarm optimization, ant colony optimization).

In literature is presented a set of applications of artificial intelligence techniques in various processes control, such as BIOEXPERT, AQUALOGIC, etc. [710]. In this subchapter it is presented an introduction to the basic computational intelligence techniques (fuzzy systems, artificial neural networks and genetic algorithms) and a brief overview of some computational intelligence applications in chemical process control.

7.2.1 Computational Intelligence Techniques

The main basic computational intelligence techniques are fuzzy systems, artificial neural networks and genetic algorithms. Fuzzy systems are a proper technique for imprecision and approximate reasoning, artificial neural networks for learning, and genetic algorithms for optimization.

Fuzzy systems combines fuzzy logic with fuzzy sets theory [11], the key idea being that truth values (from the fuzzy logic) and the membership values (from the fuzzy sets theory) are real values in the interval [0, 1], where 0 means absolute false, and 1 absolute true. A fuzzy system is developed by structuring the domain knowledge (provided by the human experts from the chosen field of application) under the form of linguistic variables and fuzzy rules set. A fuzzy set can be defined by assigning to each possible object a value that represent the fuzzy set membership degree. The fuzzy sets theory express imprecision quantitatively by introducing the membership degree from it is not member to it is totally member. If F is a fuzzy set than the μ membership function measures the degree under which x is a member of F. This membership degree represents the possibility that x can be described by F. Each membership function, specific to a certain fuzzy term, is represented by four parameters grouped in the T i term: T i = (a ib ic id i), corresponding to the weighted interval from Fig. 7.13. The form of the membership function can be triangular, trapezoidal, Gaussian, sigmoidal etc., depending on the application.

Fig. 7.13
figure 13

The membership function parametric representation

In the sets theory the high, medium and small symbolic values of the temperature variable, for example, have mutual exclusive associated values. If the numerical value of the temperature is smaller than 100 °C then the symbolic value is small, if the value is in the interval [100 °C, 300 °C] then the value is medium, and if it is greater than 300 °C then the value is high, as shown in Fig. 7.14, where there are overlappings in the neighbourhood of the interval limits (100 and 300 °C).

Fig. 7.14
figure 14

Examples of fuzzy values for the temperature variable

Figure 7.15 presents the general scheme of a fuzzy system. The role of the fuzzy system is to make fuzzy inferences that interpret the input values and based on a fuzzy rules set assign values to the outputs.

Fig. 7.15
figure 15

The general scheme of a fuzzy system

The most important engineering applications of fuzzy systems are control applications (e.g. system control and process control). Figure 7.16 shows the block diagram of a fuzzy control system. A fuzzy inference system (FIS) is a non linear system that applies if-then fuzzy rules and can model the qualitative aspects of the human knowledge and of the reasoning processes without accurate quantitative analysis. The fuzzy logic modeling techniques can be classified in three categories: the Mamdani type linguistic technique, the relational equation, and the Takagi-Sugeno-Kang (TSK) technique.

Fig. 7.16
figure 16

The block diagram of a fuzzy control system

Artificial neural networks are universal approximators [12], capable to learn complex mappings that are dependent on their structures. An artificial neural network (ANN) is composed by a number of processing units named neurons that are connected under a specific topological structure. Each connection has associated a numerical weight, that is usually, randomly initialized and later determined, during the neural network training process. Each neuron has an activation function that allow information transmission toward other neurons. The construction of a neural network for solving a certain problem consists in setting the network topology with the number of layers, number of neurons (for each layer: input, output, hidden), the type of each neuron (i.e. activation function) and the way of interconnecting the neurons. The next step is weights initialization and the network training by applying a training algorithm to a training set for which the final values of the weights are computed.

In Fig. 7.17 it is given the block diagram of a generic artificial neural network.

Fig. 7.17
figure 17

The block diagram of a generic ANN

The generic neural computing algorithm written in pseudocode is given in Fig. 7.18.

Fig. 7.18
figure 18

The generic ANN computing algorithm

The first step of the algorithm makes weights initialization, usually with random values from the interval [0, 1]. During the second step the network is trained by using a training algorithm (one of the most used is backpropagation and its various improved versions) and a training set, and the final values of the weights are determined. In the last step, the artificial neural network is tested and validated on specific testing and validation data sets.

The main neural network topological structures are feedforward and recurrent. Examples of neural networks types are feedforward neural networks, radial based neural networks, Elman neural networks, Hopfield neural networks, Kohonen neural networks, Boltzman neural networks, probabilistic neural networks, etc.

Artificial neural networks are applied with success in various applications: pattern recognition, time series prediction, optimization problems (such as optimal control) etc. They are a proper tool for solving engineering problems that have complex noisy input data.

Genetic algorithms (GA) are a subclass of evolutive algorithms that are optimization methods that mimics the processes that appear in genetics and natural evolution [13]. They maintain a population of solutions (named individuals) that evolve in time by applying genetic operators of selection, recombination and mutation. The rate of applying mutation operators is much smaller than the recombination rate.

A genetic algorithm provides an efficient optimization technique, being a stochastic algorithm. Several solutions are investigated in parallel. The final solution is the global optimal solution. A genetic algorithm is a search algorithm that finds the best solution that maximizes a fitness function (FF) that is problem dependent. In the classical variant of a genetic algorithm, a solution is represented as a string from a finite alphabet, each element of the string being a gene. In general, the string is a string of bits. The classical form of a genetic algorithm is provided in Fig. 7.19 under the form of a function written in pseudocode.

Fig. 7.19
figure 19

The general form of a classical genetic algorithm

Genetic algorithms can be applied to process control, either as a standalone technique or in combination with other computational intelligence techniques.

The new computational intelligence techniques provided by swarm intelligence are part of the evolutionary computing. They are using nature inspired collective intelligence. Examples of such techniques are particle swarm intelligence (PSO) and ant colony optimization (ACO). These techniques can be applied also to process control.

As stated initially in [14] and lately confirmed by the research results reported in the literature, combinations of computational intelligence techniques (i.e. hybrid techniques) are more effective and robust in process control.

One of the most used hybrid fuzzy systems is ANFIS—the Adaptive Neuro-Fuzzy Inference System introduced in [15], that is a FIS based on adaptive artificial neural networks. ANFIS uses the TSK model and is actually a FIS implemented under the form of an artificial neural network. Each layer of the network corresponds to a part of the FIS and the FIS parameters are codified as the artificial neural network weights.

7.2.2 Applications of Computational Intelligence in Chemical Process Control

Several applications of computational intelligence in chemical process control were reported in the literature. Some of them are using one of the three main computational intelligence techniques (FIS, ANN, GA), while others are using combinations of these techniques. In this section we are making a brief presentation of selected applications, grouped by the computational intelligence technique that was applied.

7.2.2.1 Fuzzy Systems Applications

In [16] it is presented a fuzzy logic control used as a promising control technique for improved process control of a fluid catalytic cracking unit in refinery process industry. A recent example of applying real time fuzzy control to a pH neutralization process is given in [17]. The experiments were done at laboratory level and showed a good behavior of the proposed PI fuzzy controller. Another example of a pH fuzzy controller was proposed more than a decade ago in [18]. A fuzzy dynamic learning controller was proposed in [19] for time delayed, non linear and unstable chemical processes control.

7.2.2.2 Artificial Neural Networks Applications

In [20] it is tackled the modeling problem of complicated batch processes in the context of model-based control of chemical processes. The authors proposed a novel hybrid neural network, called a structure approaching hybrid neural network (SAHNN), for intelligent modeling of a batch reactor with partially unmeasurable states. The predictive control of a wastewater treatment process is described in [21]. A predictive controller based on a feedforward artificial neural network as internal model of the process, alters the dilution rate and control the concentration of the dissolved oxygen. The artificial neural networks approach was used in the last two decades as a powerful tool for a wide range of applications in the oil and chemical industry. A recent example is reported in [22], where a feedforward neural network was applied to model the desalting and dehydration process, with the purpose of optimizing the whole chemical process and increasing the efficiency of oil production. In [23] it is presented a review of some applications of artificial neural networks in chemical process control, at simulation and online implementation level. Most of the reported applications use feedforward neural networks. As shown in [24] the most popular domain in which artificial neural networks were applied is chemical engineering. The applications reported by authors included chemical process control optimization. Finally, a computer simulation study of industrial process control of chemical reactions by using spectroscopic data and artificial neural networks is described in an older research work [25].

7.2.2.3 Genetic Algorithms Applications

In [26] it is presented an intelligent technique based on genetic algorithms for optimal controller tuning in a pH neutralization process. The experimental results showed the capability of the genetic algorithm to quickly adapt the controller to dynamic plant characteristic changes in the pH neutralization process. The biogas plant control and optimization by using genetic algorithms and particle swarm optimization is discussed in [27]. The authors apply the two computational intelligence techniques (GA and PSO) for the optimization of the substrate feed with regard to its flow rate and composition in the case of a biogas plant. The use of two computational intelligence techniques, genetic algorithms and fuzzy systems, for fed-batch fermentation process control is presented in [28]. The experimental results showed that the two techniques performed better than conventional optimizations methods in the presence of noise, parameter variation and randomness.

7.2.2.4 Swarm Intelligence Applications

In [29] it is discussed in detail the implementation of particle swarm optimization (PSO) algorithm in PID tuning for a controller of a real time chemical process. Particle swarm optimization is an evolutionary computation algorithm that simulates social behavior in swarms (e.g. bird flocking and fish schooling). The main advantages of the proposed swarm intelligence based solution are given by its simplicity and low cost, as well as by its good performance in case of PID controllers tuning. Another application of using PSO is described in [27]. The application of another swarm intelligence technique, ant colony optimization (ACO) is reported in [30]. The authors proposed a new optimal method for designing and computing the parameters of an ACO-based controller for non linear systems described by TSK models (Fig. 7.19).

7.2.2.5 Hybrid Computational Intelligence Applications

The neuro-fuzzy control of chemical technological processes is discussed in [31]. A combination of the predictive and ANFIS controller was proposed and tested as intelligent control system for a Continuous Stirred-Tank Reactor (CSTR) control problem. The experiments showed better results than those obtained with the original predictive and PID controller. Another successful application of neuro-fuzzy intelligent process control is presented in [32].

7.3 Case study: The Wastewater pH Neutralisation Process in a Wastewater Treatment Plant

Through treatment process it is understood the set of physical procedures (that compose the physical wastewater treatment plant (WWTP) step), physical-chemical procedures (physical-chemical WWTP step) and the biological ones (the biological step) through which is achieved the pollutants removing from wastewater. Such procedures are: neutralization, flotation, absorption, extraction, etc. The pH neutralization process is achieved in the WWTP physical-chemical step, in chemical reactors of high capacity, the so called Continuous Stirred Tank Reactors (CSTR). The quality indicator pH is a measure of solution acid or alkaline (basic) character and is measured on a scale from 0 to 14 pH units. For acid type wastewater neutralization (with pH < 7), namely for increasing the pH value, are used basic (alkaline) type substances, such as: lime (calcium lime-CaO) under calcium hydroxide form-Ca(OH)2), dolomite (calcium and magnesium carbonate), limestone, hydroxide sodium (NaOH), etc. For alkaline (basic) type wastewater neutralization (with pH > 7), namely for decreasing the pH value, are used: sulphuric acid (H 2 SO 4), carbonic acid (H 2 CO 3) and chlorine hydride (HCl) [33]. In Fig. 7.20 are presented examples of dynamic characteristics (the process response in time) for pH neutralization process [1].

Fig. 7.20
figure 20

Dynamic characteristics for acid and alkaline pH neutralization

As it can be observed in Fig. 7.20, the wastewater pH neutralization process is a complex one having a high nonlinear behaviour.

In this case study is presented a neuro-fuzzy system developed for wastewater pH control, system that has an ANFIS (Adaptive Neuro-Fuzzy Inference System) controller. Also, it was developed a mathematical model (under a transfer function form) of the wastewater pH neutralization process. The architecture of the proposed automatic control system for wastewater pH control (pHACS) is presented in Fig. 7.21.

Fig. 7.21
figure 21

pHACS architecture [34]

As it can be observed in Fig. 7.21, the pHACS components are [34]:

  1. 1.

    The process represented by the developed mathematical model (transfer function) for wastewater pH neutralization process

  2. 2.

    The controller (R-ANFIS) developed using neuro-fuzzy systems (ANFIS); for controller development were used the facilities offered by Matlab 7.9 environment through ANFIS Editor GUI

  3. 3.

    Two actuators EE1 and EE2; EE1 is the acid-type neutralizer (H 2 SO 4) dosing pump while EE2 is the alkali-type neutralizer (NaOH) dosing pump; the functioning of one of these two pumps depends on the pH character (acid or alkaline)

  4. 4.

    A pH meter for measuring the controlled variable (pH) value at the process output

  5. 5.

    The wastewater pH set point (r pH), value established at national level through a special normative in domain, called NTPA-001/2002 [35]

  6. 6.

    The command (c) generated by the system controller (R-ANFIS), controller that, depending on the error value, generates the command for the necessary neutralizer agent flow for bringing the controlled variable (pH) to its set point

  7. 7.

    The error (e) defined as the difference between the pH set point (r pH) and the measured pH value at the process output (m pH)

  8. 8.

    The manipulated variable (u) that represents neutralizer agent flow dosage

  9. 9.

    pH is the controlled output

  10. 10.

    m pH is the measurement signal

Hereinafter is presented the development of the wastewater pH neutralization process mathematical model (under a transfer function form) and the development of the R-ANFIS controller as a component of the proposed pHACS.

7.3.1 The Process Mathematical Model Development

The analyzed process is that of wastewater pH neutralization, process that takes place in a wastewater treatment plant (WWTP) physico-chemical step. For this type of process, studying the literature was chosen the mathematical model developed by Ibrahim R. in his PhD Thesis [36]. The mathematical model of the process was first of all analyzed and then implemented (simulated) in Matlab 7.9/Simulink environment in [34]. According to [36] and [1], the pH neutralization process has a high-nonlinear behaviour. Due to the process model complexity, in order to obtain that transfer function (the simplified mathematical model of the process) that better describes the process was applied the model linearization. The pH neutralization process inputs and outputs are presented in Fig. 7.22 [34].

Fig. 7.22
figure 22

Process inputs/outputs [34]

As it can be observed in Fig. 7.22, the process inputs and outputs are:

  1. 1.

    F 1 is the acid stream flow rate;

  2. 2.

    F 2 alkaline stream flow rate;

  3. 3.

    C 1 is the acid concentration in basin;

  4. 4.

    C 2 is the alkalinity concentration in basin;

  5. 5.

    y(pH) is the process output.

For model linearization (for obtaining the transfer function) we need to calculate the proportional control factor (K p) and the process transient time (T p), defined as follows:

$$ K_{\text{p}} = \frac{\varDelta y}{{\varDelta F_{ 1} }} $$
(7.12)
$$ K_{\text{p}} = \frac{\varDelta y}{{\varDelta F_{ 2} }} $$
(7.13)
$$ T_{\text{p}} = \frac{{T_{\text{tr}} }}{4} $$
(7.14)

Δy is the output variation (pH variation), ΔF 1 is the input F 1 variation (acid type-neutralizer flow variation), ΔF 2 is the input F 2 variation (alkali type-neutralizer flow variation) and T tr is the transient regime duration.

As it can be observed in Fig. 7.22, we considered F 1 (acid type neutralizer agent) step input in the process and the others inputs were maintained constant. In this case the process dynamic response is presented in Fig. 7.23.

Fig. 7.23
figure 23

The process response at step input F 1 [34]

Using (7.12) and knowing according to [36] the domains for F 1 (F 1 ∊ [0.0.260]l/h) and for pH (pH ∊ [0.0.14] pHunits), we have:

  1. 1.

    K p = – 0.72;

  2. 2.

    T tr = t(y(0.98xΔy)) = 0.795;

  3. 3.

    T p = 0.19875;

  4. 4.

    \( G_{{{\text{yF}}_{ 1} }} = \frac{{K_{\text{p}} }}{{T_{\text{p}} s + 1}} = - \frac{0.72}{0.19875s + 1} \) (transfer function)

Using the same reasoning was also achieved the linearization for F 2 domain (F2 ∊ [0.0.340]l/h), as it can be observed in Fig. 7.24.

Fig. 7.24
figure 24

Process inputs/outputs [34]

We considered F 2 (alkali-type neutralizer agent) step input in process and the others inputs are maintained constant. The process response at input step F 2 is that presented in Fig. 7.25.

Fig. 7.25
figure 25

The process response at step input F 2 [34]

Using (7.13) and (7.14) were obtained:

  1. 1.

    \( K_{\text{p}} = 1.72 \)

  2. 2.

    \( T_{\text{p}} = 0.19875 \)

  3. 3.

    \( G_{{{\text{yF}}_{ 2} }} = \frac{{K_{\text{p}} }}{{T_{\text{p}} s + 1}} = \frac{0.72}{0.19875s + 1} \) (transfer function)

Using the linearization of the model, we obtained the searched transfer function that will be used as the model of the wastewater pH neutralization process.

7.3.2 The R-ANFIS Controller Development

As we have mentioned for developing the R-ANFIS controller from Fig. 7.21, were used the facilities supplied by Matlab 7.9, through the anfisedit command usage, command that calls the ANFIS Editor.

In 26, R-ANFIS (RpH2) is considered to be a first-order Sugeno type fuzzy system with one input (error) and one output (EE1/EE2 opening degree for acid or alkaline/basic neutralizer agent dosage).

The rules base contains a number of ten rules, as it can be observed in Table 7.1, rules automated generated through the usage of Generate Fis option, option that based on the training data (data obtained through the process analysis) from Table 7.2, generated the system with fuzzy inference (FIS) (FIS with the structure presented in Fig. 7.26).

Table 7.1 R-ANFIS rule base
Fig. 7.26
figure 26

R-ANFIS architecture

In Table 7.1, ERROR represents the controller input, defined as the difference between the pH set point and the pH measurement at the process output, while EE1/EE2 OPEN DEGREE is the controller command (output), defined to be the EE1 or EE2 opening degree for acid or alkali type neutralizer agent flow necessary for pH control.

After the automatically obtaining of FIS (Fig. 7.26), can be visualized the generated ANFIS model using Structure button from user graphical interface (GUI). In Fig. 7.27 is presented the ANFIS model structure (Table 7.2).

Fig. 7.27
figure 27

ANFIS model structure

Table 7.2 Training data

In Fig. 7.27 we have a model with one input (error), one output (EE1/EE2 opening degree for acid or alkali type neutralizer agent dosage) and also a number of ten fuzzy rules.

As it can be observed in Fig. 7.28, for training the generated fuzzy inference system (FIS), was used a hybrid training algorithm, that according to [37] has two steps: feed forward-propagation and back-propagation.

Fig. 7.28
figure 28

FIS training

For model validation was used a validation data set. As it can be observed in Fig. 7.29, we can say that the generated model is a valid one (validation data output follows the FIS output).

Fig. 7.29
figure 29

ANFIS model validation

In Fig. 7.30 is presented the application Rule Viewer that shows a map of the entire fuzzy inference process.

Fig. 7.30
figure 30

R-ANFIS Rule Viewer

In Fig. 7.31 is presented under a graphical form the relation between the R-ANFIS controller input (error) and output (command-EE1/EE2 OPEN DEGREE).

Fig. 7.31
figure 31

R-ANFIS controller

Having developed the R-ANFIS controller it can be developed the automated system for wastewater pH control (pHACS) in Simulink.

7.3.3 pHACS Implementing in Matlab/Simulink

Using the fuzzy inference system presented in Fig. 7.26, generated and trained with the help of an artificial neural network (ANN), was developed the R-ANFIS controller. For implementing this controller in Simulink was used Fuzzy Logic Controller with Ruleviewer block, as it can be observed in Fig. 7.32.

Fig. 7.32
figure 32

Fuzzy Logic Controller with Ruleviewer block

In Fig. 7.33 is presented the neuro-fuzzy automatic system (pHACS) for an alkali type pH control using the transfer function \( G_{{{\text{yF}}_{ 1} }} \) obtained through model linearization (3.1).

Fig. 7.33
figure 33

pHACS for alkali-type pH control using \( G_{{{\text{yF}}_{ 1} }} \) (Experiment no.1)

The pHACS for alkali-type pH control response is presented in Fig. 7.34.

Fig. 7.34
figure 34

pHACS response for alkali-type pH (Experiment no.1)

In Fig. 7.35 is presented the pHACS architecture for acid-type pH neutralization using the transfer function \( G_{{{\text{yF}}_{ 2} }} \).

Fig. 7.35
figure 35

pHACS for acid-type pH control using \( G_{{{\text{yF}}_{ 2} }} \) (Experiment no.2)

The pHACS for acid-type pH control response is presented in Fig. 7.36.

Fig. 7.36
figure 36

pHACS response for acid-type pH (Experiment no.2)

The experimental results obtained for the above mentioned experiments are presented in Table 7.3.

Table 7.3 Experimental results

7.4 Conclusion

As it can be observed in Table 7.3 using neuro-fuzzy control, the pH was brought very close to its set point (7.7), therefore the controller (R-ANFIS) obtained using neuro-fuzzy techniques and the developed automatic control system (pHACS) are supplying good results, such as low error.

Through the usage of artificial neural networks (ANN), especially to theirs capacity to learn and to adapt, the fuzzy systems (FIS) performances are considerably improved. So, the parameters of a fuzzy system (FIS set of rules and membership functions) are calculated through learning (training) methods using input-output data sets.

The usage of neuro-fuzzy controllers obtained through the development, training and testing of a Sugeno type fuzzy system can be a viable solution for processes with essential nonlinearities, as in case of the wastewater pH neutralization process.

The applicability of artificial intelligence (AI) techniques (fuzzy logic, artificial neural networks, neuro-fuzzy systems, expert systems, etc.) in control problems is justified due to the AI techniques advantages (for instance, fuzzy logic is indicated to be used for complex and nonlinear process control, etc.) that AI brings to the control domain.

Computational intelligence provides low cost robust solutions with a good tolerance of imprecision and uncertainty, being a proper tool for process control in real time, where the tradeoff is between accuracy and processing speed. The most efficient chemical process control methods are those based on hybrid approaches that combine different computational intelligence techniques.