Performance Analysis of Heat Exchanger System Using Deep Learning Controller

░ ABSTRACT-Conventional PID controllers have utilised in most of the process industries. Despite being the most used controller, the traditional PID controller suffers from several disadvantages. Due to rapid development in the field of the process control system, various controllers have been developed that try to overcome the limitations of the PID controller. In this paper, a heat exchanger system has been simulated, and the generated data has been used to train a deep learning-based controller using Backpropagation. The obtained results are compared with the conventional controller on several metrics, including time response, performance indices, frequency response etc. The proposed model outperforms the conventional controller on all the evaluation metrics.


░ 1. INTRODUCTION
The Control system is the backbone of modern-day industries. It is necessary to move toward automation [1] [2]. The methods for designing a feedback control system are wellestablished. These include classical linear control system design, adaptive control, H-∞ control, robust control, nonlinear control techniques etc. Controls like ANN and Fuzzy logic controls are becoming popular due to their model-free control architecture. [3][4] [5]. The closed-loop neural network control applications differ from open-loop classification and image processing applications. Werbos [6] was the first to use NN in a closed-loop control system.
In recent years, the advances in the field of artificial intelligence have not left the field of process control untouched and the development of several deep learning-based controllers are the evidence. Deep learning [7] [8] has recently gotten a lot of interest from a variety of sources. Deep learning has more hidden layers and neurons than traditional neural networks, which allows it to increase learning performance. Deep learning algorithms can address vast and complicated issues that traditional neural networks couldn't. As a result, deep learning has been used to solve a variety of pattern identification and classification issues. Two layer NN is sufficient for a feedback control system [4] but the addition of hidden layers improves the stability of the feedback control system and produces a damping effect [3]. However, to the authors' best knowledge, only few results have been published in the automatic control field. In a recent study [3], the deep learning control technique is used for the second order linear plant model and needs to extend for real non-linear systems. In [9] PID controller is replaced with a deep learning controller via a DBN for speed control of the DC motor. A similar approach is used in [10], but hardware requirement is the main disadvantage of DBNs. Robotic manipulation controllers have recently used Deep RL and, based on RL, have also been implemented in [11]. Also, RL requires large data and is computationally expensive. Some other applications includes including non-linear system identification and model reduction [12] [13], model predictive controller [14][15] [16], architecture and size of the neural network, and comparative study [17] [18].
In this paper, a deep learning controller has been designed for temperature control of the heat exchanger system. The heat exchanger system, which is a non-linear system and needs adequate controller that can overcome the limitstions of PID controller and can also be used for non-linear systems. The Website: www.ijeer.forexjournal.co.in Performance Analysis of Heat Exchanger System Using Deep Learning Controller authors of a study [3] concluded that when subjected to a second-order linear plant in a closed-loop control system, their proposed deep learning controller worked best in the training phase as compared to works that use DBNs, RLs, and LSTMSNNs while keeping DL advantages. After an extensive survey of related literature, several lacune were discovered, one of them being the field of non-linear plant control problem, which very few studies have covered. In the present work, a heat exchanger system, which is a non-linear system is considered. To study the performance of deep learning model on a non-linear problem, the heat exchanger is simulated and the results of proposed deep learning controller (DLC) are compared with the conventional PID controller. The rest of this paper is organised as follows. Section 2 describes the second-order plant and its mathematical modelling. The DLC is described in section 3. The results and simulations are presented in section 4. Conclusion and discussion are presented in section 5.

░ 2. MATHEMATICAL MODELLING OF HEAT EXCHANGER
Heat exchangers (HEs) facilitate heat transfer between two fluids of differing temperatures while preventing them from mingling. HEs are key devices used in various thermal applications in the chemical process industries [19] [20]. The heat exchange process is influenced by a number of factors like flow pattern, flow rates of fluids, temperature difference, the heat transfer area etc. Different types of HEs are spiral tube, double pipe and shell and tube. Shell and tube type heat exchanger is commonly used. It contains many tubes packed in a shell with their axes parallel to the shell [21]. The temperature of outlet fluids can be controlled by the conventional controller or any other advanced controller [22]. Consider a HEs as shown in figure 2 [23] [24].

Figure 2 Shell and tube type heat exchanger
The following assumptions were used to develop the model [25]: The volume, density and heat capacity of both fluids remain constant. (ii) Constant heat transfer area and heat transfer coefficient of both fluids (iii) Both cold and hot fluid streams are well-mixed, and the outlet temperature Tco and Tho approximate the temperature of the cold and hot streams inside the tube.
The relationship between the U nd Q is = ∆ The energy balance equations in the shell side and tube side are The Taylor series expansion of the above equations only for linear terms and substituting steady-state values are ( ) = −11.5 + 4.65 ℎ − 7.18 + 6.85 + 0 ℎ + 0 ℎ (4) ℎ ( ) = 1.15 − 6.248 ℎ + 0 + 0 + 2.451 ℎ + 5.098 ℎ The state-space representation is Where x, u, y, A, B, C, and D is the state variable, input variable, output variable, state matrix, input matrix, output matrix, and translational matrix respectively.
The overall transfer function of the process becomes ( ) ℎ ( ) = 11.39715 2 +17.748 +66.4125 (12) This equation represents the transfer function of a shell and tube type heat exchanger system where the control variable is outlet temperature of cold water and the manipulated variable is input flow rate of hot water. FOPDT model [26] of heat exchanger system is represented as The pade approximated model [27] of above system is

