www.arpapress.com/volumes/vol17issue2/ijrras_17_2_05.pdf DESIGN OF AN ADAPTIVE FUZZY-BASED CONTROL SYSTEM USING GENETIC ALGORITHM OVER A ph TITRATION PROCESS Ibrahim Al-Adwan, Mohammad Al Khawaldah, Shebel Asad* & Ayman Al Rawashdeh Al Balqa Applied University, Faculty for Engineering Technology P.O. Box (15008 ), Amman-Jordan Email: *shebel_asad@hotmail.com, ibrahim.aladwan@yahoo.com, mohammad.alkhawaldah@gmail.com ABSTRACT The work aims, mainly, to design an intelligent-based cascaded control structure over titration process. The master controller is a fuzzy-based FLC, while the controlled variable (ph value) is calculated using a hybrid neural network that accomplishes the best features of multi-layer perceptrons MLP and radial basis function RFB. The main core of this work is to modify the performance of the proposed fuzzy controller to be adaptive using genetic algorithmbased tuner GA; its objective is to drive the ph of the solution to the desired set point in the shortest time. GA was used to develop the shape of the fuzzy membership functions. The full models of the titration process and the proposed artificial intelligent techniques have been designed with Simulink/MatLab. Numerical results have been obtained and discussed to validate the proposed design. Keywords: Titration process, Genetic algorithm, Fuzzy logic, Hybrid neural network. 1. INTRODUCTION Developing phases of the project, at the beginning the PI Controller was built to control PH of water, where the system senses any changes that occur in it and respond to it automatically, but because of the slow response to any changes of the system inputs the controllability of the waste water was developed by using advanced control strategies, so it's give satisfactory performance over the entire range of the steady state curve of the process. After that Using different modeling and control methods were used, and the intelligent techniques proved to be the best techniques that could be used with the system. Using Fuzzy multiregional based control system gave improved results in keeping the ph stability at the required level. And using Neural Network based ph estimation method added more and more accuracy to the measurement techniques and added more ranges to the control systems and also used MatLab software to built this system, but there was some weak points such as using radial base function neural network (RBFNN) for all regions of titration curve, so it give less accuracy than Hybrid Neural Network, and not taking into account the effect of temperature on ph. So implementing hybrid neural network observer and a multiregional fuzzy controller MRFLC was developed [2-4]. Its job is to compensate the weakness of conventional fuzzy model. This work was presented using MatLab/Simulink. After applying advanced technique controlling the ph value, starting from classical PID control systems with designing the hybrid NN-based observer and multiregional fuzzy controller MRFLC. These advanced intelligent structures aim to enhance the accuracy and modify the speed of the ph controlled-system response, Genetic Algorithm GA is applied to find the minimum of integrated square error ISE as an objective function to finally update the shape of fuzzy membership functions [5]. Blocks and the optimization toolbox with MatLab were used. 2. DESCRIPTION OF THE PH TITRATION PROCESS ph is a measurement of the concentration of hydrogen ions in a solution. Low ph values are associated with solutions with high concentrations of hydrogen ions, while high ph values occur for solutions with low concentrations of hydrogen ions. Pure water has a ph of 7.0, and other solutions are usually described with reference to this value. Acids are defined as those solutions that have a ph less than 7 (i.e. more hydrogen ions than water); while bases are defined as those solutions that have a ph greater than 7 (i.e. less hydrogen ions than water) [1]. The formula for calculating ph is: ph log 10 H (1) Where αh+ denotes the activity of H+ ions, and is dimensionless. In solutions containing other ions, activity and concentration will not generally be the same. Activity is a measure of the effective concentration of hydrogen ions, 177
rather than the actual concentration; it includes the fact that other ions surrounding hydrogen ions will shield them and affect their ability to participate in chemical reactions. These other ions change the effective amount of hydrogen ion concentration in any process that involves H+. The ph was defined earlier as the measure of the acidity or the basic of a solution, and an acid was defined as the solution of ph less than 7, and the base as that solution of ph larger than 7, however this definitions of acid and base does not describes the true acid or base definition since they are the main reason of the convention of ph concept [6]. As seen in figure 1, Figure1. Titration curve regions Where regions 1 and 3 could be classified as linear regions of operation, but region 2 where the ph value is fastly variated, considered as nonlinear region. This concept would be used later to design the hybrid NN observer and also to design the multiregional fuzzy controller [2, 3]. The acidity constant (or acid dissociation constant) is the equilibrium constant for the reaction of HA with water K a [ H 3O ][ A ] [ HA] (2) Where: Ka: is the dissociation constant of acid, [i]: is the concentration of the substance in the solution. In our titration process we considered that the strong acid (HCL) is flowing in constant value, where its concentration is equal to [ 0.95 mol/l], the process variable will be the flow of strong base (NaOH), where it's concentration is [1.9 mol/l].at this level we calculated ph using the following equation, (3) kqaca QbCb kqaca QbCb Qa Qb Qa Qb Qa Qb Qa Qb ph log10 14 2(10 ) 2 4(10 14 )( 1) Where, c xa, c xb are the concentration of acid and base in the outlet stream, respectively. Q a, Q b are the volumetric flow rate of acid and base entering the CSTR, respectively. V is The CSTR volume. K is a constant that depends on the strength of acid entering the CSTR given as: k 1 For strong acid-strong base system. 3. GA-Based Tuner of FLC For simplicity, we adopt triangular completeness overlap membership function, there is only one adjust parameter for five subsets in each discourse universe. The total optimization parameters are c l, c 2, c 3 three parameters. Our destination is to optimize the c l, c 2, c 3 to obtain better performance, by using Genetic algorithms [5]. Optimization procedure of c l, c 2, c 3 by using Genetic algorithm: 178
1) Coding Represent the each c l, c 2, c 3 with 3 bits binary codes respectively, and joins together into one composite string, called trial. 2) Initial population Generate an initial random population of trails. Here, the number of trials is 10. 3) Evaluation Define the index function for optimization, and evaluate the performance of each trial. Sort trials according to their index function value. The Fitness value of each trial is: (4), i = 1, 2, 3,, n Where, f is the fitness value, n is the number of trails, i is the index number. 4) Reproduction Trials are selected as parents from population using the probability distribution, (5), i=1, 2, 3,, n Where, p is the probability of being selected, f is the fitness value, n is the number of trails, i is the index number. Select two parents at random to reproduce new offspring by crossover method. 5) Crossover A breakpoint is random chosen at which the parents bits are alternately passed on to the offspring. 6) Mutation Transform the bits of each offspring trial random, replacing 1 with 0 and vice versa. The probability of mutation is 0.001 to 0.1. 7) Selection New population is selected from the parents and their offsprings. 8) Terminate condition of iteration Go to procedure 3 until the convergence criterion is reached. 9) The best treasure selected from the final population. Transform the coding into optimal parameters. Finally, the steps have been justified when designed using SimuLink/MatLab; the GA-based tuner for fuzzy logic ph controller has been developed as seen below. Figure 2. GA FLC 179
Figure 3. The first ISE enter to the GA And the fuzzy logic system using Fuzzy Logic Toolbox/MatLab has been designed with multi inputs (error, change in error and auxiliary variable) and single output (change in base flow rate). The proposed GA works to calculate the modified value of error with respect to the minimum error allowed by the controlled plant. Figure4. Fuzzy inference system (multi-inputs, single-output) (a) I 1 :error (NL,NS,ZO,PS,PS) (b) I 2 : Change in error(nl,ns,zo,ps,ps) (c) I 3 : auxiliary variable AV (low, medium, high) 180
(d) O: change in base flow rate Q b (NL, NM, NS, nnm, nns, zzo, ZO, pps, ppm, PS, PM, PL) Figure 5. Fuzzy membership functions designed for I/O variables 4. FULL PLANT MODEL The final model of the titration process is shown in figure 6, Figure 6. Cascaded control over titration process Figure 7. ph reactor with NN-based ph estimator 181
Figure 8. ph Reactor (that represents equation 3) Figure 9. Hybrid NN-based ph estimator Figure 10. Inverse system 182
After applying the modification of ISE using GA we have tested the response during many conditions; fuzzy memberships function, fuzzy rules and the GA parameter. 5. RESULTS AND DISCUSSION The final obtained results of the controlled process with/without GA have been obtained as seen below. The dynamic closed loop response of the process variable ph has been verified at movable reference frame (ph= 6, 7, 8, 9). Figure 11. Response of GA Vs FLC at set point= [6 7 8 9] GA can accept one or more plot functions through an OPTIONS argument. This feature is useful for visualizing the performance of the solver at run time. Plot functions can be selected using GAOPTIMSET. Figure 12. Best individual criteria Figure 12 shows the best and mean values of the population in every generation. The best value found by GA when it terminated is also shown in the plot title. GA starts with a random initial population which is created using random number generators. The next generation is produced using GA operators that also use these same random number generators. Every time a random number is generated, the state of the random number generators change. Figure 13. GA solver 183
To use the GA solver, we need to provide at least two input arguments, a fitness function (minimum ISE) and the number of variables in the problem. 6. CONCLUSIONS 1. The titration curve was subdivided into three regions to handle, strictly, with the nonlinearities found with such plants. 2. The ph value was estimated (with respect to the measured base flow Q b ) using hybrid neural network that accomplishes the main features of MLP and RBF. 3. Using GA, with an objective function, is designed to find the minimum ISE that could update the shape of the fuzzy membership functions. 4. Finally, the proposed adaptive fuzzy controller was validated numerically, using MatLab/SimuLink. The results at tracked reference points (ph: 6-9) were presented. 7. REFERENCES [1]. Ogunnaik, B.A., and Ray, W.H., 1994, Process Dynamics, Modeling and Control, Oxford University Press, UK. [2]. Vojtesek, J., and Dostal, P., 2005, From Steady-State and Dynamic Analysis to Adaptive Control of the CSTR Reactor, Proceedings 19th European Conference on Modeling and Simulation, Riga, Latvia, 591-598. [3]. Qin, S.J., and Borders, G., 1994, A Multiregional Fuzzy Logic Controller for Nonlinear Process Control, IEEE Transactions on Fuzzy Systems, 2, 4-81. [4]. Pishvaie, R., and Shahrokhi, M., 2008, Control of ph Processes using Fuzzy Modeling of Titration Curve, Fuzzy Sets and System, 157, 2983-3006. [5]. Linkens, H. 0. Nyongesa, Genetic algorithms for fuzzy control, Part I: Offline system development and application, lee Proc. Control Theory Appl., Vol. 142, No/3, May 1995. [6]. Shebel Alsabbah et al, evaluation of multiregional fuzzy cascade control for ph neutralization process. IJRRAS 10 (2), february 2012. www.arpapress.com. 184