CHEMICAL ENGINEERING TRANSACTIONS VOL. 57, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Sauro Pierucci, Jiří Jaromír Klemeš, Laura Piazza, Serafim Bakalis Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608- 48-8; ISSN 2283-9216 The Performance of Classic and Advanced Controllers on the Output Temperature Control in a Heat Exchange Process Giovani S. Correia da Silva*, Luiz F. L. R. Silva, Maurício B. de Souza Jr. Escola de Química, Universidade Federal do Rio de Janeiro giocaniscsilva@gmail.com CFD (Computational Fluid Dynamics) has been used in engineering, among other things, to permit reduction of costs and optimization compared to a traditional design. Its application in modern industry offers a relatively cheap and efficient problem solving tool, enabling the achievement of consolidated results. However, embedded process control techniques in CFD sources are still scarce. Hence, the implementation of advanced control techniques in CFD OpenFOAM tool, open source, is a technological innovation, since it allows the use of controllers directly in CFD simulation. A bidimensional, monophasic heat exchange problem was used to test the implementation of a simplified model predictive control (MPC) algorithm and its comparison with parallel and serial PID control algorithms. The IMC (Internal Model Control) approach was used for tuning the PID controllers in order to control the output temperature by manipulating the input velocity. The performance of the controllers was evaluated and compared by changing set point and imposing disturbances on the input temperature. The criteria to evaluate the performance of the controllers were ISE (integral of the squared error), rise time (Trise), settling time (Te) and overshoot (Os). The results show a successful embedded implementation of the simplified MPC control structures in the CFD OpenFOAM tool. 1. Introduction A chemical plant is an arrangement of processing units integrated in a systematic manner. The plant´s main objective is to convert raw materials into desired products using the available sources of energy, in the most economical way (Stephanopoulos, 1984). During their operation, the process plants must meet with requirements in the presence of external disturbances. The primary ones are personal, environmental and equipment safety. Additionally, it is necessary to obtain the desired products according to project specifications, operating constraints and market conditions (Seborg et al., 2004). Therefore, all the requisites listed above dictate the need for continuous monitoring and external control of the operation in a chemical plant to reach the operating objectives (Luyben, 1992). Besides this, it is important to study the dynamic of a process through its mathematical modelling and to know which variables that, when changed, affect the process performance, to have an increasingly efficient and profitable plant. The process control application involves an implementation of a control strategy that begins with the selection of instruments to measure and to permit continuous adjustment of process variables. Nowadays, the processing and storage of information brought about by the use of computers allows the design of more advanced controllers, which perform more complex calculations than the conventional PIDs. Model Predictive Control (MPC) is considered the most general way to put the control problem in the time domain. Formulation includes optimal control, stochastic control, and process control with delay time, multivariable control reference trajectory and constraints. Currently, CFD has been used to permit the reduction of costs and optimization of a traditional design. In this context, its application in modern industry offers a relatively cheap and efficient problem solving tool, enabling the production of consolidated results. In spite of that, implanted process control techniques in CFD sources are still limited. The authors of the present work (Correia da Silva et al., 2016) have studied the feedback control of a particle diameter in breaking and coalescence processes, using feedback control implemented in OpenFOAM software. It´s worth pointing out that the implementation of advanced control techniques in CFD DOI: 10.3303/CET1757168 Please cite this article as: Correia Da Silva G., Silva L.F.L.R., De Souza Jr M.B., 2017, The performance of classic and advanced controllers on the output temperature control in a heat exchange process, Chemical Engineering Transactions, 57, 1003-1008 DOI: 10.3303/CET1757168 1003 OpenFOAM tool, open source, is a technological innovation, since it allows the use of controllers directly in CFD simulation (Vascellari et al, 2015). In this paper, a simplified version of the DMC (Dynamic Matrix Control) for SISO (single input, single output) case and on one step ahead prediction (Deshpande, 1985) is implemented for the first time in the OpenFOAM software and compared with parallel and serial PIDs. A bidimensional heat exchange control problem with monophasic air flow is used as a control example. 2. Fundamentals 2.1 Continuity Equation The continuity equation, which describes the temporal rate of change of fluid density at a fixed position in space, is defined by (Bird et al, 2001):   0   v t    (1) Where:  is density, t is time and v  is velocity. 2.2 Motion Equation The movement equation by monofasic flow is defined by Eq(2):       gpvv t v        (2) In this case   is viscosity tension tensor and g  is the gravity. 2.3 Energy Equation The enthalpy form of energy equation is defined by the equation below:       Dt Dp vqvH t H     :ˆ ˆ   (3) Considering that t H   ˆ is the increase rate of enthalpy energy,  vHˆ is the addition of energy by convective transport,  q is the increase rate of energy by conduction transport and  v  : is the irreversible growth rate of energy by viscosity dissipation. 2.4 Control strategy The control strategies for parallel and serial PID, in the velocity form, are described by Eqs(4) and (5), respectively (Seborg et al, 2004):                211 2 kkk D k I kkck eee t e t eeKp   (4)               211 2 kkk ID kkkDI I c k eee t teee K p    (5) Where: k p is controller output at the kth sampling instant; KC is the proportional gain; I is the integral time; D  is the derivative time; k e is the error at the kth sampling instant for k =1, 2….; t is the sampling period. 1004 The implemented control action for a simplified model predictive controller is a DMC algorithm (step response based) with a single prediction step. The control action is shown in Eq(6) (Deshpande, 1985):   )1( )(ˆ)1(ˆ)1( )( * S kdkyky ku r   (6) yr defined by Eq(7): wkyky r )1()()1(   (7) Where α is constant filter, w is set point and *ŷ is prediction value, calculated by Eq(8): )1()()1()()1(ˆ 1 2 * nkunSikuiSky n i     (8) )(ˆ kd is a plant-model mismatch represented by Eq(9):     1 1 mod )()()1()()()()(ˆ n i menmen nkunSkuiSkyykykd (9) S(1) is the first value of a step convolution function. In this paper, α is equal 0, and the convolution function was obtained by a unitary negative step inserted into the air input rate. 3. Metodology Figure 1 represents the mesh used in CFD simulation. The walls indicated in the figure received a constant heat flux of 15 W / m2. The fluid (air) inlet temperature was 300 K. The control point of the controlled variable (T) and the point where the manipulated variable (input velocity) was influenced are also shown. Figure 1. Volume control employed in CFD simulation and monitoring point. This process is non-linear. Therefore, it was necessary to identify a linear transfer function model for controller design. Due to non-linearity, the final transfer function used mean values of the parameters of the functions identified with positive and negative steps at the air inlet velocity. The IMC tuning methodology was applied for parallel and serial PID controllers. Regulatory performance tests were performed with positive and negative disturbances in relation to the steady state as well as the ones in the fluid inlet temperature. Finally, the performance indexes of the controllers were calculated in order to compare control performances. 1005 4. Results and Discussions To investigate the non-linearity of the process, two simulations have been proposed, starting from the basic simulation with air inlet speed of 0.75 m/s and temperature of 300K. Disturbances of ±0.25 m/s were inserted into the fluid input rate from the steady state simulation time equals to 1000 s. The results can be seen in Figure 2. Figure 2. Simulation of the heat air process at steady state and disturbances of ±0.25 m/s in the air input speed. In Figure 2, a nonlinear behaviour was confirmed in the modelled process, since for the same magnitude of disturbances above and below, the response curves were distinctively different. In order to tune the PID parallel and serial controllers, it was necessary to identify a linear model for the process. Two data concerning the negative and positive delta ±0.25 m/s at the air inlet velocity were applied in the identification (Ident Toolbox of Matlab 7.7.0; R2008b). The process linear model represented by transfer function, for negative and positive disturbances, can be seen in Eq(10) and Eq(11), respectively: )1)(1( )( 21 1 ss K sG p    (10) Where: Kp1 = -121.41, 1 =179.39 and 2 =14.22. )1)(1( )( 43 2 ss K sG p    (11) Where: Kp2 = -82.86, 3 =116.53 and 4 =10.90. The results of deviations of the transfer function model against the data obtained from the OpenFOAM simulation, in a negative (Model 1) and positive (Model 2) steps, are considered acceptable. The Thus, those models can be used for tuning controllers using transfer function models parameters average. In classical statistics, p-value is a probability of obtaining a statistic test equal to or more extreme than that observed in a sample under the null hypothesis. For example, for hypothesis test, the null hypothesis can be rejected at 5% if the p-value is less 5% (Montgomery & Runger, 2002). In the proposed models, as the p-value is less than 0.05 (5.0% confidence), the null hypothesis can be rejected, and proposed models are able to represent the phenomenon described by the “experimental” data. The values of statistical parameters, determination coefficient (R2), Pearson correlation coefficient (R), p-value end the null hypothesis test are shown in Table 1: 1006 Table 1: Statistical parameters of determination for the proposed models Statistical Parameters Model 1 Model 2 R2 0.9898 0.9910 R 0.9902 0.9945 Correlation Classification Strength Positive Strength Positive p-value 8.9x10-4 9.2x10-4 Reject null hypothesis Yes yes With the parameters average of the transfer functions, it was possible to tune the parallel and serial PID controllers using the IMC method (Seborg et al, 2004). The tuning parameters are exhibited in Table 2: Table 2: Numeric values for IMC tuning for PID parallel and serie PID Controllers KC I  D  Parallel -0.026142 160.522 6.86 Serial -0.024972 153.339 7.18 After tuning, tests have been proposed for parallel and serial PID and Predictive controllers. The tests were performed considering the nominal steady state (T=344.98K), obtained in the simulation with air inlet speed of 0.75m/s and temperature 300K. First, the set point was submitted to variations of ±20K (5.8% regarding the steady state), in order to verify the servo response of the controllers. The performance of parallel and serial PID and Predictive Controllers on the set point problem can be appreciated in Figure 3. All controllers led the response to the desired set point. The performance indexes of controllers are exhibited in Table 3. Figure 3. Simulation of PID and Predictive Controllers. (a) Set Point equal 364K. (b) Set Point equal 324K. Table 3: Performance indexes of controllers from set point problem (a) and (b) Set point (a) Set point (b) Controllers ISE Trise Te Os ISE Trise Te Os Parallel 772110 1488.5 1025.6 - 1023100 1298.4 1025.7 Serial 743060 1297.2 1025.5 - 983430 1297.2 1025.6 Predictive 2059000 1104.4 1069.4 7.81 2058100 1104.4 1069.5 1.6 For two cases above, the serial PID had a better performance than the other controllers. Two simulations more were carried out. The air inlet temperature was submitted to variations of ±20K, and the set point was set in stead state (344.98K), in order to verify the regulatory response of the controllers. The regulatory performance of parallel and serial PID and Predictive Controllers can be seen in Figure 4. All the controllers restored the desired set point. The performances indexes of controllers are exhibited in Table 4. 1007 Figure 4. Simulation of PID´s and Predictive Controllers. (a) Inlet temperature 310K. (b) Inlet temperature 290K. Table 4: Performance indexes of controllers from regulator problem (a) and (b) Inlet temperature (a) Inlet temperature (b) Controllers ISE Trise Te Os ISE Trise Te Os Parallel 83599 1986.5 1010.0 - 62048 2076.2 1010.0 Serial 73257 1205.5 1010.0 - 54200 1825.0 1010.0 Predictive 132280 1794.2 1010.0 1.096 125520 1166.4 1010.0 3.569 In Table 4, it can be stated that for all examples, the serial PID presented better performance than the other controllers. Despite the model predictive control algorithm implemented is very simplified, the predictive control still showed a very good control performance. 5. Conclusions This work presents, to the knowledge of the authors, the first implementation of an MPC algorithm in the OpenFOAM software. However, it should be noticed that a simplified version of the DMC algorithm was used. The heat process studied in this paper did not show linear behaviour and the methodology developed for the identification process was able of providing a linear model for the process under study with good statistical correlation. With this, the IMC (Seborg et al., 2004) tuning methodology could be applied for tuning the parallel and serial PID controllers. The serial PID controller presented the best control performance in either positive or negative disturbances to the set point regarding the original steady state (344.98K) and in positive and negative disturbance in air inlet temperature. The predictive control presented a good control performance for the set point problem and regulatory problem, keeping in mind that the model predictive control algorithm implemented was simplified. It is expected to use the control structure embedded in the OpenFOAM to treat a more complex problem. The future target is to study the control of the heat exchange between the liquid reentering a vacuum tower and the steam flowing from the bottom section. References Bird, R. B., Stewart, W. E., Lightfoot, E. N.,2001, Transport Phenomena, New Jersey, USA. Correia da Silva, G. S., Silva, L. F. L. R., De Souza Jr., M. B. 2016. CFD Investigation of Feedback Control of Particle Diameter in Breaking and Coalescence Process. II Simpósio Paranaense de Modelagem, Simulação e Controle de Processos, 1, 1-8. Curitiba, Brazil. Deshpande, P. B.,1985, Distillation Dynamics and Control, Instrument Society of America. New York, USA. Luyben, W. L. 1992. Practical Distillation Control. 1ed. New York, USA. Montgomery, D. C., Runger, G. C. 2002, Applied Statistics and Probability for Engineers. New York, USA. Stephanopoulos, G., 1989, Chemical Process Control: An Introduction to Theory and Practice. Prentice-Hall Inc, New Jersey, USA. Seborg, D. E., Edgar, T. F., Mellichamp, D. A. 2004. Process Dynamics and Control, 2ed. Jonh Wiley & Sons, New Jersey, USA. Vascellari, M., Roberts, D. G., HLA, S. S., 2015, From laboratory-scale experiments to industrial-scale CFD Simulations of entrained flow coal gaseification, Fuel, 152, 58-73. 1008