# Design of Multiregional Supervisory Fuzzy PID Control of pH Reactors

Authors: Shebel AlSabbah; Mujahed AlDhaifallah; Mohammad Al-Jarrah
Journal: Journal of Control Science and Engineering
 (2015)

---

## Abstract

This work concerns designing multiregional supervisory fuzzy PID (Proportional-Integral-Derivative) control for pH reactors. The proposed work focuses, mainly, on two themes. The first one is to propose a multiregional supervisory fuzzy-based cascade control structure. It would enable modifying dynamics and enhance system’s stability. The fuzzy system (master loop) has been chosen as a tuner for PID controller (slave loop). It takes into consideration parameters uncertainties and reference tracking. The second theme concerns designing a hybrid neural network-based pH estimator. The proposed estimator would overcome the industrial drawbacks, that is, cost and size, found with conventional methods for pH measurement. The final end-user-interface (EUI) front panel and the results that evaluate the performance of the supervisory fuzzy PID-based control system and hybrid NN-based estimator have been presented using the compatibility found between LabView and MatLab. They lead to conclude that the proposed algorithms are appropriate to systems nonlinearities encountered with pH reactors.


---

## Body

## 1. Introduction

In order to overcome the nonlinearity issue found with most real plants, a wide variety of linear control systems have been developed [1]. PID controllers and conventional algorithms are the most popular control methods used in industry [1–3]. Nevertheless, they are proper for a specific operation range with a linearized plant model. Whenever perturbations lead the process to work out of its operating point, manual adjustment of PID controller parameters is required. Different approaches have been developed to deal with such issue, like predictive model based and neural networks [1]. In [4–7], the utilization of fuzzy logic as online PID tuner has been proposed. Fuzzy control systems are able to supervise the controller performance in the steady state and transition state. Despite this, such algorithms may have poor dynamic performance at certain operating points. To enlarge the working points that are covered by the controlled plant, a multiregional supervisor control is being considered in this work, as will be explained on the coming sections [7].Our primary motivation is to build end-user-interface (EUI) using the compatibility found between LabView and MatLab. The designed EUI would provide a flexible testbed for modeling and implementation of advanced control strategies without the expense or danger of working with real-time processes.In this paper, there are two main contributions:(i) The first one is the development of a multiregional supervisory fuzzy PID (MSF-PID) system to improve the accuracy and modify the dynamics of the PID-controlled pH process. The proposed algorithm has been designed with cascade structure.The proposed fuzzy-based control works in subdivided regions. These regions are derived from the preknowledge experience about input-output pattern of the corresponding process. It is concerned with adjusting the gains of PID control with respect to parameter uncertainties and environmental conditions.(ii) The second contribution concerns proposing an alternative and nonconventional estimation method of process output. Using the compatibility features found between multilayer perceptrons (MLP) and radial basis function (RBF) neural networks, a hybrid NN-based (HNN) estimator is developed. This intelligence-based estimator would replace the real hardware so that it ensures a compact size and a reduced cost when comparing with the conventional methods of measurement. It will also compensate the errors we might encounter with conventional methods of measurement [8, 9].


## 2. Preliminaries

### 2.1. Supervisory Fuzzy Controller

Supervisory fuzzy controller is a hierarchical one with the supervisor at the highest level, as shown in Figure1. The fuzzy supervisor can use any available data from the control system to characterize the system’s current behavior so that it knows how to change the controller and ultimately achieve the desired specifications. In addition, the supervisor can be used to integrate other information into the control decision-making process.Figure 1
Structure of supervisory fuzzy PID.Figure1 shows the supervisory fuzzy PID where u(t) is the control action and y(t) is the process output.The adjustment of PID parameters is carried out by some candidate rules as follows:(i)
If steady-state error is largethen increase the proportional gain.(ii)
If the response is oscillatorythen increase the derivative gain.(iii)
If the response is sluggishthen increase the proportional gain.(iv)
If the steady-state error is too bigthen adjust the integral gain.(v)
If the overshoot is too bigthen decrease the proportional gain.In some applications, controller gains are quantified according to different types of responses a priori identified from experiments on the real process [7].


