Optimization of a Heat Exchanger Using an ARM Core Intelligent Algorithm

In order to optimize heat transfer in a heat exchanger using an ARM (advanced RISC machine) core intelligent computer algorithm, a new type of controller has been designed. The whole control structure of the heat exchange unit has been conceived on the basis of seven functional modules, including data processing and output, human-computer interaction, alarm, and data communication. The main controller and communication controller have been used in a combined fashion and a new MCU (micro control unit) system scheme has been proposed accordingly. A fuzzy controller has been designed by using a fuzzy control algorithm, and a new mode of heat transfer for the heat exchanger has been implemented by combining the fuzzy controller and the PID (proportioning integral derivative) controller. Finally, the model has been applied to an actual heat exchange station to test and verify the performances of the new approach.


Introduction
In recent years, every winter, people are shrouded in haze. PM2.5 that causes haze mainly comes from coal and fuel oil, and part of the pollution caused by coal comes from heating in winter [1,2]. At present, the way of heating in many cities in the world has gradually changed to centralized heating, but the quality and efficiency of heating are poor. Meanwhile, some small boilers do not have perfect dust removal equipment nor desulfurization and denitrification equipment. The smoke and dust discharged is the main cause of haze and even air pollution, threatening human health [3]. In addition, the demand for energy is gradually increasing with the acceleration of urbanization. Only rationally and effectively use energy and improve the utilization rate of energy, can the economy develop healthily, sustainably, and rapidly. Hence, all walks of life in society are studying how to save energy, and there is great potential for energy conservation. Only for the energy consumption of heating in winter, most cities have adopted central heating as the main method, such as cogeneration and regional centralized boiler room, supplemented by decentralized heating [4,5]. In contrast with decentralized heating, the emergence of central heating makes the number of heating boilers greatly reduced, which effectively controls the emission of boiler smoke and exhaust gas, saves energy and facilitates the life of residents while preventing and controlling coal pollution.
In the mode of central heating, heat exchange is the most critical process, but at present, most of the parameters of heat exchange equipment are still manually operated depending on experience. Due to the changing environment temperature and the continuous change of heat load, such method can only achieve the effect of rough regulation, and cannot make full use of the thermal efficiency of the boiler, and the heating quality cannot be guaranteed [6][7][8]. Zsebik et al. [9] discussed the influence of the heatreturn temperature between three types of heat exchanger connections (series, parallel, and two-stage) of central heating network on the economy of central heating and the excessive cost pressure. Sitku [10] suggested that plate heat exchangers with different geometry had different thermal and hydraulic characteristics, so the initial data of the thermal and hydraulic characteristics of plate heat exchangers usually did not produce the minimum number of plates. The excessive scale of plate heat exchanger increased the unnecessary investment cost. To change the current situation, the heating industry has been studying the operation mode of automatic regulation and fine regulation for many years, so that it can fully adapt to the changes of external temperature and heat load, improve the thermal efficiency, reduce the number of boilers, and meet the requirements of users for the stability and comfort of heating. As the core of central heating, the control performance of heat exchange system determines the efficiency of the system. At present, most controllers of heat exchange system in the market take PLC (programmable logic controller) or DDC (direct digital control) as the core control unit. This controller makes the heat exchange station basically realize automatic control. Whereas, it is far from the goal of achieving intelligent control of heat exchange unit, unattended heat exchange station, and intelligent heat distribution in the heat network [11,12]. Some scholars' study proved that, with the rapid development of embedded microcontroller in computing power, storage capacity, integrated peripheral devices and other aspects, it had been widely used in various fields [13]. In addition, it was found that the embedded realtime control system was characterized by strong portability, certainty, tailorability, good stability, and had unique advantages in dealing with control systems with high real-time requirements and complex tasks [14]. It was also found that ARM core microprocessors could make embedded control system transplant well, and spare no effort to play its functions [15].
Based on this, the ARM core intelligent computer algorithm is applied to the research of heat transfer mode of heat exchanger. In this development and research, the heat exchanger controller is the core. Through the design of the overall structure of the controller, according to its functions, each different functional module is designed. After that, the fuzzy controller and PID controller are combined to develop a new type of heat exchanger controller. This study puts forward a new direction for the research of heat transfer mode of heat exchanger in the future, which promotes the development of heat supply mode to the direction of automation and intelligence, and has certain significance. Different from other researches, fuzzy controller and PID controller are integrated, which has certain innovation.

