Study of Intelligent Control Techniques Applied to a Stirring Tank with Heat Exchanger

— This work presents a study and evaluation of intelligent control techniques applied to the problem of temperature control of a stirring tank with heat exchanger. This problem is represented by the example provided and documented by MathWorks in MATLAB/Simulink software, called Heatex. The intelligent techniques used are Fuzzy Logic Controller (FLC), Fuzzy Cognitive Maps (FCM), Artificial Neural Networks (ANN) and the combination of these. The proportional-integral (PI) controller provided in the Heatex example is considered as a reference basis during the evaluation of the intelligent control techniques in different test scenarios. The metrics Integral of Absolute Error (IAE) and Integral Time-weighted Absolute Error (ITAE), as well as the parameters overshoot percentage and settling time are the criteria used to evaluate the control techniques performance.


I. INTRODUCTION
Heat exchangers have wide industrial application, e.g. in power generation, in combustion and chemical processes [1]. In this context, this process is a target for researchers in applying different control techniques, including intelligent strategies [2]. In work [2], a shell and tube heat exchanger was controlled. The control techniques analyzed were the Internal Model Controller (IMC) with a disturbance rejection function, proportional-integral-derivative (PID) controller with feed-forward and the combination of both, the IMC-PID. For the studied process, the IMC-PID control presented better results. The work [3] presented the control of a plate heat exchanger performed using a Fuzzy model in the form of Takagi-Sugeno (T-S) type. The output signal from the Fuzzy controller acted on a motor driven valve adjusting the hot water flow to the exchanger. This problem was approached by a predictive control method, because it presented a non-linear behavior.
The work presented in [4] compared different control techniques for a double pipe heat exchanger. The methods studied were the Type-II Fuzzy Logic Controller (FLC) and a proportional-integral (PI) controller combined with a genetic algorithm (GA). For the studied process, the Type-II FLC presented better performance with lower value of the Integral Time-weighted Absolute Error (ITAE) criterion. There are works in the literature that employ Fuzzy Cognitive Maps (FCM) or its extensions in control. In this context, the work [5] presents a Dynamic Fuzzy Cognitive Maps (D-FCM) applied in the supervisory control of a chemical process, the industrial fermenter. In this work, the objective is to study and evaluate the performance of intelligent control techniques applied to the Heatex problem. This is the example of a heat exchanger in a chemical reactor, provided and documented by MathWorks in MATLAB/Simulink software [6]. The intelligent control techniques used in this work are the FLC, FCM, Artificial Neural Networks (ANN) and the combination of these. A comparison with the PI controller provided in the Heatex example is done to validate the developed controllers. The criteria used to compare the performance of the controllers are the Integral of Absolute Error (IAE) and ITAE metrics, and the percentage of overshoot and settling time parameters. This work is organized as follows. Section II presents the Heatex's system, model and PI control. Section III presents the development of the control techniques based on Fuzzy logic. In Section IV the development of the controllers using ANN is presented.Section V discusses the results. Section VI presents the conclusions and future works. Fig. 1 shows the diagram of the heat exchange process in a chemical reactor called stirring tank. This diagram shows the liquid inflow, the stirring tank, the heat exchanger, the heat sensor and the actuating valve. The liquid coming from the top inlet is mixed in the tank. A sensor captures the temperature of this mixture in real time. The temperature must be kept constant by varying the steam flow in the heat exchanger, through the actuating valve. The greatest source of disturbance of the system is the temperature variation of the fluid entering the tank [6].

2.1
Model Identification of the Heat Exchanger and the Disturbance In the work [6], by means of a step input the first-order plusdead-time(FOPDT) models of the heat exchanger and the disturbance were identified. The transfer functions of the heat exchanger and the disturbance are shown in (1) and (2), respectively. First-order plusdead-timemodels have the ability to capture the essential dynamics of several industrial processes, as well as to describe linear and monotonic chemical processes with good precision [7,8,9]. In (1) The parameters of the proportional gain and integral time of (3) are given in (4) and (5), respectively. The adjustment of these parameters was performed by the ITAE criterion, according to [6]. According to [10] the tuning of the PI control through the ITAE, for first-order plus dead time models, presents good results in comparison to the tuning performed by the Ziegler-Nichols method.