### 2.2. Hybrid Neural Network

The hybrid structure of neural networks (HNNs) consists of MLP and RBF. Figure2 shows the structures of RBF and MLP. The main difference between MLP and RBF is that, unlike the MLP, there is only a hidden layer in RBF network which contains nonlinear nodes called RBF units that measure the distance between an input data vector and the center of their RBF [8].Figure 2
Structure of the proposed neural networks ((a) MLP and (b) RBF).
(a)
(b)The MLP and RBF networks are trained using a supervised training rule which attempts to minimize the error between the network and the target output patterns. If target outputs are not required for training, the learning rule is unsupervised and the network extracts its own features from the training set.For choosing the optimal and adequate structure, certain number of neuronal architectures would be studied. Different initialization of synaptic parameters has been done for each architecture to ensure that the training of the NN converges towards the least error criterion. For each structure, the mean square error of the training and validation databases could be calculated. Then, the optimal structure is the structure which has the least square error in the validation base. The training had been done using Levenberg-Marquardt algorithm [8]. The training is carried out on a field of study called “field of training.” We create three databases belonging to the field of training: training, validation, and testing database, as in Figure 3.Figure 3
Training and parameters adjustment.


## 2.1. Supervisory Fuzzy Controller

Supervisory fuzzy controller is a hierarchical one with the supervisor at the highest level, as shown in Figure1. The fuzzy supervisor can use any available data from the control system to characterize the system’s current behavior so that it knows how to change the controller and ultimately achieve the desired specifications. In addition, the supervisor can be used to integrate other information into the control decision-making process.Figure 1
Structure of supervisory fuzzy PID.Figure1 shows the supervisory fuzzy PID where u(t) is the control action and y(t) is the process output.The adjustment of PID parameters is carried out by some candidate rules as follows:(i)
If steady-state error is largethen increase the proportional gain.(ii)
If the response is oscillatorythen increase the derivative gain.(iii)
If the response is sluggishthen increase the proportional gain.(iv)
If the steady-state error is too bigthen adjust the integral gain.(v)
If the overshoot is too bigthen decrease the proportional gain.In some applications, controller gains are quantified according to different types of responses a priori identified from experiments on the real process [7].


## 2.2. Hybrid Neural Network

The hybrid structure of neural networks (HNNs) consists of MLP and RBF. Figure2 shows the structures of RBF and MLP. The main difference between MLP and RBF is that, unlike the MLP, there is only a hidden layer in RBF network which contains nonlinear nodes called RBF units that measure the distance between an input data vector and the center of their RBF [8].Figure 2
Structure of the proposed neural networks ((a) MLP and (b) RBF).
(a)
(b)The MLP and RBF networks are trained using a supervised training rule which attempts to minimize the error between the network and the target output patterns. If target outputs are not required for training, the learning rule is unsupervised and the network extracts its own features from the training set.For choosing the optimal and adequate structure, certain number of neuronal architectures would be studied. Different initialization of synaptic parameters has been done for each architecture to ensure that the training of the NN converges towards the least error criterion. For each structure, the mean square error of the training and validation databases could be calculated. Then, the optimal structure is the structure which has the least square error in the validation base. The training had been done using Levenberg-Marquardt algorithm [8]. The training is carried out on a field of study called “field of training.” We create three databases belonging to the field of training: training, validation, and testing database, as in Figure 3.Figure 3
Training and parameters adjustment.


## 3. pH Reactor: Modeling, Controlling, and Estimation

Figure4 demonstrates the pH reactor considered in this work. It is one of the most demanded processes in different industrial sectors such as food and diary, medicine, and biomedical industry [10, 11].Figure 4
pH reactor.


### 3.1. Model of pH Reactor

