## 2 MEMS Sensor-Based Localization Using the Data and Model Dual-Driven Structure
### Deep Learning-Based Speed Estimation Framework  
The performance of traditional pedestrian walking speed estimation models is constrained by the complex handheld modes, motion characteristics of different users, and simple step-length model. To solve these problems, the DLSE is developed to acquire precise walking speed measurements under complex motion modes, which considers motion and handheld features extracted from a time window of the accelerometer and gyroscope data instead of the instantaneous model in formal research. The network structure of the DLSE includes the integration of a one-dimensional convolutional neural network model (1D-CNN), gated recurrent unit (GRU), and multilayer perceptron (MLP), which is shown as follows.  
Figure 2 describes the basic model of the proposed DLSE framework, in which the 1D-CNN is developed for fully learning and extracting the motion characteristics of the users, the GRU network further takes the time-related characteristics into consideration, and MLP is finally applied to integrate all the learned features and to predict the walking speed for users.  
Figure 1: Framework of the proposed H-IPS.  
Figure 2: (**a**) Structure of the deep learning framework. (**b**) Structure of the GRU.  
In the 1D-CNN structure, the mapping model among input features and outputted learned features is presented [2]:  
\[O_{j}=\varpi(\sum_{i=1}^{N}x_{i}*k_{ij}+b_{j}) \tag{1}\]  
where \(x_{i}\) is the modeled input features, \(k_{ij}\) is the kernel weights, \(b_{j}\) is the calculated biases, \(\varpi(\cdot)\) is the activation function, and \(O_{j}\) is the learned output features of 1D-CNN.  
In the GRU layer, the updated model of the GRU parameters is described as [23]:  
\[\left\{\begin{array}{l}z_{t}=\sigma\cdot(W_{z}\cdot[h_{t-1},x_{t}])\\ \widetilde{h}_{t}=\tanh\cdot(W\cdot[r_{t}*h_{t-1},x_{t}])\\ r_{t}=\sigma\cdot(W_{r}\cdot[h_{t-1},x_{t}])\\ h_{t}=(1-z_{t})\cdot h_{t-1}+z_{t}*\widetilde{h}_{t}\end{array}\right. \tag{2}\]  
where \(r_{t}\) and \(z_{t}\) are the forget and output units, \(x_{t}\) is the input vector of GRU model, \(h_{t}\) indicates the hidden state vector, and \(\sigma\) is the sigmoid function. The output vector of the proposed GRU network is modeled as the input vector of MLP, and the predicted uncertainty error is presented as:  
\[v_{t}=MLP(h_{t}) \tag{3}\]  
where \(v_{t}\) indicates the final predicted walking speed provided by the proposed DLSE.  
Before inputting the inertial sensor data into the neural network, it is necessary to preprocess the data to reduce the complexity of the data so that the network can better fit the pedestrian walking model. Through the 9-axis sensor data, the real-time attitude quaternion is updated by the proposed DMDD. Finally, the acceleration and angular velocity are converted from the sensor coordinate system to the navigation coordinate system by using the attitude quaternion. The vector \(AG_{\textit{INS}}\) in the sensor coordinate system can be converted into the variable in the navigation coordinate system by Formula (4):  
\[AG_{\textit{INS}}=\mathbf{q}\times AG_{\textit{IMU}}\times\mathbf{q}^{-} \tag{4}\]  
where \(AG_{\textit{INS}}\) is the converted IMU data, which is regarded as the input values of the proposed DLSE.  
This paper adopts the sliding window method to improve the output rate of neural network prediction. By using a fixed-size sliding window, the inertial sensor data will be divided into independent sequences. The sequence window size \(n\) is 100 frames (1 s), and the sliding window step size is for 10 frames. The velocity vector is predicted by the deep neural network of each sequence, and the position is generated by merging the link module. The current position is updated to the previous 200 frames. The overlapping window is used for the prediction update, and the output frequency will be increased to 20 Hz, and then passed through the low-pass filtering, and the position derived from the velocity vector is further processed by the controller to smoothly reconstruct the predicted trajectory.