## 2 Methodological Background
### Mathematical Model of Airplane Cockpit ECS  
In the ECS of an aircraft cockpit, the controlled system uses two valves, called butterfly valves, to control the amount of cold and hot air flows. The opening and closing degrees of the butterfly valve flaps, which affect the cross-sectional area of the tube, are controlled by a torque motor driven by electric current. The change in cross-sectional area of the tube impacts the air flow passing through.  
The cold and hot air flows are mixed according to the desired air flow temperature and flow rate that the pilot wants to achieve, and then they are sent to the cockpit. Temperature and flow sensors are installed to detect the mixed air flow and facilitate the feedback signals to the system controller to calculate the amount of errors for the air flow temperature and flow rate, thus, forming a closed loop control system. In such a closed loop system, according to the feedback of errors, the PID controller regulates its gain parameters \(K_{p}\), \(K_{i}\), and \(K_{d}\) to be more suitable for the air flow temperature and flow rate required by the pilot. This closed loop system for the ECS of an aircraft cockpit is shown in Figure 1[1].  
The system in Figure 1 is modeled as shown in Figure 2. We use \(C_{1}\) to represent the flow controller and \(C_{2}\) to represent the temperature controller. After the errors pass through the controller, currents \(i_{1}\) and \(i_{2}\) are obtained and then sent to the controlled system. The two butterfly valves, \(V_{h}\) and \(V_{c}\), and the controlled system can be expressed by four transfer functions as the following mathematical formula by the Laplace transform:  
\[G_{p}(s)=\left[\begin{array}{cc}G_{11}(s)&G_{12}(s)\\ G_{21}(s)&G_{22}(s)\end{array}\right]=\left[\begin{array}{cc}G_{11}(s)&-G_{1 1}(s)K_{c}\\ G_{21}(s)&G_{21}(s)K_{h}\end{array}\right] \tag{1}\]  
\[=\left[\begin{array}{cc}\frac{-1.908+52.2481}{s+34.84+52.2481}*0.2433&\frac{-1.908+52.2481}{s^{2}+34.48+52.2481}*(-2.311)\\ \frac{-6017s+161.9432}{s^{2}+44.87s+161.9432}*0.3023&-\frac{-6017s+161.9432}{s^ {2}+44.87s+161.9432}*12.24\end{array}\right] \tag{2}\]  
\(G_{11}\): the transfer function with which the \(V_{c}\) valve flap (cold air source) input current led to a change in the mixed air flow.  
\(G_{12}\): the transfer function with which the \(V_{c}\) valve flap (cold air source) input current led to a change in the mixed air temperature.  
\(G_{21}\): the transfer function with which the \(V_{h}\) valve flap (hot air source) input current led to a change in the mixed air flow.  
\(G_{22}\): the transfer function with which the \(V_{h}\) valve flap (hot air source) input current led to a change in the mixed air temperature.  
\(K_{h}\): gain value of the heat flow to the temperature change of the mixed gas.  
\(K_{c}\): gain value of the cold flow rate to the temperature change of the mixed gas.  
The constant values, which are actually tested by experimental methods in Equation (2) are suggested according to reference. \(G_{p}(s)\) represents the output air flow and temperature via the controlled system when the inputs are currents \(i_{1}\) and \(i_{2}\).  
Figure 1: Diagram of cockpit flow and temperature control system.