The logarithmic relation between the base streams as manipulated variable and the pH value as a master process variable has been studied, as will be seen in Section3.2. This relation is subdivided into three operating zones (two linear ranges and one nonlinear range). It aims, mainly, to enlarge operating range of controlling pH and modify its close-loop response.In our case, the considered titration process has a strong acid (HCL) with a constant flow value [2 mL/sec], where its concentration is equal to [0.95 mol/L]. The manipulated variable will be the flow of strong base (NaOH), with a concentration [1.9 mol/L]. At this level, pH would be calculated using the following equation [1, 7]:(1)pH=log10⁡-kQaCa/Qa+Qb-QbCb/Qa+Qb+kQaCa/Qa+Qb-QbCb/Qa+Qb2-410-14-1210-14,where Ca, Cb are the concentration values of acid and base, respectively, in the outlet stream, Qa, Qb are the volumetric flow rates of acid and base, respectively, V is the volume, and k is a constant that depends on the strength of acid. In our case, k = 1 is considered for strong acid-strong base system [7, 10].


### 3.2. MSF-PID Control of pH Reactor

In this subsection, a modified cascade structure of MSF-PID control system is proposed to meet the industrial control demands due to its nonlinearities which interfere with gain adjustment of the process.Figure5 shows the block diagram of the pH-based fuzzy supervisory control system. As it can be seen from the block diagram, the fuzzy system takes three inputs, auxiliary variable (pH∗), error in pH value (e), and change in error (de), and generates three outputs: proportional gain KP, integral gain KI, and derivative gain KD.U is the control action; Qb is the manipulated variable and represents the flow of base.Figure 5
Supervisory fuzzy PID-based control over pH reactor.The proposed control system is working on three subdivided titration regions. These three regions have been chosen with respect to the value of base flow rateQb that manipulates the pH value inside the reactor, Figure 6.Figure 6
The titration curve subdivided into three regions.Since the variables and their state are linguistic values, they can only be interpreted qualitatively and inexactly. Therefore, a technique is needed to describe these vague values. Fuzzy set is one of the perfect tools to process the linguistic information.Regarding structure of proposed fuzzy, there are three inputs to fuzzy inference: auxiliary inputpH∗ (region 1: low; region 2: medium; and region 3: high), errore and derivative of errorde, and three outputs which are KP, KI, and KD. The PID controller has two inputs (control error and derivative of error).Figures7(a) and 7(b) show the membership functions of all the inputs and outputs. They are composed of different shapes (triangular and Gaussian) and sizes to accomplish all linear and nonlinear features found with such process dynamics (Figure 6) and also to ensure smooth operation around set point (modified dynamics) and a minimum steady-state error (enhanced stability).Figure 7
Membership functions for (a)e, de, KP, KI, and KD; (b) AV with normalised discourse.
(a)
(b)The widths of the fuzzy sets used for controllers are not the same and they have been determined by trial and error experience. The width of the fuzzy sets forKP has been chosen [0.20.7], for KI is [0.0010.01] and for KD is [0.10.15]. And for inputs, the range of set point as an auxiliary input pH∗ is [014], the range for the error has been chosen [-11], and for error rate is [-1010]. The auxiliary input is used to precisely localize at which region pH varies.The designed fuzzy tuner would upgrade the values ofKP, KI, and KD upon to the fuzzy inputs (e, de as measured inputs and the set point as AV). The structure of the classical controller is supposed to be PI+D. Two tables would be supplied (Tables 1(a) and 1(b)), as an example, to show the fuzzy rules with respect to two measured inputs (e and de) and a fixed set point (AV = medium), since the medium state of the third input means that the process runs in region 2 (nonlinear region) as seen in Figure 6. The AV is used to specify where pH is located (linear or nonlinear regions).Table 1
Fuzzy rules at medium auxiliary variable (AV is M) as a case study.
(a)
Error
Error rate
NL
NM
NS
ZO
PS
PM
PL
NL
ZO
NS
NM
NL
NM
NS
ZO
NM
PS
ZO
NS
NM
NS
ZO
PS
NS
PM
PS
ZO
NS
ZO
PS
PM
ZO
PL
PM
PS
ZO
PS
PM
PL
PS
PM
PS
ZO
NS
ZO
PS
PM
PM
PS
ZO
NS
NM
NS
ZO
PS
PL
ZO
NS
NM
NL
NM
NS
ZO
(b)
Error
Error rate
NL
NM
NS
ZO
PS
PM
PL
NL
ZO
PS
PM
PL
PM
PS
ZO
NM
NS
ZO
PS
PM
PS
ZO
NS
NS
NM
NS
ZO
PS
ZO
NS
NM
ZO
NL
NM
NS
ZO
NS
NM
NL
PS
NM
NS
ZO
PS
ZO
NS
NM
PM
NS
ZO
PS
PM
PS
ZO
NS
PL
ZO
PS
PM
PL
PM
PS
ZOTable1(a) shows the fuzzy rules which are used to determine the fuzzy outputs (KP andKI) with respect to measured inputs; these rules would ensure the enhanced stability with minimum residual error at the final state.Table1(b) shows the fuzzy rules used to determineKD. In Table 1(b), the rules have been designed in a way where the best dynamic features (smooth rising time and least over- and undershooting) could be assured with the presence of derivative control action.Table1 presents only the rules with respect to measured inputs (e and de). It is also showing the influence of measured inputs on PID control gains of the proposed structure (PI+D). But the set point (AV) is also necessary to specify the region of operation (linear or nonlinear, Figure 6).


