# Sensorless Air Flow Control in an HVAC System through Deep Learning
## 3 Predicting Static Pressure Using Deep Learning
### Proposed Deep Learning Model  
Among the deep learning techniques, the RNN (Recurrent Neural Network) is effective for learning sequential information. It recalls previous input from internal memory in the hidden layer to use with the input data in the subsequent data samples in the sequence. This feature makes it perfectly suited for machine learning problems that involve sequential data. Long Short-Term Memory (LSTM) is an extension for RNN that extends the memory to very long time lags. The memory in LSTM can be seen as a gated cell, and the gating is done by learning the importance of each input. Thus, LSTM can solve the long-term dependency problem by adding the cell state to the hidden state of the RNN. Time dependency is an important factor of learning time-series data characteristics. The experimental results with our data show that the best performance is achieved by using the previous nine data items. In other words, our LSTM model uses the data observed from the previous nine minutes to predict the data for the next minute. Therefore, of the different types of LSTM models, we used a many-to-one type (Figure 8) because our goal is to predict one next static pressure value from nine previous values. As described in Section 3.1, \(X_{t}\) is a set of seven input parameters at time \(t\), namely, the static pressure set-point, the temperature set-point, the volume of the supply air, the volume of the return air, the temperature of the supply air, the temperature of the return air, and the speed of the inverter fan. In Figure 8, each LSTM cell has the following six functions:  
\[f_{t}=\sigma(W_{Xf}X_{t}+W_{hg}h_{t-1}+b_{f}), \tag{1}\]  
\[i_{t}=\sigma(W_{Xi}X_{t}+W_{hi}h_{t-1}+b_{i}), \tag{2}\]  
\[\tilde{C}_{t-1}=tanh(W_{Xg}X_{t}+W_{hg}h_{t-1}+b_{g}), \tag{3}\]  
\[C_{t}=f_{t}\odot C_{t-1}+i_{t}\odot\tilde{C}_{t-1}, \tag{4}\]  
\[o_{t}=\sigma(W_{Xo}X_{t}+W_{ho}h_{t-1}+b_{o}), \tag{5}\]  
\[h_{t}=o_{t}\odot tanh(C_{t}), \tag{6}\]  
where \(W\) denotes a weight factor, and \(b\) denotes bias for the gates in the LSTM cells. In Equations (1), (2) and (5), \(\sigma\) is a sigmoid layer used in the gates. It outputs numbers between 0 and 1 and determines how much of each information component should be let through the gate. For the forget gate \(f_{t}\) in Equation (1), the sigmoid layer determines how much of the past information, which is stored in the form of the cell state, should be forgotten. The cell state facilitates the propagation of the gradient, even if the state is long in the LSTM. The forget logic looks at \(h_{t-1}\), the output from the previous  
Figure 7: Comparison of static pressure of each floor. time step, and \(x_{t}\), the input at time step \(t\), and outputs a number between 0 and 1 for each number in the cell state \(C_{t-1}\). A sigmoid value of 1 means that the entirety of the given information should be kept, whereas 0 means that the entirety of the data should be forgotten. Next, the LSTM model decides what new information it will store in the cell state. First, the input gate \(i_{t}\) decides which values it will update (Equation (2)). Second, a hypertangent (tanh) layer creates a vector of new candidate values \(\tilde{C}_{t}\) to potentially add to the state (Equation (3)). Then, the LSTM updates the cell state in Equation (4). For this, the LSTM multiplies the old state \(C_{t-1}\) by \(f_{t}\) using the Hadamard product \(\odot\), thereby forgetting the data according to its previous decision. Next, it adds \(i_{t}\odot\tilde{C}_{t-1}\) (Equation (4)). This is the new candidate value, scaled by how much it decided to update each state value. Finally, the LSTM model decides what to output. The output is based on the cell state but is a filtered version. First, a sigmoid layer decides what parts of the cell state it will output (Equation (5)). Then, it puts the cell state through \(\tanh\) to squeeze the values so that they are between \(-1\) and \(1\) and multiplies it by the output of the sigmoid gate.