III.
FUZZY LOGIC Fuzzy logic is closer to human language and thinking than traditional logical systems, implying an effective way of capturing approximate and inaccurate real-world behavior [11]. In this work, two control techniques based on Fuzzy logic were developed, the FLC and the FCM. The FLC provides an algorithm for transforming a linguistic control strategy from a specialist into an automatic control strategy. Then, the FLC can be considered an approximation between conventional mathematical control and human decision making [11]. The FLC differs from conventional techniques focusing on modeling and description of control by differential equations, e.g. PID and state feedback. In developing the Fuzzy control the intuitive understanding of how is the best way to control the process is attributed to the FLC, i.e. the FLC represents a means of imitating a skilled human operator [11,12,13]. The FCM is a modeling method for complex systems based on human experience and prior knowledge about the applied system. In addition, this method presents characteristics and learning capacity that improve its structure and computational behavior. Originally, Kosko introduced this concept as an extension of the cognitive maps, providing a powerful feature for modeling dynamic systems [14]. The representation of the knowledge and reasoning technique of a FCM is similar to that performed by humans. The FCM is able to incorporate the knowledge of data experts into the rules format. This approach represents knowledge through causal connections and the map structure [15]. A FCM consists of a graph formed by concepts or nodes that represent the important elements of the mapped system, in addition to directed arcs, responsible for representing the causal relations between the concepts. The directed arcs are labeled with Fuzzy values in the interval of [0, 1] or [-1, 1] that demonstrate the degree of influence between the concepts. The Fuzzy part allows the use of degrees of chance that are represented as links between the concepts of the graph. When the FCM converges, it can reach a chaotic state or a limit cycle, in this work the FCM reached the limit cycle [15]. Fig. 2 shows an example of the FCM structure.