### 3.3. HNN-Based pH Estimator

One of the main objectives of this paper is the design and application of a numerical pH estimator integrated into titration process as an industrial replacement of real hardware electrodes to measure pH. The proposed estimator is designed with LabView and MatLab. First, the MLP and RBF are used separately to design pH estimator. Then, a hybrid NN structure is developed to accomplish the best features found in both MLP and RBF. The split-sample method is implemented to select the optimal NN structure.A conventional pH measurement loop is made up of three components: the pH sensor, which includes a measuring electrode, a reference electrode, and a temperature sensor; a preamplifier; and an analyzer or transmitter. The measuring electrode, which is sensitive to the hydrogen ion, develops a potential (voltage) directly related to the hydrogen ion concentration of the solution [12, 13].Many troubles of conventional pH measurement could be faced in practice, for example, electrical interference, relay hunting, in-line calibration, current transmission 4–20 mA, pH measurement in liquids with hydrofluoric acid, prevention of chemical wastage, and manual temperature compensation [13].To overcome the drawbacks which might be found with conventional method for measuring pH, technical and commercial ones, an HNN-based pH estimator has been proposed. The HNN estimator aims to achieve high accuracy and hardness and treat the nonlinearity of titration curve.The main structural difference between MLP neural network and RBF one is that, in MLP, the main function is a tansig in first layer but in RBF the main function is Gaussian in latest layer; this makes RBF-NN better than MLP-NN in nonlinear stages of titration process.The testing database is of different values than the precedent ones (training and validation database). The error between the real and observed pH values is defined for each parameter by the relative error (RE) (pH) as illustrated in Figure8.Figure 8
The computed relative error (RE) for both RBFNN and MLPNN.Figure8 shows the computed relative error (RE) at both nets. It seems that the RE produced by MLP-NN is 1.82% which is larger than that of RBFNN (0.133%). That is why the MLPNN is recommended to be used with linear regions in the titration process and the RBFNN with nonlinear region, as will be seen later.Referring to the multiple regions established on titration curve (Figure6), it can be noted that the RBF network would deal tightly with region 2 (fast variation) whenQb varies from 0.8 lt/min to 1.2 lt/min, and the MLP-NN would ensure the rabidity when dealing with the linear regions (1 and 3).Figure9 shows the performance of the proposed hybrid net, where it can be seen that the allowance of the sum-squared error (SSE) has been reached (10−14) with 11 epochs. So both the accuracy and the speed enquiries have been achieved.Figure 9
The SSE plot for the performance of the hybrid NN-based estimator.With this estimator, the industrial costs could be reduced when replacing the real hardware with numerical hybrid structure connected to the base stream (flow transmitter), and the size could be also reduced. So, the work could match the commercial benefits, when realized.


