CHEMICAL ENGINEERING TRANSACTIONS VOL. 76, 2019 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar S. Varbanov, Timothy G. Walmsley, Jiří J. Klemeš, Panos Seferlis Copyright © 2019, AIDIC Servizi S.r.l. ISBN 978-88-95608-73-0; ISSN 2283-9216 Control of Heat Exchangers Using Complex Control Structures with Neural Network Predictive Controllers Anna Vasičkaninová*, Monika Bakošová, Juraj Oravec, Alajos Mészáros Slovak University of Technology in Bratislava, Faculty of Chemical and Food Technology, Institute of Information Engineering, Automation, and Mathematics, Radlinského 9, 81237 Bratislava, Slovak Republic anna.vasickaninova@stuba.sk A new idea presented in this paper is implementation of the neural network (NN) predictive controllers in the complex control structures that are used in industrial applications. The conventional feedback PID control, simple neural network predictive control (NNPC) and two complex control structures with NN predictive controllers were studied using simulation experiments and compared. The NN predictive controllers in the role of the primary controllers were used in the cascade control and in the control system with the auxiliary control input. All mentioned control structures were used for control of five counter-current heat exchangers in series that were used for cooling of a product of distillation. The neural network (NN) plant model of the heat exchangers was obtained off-line. The simulation experiments showed that the NNPC-based control system with the main NN predictive controller and with the auxiliary control input significantly reduced both, the settling time and the overshoots. This control structure assured also the best integral quality criteria IAE and ISE as well as the smallest coolant consumption. The disadvantage and the reason for rare using of this control structure in practice is that two manipulated variables are necessary. The second best was the NNPC-based cascade control. The NNPC-based complex control structures are promising for assuring effective operation of HEs and decreasing energy consumption. 1. Introduction Heat exchangers (HEs) and heat exchanger networks (HENs) serve for heat exchange between media with different temperatures and their non-optimal processing is energy intensive. As HEs and HENs are often used in the process industry, they attract high interest of researchers and engineers focused on modelling, advanced control strategies and their implementations, safe operation or process integration. Saranya et al. (2017) reviewed and compared different types of the mathematical models of the heat exchangers and various types of heat exchanger controllers. Nemet et al. (2017) used risk assessment for the synthesis of safer heat exchanger networks (HENs). Sun et al. (2018) analysed the two enhanced ejector heat exchangers from the perspective of thermodynamics. Baruque et al. (2019) presented a heat exchanger designed to help regulate the temperature of a bioclimatic installation. Predictive control is an advanced control strategy that is recently intensively studied and the most widely implemented in industrial applications. Vasičkaninová and Bakošová (2015) presented an advanced control strategy using an NNPC and a fuzzy controller in the control system with an auxiliary control input. The extension of the research in NNPC for the counter-current HEs in series was presented in Vasičkaninová et al. (2017) and energy savings were assured. Two advanced control strategies were investigated for a tubular heat exchanger in Bakošová et al. (2017), the neural-network-based predictive control and the robust model-based predictive control (RMPC) with integral action. Simulation results confirmed improvement of the closed-loop control performance and energy savings in comparison with the conventional PID control. Oravec et al. (2016) designed the robust model-based predictive control to optimize the heat exchangers in series with uncertain parameters and reached promising results from the viewpoint of energy savings. They analysed also robust stability, violation of constraints on control inputs and controlled outputs, energy savings, and overall computational complexity of the control algorithm. DOI: 10.3303/CET1976061 Paper Received: 15/03/2019; Revised: 09/04/2019; Accepted: 09/04/2019 Please cite this article as: Vasickaninova A., Bakosova M., Oravec J., Meszaros A., 2019, Control of Heat Exchangers Using Complex Control Structures with Neural Network Predictive Controllers, Chemical Engineering Transactions, 76, 361-366 DOI:10.3303/CET1976061 361 2. Neural network-based model predictive control The neural network-based (NN) predictive controller uses a neural network model of the controlled plant to predict future plant performance (Figure 1). The plant can be nonlinear as well as influenced by various uncertainties. The NN predictive controller calculates the predicted control input that will optimize the plant performance over a specified future time horizon (Soloway and Haley, 1996). Figure 1: The scheme of neural-network-based predictive control The predictions are used by a numerical optimization procedure to determine the control signal that minimizes the performance criterion (1) over the specified horizon: 𝐸(𝑘) = ∑ (𝑟(𝑘 + 𝑗) − 𝑦𝑚(𝑘 + 𝑗)) 2 𝑁2 𝑗=𝑁1 + ∑(𝑢(𝑘 + 𝑗 − 1))2 𝑁𝑢 𝑗=1 (2) where N1, N2, and Nu are the prediction and control horizons, respectively, over which the tracking error and the control increments are evaluated, and k is the time in the discrete time domain. The parameter  represents the contribution that the sum of the squares of the control increments has on the performance criterion, r is the reference signal, ym is the NN model response, and u is the sequence of the future control increments that have to be calculated in the optimization procedure (Beale et al., 2015). The neural network plant model is a very important control component in the NNPC. The two-layer network with sigmoid transfer functions in the hidden layer and linear transfer functions in the output layer is used in the presented NNPC design. The prediction error between the plant output and the neural network output is used as the NN training signal. The NN plant model uses previous process inputs and previous process outputs to predict future values of the process outputs. The first step in NNPC design is the system identification that means training of a neural network to represent the feedforward dynamics of the plant. The network can be trained off line in the batch mode using data collected from the process operation. The often used Levenberg-Marquardt (LM) algorithm is efficient for training (Lera and Pinzolas, 2002). The LM algorithm is an iterative one that finds a minimum of a function that is expressed as the sum of squares of non-linear functions. The formula for weight optimization and threshold updating in the LM algorithm is: 𝑥(𝑘 + 1) = 𝑥(𝑘) − (𝐽𝑇𝐽 + 𝐼)−1𝐽𝑇𝑒(𝑘) (2) where J is the Jacobian matrix from the difference of error to the weight value, I is the identity matrix, e denotes the control error and  is a positive scalar number, that determines the length of the step in the steepest-descent direction. 3. Cascade control Cascade control (Figure 2) is a multi-loop control structure used in process industry to improve control under immeasurable disturbances and to enhance single-loop control performance (Bequette, 2003). In the Figure 2, C1 represents the primary (master) controller, C2 is the secondary (slave) controller, P1 is the primary controlled system, and P2 is the secondary controlled system. Signals r1 and r2 are the primary and the secondary reference values, y1 and y2 are the primary and the secondary controlled outputs, e1 and e2 are the primary and the secondary control errors, u2 is the manipulated variable that results from the control input calculated by the secondary controller influenced by the disturbance d1, and d2 is also a disturbance. In this setup, there is one manipulated variable and more than one measured variables. The inner and the outer control loops are formed each with an individual feedback controller. The major benefit from using the cascade control is that disturbances arising within the secondary loop are corrected by the secondary controller before affecting the value of the 1 2 3 4 5 6 7 8 9 10 - Future input Predicted output Reference trajectory - + + Constraints Process Optimizer NN Model Cost function Output NNPC Future error 362 primary controlled output. The output of the primary controller is used to adjust the set point r2 of a secondary controller, which generates a control signal to the controlled process. The process output y1 is fed back to the primary controller, and a signal from an intermediate stage of the process y2 is fed back to the secondary controller. The main advantage of the cascade control is that the better control performance is assured for all types of load disturbances. The primary controller is usually tuned as a controller with an integral action, as it is responsible for achieving the control objective. The secondary controller must compensate the load disturbance as fast as possible and using the P controller with a high gain for fast action is usually sufficient. The secondary controller is tuned at first and the primary controller is tuned with working inner loop. As the behaviour of the controlled process is often nonlinear and asymmetric and as the dynamics of the inner loop has to be taken into account for the primary controller tuning, the primary controller tuning is not so straight forward. So, the neural network model of the controlled process can be used to improve the primary controller tuning. Figure 2: Scheme of a cascade control system 4. Control system with an auxiliary control input The control system with an auxiliary control input (Figure 3) can improve servo and regulatory problems of processes with slow dynamics or with a time delay. In the Figure 3, C1 represents the main controller, C2 is the auxiliary controller, P1 is the slow part of the controlled system or the part including the time delay, P2 is the fast part of the controlled system. Signal r is the reference value, y is the controlled output, e is the control error, u2 is the control input calculated by the auxiliary controller, u1 is the control input calculated by the main controller, d is a load disturbance. Control system with an auxiliary control variable can be used, when it is possible to split the controlled process into two parts, the slow and the fast ones. The main control input enters to the whole controlled process. The choice of an auxiliary variable must be done so that it enters directly to the fast part of the controlled process. Although the problem of disturbances is not treated directly, disturbances are rejected faster than in a simple feedback control loop. The complication is that 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 of the controlled process. It is more difficult to fulfil this requirement in practice than two have two measured process outputs for the cascade control. Figure 3: Scheme of a control system with an auxiliary control input 5. Simulations and results 5.1 Process description Based on the previous work (Vasičkaninová et al., 2017), five identical counter-current shell-and-tube HEs in series were considered (Figure 4). Steel was used as a construction material for the tubes and the shell. Kerosene flows in the inner tubes. Water is used as a cooling fluid and it flows in the shell of each HE. Every HE has a counter-current arrangement as well as the whole HEN as it is shown in Figure 4. The objective is to decrease the kerosene temperature in the outlet stream from the 5th HE to the reference temperature and to minimize the cooling water consumption. The simplified nonlinear dynamic mathematical model of the HEs can be in the form of ten first-order ordinary differential equations (Oravec et al., 2016). Parameters and steady-state inputs of the heat exchangers are given in (Vasičkaninová et al., 2017). 1 2 3 4 5 6 7 C1 - P2 P1 C2 - r1 e1 d2 e2 u2 d1 y1 y2 r2 Inner loop Outer loop 1 2 3 4 5 6 7 P r C1 - P2 P1 C2 e u2 y u1 d 363 Figure 4: Scheme of the counter-current shell-and-tube exchangers in series 5.2 Conventional PID control of the heat exchangers The kerosene temperature in the outlet stream from the 5th heat exchanger is the controlled output, and the volumetric flow rate of cold water in the inlet stream into the 5th heat exchanger is the manipulated variable (Figure 4). The disturbances were represented by the coolant temperature changes in the inlet stream into the first HE in the simulation experiments and they were as follows: temperature increased by 5 K at t = 1800 s and decreased by 5 K at t = 5400 s. The conventional PID controller is described by the transfer function 𝐶 = 𝑘𝑝 (1 + 1 𝑡𝑖𝑠 + 𝑡𝑑𝑠) (3) where kp is the proportional gain, ti the integral time and td the derivative time. The PID controllers were tuned using the Rivera-Morari and Chien-Hrones-Reswick methods (Corriou, 2004). The model of the HEN needed for tuning was identified using the step-response-based method and had the form of the nth order plus time delay transfer function (Mikleš and Fikar, 2007) in Eq(4). 𝑆 = 𝐾 (𝑇𝑠 + 1)𝑛 𝑒−𝐷𝑠 (4) The transfer function parameters were identified as follows: the order n = 2, the gain K = − 30 K s m-3, the time constant T = 183 s, and the time delay D = 6 s. The PID controller parameters are presented in Table 1. Table 1: Parameters of the conventionally tuned PID controllers Tuning rules kp (K-1 s-1 m3) ti (s) td (s) Rivera-Morari −0.32 345 14.34 Chien-Hrones-Reswick −0.22 330 15.00 5.3 NNPC of the heat exchangers The first step in the NNPC design was NN process model identification. The NN model of the HEN was trained off-line using data obtained from the nonlinear model of the HEN (Vasičkaninová et al., 2017). 1500 training samples were used for training, validation, and testing. The neural network had 4 delayed process inputs, 3 delayed process outputs and one hidden layer with 6 neurons. The parameters values in the performance criterion Eq(1) used for the NNPC design were: the prediction and the control horizons N1 = 1, N2 = 5, Nu = 2, the weighting parameter λ = 0.01. The constraints on the control inputs were chosen: the minimum control input q1min = 1.666710-4 m3 s-1, the maximum control input q1max = 0.0086 m3 s-1. 5.4 NNPC-based cascade control of the heat exchangers The NNPC-based cascade control was designed and used in simulation experiments. The NN predictive controller was used as the primary controller, as it was responsible for achieving the control objective. The secondary controller had to compensate the load disturbances as fast as possible and the conventional P controller was used. The primary controlled output was the temperature of the cooled fluid in the outlet stream from the 5th HE. The secondary controlled output was the flow-rate of the cold water in the inlet stream into the 5th HE. The control setup of the primary NN predictive controller was as follows. The neural network had 4 delayed process inputs, 3 delayed process outputs and one hidden layer with 6 neurons. 1000 training samples were used for training, validation, and testing. The parameters values in the performance criterion Eq(1) used for the NNPC design were: the prediction and the control horizons N1 = 1, N2 = 7, Nu = 4, the weighting parameter λ = 0.01. The minimum control input Tcmin = 303 K, the maximum control input Tcmax = 463 K. The secondary controller was the P controller with the gain − 0.06 K-1 s-1 m3. 364 5.5 NNPC-based control system with an auxiliary control input The NNPC-based control system (CS) with the main NN predictive controller and with the auxiliary conventional P controller was also designed and used in simulation experiments for the temperature control in the HEN. The main manipulated variable was the flow rate of the hot stream and the auxiliary manipulated variable was the flow rate of the cold stream. The input to the both controllers is the same control error (Figure 3). The control setup of the main NN predictive controller was as follows. The neural network had 4 delayed process inputs, 3 delayed process outputs and one hidden layer with 6 neurons. 1500 training samples were used. The parameter values in the performance criterion Eq(1) used for the NNPC design were: the prediction and control horizons N1 = 1, N2 = 5, Nu = 2, the weighting parameter λ = 0.01. The minimum control input q1min = 1.666710-4 m3 s-1, the maximum control input q1max = 0.0086 m3 s-1. The auxiliary controller was the P controller with the gain 0.95 K-1 s-1 m3. All simulation results are shown in Figure 5. Figure 5: Comparison of PID control, NNPC, NNPC-based cascade control and NNPC-based CS with an auxiliary control input NNPC-based cascade control of 5 HEs in series and control using NNPC-based CS with an auxiliary control input were compared with control using simple NNPC and two conventional PID controllers. The simulation results are presented in Figure 5. The results were compared also using the total consumption of cooling water V consumed during control, the integral quality criteria IAE (integrated absolute error) and ISE (integrated squared error) defined e. g. in (Ogunnaike and Ray, 1994) as follows 𝐼𝐴𝐸 = ∫|𝑒(𝑡)|𝑑𝑡 ∞ 0 , 𝐼𝑆𝐸 = ∫ 𝑒(𝑡)2𝑑𝑡 ∞ 0 (5) In Eq(5), e(t) is the error between the reference value r(t) and the actual process output y(t). The numerical results are compared in Table 2. According to IAE and ISE, the control performance was better when the control structures with NNPC were used, see Table 2. Conventional PID control led to the worst values of IAE and ISE as well as to maximum overshoots and undershoots in control responses. The maximum total volume of cooling water was consumed in simple NNPC. According to the IAE, ISE and V, the best control structure is the NNPC-based control system with and auxiliary control input. The second best is the NNPC- based cascade control. Table 2: Values of IAE, ISE, and V Control IAE ISE V (m3) PID Rivera-Morari 38.03 48.42 79.53 PID Chien-Hrones-Reswick 47.52 66.87 77.49 NNPC 27.65 32.17 80.22 NNPC-based cascade control 17.72 21.55 76.61 NNPC-based CS with auxiliary control input 3.27 3.03 54.57 365 6. Conclusions PID control, NNPC, NNPC-based cascade control and NNPC-based control system with an auxiliary control input were used for control of five counter-current heat exchangers in series and compared. According to the IAE and ISE criteria, all control structures with NNPC outperformed conventional PID control. The simulation results showed that the NNPC-based control system with an auxiliary control input significantly reduced both, the settling time and overshoots. The best results were reached using this NNPC-based control system also according to the IAE and ISE criteria. The total volume of the consumed cooling water was also minimal. The disadvantage is that the control system with an auxiliary control input is used rarely in practice. The reason is that it is not easy to split the process into the slow and fast parts and to find two manipulated variables, one of them influencing the whole process and the second one influencing only the fast part of the process. According to the simulation results, the second best strategy was the NNPC-based cascade control. This strategy is promising for implementation in practice, as the cascade control is often used to reject the immeasurable disturbances. Acknowledgements The authors gratefully acknowledge the contribution of the Scientific Grant Agency of the Slovak Republic under the grant 1/0112/16. References Bakošová M., Oravec J., Vasičkaninová A., Mészáros A., 2017, Neural-network-based and robust model-based predictive control of a tubular heat exchanger, Chemical Engineering Transactions, 61, 301-306. Baruque B., Porras S., Jove E., Calvo-Rolle J.L., 2019, Geothermal heat exchanger energy prediction based on time series and monitoring sensors optimization, Energy, 171, 49-60. Beale M.H., Hagan M.T., Demuth H.B., 2015, Neural Network Toolbox™, User's Guide, MATLAB® R2015a, The MathWorks, Inc., Natick, MA, USA, 410 ps. ISBN: 0-9717321-0-8. Bequette W B., 2003, Process Control: Modeling, Design, and Simulation, Prentice-Hall of India, New Delhi, India, 800 ps. ISBN-10: 0133536408, ISBN-13: 978-0133536409. Corriou J.P., 2004, Process Control – Theory and Applications, Springer, London, UK, 860 ps. Print ISBN 978- 3-319-61142-6, Online ISBN 978-3-319-61143-3. Lera G, Pinzolas M., 2002, Neighborhood based Levenberg Marquardt algorithm for neural network training, IEEE Trans. Neural Networks, 13(5), 1200-1203. Mikleš J., Fikar M., 2007, Process Modeling, Identification, and Control, Springer, Berlin/Heidelberg, Germany, 2007, 480 ps. ISBN: 978-3-540-71969-4 Nemet A., Klemeš J.J., Kravanja Z., 2017, Heat exchanger network synthesis considering risk assessment for entire network lifetime, Chemical Engineering Transactions, 57, 307-312. Ogunnaike B.A., Ray W.H., 1994, Process Dynamics, Modelling, and Control, Oxford University Press, New York, USA, 1260 ps. ISBN: 978-0195091199. Oravec J., Bakošová M., Meszáros A., 2016, Robust model predictive control of heat exchangers in series, Chemical Engineering Transactions, 52, 253-258. Saranya S.N., Thirumarumurugan M., Sivakumar V.M., Sowparnika G.C., 2017, An Optimal Analysis of Controller Strategies for Different Heat Exchangers – A Review, Middle-East Journal of Scientific Research, 25 (4), 761-775. Soloway D., Haley P.J., 1996, Neural generalized predictive control, Proceedings of the 1996 IEEE International Symposium on Intelligent Control, Dearborn, MI, USA, 277–281. Sun F., Chen X., Fu L., Zhang S., 2018, Configuration optimization of an enhanced ejector heat exchanger based on an ejector refrigerator and a plate heat exchanger, Energy, 164, 408-417. Vasičkaninová A., Bakošová M., 2015, Control of a heat exchanger using neural network predictive controller combined with an auxiliary fuzzy controller, Applied Thermal Engineering, 89, 1046-1053. Vasičkaninová A., Bakošová M., Oravec J., Mészáros A., 2017, Neural network predictive controller design for counter-current tubular heat exchangers in series, Chemical Engineering Transactions, 61, 121-126. 366