Method
In recent years, due to the rapid development of the heating industry, a variety of controllers have been developed. This kind of controller usually takes PLC or DDC controller as the core since they have certain advantages. The system design of PLC controller is relatively simple and easy to install, and can adapt to various environments. DDC controller has some digital intelligent control functions, which can be used in data collection, data transmission, and other aspects, but it is not flexible enough and has relatively fixed structure, so it has great limitations. Therefore, a new controller is designed, and embedded microcontroller is mainly used here. This controller combines the advantages of PLC and DDC controller, with high algorithm matching, and has a very strong flexibility and efficiency [16]. The microprocessor with ARM core is mainly used, which consumes less work and cost, has short interrupt delay, is easy to expand, has excellent performance, and can meet the design requirements of heat exchange unit.

Intelligent Heat Exchanger Controller
The intelligent heat exchange unit controller can realize many functions, sample and output signals, and store data, and make human-computer interaction, alarm reminder, data communication and other functions. According to its function, the system structure of the controller can be further divided into seven functional modules. It includes analog signal input, switch input, analog signal output, switch output, human-computer interaction, communication, and data storage. These modules will interact with each other and work together to realize the functions of the controller. Fig. 1 shows the structure diagram of the controller: According to Fig. 1, the whole controller can be divided into the main controller and communication controller. The main controller mainly processes and calculates the signals and data, records the events, and makes timely alarms for the accidents of the system. Additionally, it can make human-computer interaction to share information. Communication controller, as the name suggests, is mainly responsible for data transmission and sharing. The two controllers will work together to communicate with SPI (serial peripheral interface) through HS1 and HS2 hardware. Through the joint operation of the two controllers, it not only can retain its operation function but also play the communication function, and the two functions do not affect each other. Even if the communication function and operation function are wrong, it will not affect the normal operation of the controller, which can effectively ensure the stability and reliability of the system.

Design of Function Module
Based on the above analysis of the controller function module of intelligent heat exchange unit, the design is developed from the function module. First, the analog signal input module of the system. To meet the requirements of the controller, two sets of different analog inputs need to be set, one set of analog input has four pressure transmitters, and the other set has four temperature sensors. The pressure transmitter can be divided into two types: return water pressure and water supply pressure. The power supply voltage of the transmitter is 24 V, and the range is 0 to 1.6 MPa. The temperature sensor can also be divided into two types: water supply temperature and return water temperature. Its power supply voltage is 24 V and its range is 0-200°C. In terms of analog signal acquisition, AD (analog to digital) conversion chip is applied, which not only has small work and low noise, but also can directly input small signal. Using this chip, 8-channel differential and 15-channel single ended or pseudo differential can be input simultaneously, which can carry out high-precision measurement operation.
In the switch input module of the controller, the most basic requirement is to require 16 switch quantities, and the states contained in each input group are also different. Input group I has 10 operating states, and input group II has 6 fault states.
As the working environment of using the switch value acquisition circuit is very bad, and the signal interference often occurs, when designing the circuit, it needs to meet the requirements of improving the safety and anti-interference of the circuit as much as possible. To avoid the damage of the optocoupler  caused by the excessive voltage input, the Schottky diodes are connected in parallel at both ends of the optocoupler during the design process. Among them, the low-pass filter is mainly composed of C1 and R4. Its main function is to remove the complex interference signal and make the circuit safer.
As the core component of the controller of heat exchange unit, human-computer interaction module is used by managers to complete the overall control of the system. The human-computer interaction module designed mainly consists of buttons and touch screen. There are three different key operation modes, namely short press, long press, and combination press. The main function of the button is to complete some basic operations of the system, such as returning to the previous step, the menu and home page. The main functions of touch screen are variables and display page. Different from the traditional touch screen, the design here is more flexible, less difficult to develop, and simpler and more convenient in the later maintenance process. At the beginning of the design, it is necessary to integrate the screen background, text, figures, and tables into a folder, and then use the memory card to transfer and save the folder to the LCD (liquid crystal display).
The design of data storage module is also very important. In general, during the operation of system controller, unexpected power failure often occurs, so it is easy to cause the loss of important data information. Hence, it is necessary to save the information and data content in advance to avoid accidents and unnecessary situations. In the design process, FRAM (ferroelectric RAM) is the main external memory used in this study. This type of chip has relatively high performance and reasonable price, and can effectively meet the basic requirements of the controller. The main medium connecting the external memory and STM32F103 is SPI (serial peripheral interface) serial port, and its main role is communication.