## 3.1. Model of pH Reactor

The logarithmic relation between the base streams as manipulated variable and the pH value as a master process variable has been studied, as will be seen in Section3.2. This relation is subdivided into three operating zones (two linear ranges and one nonlinear range). It aims, mainly, to enlarge operating range of controlling pH and modify its close-loop response.In our case, the considered titration process has a strong acid (HCL) with a constant flow value [2 mL/sec], where its concentration is equal to [0.95 mol/L]. The manipulated variable will be the flow of strong base (NaOH), with a concentration [1.9 mol/L]. At this level, pH would be calculated using the following equation [1, 7]:(1)pH=log10⁡-kQaCa/Qa+Qb-QbCb/Qa+Qb+kQaCa/Qa+Qb-QbCb/Qa+Qb2-410-14-1210-14,where Ca, Cb are the concentration values of acid and base, respectively, in the outlet stream, Qa, Qb are the volumetric flow rates of acid and base, respectively, V is the volume, and k is a constant that depends on the strength of acid. In our case, k = 1 is considered for strong acid-strong base system [7, 10].


## 3.2. MSF-PID Control of pH Reactor

In this subsection, a modified cascade structure of MSF-PID control system is proposed to meet the industrial control demands due to its nonlinearities which interfere with gain adjustment of the process.Figure5 shows the block diagram of the pH-based fuzzy supervisory control system. As it can be seen from the block diagram, the fuzzy system takes three inputs, auxiliary variable (pH∗), error in pH value (e), and change in error (de), and generates three outputs: proportional gain KP, integral gain KI, and derivative gain KD.U is the control action; Qb is the manipulated variable and represents the flow of base.Figure 5
Supervisory fuzzy PID-based control over pH reactor.The proposed control system is working on three subdivided titration regions. These three regions have been chosen with respect to the value of base flow rateQb that manipulates the pH value inside the reactor, Figure 6.Figure 6
The titration curve subdivided into three regions.Since the variables and their state are linguistic values, they can only be interpreted qualitatively and inexactly. Therefore, a technique is needed to describe these vague values. Fuzzy set is one of the perfect tools to process the linguistic information.Regarding structure of proposed fuzzy, there are three inputs to fuzzy inference: auxiliary inputpH∗ (region 1: low; region 2: medium; and region 3: high), errore and derivative of errorde, and three outputs which are KP, KI, and KD. The PID controller has two inputs (control error and derivative of error).Figures7(a) and 7(b) show the membership functions of all the inputs and outputs. They are composed of different shapes (triangular and Gaussian) and sizes to accomplish all linear and nonlinear features found with such process dynamics (Figure 6) and also to ensure smooth operation around set point (modified dynamics) and a minimum steady-state error (enhanced stability).Figure 7
Membership functions for (a)e, de, KP, KI, and KD; (b) AV with normalised discourse.
(a)
(b)The widths of the fuzzy sets used for controllers are not the same and they have been determined by trial and error experience. The width of the fuzzy sets forKP has been chosen [0.20.7], for KI is [0.0010.01] and for KD is [0.10.15]. And for inputs, the range of set point as an auxiliary input pH∗ is [014], the range for the error has been chosen [-11], and for error rate is [-1010]. The auxiliary input is used to precisely localize at which region pH varies.The designed fuzzy tuner would upgrade the values ofKP, KI, and KD upon to the fuzzy inputs (e, de as measured inputs and the set point as AV). The structure of the classical controller is supposed to be PI+D. Two tables would be supplied (Tables 1(a) and 1(b)), as an example, to show the fuzzy rules with respect to two measured inputs (e and de) and a fixed set point (AV = medium), since the medium state of the third input means that the process runs in region 2 (nonlinear region) as seen in Figure 6. The AV is used to specify where pH is located (linear or nonlinear regions).Table 1
Fuzzy rules at medium auxiliary variable (AV is M) as a case study.
(a)
Error
Error rate
NL
NM
NS
ZO
PS
PM
PL
NL
ZO
NS
NM
NL
NM
NS
ZO
NM
PS
ZO
NS
NM
NS
ZO
PS
NS
PM
PS
ZO
NS
ZO
PS
PM
ZO
PL
PM
PS
ZO
PS
PM
PL
PS
PM
PS
ZO
NS
ZO
PS
PM
PM
PS
ZO
NS
NM
NS
ZO
PS
PL
ZO
NS
NM
NL
NM
NS
ZO
(b)
Error
Error rate
NL
NM
NS
ZO
PS
PM
PL
NL
ZO
PS
PM
PL
PM
PS
ZO
NM
NS
ZO
PS
PM
PS
ZO
NS
NS
NM
NS
ZO
PS
ZO
NS
NM
ZO
NL
NM
NS
ZO
NS
NM
NL
PS
NM
NS
ZO
PS
ZO
NS
NM
PM
NS
ZO
PS
PM
PS
ZO
NS
PL
ZO
PS
PM
PL
PM
PS
ZOTable1(a) shows the fuzzy rules which are used to determine the fuzzy outputs (KP andKI) with respect to measured inputs; these rules would ensure the enhanced stability with minimum residual error at the final state.Table1(b) shows the fuzzy rules used to determineKD. In Table 1(b), the rules have been designed in a way where the best dynamic features (smooth rising time and least over- and undershooting) could be assured with the presence of derivative control action.Table1 presents only the rules with respect to measured inputs (e and de). It is also showing the influence of measured inputs on PID control gains of the proposed structure (PI+D). But the set point (AV) is also necessary to specify the region of operation (linear or nonlinear, Figure 6).