International Journal of Advanced Engineering Research and Science (IJAERS)
[  3.1 Development of a FLC for Heatex To obtain the intuitive understanding of the Heatex process, the PI control and all structure presented in Section II were studied. As input to the FLC, the error ( ), which is the difference between the setpoint and the process output, and thechange of error ∆ ( ) were chosen. From the inputs used it was determined that the output of the FLC should be the change of the control action ∆ ( ). Fig. 3 presents the structure of the FLC, which represents an intuitive control strategy presented in [12]. Figs. 4, 5 and 6 present the universes of discourse and regions of the membership functions for the FLC input and output variables, respectively, change of error, error and change of the control action.  In Figs. 5 and 6, the peaks of the membership functionsforthe error and the change of the control action were shifted. This adjustment was made with the intention of increasing the stability region and making the control response less oscillatory.   Table 1 presents the rule base used for the FLC, which uses the strategy presented in [12].

International Journal of Advanced Engineering Research and Science (IJAERS)
[   7 shows thesurface of the developed FLC. 3.2 Development of a FCM controller for Heatex Fig. 8 presents the FCM structure defined and used as controller in this work. Thus, the FCM has two input concepts, the error and change of error, and one output concept, the change of the control action. The FCM also presents two directed arcs, one for each of the causal relations, with their respective values. For the development of the FCM it is necessary to choose the ideal activation function for the application, since it is responsible for inferring the value of the output concept from the values of the input concepts and the causal relations. At first, the sigmoid function was used. However, it was replaced because it only infers positive values for the output concept. The change of the control action also assumes negative values.Then, the activation function chosen for the FCM was the hyperbolic tangent sigmoid, presented in (6), which meets the needs of the developed controller.

Change of error (∆ ( ))
The activation function in (6), in this work, is similar to the hyperbolic tangent sigmoid function used in MATLAB's ANN toolbox, where λ is the forgetting factor adjusted with value 1.
In order to determine the values of the causal relations 1and 2 meeting the needs of the Heatex control, a GA was used.The objective was to minimize the quadratic difference between the setpoint and output response of the system with the FCM controller. The objective function used in the GA is presented in (7). The . . denotes the objective function, represents the smallest value that will be found and represents the length of the setpoint and output vectors. The GA implementation was performed using the toolbox of the MATLAB/Simulink software with the configuration presented in Table 2. The values obtained for the causal relations were 1 = 0.0313and 2 = 1.Therefore, for this problem, the change of error has a more significant influence when compared to the error.

IV.
ARTIFICIAL NEURAL NETWORKS ANNs are computational models inspired by the nervous system of living beings. An ANNis defined as an arrangement of processing units, called artificial neurons, highly interconnected by synaptic weights. These represent the connection strength between the neurons and are used to store the acquired knowledge [16,17]. The main applications of this computational intelligence technique are related to the capacity of adaptation by experience, fault tolerance, data organization, learning capacity, ease of prototyping and generalization ability  [16,17]. In this context, the ANN was used in this work with the intention of learning and improving the responses of the FLC and the FCM controller through its ability to generalize the acquired knowledge. 4.1 ANN-Fuzzy Controller The ANN-Fuzzy controller consists of a neural network with 3 layers: the input layer where the error ( )and change of error ∆ ( ) values are presented, the hidden layer containing 8 neurons and the layer of the controller output, where the change of the control action ∆ ( ) is provided. This input and output structure is the same for the FLC and the FCM controller developed in Section III. Fig. 9 illustrates the architecture used in the ANN-Fuzzy controller. The neural network training is supervised and based on the backpropagation method, it was developed in the MATLAB/Simulink software on a computer with the Intel i5 1.80 GHz processor, 10 GB RAM and the Windows 10 Education operating system. In this context, the training and validation samples were obtained based on the response curves of the FLC, in which the setpoint value was maintained at zero, but the value of the disturbance varied in the range of -1 to 1 in intervals of 0.1. Therefore, 20 response curves for the error, change of error and change of the control action were collected and stored to train the network. For the validation of the neural network, another 4 curves were obtained with values of disturbance belonging to the training interval, but different from those that were used to train the network. Overall, 24 curves were obtained where each curve contained 1200 samples and the sample time used for this scenario was 1 second. In total, 24,000 samples were used to train the network and 4,800 samples were used for the network validation. Table 3 presents the parameters configuration to train and validate the ANN-Fuzzy controller.

ANN-FCM Controller
The neural network assembled for the ANN-FCM controller has the same architecture shown in Fig. 9. In addition, the scenario and computer used to train the network are similar to the ANN-Fuzzy controller. The only differences are related to the way the samples were obtained, which in this case was by means of the developed FCM controller. Overall, 24 curves were obtained, each curve contained 500 samples and the sample time used for this scenario was 1 second. In total 12,000 samples were obtained, in which 10,000 were used for training and 2,000 for validation of the network. Table 4 presents the parameters configuration to train and validate the ANN-FCM controller.

V. RESULTS AND DISCUSSIONS
This Section presents the results and analyzesthe performance of the FLC, FCM, ANN-Fuzzy, ANN-FCM and PI controllers in six different control scenarios. In each of these the setpoint and disturbance values acting on the system were varied.The total simulation time for each scenario was 500 seconds because of the slow response characteristic of the system. To evaluate the performance of the controllers, the IAE and ITAE metrics, and the maximum overshoot and settling time parameters were used. ITAE is a criterion that penalizes errors that persist for long periods. On the other hand, IAE is an intermediate metric between the Integral of Squared Error (ISE) and the ITAE, penalizing in greater intensity the errors in the initial instants of the control [18]. The overshoot is the difference between the value of the highest peak of the response and the value in steady state, being indicated in percentage [19]. The formula used for the calculation is presented in (8). Where: is the maximum value of the response and is the desired reference value (setpoint). Finally, the settling time is the time required for the curve to remain within a range around the steady state [19]. For this work, the chosen range was ± 3% over the steady state or setpoint.

5.2
Control Scenario 1 This scenario maintained the setpoint at 0 and inserted a small disturbance value of 0.17 into the system. Figs. 10 and 11 present, respectively, the control response and the control action comparison for all the controllers in scenario 1.   Table 5 presents the evaluation results for all the controllers' responses in scenario 1. As it is not possible to calculate the overshoot percentage for the setpoint at 0, it was used the maximum response value . The analysis of Fig. 10 shows that the PI controller presented the lowest overshoot value in relation to the other control techniques, in addition to a shorter settlingtime, despite its response being oscillatory.The FCM and ANN-FCM controllers had practically the same responses and were closer to the PI controller. Fig. 11 shows that the PI response is faster, but is aggressive and oscillatory, whereas the FCM and the ANN-FCM presented faster responses than the Fuzzy-based controllers and were smoother compared to the PI controller.As seen in Table 5, the best controller for this scenario was the PI, since it obtained the best values in all analyzed metrics and parameters.

5.3
Control Scenario 2 In this scenario, the setpoint wasmaintainedat 0 and theinserted disturbance value was changed to 0.37. Figs. 12 and 13 present, respectively, the control response and the control action comparison for all the controllers in scenario 2.  The analysis of Figs. 12 and 13 shows that, in general, the behavior of the responses and the control action was similar to that of scenario 1. This is also confirmed by Table 6.

5.4
Control Scenario 3 This scenario changed the setpoint to 0.50 and inserted a small disturbance value of 0.17 into the system. Figs. 14 and 15 present, respectively, the control response and the control action comparison for all the controllers in scenario 3.   Table 7 presents the evaluation results for all the controllers' responses in scenario 3. The analysis of Fig. 14 shows that the ANN-FCM control presented the lowest settling time and overshoot percentage. However, this controller did not respond as quickly as the FCM and PI controllers. Due to this, the ANN-FCM controller presented the best value for the ITAE criterion, but not for the IAE, as seen in Table 7. Fig. 15 shows that the control action was more aggressive for the PI and FCM controllers, and the ANN-FCM controller presented the smoother control action.   Table 8, the evaluation results for all the controllers' responses in scenario 4 are presented.  Fig. 16 shows that the PI controller had the shortest rise and settling time. Consequently, the PI control presented the lowest values for the ITAE and IAE criteria, as seen in Table 8. However, Fig. 16 shows that the overshoot presented by the PI controller is higher than that of the FCM and ANN-FCM controllers. Fig. 17 shows that the control action was more aggressive for the PI and FCM controllers. In this scenario, the RNA-FCM controller also presented the smoother control action, compared to the others. 5.6 Control Scenario 5 In this scenario, the setpoint was changed to 0.70 and a small disturbance value of 0.17 was inserted into the system. Figs. 18 and 19 present the control response and the control action comparison, respectively, for all the controllers in scenario 5. Table 9 presents the evaluation results for all the controllers' responses in scenario 5. The analysis of Fig. 18 shows that the FCM control had the lowest overshoot, which is considerably smaller than that of the PI control. The FCM control also had the shortest settling time. Fig. 19 shows a fast action of the PI and FCM controls, the latter being smoother. Fig. 19: Control action for the scenario 5. Table 9 shows that the FCM control was superior in all metrics and parameters, even in overshoot percentage, since the ANN-FCM response was underdamped.   Due to this, the PI controller presented low values for the ITAE and IAE criteria, as seen in Table 10. Fig. 21: Control action for the scenario 6. Fig. 21 shows a fast action of the PI and FCM controls, the latter being smoother. Although the ANN-FCM had the lowest overshoot and settling time, the ascent of the control was slow. VI. CONCLUSIONS This work presented the techniques FLC, FCM, ANN-Fuzzy and ANN-FCM applied to the Heatex problem. For the evaluation of these intelligent control techniques, the PI control of the Heatex example was used as a reference basis. The ITAE and IAE metrics, and the overshoot percentage and settling time parameters were used to compare the control responses. All this led to the following conclusions. The PI technique was among the best controllers for the scenarios in which the value of the disturbance is considerable when compared to the setpoint value. As in scenarios 1 and 2, where the control acts only on the effect of the disturbance, since the setpoint is zero. In addition to scenarios 4 and 6, where the disturbance range around 0.37 represents a considerable value compared to the setpoints 0.50 and 0.70. The techniques related to FCM werethe best for scenarios where the value of the disturbance is small when compared to the setpoint value. As in scenarios 3 and 5, where the disturbance range around 0.17 represents a small value compared to the setpoints 0.50 and 0.70. The ANN-FCM may be an alternative to FCM, in these scenarios, when a controller with a smoothcontrol action and a dampened response is desired.
The FLC and ANN-Fuzzy techniques had poor results when compared to the other techniques, in all the test scenarios. However, the FLC technique has a good performance when applied to the Heatex problem without the disturbances. Finally, each of the control scenarios presents one or two controllers with better performance than the others. If the goal is to develop a controller with smooth control action, FCM and ANN-FCM techniques were the best options, for this problem. In the future, the techniques presented in this article will be applied to problems of higher order than Heatex.