Control System of Heat Exchange Unit Based on Fuzzy Control
Generally, the control system of heat exchange unit is characterized by nonlinearity, large lag, and instability. In the process of operation, each parameter is unstable and has the property of changing with time. Thus, it is difficult to establish a mathematical control model. The traditional PI (proportioning integration) control algorithm is not only easy to be interfered by the external environment but also has poor regulation ability. Based on this, the control system of heat exchange unit is designed.
Fuzziness is the process of mapping the range of change to the corresponding domain, and then transforming the input data in the domain into the corresponding language variables to form a fuzzy set [17]. It converts the relevant physical quantity of the control object into electric quantity through the sensor. If the output quantity is a continuous analog quantity, the A/D converter shall be used again to convert it into a digital quantity as the input measurement value of the computer, and then the measurement value shall be standardized. In this way, the exact input quantity is transformed into the value of a fuzzy variable expressed by membership function. A and B are set as fuzzy sets on the domain.
If the union of A and B is A ∪ B, the intersection is A ∩ B, x stands for the collection of variable (1, 2, …, m), U is the collection of all variables, and the complement of A is A, then there are the following equations.
l ðAÞ ðxÞ ¼ 1 À l ðAÞ ðxÞ; 8x 2 U The fuzzy relation between A and B is defined as a fuzzy subset of Cartesian product A × B. If the membership function is used to express the fuzzy subset, the fuzzy relation can be expressed by matrix R AÂB ¼ l 11 l 12 … l 1n l 21 l 22 … l 2n : : : : : : : : : : : : l m1 l m2 … l m3 Set X ¼ fx 1 =a 1 ; x 2 =a 2 ; …; x m =a m g to be the membership function on the domain A, which is simply expressed as X ¼ fx 1 ; x 2 ; …; x m g, then the vectors, shown in Eqs. (7) and (8) are the results of fuzzy transformation of X, which represent a membership function on the domain B shown in Eqs. (9) and (10).
After that, the step of inferring fuzzy control rules by using the detected input as the condition of fuzzy control rules can be completed. Among them, the modules that can accomplish this purpose are called state interface or fuzzy interface. In this operation, the most important thing is to convert the precise input into the fuzzy input, which mainly includes the input of the external system and the output of the system.
The fuzzy output cannot directly control the executive part. It is necessary to determine the most representative value as the output control quantity in the determined output range, which is called defuzzied decision [18]. Different algorithms will be obtained from different angles and aspects to determine the key values. This module is called the interface of defuzzification or control. The function of this module is to convert the fuzzy quantity obtained from the previous legend into the accurate quantity for actual control. After obtaining the value, the accurate analog quantity signal can be obtained through logarithmic mode conversion and transmitted to the actuator to control the controlled object [19].
Through the above introduction to the fuzzy control theory, the fuzzy control algorithm is summarized, which is divided into the following four steps. First, the system output value obtained from the first sampling is calculated to obtain the input variable of the selected system, and then it is divided into fuzzy quantity. Next, the fuzzy quantity of the input variable and the fuzzy control rules are reasoned into fuzzy control system rules to calculate the control quantity. Finally, the precise control quantity is obtained through the operation of fuzzy solution.
In the process of defuzzification, the main principle is to further convert the fuzzy quantity into the rank quantity, and then the rank quantity into the exact quantity. The maximum membership degree method and the weighted average judgment method can be used to transform it into the rank quantity. The principle of the maximum membership method is to find the subset with the largest membership degree in the fuzzy subset of the fuzzy controller, and define its elements as u i . If there is a situation that the continuous elements have the maximum membership degree in the controller, calculate the average value of these elements, and take the average value as the output value of the control quantity. The principle of using the maximum membership method for defuzzification is very simple, but its resource information is relatively small. Hence, it can only exclude some elements with small membership degree, and cannot reflect the effect of each element on the control result. The main property of weighted average decision method is a selection method based on weight coefficient. The unique attribute of the system itself determines the weight coefficient. Assuming that the weight coefficient is k i = (i = 1, 2, …, m), the output of fuzzy quantity decision is calculated as Eq. (11): The exact value can be obtained according to the decision output of the fuzzy value and the stroke of the actuator. If the maximum stroke that the actuator can accept within a limited number of times is AEu m %, then the output domain of the controller can be set as follows: Therefore, the domain of rank quantity can be set as follows: The controller output is calculated as Eq. (14): K u represents the scale factor. Fig. 2 shows the design process of the fuzzy controller.