## 3.3. HNN-Based pH Estimator

One of the main objectives of this paper is the design and application of a numerical pH estimator integrated into titration process as an industrial replacement of real hardware electrodes to measure pH. The proposed estimator is designed with LabView and MatLab. First, the MLP and RBF are used separately to design pH estimator. Then, a hybrid NN structure is developed to accomplish the best features found in both MLP and RBF. The split-sample method is implemented to select the optimal NN structure.A conventional pH measurement loop is made up of three components: the pH sensor, which includes a measuring electrode, a reference electrode, and a temperature sensor; a preamplifier; and an analyzer or transmitter. The measuring electrode, which is sensitive to the hydrogen ion, develops a potential (voltage) directly related to the hydrogen ion concentration of the solution [12, 13].Many troubles of conventional pH measurement could be faced in practice, for example, electrical interference, relay hunting, in-line calibration, current transmission 4–20 mA, pH measurement in liquids with hydrofluoric acid, prevention of chemical wastage, and manual temperature compensation [13].To overcome the drawbacks which might be found with conventional method for measuring pH, technical and commercial ones, an HNN-based pH estimator has been proposed. The HNN estimator aims to achieve high accuracy and hardness and treat the nonlinearity of titration curve.The main structural difference between MLP neural network and RBF one is that, in MLP, the main function is a tansig in first layer but in RBF the main function is Gaussian in latest layer; this makes RBF-NN better than MLP-NN in nonlinear stages of titration process.The testing database is of different values than the precedent ones (training and validation database). The error between the real and observed pH values is defined for each parameter by the relative error (RE) (pH) as illustrated in Figure8.Figure 8
The computed relative error (RE) for both RBFNN and MLPNN.Figure8 shows the computed relative error (RE) at both nets. It seems that the RE produced by MLP-NN is 1.82% which is larger than that of RBFNN (0.133%). That is why the MLPNN is recommended to be used with linear regions in the titration process and the RBFNN with nonlinear region, as will be seen later.Referring to the multiple regions established on titration curve (Figure6), it can be noted that the RBF network would deal tightly with region 2 (fast variation) whenQb varies from 0.8 lt/min to 1.2 lt/min, and the MLP-NN would ensure the rabidity when dealing with the linear regions (1 and 3).Figure9 shows the performance of the proposed hybrid net, where it can be seen that the allowance of the sum-squared error (SSE) has been reached (10−14) with 11 epochs. So both the accuracy and the speed enquiries have been achieved.Figure 9
The SSE plot for the performance of the hybrid NN-based estimator.With this estimator, the industrial costs could be reduced when replacing the real hardware with numerical hybrid structure connected to the base stream (flow transmitter), and the size could be also reduced. So, the work could match the commercial benefits, when realized.


