Self-Tuning Fully-Connected PID Neural Network System for Distributed Temperature Sensing and Control of Instrument with Multi-Modules

High integration of multi-functional instruments raises a critical issue in temperature control that is challenging due to its spatial–temporal complexity. This paper presents a multi-input multi-output (MIMO) self-tuning temperature sensing and control system for efficiently modulating the temperature environment within a multi-module instrument. The smart system ensures that the internal temperature of the instrument converges to a target without the need of a system model, thus making the control robust. The system consists of a fully-connected proportional–integral–derivative (PID) neural network (FCPIDNN) and an on-line self-tuning module. The experimental results show that the presented system can effectively control the internal temperature under various mission scenarios, in particular, it is able to self-reconfigure upon actuator failure. The system provides a new scheme for a complex and time-variant MIMO control system which can be widely applied for the distributed measurement and control of the environment in instruments, integration electronics, and house constructions.


Introduction
Miniaturization, modularization, and multi-functionalization have become development trends in instrumentation [1][2][3][4]. For example, Christian et al. [5] introduced one of the smallest real-time polymerase chain reaction (PCR) systems with a size of 100 × 60 × 33 mm 3 and a weight of approximately 90 g. Segyeong et al. [6] presented a portable microfluidic flow cytometer with dual detection ability of impedance and fluorescence that is 150 × 100 × 100 mm 3 in size and weighs nearly 800 g. Roda et al. [7] designed a simple and versatile portable device based on chemiluminescence lensless imaging that can simultaneously perform different types of bioassays.
For the instruments with multi-modules, internal temperature control becomes an important issue, since the different functions are achieved by several modules integrated in one box, and the modules' thermal characters vary. For instance, the typical PCR temperatures are approximately 90 • C in denaturation, 55 • C in annealing, and 72 • C in extension [1]. Thus, these are three different temperatures in one cycle. The loop-mediated isothermal amplification (LAMP) temperature is set to a fixed value of 55 • C [2]. However, general modules require the environment temperature to be constant and near to room temperature. This is a challenge, since the modules are shaped differently and placed very close to each other due to spatial constraints.
Distributed temperature control is a general problem in various fields. Song et al. [8] introduced a method using artificial neural networks to optimize the temperature control in data centers. Shen et al. [9] designed a novel decoupling control system for high-dimensional, multi-input, Due to the complexity of the thermohydrodynamic operation, it is generally difficult to build an accurate model for an instrument system. Stafford et al. [18] have made a thorough study at flat plate heat transfer with axial fan flows. They used infrared thermography to quantify a two-dimensional profile of the heat transfer coefficient on a flat plate for a range of fan speeds and the distances from fan to plate. A relationship between the fan speed and heat transfer intensity was presented. Generally, when the other conditions were kept stable, the faster the fan speed, the higher the Nusselt number in their experiments. Thus, the convective heat transfer characteristics can be changed by adjusting the fans' speeds. Grimes et al. [19] have researched air flow and heat transfer in fan-cooled electronic systems. In their works, we can see that the heat transfer processes situated in the inlet and exit air flow from the fan varies significantly. The fan exhaling flow is unsteady and swirling, and the Nusselt number is higher, which enhances the heat transfer. However, this method makes the internal air more disordered.
Based on the previous research, when the other influencing factors keep invariant, we can get the function relation of temperature and fan speed in the presented mockup as: T i = f i (F 1 , . . . , F j , . . . , F 6 ), i = 1, . . . , 6 (1) where T i is the sensor's temperature around module i, and F j is the speed of cooling fan j. That is, the temperature variation is infulenced by the fans' speed. As mentioned above, due to the complexity of the structural configuraiton and the thermohydrodynamic coupling, the function f i cannot be obtained exactly. We can convert Equation (1) to another form: k=1 (a ik ·F k ), k = 1, . . . , 6 (2) a ik = a ik (F 1 , . . . , F j , . . . , F 6 ), j = 1, . . . , 6 where a ik is the coefficient of F k , which is decided by F j (j = 1, . . . , 6). So, we can get the matrix form of the function relation as: where A stands for the relation matrix.

