International Conference on Comuter Alications and Industrial Electronics (ICCAIE ) Genetic Algorithm Based PID Otimization in Batch Process Control.K. Tan Y.K. Chin H.J. Tham K.T.K. Teo odelling, Simulation and Comuting Laboratory School of Engineering and Information Technology Universiti alaysia Sabah Kota Kinabalu, alaysia msclab@ums.edu.my hjtham@ums.edu.my ktkteo@ieee.org Abstract The rimary aim in batch rocess is to enhance the rocess oeration in order to achieve high quality and urity roduct while minimising the roduction of undesired by-roduct. However, due to the difficulties to erform online measurement, batch rocess suervision is based on the direct measurable quantities, such as temerature. During the rocess, a large amount of exothermic heat is released when the reactants are mixed together. The exothermic behaviour causes the reaction to become unstable and consequently the quality and urity of the final roduct will be affected. Therefore, it is imortant to have a control scheme which is able to balance the needs of rocess safety with the roduct quality and urity. Since the chemical industries are still alying PI and PID to control the batch rocess, researchers are keen to otimize PID arameters using artificial intelligence (AI) techniques. However, most of these PID otimization techniques need online rocess model to redetermine the otimizer arameters. However in ractice, the dynamic model of the batch rocess is oorly known. As a result, majority of the studies focused on accetable erformance instead of otimum erformance of the batch rocess control. This aer rooses a new genetic algorithm (GA) otimizer which consists of additional information of the online estimated model arameters in addition to the PID arameters as the string of the GA. The simulation results show that the roosed GA auto-tuning method is a better candidate than the regular GA where the estimated model arameters in fitness function is caable to control the rocess temerature while avoiding model mismatch and disturbance condition. Keywords rocess otimization; exothermic heat; temerature control; genetic algorithm I. INTRODUCTION Chemical rocess oeration mode can be classified into two categories: continuous and batch. Continuous rocess is usually used in large scale roduction lines, whereas batch rocess is used to manufacture small-volume roducts (e.g. harmaceuticals, agrochemicals and etc). Batch rocess receives foremost attention due to its flexibility to adat with variety roducts manufacturing. In general, batch rocess is aim to maximise the roduction of desired roduct while minimise the roduction of undesired by-roduct in a finite rocess duration. However, due to the difficulties to erform online measurement, batch rocess suervision is basically based on the direct measurable quantities, such as temerature []. Batch rocess control is roved to be a challenging task, esecially exothermic reaction is involved since the dynamic behaviour of the rocess is highly nonlinear and varying with time []. If the heat released due to exothermic reaction exceeds the reactor cooling caacity, it will cause thermal runaway. As the result, it will affect the final roduct quality and will also ose safety issue to the lant. Thus, it is vital to control the rocess temerature in a desired trajectory. Although many advanced control methods (e.g. generic model control [3], model redictive control [4], fuzzy logic [5] and etc) have been studied in the ast, chemical industries are still imlementing PI and PID controllers to control the batch rocess [6]. The main disadvantage of these methods is that the otimum results are seldom obtained due to the need of an exerienced oerator to manually tune the controller arameters. In order to reduce the deendency on human oerator, artificial intelligence (AI) technique is roosed to auto-tune the PID arameters [7, 8, 9]. It can be concluded that most of these PID otimization techniques need to have rocess model to redetermine the otimizer arameters. Due to the dynamic model of the batch rocess is oorly known in ractice, most of the studies only rovide an accetable erformance instead of an otimum erformance. Hence, the urose of this aer is to resent a PID otimization technique using a newly design genetic algorithm (GA) to imrove the batch oeration erformance. This roosed method with the additional information of the online estimated model arameters is able to adat its fitness function and then evolve an otimum set of PID arameters to control the reactor temerature. The organisation of this aer is described as follows. Section II describes the rocess modelling. Section III exlains the roosed control technique. Section IV shows the results and discussions. Finally, Section V summarises the findings in this aer. II. PROCESS ODELLING The modelling of the batch rocess used in this research is based on the dynamic model roosed by Cott and 978--4577-59-8//$6.00 IEEE 6
acchietto [3], where a arallel and well-mixed liquid hase reaction is considered, as shown in () and (). Reaction : A + B C () Reaction : A + C D () Reaction is the main reaction where reactant A and reactant B are mixed together and roduce desired roduct C, whereas the Reaction is the side reaction where reactant A reacts with the roduct C and roduce undesired by-roduct D. Fig. illustrates the batch reactor diagram. A. Thermal Energy Balance During the reaction rocess, liberated exothermic heat will further increase the reactor temerature. In order to maintain the reactor temerature in a desired trajectory, it should be cooled down using the surrounded jacket, as shown in Fig.. The change of reactor temerature can be formulated as (3). ( ΔH r R ΔH R ) + UA( T j Tr = (3) rc r dt ) The change in the jacket temerature is mainly affected by the thermal energy difference between jacket and coolant, lus thermal energy difference between jacket and reactor, as shown in (4). The thermal energy will transfer from the hotter laces to heat u the colder laces. dt F ρ C ( T T ) UA( T T ) j j j j c j j r = (4) V ρ C Initially, the reactor, jacket and coolant temerature are assumed to be equal as room temerature C. The range of jacket temerature and coolant temerature are assumed to be in the range of C to C due to the constraint of heat exchanger caacity. B. ass Balance The reaction rate constants for k and k are highly deending on the reactor temerature through the Arrhenius equation, as shown in (5) and (6) resectively. j j j k k = ex( k ) (5) + 73.5 T r k k = ex( k ) (6) + 73.5 T r Figure. Batch reactor diagram The reaction rates for Reaction and Reaction are deending on the reactants concentration and reaction rate constant, as described in (7) and (8) resectively. R = k A B (7) R = k A C (8) The concentration of substance A, B, C and D are changed according to the reaction rate of (7) and (8) for Reaction and Reaction, as shown from (9) to () resectively. The initial concentration of substance A, B, C and D are assumed to be kmol, kmol, 0 kmol and 0 kmol resectively. d A = R R (9) d B = R (0) d C = R R () d D R () C. Physical Parameters The total charging molar inside the reactor and their total molar heat caacity are described in (3) and (4). C = + + + (3) r A B C D C A + C B + C r A B C C + = C (4) III. CONTROL TECHNIQUE This study resumes that the rocess lant indicates the real exeriment, in which all the arameters and their relationshis are unknown in the controller. The modelling equations shown in Section II are mainly used to generate results to indicate the real exerimental data, and the arameters are shown in Table I. The roosed technique consists of two comonents: otimization scheme and controller. In the otimization scheme, genetic algorithm (GA) is roosed as the otimizer of PID controller arameters. This otimization method is able to adat its fitness function deending on the dynamic changes in the reactor, and then evolving the otimum PID controller arameters. On the other hand, PID is emloyed as the controller in this aer because it is still commonly alied in industries. It will determine the suitable coolant temerature based on the deviation between the otimal temerature rofile and the current reactor temerature using the well-tuned arameters based on the roosed GA otimizer. A. Otimization Scheme The framework of the roosed GA is shown in Fig.. First, an initial oulation of solutions is randomly generated with a oulation size of 50. The outut of this roosed GA function is the estimated relationshi between the coolant temerature and the reactor D D 63
TABLE I. ODELLING PARAETERS AND DESCRIPTION Parameter Value Unit Descrition A 6.4 m Conduction surface between jacket and reactor C A 75.3 kj kmol - C - substance A C B 67.36 kj kmol - C - substance B C C 7.57 kj kmol - C - substance C C D 334.73 kj kmol - C - substance D C j.888 kj kg - C - Heat caacity of coolant C r Refer to (4) kj kmol - C - Total molar heat caacity F j 0.0058 m 3 s - Flow rate of coolant into jacket H -48 kj kmol - Enthaly change of Reaction H -505 kj kmol - Enthaly change of Reaction k.9057 - Constant k k k 00 C Constant 38.9057 - Constant 7000 C Constant WA 30 kg kmol - olar weight of substance A WB kg kmol - olar weight of substance B WC 30 kg kmol - olar weight of substance C WD kg kmol - olar weight of substance D ρ 0 kg m -3 Total substance density ρ j 0 kg m -3 Coolant density r 0.5 m Radius of reactor R Refer to kmol min - Reaction rate of Reaction (7) R Refer to kmol min - Reaction rate of Reaction (8) T c - C Coolant temerature T j - C temerature T r - C temerature T ref 95 C temerature U 0.67 kw m - C - Heat transfer coefficient V j 0.69 m 3 Volume of jacket temerature, and the PID arameters. The solutions of roosed GA are strings of five arameters, which is able to characterise all the rocess inut-outut relationshis and PID arameters, as shown in Fig. 3. The fitness of each solution is calculated using the estimated rocess relationshi. The best solution obtains highest fitness value; otherwise, it will obtain lower fitness value. The equation of fitness function is described in (5) and (6). T = T C (5) est c + Fitness = + (6) ( T T ) ( T T ) r est where T ref, T r, T est and T c are the reference temerature, reactor temerature, estimated reactor temerature and coolant temerature resectively. and C are develoed based on the relationshi between coolant temerature and reactor temerature. The first term of (6) is used to obtain the best estimation of rocess inut-outut relationshi, whereas the second term is used to determine the otimum PID arameters in the string. The rocess inut-outut relationshi is used to calculate the fitness of each PID arameters set. Ranking method is used in selection oeration. This oeration emhasises the fittest solution in the oulation by dulicating those solutions in the mating ool and hoing that their offsring will in turn have even higher fitness value while maintaining the oulation size. In crossover oeration, blending method is used with a rate of 0.9. This oeration will randomly ick u two solutions, called arent, from the mating ool. Some ortions from both arents will be exchanged and create two new solutions, called offsring. This method combines variable values from both arents into new variable values in the offsring. The first offsring variable value comes from a combination of two corresonding arent variable values, whereas the second offsring is merely the comlement of the first offsring, as described in (7) and (8). x x ref est n = x + ( β ) x β (7) n = x + ( β ) x β (8) where x n is the offsring, x is the arent, β is a random number, which is in between 0 and. The mutation oerator hels in randomly searching other areas of the solution sace that may be unexlored and might be containing the global maxima. However, the robability of mutation must be low in order to revent the loss of fit solutions and affect the convergence of the solutions. Hence, the mutation rate in this aer is set as 0.0. The stoing criterion of the GA is whenever the maximum number of generation is reached. In this work, the maximum number of generation is set to. Hence, the GA will sto after generations and choose the otimum PID arameters. 64
Initialise oulation 0 Fitness function Process odel Estimation PID Parameters 90 Selection Crossover utation Reached stoing criterion? 70 50 30 0 Exothermic Heat Profile Figure. Framework of roosed GA Proosed GA solution string: Otimum PID Parameters Figure 3. Proosed GA solution string B. Controller The controller model is based on PID control algorithm, as described in (9). t de( t) u( t) = K e( t) + K i e( τ ) dτ + K (9) d where u(t) is the control variable, e(t) is the error, K is the roortional arameter, K i is the integral arameter, and K d is the derivative arameter. IV. RESULTS AND DISCUSSION This comares the erformances of three tyes of controller: classical PID controller, regular GA-PID controller and the roosed GA-PID controller with additional arameters at the fitness function. First of all, PID arameters are manually tuned using all the nominal rocess arameters and Fig. 4 illustrates its erformance. It can be observed that the PID controller erforms well in the nominal case if the PID arameters are well-tuned subjected to the nominal condition. The reactor temerature is raised to the desired temerature set oint in min. Fig. 4 shows the liberated exothermic heat during the rocess. However, it is very imortant to test the robustness of the controller with unredictable faults and disturbances because the reactor must always be oerated in safe condition in regardless of any faults. Therefore, PID controller with the well-tuned arameters in nominal case is tested under two asects: model mismatch and external disturbance. The robustness of PID is then comared with the regular GA-PID and roosed GA-PID. 0 C P I D Exothermic Heat (kw) 0 0 Figure 4. PID erformance, exothermic heat rofile under nominal case The first robustness test involves 30 % and 0 % increment from the nominal value in reaction rate and reaction rate resectively. This test reresents the resence of unmodelled reactions because the dynamic model of batch rocess is oorly known in ractice. In reality, inherent variable time delay is one of the main challenges for the rocess controller to react efficiently [0]. Therefore, random time delay is introduced at the controller outut due to the valve delay occurred in the jacket inlet stream. The erformances of the controllers are shown in Fig. 5. The simulation result shown in Fig. 5 illustrates that the PID controller has largest overshoot in the reactor temerature. This result shows that a reset PID controller is not robust in handling model mismatch condition. Therefore, AI technique is recommended to auto-tune the PID arameters. Fig. 5 demonstrates that the regular GA-PID with redetermined model arameters has an accetable erformance, whereas Fig. 5(c) shows that the roosed GA-PID has the best erformance since it has the smallest overshoot in the reactor temerature. This is because by emloying additional information of online estimated model arameters in the fitness function in GA, GA will adat its fitness function arameters according to the environment changes and then able to evolve otimum PID arameters using the more accurate and udated information. 65
0 0 0 0 0 (c) Figure 5. Performance of PID, Performance of regular GA-PID, (c) Performance of roosed GA-PID under model mismatch condition The second robustness test involves a sudden shut down of the valve in jacket inlet stream at time min to 3 min, and 90 min to 95 min. This test reresents a short eriod of malfunction in the valve relay. Random time delay is also introduced in this robustness. The erformances of the controllers are shown in Fig. 6. As a result of disturbance rejection ability, Fig. 6 shows that the PID has worst erformance, whereas the roosed 0 (c) Figure 6. Performance of PID, Performance of regular GA-PID, (c) Performance of roosed GA-PID under external disturbance control technique has the best erformance in controlling the temerature when the external disturbance is introduced. Fig. 7 shows the erformances of the regular GA-PID and the roosed GA-PID in dealing with the combination of model mismatch and external disturbance situations. Simulation is conducted to test the effectiveness of both controllers in a critical condition. 66
0 0 Figure 7. Performance of regular GA-PID, Performance of roosed GA-PID under combination case of model mismatch and external disturbance The vigorous arameters changes force the rocess towards instability. Regular GA-PID with redetermined model in fitness function is not able to revent the temerature runaway effectively, as shown in Fig 7. On the other hand, roosed GA-PID shows a less overshoot in the reactor temerature before the desired temerature is attained, as shown in Fig 7. V. CONCLUSION In this study, an exothermic rocess model with online estimated model arameters with the GA otimization scheme of PID controller has been develoed based on the characteristic of the batch rocess. The roosed control technique consists of two comonents: otimization scheme and controller. The roosed GA otimizer is used to adat its fitness function arameters and then otimize the PID arameters, whereas PID controller is used to control the reactor temerature by controlling the coolant temerature. From the simulation results, it can be verified that the roosed control method rovides a more effective solution in temerature control due to its robustness against the variable time delay, model mismatch and external disturbance situations comared to the regular GA-PID with redetermined model arameter and non adative PID controller. In future, the roosed GA can be used to otimize the coolant flow rate as well as controlling the reactor temerature as a IO system. ACKNOWLEDGENT The authors would like to acknowledge the financial suort of Universiti alaysia Sabah (US) under Postgraduate Scholarshi Scheme. REFERENCES [] G. Henini, F. Souahi and Y. Laidani, Suervision and control to imrove the roductivity of batch reactor equied with a monofluid heating / cooling system, Energy Procedia, vol. 6,. 449-458,. [] A. Patra, D.. Dave and A.. Jana, Nonlinear control of a batch reactive rectifier, Industrial & Engineering Chemistry Research, vol. 50,. 666-673,. [3] B.J. Cott and S. acchietto, Temerature control of exothermic batch reactors using generic model control, Industrial & Engineering Chemistry Research, vol. 8,. 77-84, 989. [4]. Golshan, J.F. acgregor,.j. Bruwer and P. haskar, Latent variable model redictive control (LV-PC) for trajectory tracking in batch rocesses, Journal of Process Control, vol., no. 4,. 538-550, 0. [5] T.T.K. Kenneth, S. Yaacob, R. Nagarajan and G. Sainarayanan, Certain studies on samle time for a redictive fuzzy logic controller through real time imlementation of henolformaldehyde manufacturing, Proceedings of IEEE Region 0 Conference (TENCON): Analog and Digital Techniques in Electrical Engineering, vol. 4,. 54-57, 04. Chiang ai, Thailand. [6] I.. ujtaba, N. Aziz and.a. Hussain, Neural network based modelling and control in batch reactor, Chemical Engineering Research and Design, vol. 84, no. A8,. 635-644, 06. [7] J. Wang, A.J. Song and Q.X. Zhu, Adative PID temerature controller based on fuzzy logic, Alied echanics and aterials, vol. 55-57,. 455-458,. [8] N. Jha, U. Singh, T.K. Saxena and A. Kaoor, Online adative control for non linear rocesses under influence of external disturbance, International Journal of Artificial Intelligence and Exert Systems, vol., no.,. 36-46,. [9] B. Tandon and R. Kaur, Genetic algorithm based arameter tuning of PID controller for comosition control system, International Journal of Engineering Science and Technology, vol. 3, no. 8,. 6705-67,. [0]. Sbarciog, R.D. Keyser, S. Cristea and C.D. Prada, Nonlinear redictive control of rocesses with variable time delay. A temerature control case study, Proceedings of 7th IEEE International Conference on Control Alications,. -6, 08. Texas, USA. 67