## 4. Simulation with LabView/MatLab

### 4.1. Design Steps

The process has one manipulated variable which is the flow of baseQb. Inside the process, a scalar circuit has been designed that has two values (0 or 1) whileQb is limited between 0 and 2.The design process is divided into three steps.First step is determining the valve position from 0 to 1; then, the position of valve returned to the input of the process and multiplied by the flow again to give a new flow value and a new valve position. This step will be repeated periodically during the life time of system.Second step is determining the ions of hydrogen H+ by proposing an inverse model of the process. The result from this process is returned partially as a feedback to insure the continuity of the system.Third step is designing the mixer block diagram; as mentioned previously, the inputs of mixer are (diameter, length, flow, and initial height), while it has two outputs which are flow out and level.


### 4.2. EUI

Using the compatibility found between LabView and MatLab (M-files) as programming languages, the HNN-based pH estimator has been designed, Figure10.Figure 10
The MatLab script files of HNN in LabView.The final EUI has been created (Figure11) to facilitate users’ studying and analyzing of pH reactor and titration process at different control strategies.Figure 11
The final end-user-interface (EUI).


## 4.1. Design Steps

The process has one manipulated variable which is the flow of baseQb. Inside the process, a scalar circuit has been designed that has two values (0 or 1) whileQb is limited between 0 and 2.The design process is divided into three steps.First step is determining the valve position from 0 to 1; then, the position of valve returned to the input of the process and multiplied by the flow again to give a new flow value and a new valve position. This step will be repeated periodically during the life time of system.Second step is determining the ions of hydrogen H+ by proposing an inverse model of the process. The result from this process is returned partially as a feedback to insure the continuity of the system.Third step is designing the mixer block diagram; as mentioned previously, the inputs of mixer are (diameter, length, flow, and initial height), while it has two outputs which are flow out and level.


## 4.2. EUI

Using the compatibility found between LabView and MatLab (M-files) as programming languages, the HNN-based pH estimator has been designed, Figure10.Figure 10
The MatLab script files of HNN in LabView.The final EUI has been created (Figure11) to facilitate users’ studying and analyzing of pH reactor and titration process at different control strategies.Figure 11
The final end-user-interface (EUI).


## 5. Results

The comparative results of PID controller and supervisory fuzzy PID controller within the three regions of the titration curve and towards the set point tracking are presented in Figures12, 13, and 14. Figure 12 shows the response of PID-controlled pH reactor. Because of the decrement in the static gain of the process, the dynamic response becomes slower for operating point superior to 9.8 (70%).Figure 12
PID-controlled response.Figure 13
Supervisory fuzzy PID response process.Figure 14
Performance of multiregional fuzzy PID controller in the three regions of titration curve for weak acid (a, c) and also for strong acid (b, d).
(a)
(b)
(c)
(d)In Figure13, the overshoots and undershoots were smaller than 5%. It appears more satisfactory than that shown in Figure 12.The auxiliary input,pH∗, has been used as an additional fuzzy input to generate new results that modifies the overall performance of the control system. Figure 14 shows the performance of multiregional supervisory fuzzy PID controller with set point tracking (pH∗: 4,8,12) at three operating regions in titration process for weak acid and strong acid.Figures12, 13, and 14 clearly show a superior performance of the multiregional fuzzy PID-based cascade controller over the pH reactor with minimal resulting errors.