Design of Fuzzy PID Controller
Generally, the input of the fuzzy controller is the system deviation and the change rate of the deviation. PID control is applied to the operation control of temperature, differential pressure, and constant pressure of heat exchanger. A new fuzzy PID controller can be designed by combining PID controller and fuzzy controller. The traditional PID controller's proportion, integral, and differential coefficients will not change easily. In Eq. (15), represents the deviation of the system and ec denotes the change rate of the deviation of the system. These two inputs can adjust the change parameters of the system in time. Among them, there is a certain relationship between PID parameters, system deviation, and the change rate of deviation, as shown in Eq. (15): K p represents the proportion, K I denotes the integral, and K D indicates the differential coefficient.
In the design of fuzzy PID control system, the first step is to initialize the relevant parameters of the system, then calculate the input signal of the controller according to the previously determined input value, and then carry out the fuzzy processing. Finally, establish the fuzzy rules and obtain the output value of the controller.

Test and Application of Control System of Heat Exchange Unit
After the completion of the controller design of heat exchange unit, to operate safely and reliably in the future, it is necessary to test the whole system, including basic functions and communication functions.
According to the basic functions of the controller design of heat exchange unit, this part includes control effect test, fault record and alarm function test, and human-computer interaction test. During the actual test, to get the real data, the controller was installed in a community of XX city from December 15, 2018 to February 15, 2019. During operation, set the controller through the touching LCD screen to record the detected secondary network water supply and return temperature, water supply and return pressure value, outdoor temperature, and other data into the external memory every 10 minutes. Read the data of the memory several hours later, empty the storage space of relevant data as new data immediately after reading. Finally, the obtained data will be archived and arranged to prepare for the subsequent analysis of controller performance. The communication function of the controller of the heat exchange unit is the basis for the realization of unattended in the heat exchange station. There are three communication modes for the controller of the heat exchange unit, which are RS-485, Ethernet, and GPRS. In a large heat exchange station, there are often multiple heat exchange units. At this time, the central control room of the heat exchange station usually adopts RS-485 bus to monitor the heat exchange unit. In a small heat exchange station without a control room, the heat exchange unit communicates with the remote-control room through Ethernet. In actual use, one of the ways is selected according to different application environment. When testing the communication function, several controllers are used to simulate the working condition of the heat exchange station, and "RS485 + GPRS" and "Ethernet + GPRS" communication tests are carried out, respectively.

Design of Heat Exchanger Unit Controller
Based on the sustainable development background in the field of heating, the intelligent heat exchanger controller designed can realize the control function and communication function in modules, and ensure the real-time and reliability of the system. Different software architectures are used in different modules. The main controller adopts the traditional front and back-end mode of the main cycle and multiple interrupts. The program waits for human-computer interaction operation in the main cycle, and processes the data in the interruption, and the communication controller transplants the IC/OS-II embedded real-time operating system. According to the characteristics of each task and the relationship between them, priority, sleep condition, and communication mode among tasks are set up for each task, and the program performs each task according to priority. Therefore, the design can achieve the goal of intelligent and unattended heat exchange station, and can be flexibly applied in various occasions.

Basic Function Test Results
To verify the superiority and effectiveness of the heat exchanger controller based on the ARM core intelligent computer algorithm designed, the controller is installed in a heat exchanger station running in real time. Then, the secondary supply and return water pressure, supply and return water temperature, and some indoor temperature of residents are monitored. Finally, the data results are sorted and analyzed (Figs. 3 and 4).
Figs. 3 and 4 show that the secondary water supply pressure and return water pressure of the heat exchange unit do not fluctuate greatly from 7:00 to 12:00, in which the secondary water supply pressure is basically kept at 0.46 MPa and the secondary return water pressure at 0.316 MPa. Moreover, the secondary water supply temperature and return water temperature of the heat exchange unit do not fluctuate too much, and the state is relatively stable. However, the temperature of the secondary water supply and the temperature of the secondary water supply are adjusted by 5°C. The controller of heat exchanger designed has a good adjustment ability. Through fault recording and alarm function test, various analog fault signals can be input to the controller at any time, and each signal is 100 times. The number of times to correctly identify and process the corresponding fault information shows that the accuracy of the heat exchanger group identification controller in identifying and processing various faults is 100%, and the total number of detected samples is the same as the total number of correctly identified and processed samples. Therefore, the heat exchanger control system designed has good alarm and fault detection performance. The test of human-computer interaction shows that the controller runs separately. Through the simulation operation of the controller, great improvements are made to the convenience and efficiency of operation, and the sensitivity of the controller to the user's operation, which improves the friendliness of human-computer interaction. The human-computer interaction module often applies intelligent operation mode, and the operation method is simple, efficient, fast, and the interface is clear, hierarchical, and in line with the operation habits of most users.