MIMO Temperature Sensing and Control System
As mentioned above, the PIDNN controller does not rely on the object's model. The structure of the PIDNN controller is a three-layer network whose hidden layer neurons' activation functions work as a PID controller [15][16][17]. The improved FCPIDNN controller proposed in this paper takes a series of PIDNN controllers as basic controllers and adds a full connection layer between the basic controllers and the cooling fans. complexity of the structural configuraiton and the thermohydrodynamic coupling, the function fi cannot be obtained exactly. We can convert Equation (1) to another form: where aik is the coefficient of Fk, which is decided by Fj (j = 1,…, 6). So, we can get the matrix form of the function relation as: where A stands for the relation matrix.

MIMO Temperature Sensing and Control System
As mentioned above, the PIDNN controller does not rely on the object's model. The structure of the PIDNN controller is a three-layer network whose hidden layer neurons' activation functions work as a PID controller [15][16][17]. The improved FCPIDNN controller proposed in this paper takes a series of PIDNN controllers as basic controllers and adds a full connection layer between the basic controllers and the cooling fans. The structure of the FCPIDNN controller is shown in Figure 1. It contains a four-layer neural network. The symbol i represents the serial number (i = 1,..., 6). Ri is a target temperature. Ni is the fourth layer neuron. Pi is the pulse width modulation (PWM) control signal inputting to fan i, which is used to control fan speed. Fi is the speed of fan i. Ti is the local temperature of sensor i. The MIMO controller includes two main parts. One is six separate PIDNN controllers. The other is the full connection structure of the neural network. The structure of the PIDNN controller is shown in Figure 2, where Ri is the target temperature. Ti is the actual local temperature. Yi is the output of the PIDNN controller [15]. There are three layers in the PIDNN, including an input layer, a hidden layer, and an output layer. Each neuron has an input o and an output x. The input layer is used to estimate the difference between the set-point and the actual value. The hidden layer is composed of P, I, and D neurons, which implement a PID algorithm combined with connection weights from the The structure of the FCPIDNN controller is shown in Figure 1. It contains a four-layer neural network. The symbol i represents the serial number (i = 1, ..., 6). R i is a target temperature. N i is the fourth layer neuron. P i is the pulse width modulation (PWM) control signal inputting to fan i, which is used to control fan speed. F i is the speed of fan i. T i is the local temperature of sensor i. The MIMO controller includes two main parts. One is six separate PIDNN controllers. The other is the full connection structure of the neural network. The structure of the PIDNN controller is shown in Figure 2, where R i is the target temperature. T i is the actual local temperature. Y i is the output of the PIDNN controller [15]. There are three layers in the PIDNN, including an input layer, a hidden layer, and an output layer. Each neuron has an input o and an output x. The input layer is used to estimate the difference between the set-point and the actual value. The hidden layer is composed of P, I, and D neurons, which implement a PID algorithm combined with connection weights from the hidden layer to the output layer. The output layer contains one neuron, summing the outputs of the hidden layer with weights. Here we utilize this kind of independent PIDNN mainly to reduce the complex calculating cost to achieve a real-time online training. hidden layer to the output layer. The output layer contains one neuron, summing the outputs of the hidden layer with weights. Here we utilize this kind of independent PIDNN mainly to reduce the complex calculating cost to achieve a real-time online training. The full-connection structure from the output of the PIDNN to the fourth layer is mainly used to link the basic controllers to the fans. As seen in Equation (4), the relationship between the six fans and the output temperatures can be represented as a dimensional matrix. Under a slight change of the fan speed, this relationship can be approximately linear. Thereby, Equation (4) can be simplified as: where woij is the weight from Yi to Nj, and li is the scale factor between Pi to Fi. In the PIDNNi, the weights from the first layer to the second layer are wi11 = wi12 = wi13 = 1 and wi21 = wi22 = wi23 = −1, and the weight from the hidden layer to the output layer is wihl (l = 1,...,3). The weight from the third layer to the fourth layer is woij, where i and j present the serial number from PIDNNi to neuron Nj. The goal of the FCPIDNN controller is to minimize the deviation of the actual temperature from the target temperature. The weights are updated online using the back-propagation (BP) algorithm. So, the cost function is defined as: where e represents the difference between the target and actual temperatures, m represents the number of temperature control channels, and n represents the sample number. The BP updated algorithm is used as: where η o and η h are the learning coefficients. The partial derivative terms in Equations (7) and (8) can be written as: The full-connection structure from the output of the PIDNN to the fourth layer is mainly used to link the basic controllers to the fans. As seen in Equation (4), the relationship between the six fans and the output temperatures can be represented as a dimensional matrix. Under a slight change of the fan speed, this relationship can be approximately linear. Thereby, Equation (4) can be simplified as: where w oij is the weight from Y i to N j , and l i is the scale factor between P i to F i . In the PIDNNi, the weights from the first layer to the second layer are w i11 = w i12 = w i13 = 1 and w i21 = w i22 = w i23 = −1, and the weight from the hidden layer to the output layer is w ihl (l = 1, ..., 3). The weight from the third layer to the fourth layer is w oij , where i and j present the serial number from PIDNNi to neuron Nj. The goal of the FCPIDNN controller is to minimize the deviation of the actual temperature from the target temperature. The weights are updated online using the back-propagation (BP) algorithm. So, the cost function is defined as: where e represents the difference between the target and actual temperatures, m represents the number of temperature control channels, and n represents the sample number. The BP updated algorithm is used as: where η o and η h are the learning coefficients. The partial derivative terms in Equations (7) and (8) can be written as: Due to the absence of the system model of the instrument, we use a sign function to deduce ∂T m ∂F j as:

Convergence Analysis
Based on Equation (5) to Equation (6) and Figure 2, the difference between J(n) and J (n − 1) can be written as: According to Equation (7) to Equation (8), we can get Introducing Equations (13) and (14) into Equation (12), we can get Equation (15) indicates that J(n) ≤ 0, meaning that the cost function J(n) converges to the minimum, implying that the system is stable.

Instrument Mockup
In practical applications, the different modules in an instrument have different power consumptions. To evaluate the proposed self-tuning FCPIDNN for temperature sensing and control, a mockup of a real instrument was constructed. The 3D model of the mockup is shown in Figure 3.
The mockup is 350 mm × 350 mm × 415 mm in volume with six modules inside. These modules have different shapes and volumes. Inside each module, there is a heater to generate heating and a small ventilation fan. The six heaters have different power, and the ventilation fans drive the heat out of the modules into internal public space of the mockup. Each module has a temperature sensor around itself, and there are six main cooling fans set at the back of the mockup. These cooling fans serve as temperature-tuning actuators to modulate the internal temperature of the instrument. Therefore, a temperature sensing and control system is built up with the modules, temperature sensors, and cooling fans.

Instrument Mockup
In practical applications, the different modules in an instrument have different power consumptions. To evaluate the proposed self-tuning FCPIDNN for temperature sensing and control, a mockup of a real instrument was constructed. The 3D model of the mockup is shown in Figure 3.

Experimental System and Results
The temperature sensing and control system was applied to a mockup of an instrument with multi-modules, as illustrated in Figure 4a. The instrumentation includes a mockup, a power supply (KEITHLEY 2260b-30-72), a temperature sensors (DS18B20) array, a tailor-designed data processing circuit, and a data monitoring computer. The system used the FCPIDNN controller mentioned above to perform the online temperature control. The details of the mockup have been presented previously. Figure 4b shows the back view of the mockup, with six fans indicated as fan1 to fan6. Figure 4c shows the internal layout of the mockup. The power supply was used to provide electrical energy to the heaters inside the six modules, simulating the heating behavior of the modules. The powers of the heaters inside modules 1 and 6, modules 2 and 3, and modules 4 and 5 are set to 24W, 48W, and 96W, respectively. The temperature sensors were used to detect the local temperatures around the six modules. The data processing circuit, including a field-programmable gate array (FPGA, EP2C35F484), acquired the temperatures around the six modules from temperature sensors through universal asynchronous receiver and transmitter (UART) port, implemented the developed self-tuning temperature control and outputted the PWM control signals to the fans. The data processing circuit also output the temperature information to the data monitoring computer through the UART port. The mockup is 350 mm × 350 mm × 415 mm in volume with six modules inside. These modules have different shapes and volumes. Inside each module, there is a heater to generate heating and a small ventilation fan. The six heaters have different power, and the ventilation fans drive the heat out of the modules into internal public space of the mockup. Each module has a temperature sensor around itself, and there are six main cooling fans set at the back of the mockup. These cooling fans serve as temperature-tuning actuators to modulate the internal temperature of the instrument. Therefore, a temperature sensing and control system is built up with the modules, temperature sensors, and cooling fans.