## 6. Evaluation of Results

The performance of the proposed multiregional supervisory fuzzy-based controller has been evaluated and compared with conventional PID-based algorithm. The evaluation was performed using the integral of absolute error (IAE) and integral of the absolute value of the error-weighted time (ITAE), as given in Tables2 and 3.Table 2
Performance metrics for IAE.
pH∗
Set point in percentage
PID
Multiregional fuzzy PID
7–8.4
50–60%
524.37
172.60
8.4–9.8
60–70%
333.54
124.32
9.8–11.2
70–80%
343.48
124.14
11.2–12.6
80–90%
342.08
163.82
12.6–7
90–50%
1881.85
857.95
7–5.6
50–40%
277.91
111.44
5.6–4.2
40–30%
293.88
118.08
4.2–2.8
30–20%
313.16
124.43
2.8–1.4
20–10%
355.36
137.14
1.4–7
10–50%
1755.76
749.34Table 3
Performance metrics for ITAE.
pH∗
Set point in percentage
PID
Multiregional fuzzy PID
7–8.4
50–60%
19627.06
10922.24
8.4–9.8
60–70%
19001.66
9622.48
9.8–11.2
70–80%
20021.90
10162.72
11.2–12.6
80–90%
2459.45
18886.27
12.6–7
90–50%
95529.10
59454.59
7–5.6
50–40%
12770.29
12271.11
5.6–4.2
40–30%
14849.38
13640.24
4.2–2.8
30–20%
17674.65
12579.83
2.8–1.4
20–10%
25622.83
12073.15
1.4–7
10–50%
100773.71
43639.44From Tables2 and 3, it could be clearly noticed that the multiregional supervisory fuzzy PID is better in performance than PID at all reference points.


## 7. Conclusions and Future Work

### 7.1. Conclusions

(i)
The nonlinear behavior exhibited by the pH process was tested using multiregional supervisory fuzzy PID-based cascade control. It is proved to be smoother and more robust than classical PID ones that suffer from problems of parameter tuning.
(ii)
Two kinds of neural inverse models (MLP and RBF) are developed to simultaneously estimate the pH value. Two input parameters (base flow and temperature variation) are considered to train, test, and validate the proposed HNN structure. The obtained results ensure the higher accuracy and rapidity of the hybrid structure. The optimal structure of the proposed HNN estimator has been achieved for a set of readings containing 200 samples.


### 7.2. Suggestions for Future Work

(i)
A rational controller could be added to manage the percentage in variation of base stream with respect to acid stream (e.g., weak or strong). Thus, the dynamics shown in Figure14 can be further modified.
(ii)
Other nonlinear control strategies could be included into the module and chosen by the end-user to verify the performance of the plant and how it responds to different algorithms.
(iii)
The proposed numerical and hybrid NN-based estimator could be realized using digital signal processor (DSP).


## 7.1. Conclusions

(i)
The nonlinear behavior exhibited by the pH process was tested using multiregional supervisory fuzzy PID-based cascade control. It is proved to be smoother and more robust than classical PID ones that suffer from problems of parameter tuning.
(ii)
Two kinds of neural inverse models (MLP and RBF) are developed to simultaneously estimate the pH value. Two input parameters (base flow and temperature variation) are considered to train, test, and validate the proposed HNN structure. The obtained results ensure the higher accuracy and rapidity of the hybrid structure. The optimal structure of the proposed HNN estimator has been achieved for a set of readings containing 200 samples.


## 7.2. Suggestions for Future Work

(i)
A rational controller could be added to manage the percentage in variation of base stream with respect to acid stream (e.g., weak or strong). Thus, the dynamics shown in Figure14 can be further modified.
(ii)
Other nonlinear control strategies could be included into the module and chosen by the end-user to verify the performance of the plant and how it responds to different algorithms.
(iii)
The proposed numerical and hybrid NN-based estimator could be realized using digital signal processor (DSP).



---

*Source: 396879-2015-09-07.xml*