Discussion
The traditional heating industry consumes a lot of resources and funds, and has poor heating quality mainly due to the low efficiency of heat exchanger. For example, some scholars studied the heat transfer efficiency of water and iron oxide nanofluids in a typical twisted strip double tube heat exchanger, which showed that the heat transfer efficiency would be affected by the temperature, concentration, mass flow rate, and twist rate of the fluid [20]. Some studied the nanoparticle composed of distilled water and Al 2 O 3 nanoparticles with mass concentrations of 1wt% and 2wt%. Under certain temperature (20°C, 30°C, 40°C and 50°C) and counter current and laminar flow conditions, the forced convection heat transfer of fluid flowing in vertical shell and tube heat exchanger was discussed. Based on the existing research results of heat exchanger efficiency, the heat transfer mode of heat exchanger based on ARM core intelligent computer algorithm was discussed [21]. Hou et al. [22] used the high Reynolds number k-ε turbulence model to simulate the surface heat transfer and flow characteristics of the compact staggered fin heat exchanger under the medium and high Reynolds numbers. The results showed that this type of heat exchanger had good flow and heat transfer performance, which broadened its application in the field of air conditioning with high cost. Jin et al. [23], in the synthesis process of heat exchange network, according to the heat exchange area of the single heat exchange equipment and the flow direction of the fluid, distributed the pressure drop constraint, and checked whether the total pressure drop of the flow stock was within the allowable range, and gave the detailed design flow chart of the heat exchanger under the premise of considering the pressure drop distribution. The calculation results showed that, compared with the field energy system, the new energy system based on this method could save 30.87% of the heat exchange area and reduce the total pressure drop by 12.66%. Taking the heat exchanger controller as the main core of the research, the specific hardware development and design are carried out for the module function of the heat exchanger controller. Then the fuzzy PID control system is designed, which is applied to the development of heat transfer mode of heat exchanger. Through the actual test experiment, it is found that this control system can adjust the heating according to the user's heating demand and weather temperature from 7:00 to 12:00. No matter how far away the user is from the heating station, the heating temperature is the same, and the heating temperature is relatively stable. The fault alarm mode of the system is tested, and the accuracy of the fault diagnosis is 100%. The joint control scheme of the main controller and the communication controller can effectively store and process the signal data of the system, calculate the algorithm, and record the real-time alarm of the fault. The main controller applies the traditional front and back-end mode of the main loop and multiple interrupts. The system program will conduct human-computer interaction and data processing in the process of the main loop. The communication controller will set the sleeping conditions and specific communication methods according to the different characteristics of different tasks and the relationship between tasks. Then, the program will execute tasks according to these conditions and methods. The test results show that the system developed is effective, flexible, stable, and intelligent. It can be widely used in the heating work of the heating station and has certain application value. The controller can be applied in various scenarios, and the application of the controller can promote the heat exchange station to achieve the unattended goal.

Conclusion
Through the design of the control system of heat exchanger as the core, the research on the heat transfer mode of heat exchanger is carried out. Through the actual test experiment, it is proved that the controller system of heat exchanger is effective, and has complex and diverse functions. In addition, it has certain intelligence, can adjust the heating mode according to the needs of users and the weather temperature, and has certain flexibility and stability. The research results show that the system has the characteristics of high efficiency, flexibility, stability, and intelligence. It can be widely used in the heating work of the heating station, and has a certain application value. The controller can be used in various occasions, and its application can promote the heat exchange station to achieve the purpose of unattended. However, in the design of the control system, though fuzzy algorithm is used, whether the algorithm is the optimal algorithm has not been verified; in the final experimental test, only the fault alarm function module of the system is tested, and no other function module is tested. In the future research, it is necessary to apply optimization algorithm to expand the controller design and test multiple functional modules.
Funding Statement: The author(s) received no specific funding for this study.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.