Experimental System and Results
The temperature sensing and control system was applied to a mockup of an instrument with multi-modules, as illustrated in Figure 4a. The instrumentation includes a mockup, a power supply (KEITHLEY 2260b-30-72), a temperature sensors (DS18B20) array, a tailor-designed data processing circuit, and a data monitoring computer. The system used the FCPIDNN controller mentioned above to perform the online temperature control. The details of the mockup have been presented previously. Figure 4b shows the back view of the mockup, with six fans indicated as fan1 to fan6. Figure 4c shows the internal layout of the mockup. The power supply was used to provide electrical energy to the heaters inside the six modules, simulating the heating behavior of the modules. The powers of the heaters inside modules 1 and 6, modules 2 and 3, and modules 4 and 5 are set to 24W, 48W, and 96W, respectively. The temperature sensors were used to detect the local temperatures around the six modules. The data processing circuit, including a field-programmable gate array (FPGA, EP2C35F484), acquired the temperatures around the six modules from temperature sensors through universal asynchronous receiver and transmitter (UART) port, implemented the developed self-tuning temperature control and outputted the PWM control signals to the fans. The data processing circuit also output the temperature information to the data monitoring computer through the UART port.
(a)    To demonstrate the control performances of the proposed method in a MIMO temperature sensing and control system, we conducted three experiments and compared with the conventional method. The first experiment was conducted by comparing the temperature responses of the instrument by using a FCPIDNN controller and a traditional PIDNN controller. The second experiment was conducted to demonstrate the self-tuning of the controller when the target temperature changed in-process. The third experiment was conducted to simulate the reconfiguration of the control system when a pop-up actuator fail occurred.     To demonstrate the control performances of the proposed method in a MIMO temperature sensing and control system, we conducted three experiments and compared with the conventional method. The first experiment was conducted by comparing the temperature responses of the instrument by using a FCPIDNN controller and a traditional PIDNN controller. The second experiment was conducted to demonstrate the self-tuning of the controller when the target temperature changed in-process. The third experiment was conducted to simulate the reconfiguration of the control system when a pop-up actuator fail occurred. To demonstrate the control performances of the proposed method in a MIMO temperature sensing and control system, we conducted three experiments and compared with the conventional method. The first experiment was conducted by comparing the temperature responses of the instrument by using a FCPIDNN controller and a traditional PIDNN controller. The second experiment was conducted to demonstrate the self-tuning of the controller when the target temperature changed in-process. The third experiment was conducted to simulate the reconfiguration of the control system when a pop-up actuator fail occurred. Figures 6 and 7 show the control results using conventional PIDNN and FCPIDNN controllers, respectively. Figure 6a shows the results using a PIDNN controller to control a single module temperature. Figure 6b shows the results using six separate PIDNN controllers to control the temperatures of the six modules. Each controller worked in its own separate control loop. We can see from the results that the PIDNN could control the environmental temperature of one module very well, but brought steady-state errors when controlling for multiple modules. The steady-state temperatures of several controlled objects did not converge to the target, due to the presence of the mutual interference among the cooling fans. To solve this problem, we need to build connections among the controllers and thus ensure the controlling processes tending to global optimization.  Figure 6a shows the results using a PIDNN controller to control a single module temperature. Figure 6b shows the results using six separate PIDNN controllers to control the temperatures of the six modules. Each controller worked in its own separate control loop. We can see from the results that the PIDNN could control the environmental temperature of one module very well, but brought steady-state errors when controlling for multiple modules. The steady-state temperatures of several controlled objects did not converge to the target, due to the presence of the mutual interference among the cooling fans. To solve this problem, we need to build connections among the controllers and thus ensure the controlling processes tending to global optimization.  Figure 7a shows the results using the FCPIDNN controller. The experimental condition was the same as that in Figure 6a. Figure 7b shows the corresponding variation of the square root of the cost function. We can see that the temperature of different modules tended to the setting targets simultaneously, and the cost function's variation shows that the difference between the actual and target temperatures decreased and approached the minima. There were no steady-state errors in the temperature, and the control obtained a global convergence. Figure 8 shows the control results using FCPIDNN controller when target temperature varied in process. There were three different control processes. Figure 8a,b (process 1) shows the control results when one temperature control target changed in a stable state. In the process, six controllers maintained the six modules' temperature at 32 °C at the beginning. Then, the target temperature of module six was changed to 34 °C, and others' temperatures remained unchanged. After a period of self-tuning by the FCPIDNN controller, the temperatures of all modules approached to their own targets, and the cost function gradually reduced to the minima. Figure 8c,d (process 2) show another control result when temperature target changed to different values. In the process, the temperature initially remained at 35 °C. Then, the target temperature for modules 1, 2, and 6 was  Figure 6a shows the results using a PIDNN controller to control a single module temperature. Figure 6b shows the results using six separate PIDNN controllers to control the temperatures of the six modules. Each controller worked in its own separate control loop. We can see from the results that the PIDNN could control the environmental temperature of one module very well, but brought steady-state errors when controlling for multiple modules. The steady-state temperatures of several controlled objects did not converge to the target, due to the presence of the mutual interference among the cooling fans. To solve this problem, we need to build connections among the controllers and thus ensure the controlling processes tending to global optimization.  Figure 7a shows the results using the FCPIDNN controller. The experimental condition was the same as that in Figure 6a. Figure 7b shows the corresponding variation of the square root of the cost function. We can see that the temperature of different modules tended to the setting targets simultaneously, and the cost function's variation shows that the difference between the actual and target temperatures decreased and approached the minima. There were no steady-state errors in the temperature, and the control obtained a global convergence. Figure 8 shows the control results using FCPIDNN controller when target temperature varied in process. There were three different control processes. Figure 8a,b (process 1) shows the control results when one temperature control target changed in a stable state. In the process, six controllers maintained the six modules' temperature at 32 °C at the beginning. Then, the target temperature of module six was changed to 34 °C, and others' temperatures remained unchanged. After a period of self-tuning by the FCPIDNN controller, the temperatures of all modules approached to their own targets, and the cost function gradually reduced to the minima. Figure 8c,d (process 2) show another control result when temperature target changed to different values. In the process, the temperature initially remained at 35 °C. Then, the target temperature for modules 1, 2, and 6 was  Figure 7a shows the results using the FCPIDNN controller. The experimental condition was the same as that in Figure 6a. Figure 7b shows the corresponding variation of the square root of the cost function. We can see that the temperature of different modules tended to the setting targets simultaneously, and the cost function's variation shows that the difference between the actual and target temperatures decreased and approached the minima. There were no steady-state errors in the temperature, and the control obtained a global convergence. Figure 8 shows the control results using FCPIDNN controller when target temperature varied in process. There were three different control processes. Figure 8a,b (process 1) shows the control results when one temperature control target changed in a stable state. In the process, six controllers maintained the six modules' temperature at 32 • C at the beginning. Then, the target temperature of module six was changed to 34 • C, and others' temperatures remained unchanged. After a period of self-tuning by the FCPIDNN controller, the temperatures of all modules approached to their own targets, and the cost function gradually reduced to the minima. Figure 8c,d (process 2) show another control result when temperature target changed to different values. In the process, the temperature Sensors 2016, 16, 1709 9 of 12 initially remained at 35 • C. Then, the target temperature for modules 1, 2, and 6 was changed to 33.5 • C, and the target temperature for modules 3, 4, and 5 was changed to 32 • C. After a period of self-tuning, all modules approached their target temperatures separately. Figure 8e,f (process 3) shows the control results when the target temperature for all modules was changed twice in the process; i.e., 35 • C at the beginning, then changed to 32.5 • C, and finally changed to 30 • C. The FCPIDNN controller successfully modulated the temperature of the modules to the setting targets and the square roots of the cost function got to minima at last.
Sensors 2016, 16, 1709 9 of 12 changed to 33.5 °C, and the target temperature for modules 3, 4, and 5 was changed to 32 °C. After a period of self-tuning, all modules approached their target temperatures separately. Figure 8e,f (process 3) shows the control results when the target temperature for all modules was changed twice in the process; i.e., 35 °C at the beginning, then changed to 32.5 °C, and finally changed to 30 °C. The FCPIDNN controller successfully modulated the temperature of the modules to the setting targets and the square roots of the cost function got to minima at last. Reliability of temperature control is generally very important in practical use. When a fan fails to work, the system can make a self-reconfiguration to adapt to this situation. To validate the reliability, we conducted an experiment by setting the target temperature of all modules to 32.5 °C at the beginning of the process, and then shut off one fan. Figure 9a,b shows the control results when all fans were working. Figure 10 shows the control results when fan 2 failed. Figure 11 shows the control results when fan 3 failed. We can see that the temperatures of the modules could be modulated to the setting targets, even though one fan failed. Reliability of temperature control is generally very important in practical use. When a fan fails to work, the system can make a self-reconfiguration to adapt to this situation. To validate the reliability, we conducted an experiment by setting the target temperature of all modules to 32.5 • C at the beginning of the process, and then shut off one fan. Figure 9a,b shows the control results when all fans were working. Figure 10 shows the control results when fan 2 failed. Figure 11 shows the control results when fan 3 failed. We can see that the temperatures of the modules could be modulated to the setting targets, even though one fan failed. From the experiments, we can see that both FCPIDNN and PIDNN can control the system without the need of the model. The FCPIDNN can successfully deal with the coupling MIMO system with global optimum, but PIDNN can only control the temperature for one module, and will bring errors when controlling multiple coupling modules. In addition, FCPIDNN can make self-reconfiguration to the actuator fail. The above capabilities enhance the robustness of the control system and make the system smart, aiming at any possible scenario.

