Format And Type Fonts CCHHEEMMIICCAALL EENNGGIINNEEEERRIINNGG TTRRAANNSSAACCTTIIOONNSS VOL. 39, 2014 A publication of The Italian Association of Chemical Engineering www.aidic.it/cet Guest Editors: Petar Sabev Varbanov, Jiří Jaromír Klemeš, Peng Yen Liew, Jun Yow Yong Copyright © 2014, AIDIC Servizi S.r.l., ISBN 978-88-95608-30-3; ISSN 2283-9216 DOI: 10.3303/CET1439056 Please cite this article as: Vasičkaninová A., Bakošová M., 2014, Control of a heat exchanger using neural network predictive controller and auxiliary fuzzy controller, Chemical Engineering Transactions, 39, 331-336 DOI:10.3303/CET1439056 331 Control of a Heat Exchanger Using Neural Network Predictive Controller and Auxiliary Fuzzy Controller Anna Vasičkaninová*, Monika Bakošová , Institute of Information Engineering, Automation and Mathematics, Faculty of Chemical and Food Technology, Slovak University of Technology in Bratislava, Radlinského 9, 812 37 Bratislava, Slovak Republic anna.vasickaninova@stuba.sk The paper presents an advanced control strategy that uses the neural network predictive controller and the fuzzy controller in the complex control structure with an auxiliary control variable. The controlled tubular heat exchanger was used for pre-heating of petroleum by hot water. The heat exchanger was modelled as a nonlinear system with interval parametric uncertainty. The set point tracking and the disturbance rejection using intelligent control strategies were investigated. The control objective was to keep the outlet temperature of the pre-heated petroleum at a reference value. Simulations of control of the tubular heat exchanger were done in the Matlab/Simulink environment. The neural network predictive control (NNPC) with fuzzy controller was compared with classical PID control. Simulation results obtained using NNPC with fuzzy controller and those obtained by classical PID control confirmed the effectiveness and superiority of the presented advanced control approach. 1. Introduction Predictive control is recently the most widely implemented advanced process control strategy in industrial applications. The robust model predictive control represents one of approaches, which enable to design effective control algorithms for optimisation of the control performance as well as to take process uncertainty into account (Bakošová and Oravec, 2013). Model-based predictive control refers to a class of algorithms that optimise future behaviour of a plant and the process model is used for prediction of future process outputs (Darby and Nikolaou, 2012). The MPC technology can now be found in a wide variety of applications (Keshavarz et al., 2010). Fuzzy control is nowadays successful control approach to complex nonlinear systems or even nonanalytic ones. Fuzzy logic controllers have the advantages over the conventional controllers: they are cheaper to develop, they cover a wider range of operating conditions, and they are more readily customizable in natural language terms. Fuzzy control has been suggested as an alternative approach to conventional control techniques in many situations. Salmasi classifies and overviews the state-of-the-art control strategies for hybrid electric vehicles (Salmasi, 2007). The design of the controller based on the use of a finite-dimensional approximate model,of high order, derived by spatially lumping the infinite-dimensional model of the heat exchanger is described in (Maidi et al., 2008). Fuzzy logic controllers have been implemented successfully in a variety of applications. In (Hladek et al., 2009), multi-agent control system based on a fuzzy inference system for a group of two wheeled mobile robots executing a common task is proposed. Wakabayashi describes procedures related to the application of PI fuzzy control in a semi-batch reactor for the production of nylon 6 (Wakabayashi et al., 2009). Hayward and Davidson illustrate the power of fuzzy logic through a simple control example (Hayward and Davidson, 2003). In Peri and Simon (2005), a fuzzy logic control of the motion of differential drive mobile robots has been presented. In Mendes et al. (2014), a new method for automatic extracting all fuzzy parameters of a Fuzzy Logic Controller in order to control nonlinear industrial processes is proposed. A major contribution of fuzzy logic is its capability of representing vague data (González et al., 2013). In Markowski and Siuta (2013), a general framework for dealing with uncertainties in each stage of consequence modelling is presented. 332 d 2 d 3 d1 T2(z,t) outlet petroleum q1, T1out inlet petroleum q1, T1in hot water q3(t), T3out hot water q3(t), T3in l z l T1(z,t) z+dz T3(z,t) Figure 1: Scheme of the tubular heat exchanger 2. Process description Consider a co-current tubular heat exchanger (Vasičkaninová et al., 2011), where petroleum is heated by hot water through a copper tube (Figure 1). The controlled variable is the outlet petroleum temperature T1out. Among the input variables, the hot water flow rate q3(t) is selected as the control variable. The mathematical model of the heat exchanger is derived under some simplifying assumptions (Vasičkaninová and Bakošová 2012). Parameters and steady-state inputs of the heat exchanger are given in (Vasičkaninová and Bakošová 2012). For the identification, the step changes of the inlet mass flow-rate of the heating water were generated. According to these step changes, the heat exchanger is a time-delay nonlinear system with asymmetric dynamics. The model was identified using the Strejc method (Mikleš and Fikar, 2007) from the step responses in the form of the n th order plus time delay transfer function in Eq(1).   Ds n e +τs K =G  1 (1) As several step responses were identified, intervals were obtained for the gain K, the time constant , the time delay D and the heat exchanger was represented as the 3 rd order system with interval parametric uncertainty. The nominal values of the parameters are mean values mean = 19.5 s, Dmean = 1.5 s and Kmean = 5.3510 4 °C m -3 s. 3. Control of the heat exchanger 3.1 PID Control of the heat exchanger PID controllers described by the transfer function       st+ st +k=C d i p 1 1 (2) with kp the proportional gain, ti the integral time and td the derivative time, were tuned using the Cohen- Coon method (Ogunnaike and Ray, 1994) and the Strejc method (Mikleš and Fikar, 2007) for the nominal model in the form Eq(1). The PID controller parameters obtained using the Cohen-Coon formulas are kp = 1.1910 -4 , ti = 35.44 s, td = 4.55 s and those obtained using the Strejc formulas are kp = 4.3210 -5 , ti = 48.1 s, td = 12.64 s. 3.2 Neural network predictive control of the heat exchanger Model-based predictive control (MBPC) includes a broad variety of* control methods that comprise certain common ideas. A process model is explicitly used to predict the process output ŷ for a fixed number N of steps into future and the predictions are calculated based on information up to time k and on the future control actions. A future reference trajectory is known. A receding strategy is used, i.e. only the first control signal u(k) of the calculated sequence is applied to a controlled process. The standard cost function can have the form Eq(3). 333     2 1 2 max min )1()()1(ˆ)(    u N j N Nj r jkujkykyPkJ  (3) where Nu is the control horizon, Nmin and Nmax are the minimum and maximum prediction horizons respectively, yr is the reference trajectory, ŷ is the predicted controlled output, , P are the weight factors, and u is the sequence of the future control increments that have to be calculated. The cost function is minimized in order to obtain the optimum control input that is applied to the non-linear plant. The control input u may be constrained: umin ≤ u(k+j) ≤ umax; j = 1, 2, …, Nu. The length of the control horizon Nu must satisfy following constraints: 0 < Nu ≤ Numax . The value of Numax should cover the important part of the step response curve. The role of the coefficient  is to scale the second sum of squared control increments against the first sum representing squared predicted control errors. P scales the predicted controlled output against the reference signal. The output sequence of the optimal controller is obtained over the prediction horizon by minimizing the cost function J with respect to the vector of control inputs. The reference trajectory is assumed to be known. If it is not the case, several approaches are possible. The simplest way is to assume that the future reference is constant and equal to the desired set point: yr(k)=yr(∞). The preferred approach is to use smooth reference trajectory that begins from the actual output value and approaches asymptotically via the first order filter to the set point yr(∞): yr(k)=y(k), yr(k+j)=αyr(k+j-1)+(1-α)yr(∞). The parameter  determines smoothness of the trajectory with  0 being the fastest and  1 being the slowest trajectory. When the future output of the plant in predictive control strategy is predicted using neural network plant model, the neural network predictive control (NNPC) is established. The general control structure for the NNPC is shown in Figure 2. The first step in neural network predictive control is training the network. The Levenberg-Marquard algorithm was chosen for network training and the name of the training function in MATLAB is trainlm. The training data were obtained from the controlled process with distributed parameters represented by the non-linear model of the heat exchanger with the sampling interval 1 s. 1,200 training samples were used for the neural network training. The NN model was trained off line. The results of training are shown in Figure 3 for the validation data. The prediction error was sufficiently small and the process output and the NN model output fitted well. It is possible to state that the NN training was successful. After the NN model was trained, the NNPC started. The parameters for NNPC of the described heat exchanger were chosen as follows: minimum prediction horizon Nmin = 1, maximum prediction horizon Nmax = 17, control horizon Nu = 3, weight coefficients in the cost function  = 5, P = 1, and the parameter for the reference trajectory calculation   0.00012. For computing the control signals that optimise future plant performance, the minimization routine csrchbac was chosen. It is in fact one-dimensional minimization using the backtracking method. The control input constraints were set: 1.5×10 -4 ≤ q3in ≤ 3.5×10 -4 m 3 s -1 and control output constraints: 36.6 ≤ T1out ≤ 41 °C. The controller block was implemented in MATLAB-Simulink. 3.3 Takagi-Sugeno fuzzy controller Control system with auxiliary manipulated variable can be used, when it is possible to split controlled process into two parts, the slow and the fast ones. Then, it is necessary to find two manipulated variables, one influencing the slow part and the whole process and the second one influencing only the fast part. Such Figure 2: Neural network predictive control. 334 Figure 3: Validation data for NN model. Sugeno-type fuzzy inference system was generated in the form: If e is Ai Then fi = pi e + qi , i=1, ..., 6 (4) where e is the control error, q1(t) is the calculated control input and pi, qi are consequent parameters. The generalized bell membership function are used for the fuzzification of inputs and it depends on three parameters a, b, c as it is seen in (5)   1 2 )( 1,                    b a cx =cba,x;f (5) The parameters a, b, and c for bell membership functions are listed in the Table 1. The consequent parameters in the control input rule (4) are listed in Table 2. Rule viewer that simulates the entire fuzzy inference process is shown in Figure 4 and Figure 5 shows the structure of the artificial neural fuzzy inference system ANFIS. Table 1: Parameters of the bell curve membership functions ai bi ci 0.295 0.355 0.199 0.219 0.381 0.319 1.993 2.016 2.075 2.066 2.006 2.000 -1.034 -0.324 0.045 0.656 1.390 2.082 Table 2: Consequent parameters pi qi -1.06910 -3 -1.20410 -3 -1.03210 -3 -3.09610 -5 -7.71510 -6 -4.07510 -6 -2.12310 -4 3.32710 -4 4.13310 -4 3.36610 -5 1.40810 -5 9.88510 -6 Simulation results obtained using designed NN predictive control, predictive control with fuzzy P controller and two PID controllers are shown in Figure 6. The controlled outputs are compared in the task of set point tracking and in the case when disturbances affect the controlled process. The set point changes from 36.91 °C to 39 °C, then to 38 °C at 400 s and then to 40 °C at 800 s. Disturbances were represented by water temperature changes from 30°C to 35 °C at 200 s, from 35 °C to 31 °C at 600 s min and to 34 °C at 1000 s. The simulation results were compared also using integral criteria IAE (integrated absolute error) and ISE (integrated squared error) (Ogunnaike and Ray, 1994). The results for different performance measures are compared in Table 3. The control response obtained by neural network predictive control with fuzzy P controller has the smallest values of IAE and ISE, the smallest overshoots and the shortest settling times. 335 Figure 4: Fuzzy inference system  e membership functions A2 f1  e rules consequence functions output u f3  A1 A3 A4 A5 A6     f6 f5 f4 f2 Figure 5: Structure of Anfis Table 3. Values of IAE and ISE controller IAE ISE Cohen-Coon PI control Strejc PI control NNPC NNPC and fuzzy P controller 171 375 151 39 138 331 142 9 Figure 6: Comparison of the outlet petroleum temperature control. 4. Conclusion In this paper, a control strategy that uses the neural network predictive controller and the fuzzy controller in the complex control structure with an auxiliary control variable was investigated on the nonlinear heat exchanger. The advantage of this approach is that it is not a linear-model-based strategy and the control input constraints are directly included into the controller synthesis. Simulation results obtained using designed controllers were evaluated calculating integral performance indexes IAE and ISE. The control response obtained using the auxiliary control input had the smallest overshoots, the shortest settling times and also the smallest IAE and ISE values. The predictive control strategy with the auxiliary fuzzy controller provides satisfactory control responses for the set-point tracking as well as for the load disturbance 336 attenuation. Better results can be observed particularly in the case when disturbances affect the controlled process. Acknowledgments The authors are pleased to acknowledge the financial support of the Scientific Grant Agency VEGA of the Slovak Republic under the grants 1/0973/12. References Al-Mutairi E. M., 2010, Optimal design of heat exchanger network in oil refineries, Chemical Engineering Transactions, 21, 955-960 DOI: 10.3303/CET1021160. Bakošová M., Oravec J., 2013, Robust model predictive control of heat exchanger network, Chemical Engineering Transactions, 35, 241-246 DOI:10.3303/CET1335040 Darby ML, Nikolaou M., 2012, MPC: Current practice and challenges. Control Engineering Practice,20, 328-342. DOI:10.1016/j.conengprac.2011.12.004 Keshavarz M, Yazdi M.B., Jahed-Motlagh M.R., 2010, Piecewise affine modeling and control of a boiler– turbine unit, Applied Thermal Engineering. 30, 781-791, DOI 10.1016/j.applthermaleng.2009.11.009 Salmasi F.R., 2007, Control strategies for hybrid electric vehicles: evolution, classification, comparison, and future trends, IEEE Transactions on Vehicular Technology, 56(5), 2393–2404 igital Object Identifier 10.1109/TVT.2007.899933. Maidi A., Diaf M., Corriou J.P., 2008, Optimal linear PI fuzzy controller design of a heat exchanger, Chemical Engineering and Processing: Process Intensification 47(5), 938–945, DOI 10.1016/j.cep.2007.03.008. Hladek D., Vaščák J., Sinčák P., 2009, Multi-robot control system for pursuit-evasion problem, Journal of Electrical Engineering 60(3), 143–148, ISSN 1335-3632. Wakabayashi C., Embiruc M., Fontes C., Kalid R., 2009, Fuzzy control of a nylon polymerization semi- batch reactor, Fuzzy Sets and Systems 160(4), 537–553, http://dx.doi.org/10.1016/j.fss.2008.08.009. Hayward, G. and V. Davidson V., 2003, Fuzzy Logic Applications. Analyst, vol.128, 1304-1306, DOI: 10.1039/bb312701j. Peri V.M. and Simon D., 2005, Fuzzy Logic Control for an Autonomous Robot, North American Fuzzy Information Processing Society. NAFIPS 2005 Annual Meeting, 337-342, DOI 10.1109/NAFIPS.2005.1548558 Markowski A.S., Siuta D., 2013, Application of Fuzzy Logic Approach to Consequence Modeling in Process Industries, Chemical Engineering Transactions, 31, 157-162 DOI: 10.3303/CET1331027. González J.R., Darbra R.M., Arnaldos J.,2013, Using Fuzzy Logic to Introduce the Human Factor in the Failure Frequency Estimation of Storage Vessels in Chemical Plants, Chemical Engineering Transactions, 32, 193-198 DOI: 10.3303/CET1332033. Mendes J., Araújo R., Matias T., Seco R., Belchior C., 2014, Automatic extraction of the fuzzy control system by a hierarchical genetic algorithm, Engineering Applications of Artificial Intelligence, 29, 70– 78, DOi: 10.1016/j.engappai.2013.12.012. Vasičkaninová A., Bakošová M., Mészáros A., Klemeš J., 2011, Neural network predictive control of a heat exchanger. Applied Thermal Engineering, 31, 2094-2100, DOI: 10.1016/j.applthermaleng.2011.01.026. Vasičkaninová, A., Bakošová, M., 2012, Robust control of heat exchangers. Chemical Engineering Transactions, 29, 1363-1368, DOI: 10.3303/CET1229228. Mikleš J,, Fikar M., 2007, Process Modeling, Identification, and Control. Berlin, Germany: Springer. Ogunnaike B.A., Ray W.H., 1994, Process Dynamics, Modelling, and Control. Oxford University Press, New York, USA. http://dx.doi.org/10.1016/j.fss.2008.08.009 http://dx.doi.org/10.1109/NAFIPS.2005.1548558