# Research on Kalman Filter Fusion Navigation Algorithm Assisted by CNN-LSTM Neural Network
## 3 Constructing the Framework for CNN and LSTM Assisted GNSS/INS Navigation System
### Constructing the Framework for CNN- and LSTM-Assisted GNSS/INS Navigation System
#### 3.2.2 LSTM Model Training  
The GNSS/INS data processed in the CNN layer are fed into the LSTM layer for further feature learning of the GNSS/INS data, while the GNSS/INS sequence data are processed and memorized using gating and long- and short-term memory modules, and model training and prediction is performed.  
The main mechanisms for capturing long-term dependencies in LSTM networks are as follows:  
Forget Gate [44]: The forget gate determines which information should be retained in the memory cell. It takes the input at the current time step and the hidden state from the previous time step as inputs and outputs a value between 0 and 1, controlling the degree of information retention in the memory cell. When the output of the forget gate is close to 1, it indicates the retention of most information, while an output close to 0 indicates the forgetting of most information.  
Input Gate [45]: The input gate decides which new information should be added to the memory cell. Similarly, it takes the input at the current time step and the hidden state from the previous time step as inputs and outputs two values: one for controlling the amount of new information to be added and another for generating the new candidate cell state.  
Cell State [46]: The cell state is the core component of the LSTM network, responsible for storing and transmitting information in long time sequences. At each time step, the cell state is updated based on the outputs of the forget gate and input gate. Specifically, the cell state is determined by the previous time step's cell state, the output of the forget gate, and the output of the input gate.  
Output Gate [47]: The output gate determines the output value at the current time step. It takes the input at the current time step, the hidden state from the previous time  
Figure 5: ReLU function.  
step, and the current cell state as inputs, and outputs a value used to compute the current time step's hidden state. The hidden state is the output of the LSTM network at each time step, which can be used for subsequent layer processing or as a representation of the entire sequence.  
Through these mechanisms, LSTM networks can selectively retain and update information, effectively handling dependencies in long time sequences. This capability makes LSTM networks perform excellently in tasks involving long-term dependencies, such as speech recognition, machine translation, and time series prediction.  
Figure 6 depicts the structure of an LSTM neural network.  
The update process of LSTM at time step t is as follows:  
\[\left\{\begin{array}{l}i_{t}=\sigma(W_{i}x_{t}+U_{i}h_{t-1}+V_{i}c_{t-1})\\ f_{t}=\sigma\Big{(}W_{f}x_{t}+U_{f}h_{t-1}+V_{f}c_{t-1}\Big{)}\\ o_{t}=\sigma(W_{o}x_{t}+U_{o}h_{t-1}+V_{o}c_{t-1})\\ \widetilde{c}_{t}=\tanh(W_{c}x_{t}+U_{c}h_{t-1})\\ c_{t}=f_{t}\otimes c_{t-1}+i_{t}\otimes\widetilde{c}_{t}\\ h_{t}=o_{t}\otimes\tanh(c_{t})\end{array}\right. \tag{36}\]  
where \(x_{t}\) is the input at the current time step, \(\sigma\) represents the logistic sigmoid function, and \(V_{i}\), \(V_{f}\), \(V_{o}\) denote element-wise multiplication. The forget gate \(f_{t}\) controls how much information each memory cell should forget, the input gate \(i_{t}\) controls how much new information should be added to each memory cell, and the output gate \(o_{t}\) controls how much information each memory cell should output.