Conclusions
In this paper, we developed a MIMO self-tuning temperature sensing and control system with a novel FCPIDNN controller for an instrument with multi-modules. A mockup system was built up From the experiments, we can see that both FCPIDNN and PIDNN can control the system without the need of the model. The FCPIDNN can successfully deal with the coupling MIMO system with global optimum, but PIDNN can only control the temperature for one module, and will bring errors when controlling multiple coupling modules. In addition, FCPIDNN can make self-reconfiguration to the actuator fail. The above capabilities enhance the robustness of the control system and make the system smart, aiming at any possible scenario.

Conclusions
In this paper, we developed a MIMO self-tuning temperature sensing and control system with a novel FCPIDNN controller for an instrument with multi-modules. A mockup system was built up From the experiments, we can see that both FCPIDNN and PIDNN can control the system without the need of the model. The FCPIDNN can successfully deal with the coupling MIMO system with global optimum, but PIDNN can only control the temperature for one module, and will bring errors when controlling multiple coupling modules. In addition, FCPIDNN can make self-reconfiguration to the actuator fail. The above capabilities enhance the robustness of the control system and make the system smart, aiming at any possible scenario.

Conclusions
In this paper, we developed a MIMO self-tuning temperature sensing and control system with a novel FCPIDNN controller for an instrument with multi-modules. A mockup system was built up From the experiments, we can see that both FCPIDNN and PIDNN can control the system without the need of the model. The FCPIDNN can successfully deal with the coupling MIMO system with global optimum, but PIDNN can only control the temperature for one module, and will bring errors when controlling multiple coupling modules. In addition, FCPIDNN can make self-reconfiguration to the actuator fail. The above capabilities enhance the robustness of the control system and make the system smart, aiming at any possible scenario.

Conclusions
In this paper, we developed a MIMO self-tuning temperature sensing and control system with a novel FCPIDNN controller for an instrument with multi-modules. A mockup system was built up to mimic the complicated environment in the instrument and test the effectiveness of the MIMO self-tuning system. The MIMO temperature sensing and control system can adjust the internal temperature environment of the instrument without the need for system modeling. It can get to a global optimal result by on-line self-tuning. The system is applicable to effectively control the internal temperature of an instrument aiming at various mission scenarios, in particular, it is able to self-reconfigure upon actuator failure.