░ 3. DEEP LEARNING CONTROLLER
Input-output data of the HE system given by equations 4 and 5 is used to train a DLC offline. The backpropagation (BP) procedure, which starts from the output layer and propagates backwards until it reaches the hidden layer adjacent to the input layer to update the weights, is the most common training algorithm for neural network weights. So, we started by setting a random value to weight by random weight generation and then propagated forward. Now error is calculated at output and then is backpropagated to adjust the weight. We try to optimise the performance [28] given in equation (15).

Figure 3:
Feedback system with a deep learning controller [29] The instantaneous value of the error as 2 ( ) where k represents kth neuron.
Where 2 ( )= cost function 1 = 1= minimum prediction horizon =desired response trajectory 2 = cost horizon ʹ= tentative control signal =network model response = controller weighting factor =control horizon The cost horizon, control horizon, controller weighting factor, training samples, size of hidden layers taken as 5, and training epoch are taken for deep learning parameters. We have generated 8000 training samples, and these training samples have been selected from random number generation process. So, basically, we have generated input and target data for the neural network training in this step. There are various types of BP depending on the update strategy, the most popular being BP based on gradient descent (GD) The total error energy is represented as The average squared error energy is [30] The goal of the learning process is to update the network's parameters to reduce Eav.
Where the vj (n) associated with neuron k is induced local field. So, we can write can be written as The partial derivatives Using equations (41), equation (42) can be written as The local gradient ( ) can be written as The local gradient ( ) for output neuron k is given by equation (25). When neuron k is not belongs to output layer and neuron k belongs to hidden layer then error signal would have to be determined recursively and may redefine the local gradient ( ) j as The hyperbolic tangent activation function is antisymmetric about = 0 and has better and faster learning capabilities. It is defined as ( ( )) = tanh ( ( )), ( , ) > 0 (29) Where a,b is constant. The proposed model is trained usimg the randomly generated 8000 samples. These samples are further divided into training, validation and testing. Number of training samples is 70% of the total samples, while the validation and testing data is made of 15% samples each. These samples are selected randomly from the total samples and differ each time we train the model.

░ 4. SIMULATION RESULTS AND ANALYSIS
The MATLAB (Academic License no. 1075356) is used to run all simulations. Second-order non-linear plant (HE) given by equations 4 and 5 is simulated. The best validation performance of the deep learning controller during training is shown in figure 4. The evaluation metric for the proposed Website: www.ijeer.forexjournal.co.in Performance Analysis of Heat Exchanger System Using Deep Learning Controller network is set as mean squared error (MSE). The loss, thus is defined in terms of mse, where loss is the MSE of the output of NN and the real value. As it can be observed, at the initial phase of the training, the loss is high (~10), but as the training progresses through the epochs, the loss diminishes and finally settles at around 10-8. The losses observed during validation also follow the same curve. This implies that the model is trained perfectly and any kind of over or under fitting is absent. The testing losses also convey the same findings, i.e., the model is perfectly trained.
The best performance obtained is 5.5*10-09 at the 2000 epoch. The performance of the controller during training is shown in figure 5. This graphic compares the output of the NN to the real value. These two are coinciding, showing that the neural network is of good quality. Regression value during the training, validation and test all are 1, which indicate the best regression value, and there is a close relationship between the input and output. Input, plant output, NN output and error during training is shown in figure 7. The use of several samples and splits in the dataset allows us to assess the model performance. The training set of data simulated is used to train the model. NN output follows the plant output and during this steps, error obtained is 2*10-03. Similarly during testing and validation, error is 6*10-04 for both case is shown in figure 8 and figure 9. Training state is shown in figure 10. Validation data is fed into the model during training to provide it new data that hasn't seen before. A check was also put in place to detect if the learning of the model was becoming stagnant amd hence, the model was not learning. This was implemented by placing a "val_fail" function. The model peaked at the 2000 epochs. Heat exchanger performance has been evaluated using MATLAB and Simulink toolbox.   Also, the step response of the system has been compared with a different conventional controller in figure 12. The same trained deep learning controller has been used for system response to a step of magnitude changes from 85 to 90 as shown in figure 13. The time response characteristics and signal statistics are listed in table 1 and 2. The frequency response analysis has also been done and the bode plot, Nichols digarma, Nyquist plot and pole zero map of the system have been plotted with a deep learning controller, as shown in figure 14, 15,16 and 17 respectively. When the grid of pole zero map is turned on, it shows lines with a constant damping ratio (zeta) and lines with a constant natural frequency (wn).

CONCLUSION AND FUTURE SCOPE
A HE system has been simulated and the generated input and output data have been used to train a DLC using Backpropagation. The control horizon falls between one and the prediction horizon, and here control horizon is taken as 7 and the cost horizon as 35. During the training process, the best validation performance 5.15*10-9. Dataset has been divided into three sets a training set, validation set and test set. The advantage of using a validation data set is to avoid overfitting of the model. Train, validation and test data sets show that they are the best-fitted curve. Training, testing and validation data are also shown in the result. They show that neural networks learn very good and perform best during testing and validation. The performance of the heat exchanger system is measured by time response characteristics and frequency response characteristics through closed-loop simulation in MATLAB. The step response of magnitude 85 of the heat exchanger system with a DLC has been evaluated and also tested for set point changes. After time response and frequency response based analysis were carried out it is observed that the deep learning controller provides a satisfactory performance and outperforms as a comparison to the PID controller. Further work in this direction for the proposed work will have a great advantage in the real systems. Optimization techniques such as particle swarm optimization, genetic algorithm and intelligent techniques such as neural fuzzy interference system can be used in fine-tuning of deep learning controllers for better performance.