## 3 Preliminaries of IMU and Extended Kalman Filter Used in UWB Positioning  
### Principle of IMU Positioning  
An IMU can provide the attitude information and motion trajectory of the object carrier. Because of its quick refresh frequency, an IMU has the advantage of high positioning precision in a short time, and it is not easily interfered by time, region, and human factors. In general, an IMU contains three single shaft accelerometers and gyroscopes, as well as three magnetometers. The accelerometer can be used to measure the carrier line acceleration. Further, the velocity and displacement can be obtained by integrating the linear acceleration with time [17]. The gyroscope can be used to measure the angular velocity, and the angle can be obtained by integrating the angular velocity with time accordingly. The magnetometer can be used to measure the geomagnetic force in the space where the sensor is located. If the geomagnetic field intensity of this position is known, the included angle between the sensor and geomagnetic line can be calculated according to the triaxle magnetic force intensity sensitive to the magnetometer [18]. In practice, an IMU is installed on the center of gravity of the object. The data of the three sensors are fused to obtain more accurate attitude information. As Figure 1 shows, the attitude angles of an IMU are the three angles between the coordinate system and the ground inertial coordinate system, which can be represented by the roll angle, pitch angle, and yaw angle. The roll angle can be obtained by the rotation around the X-axis, the pitch angle can be obtained by the rotation around the Y-axis, and the yaw angle can be obtained by the rotation around the Z-axis [19]. The magnetic measurement value of a certain point on Earth is \(h=\left[h_{x}^{b},h_{y}^{b},h_{z}^{b}\right]\), which, respectively, represents the components of the measured value of the three-axis dynamometer along each axis, the magnetic field vector under the geomagnetism, and the projection of the magnetic field vector under the magnetometer coordinate system. When it is parallel to the geomagnetic plane, the angle between the magnetometer and the geomagnetic north pole can be calculated according to Equation (1) [20]. \[\phi=\arctan(\frac{h_{y}^{b}}{h_{x}^{b}}) \tag{1}\]  
In an IMU, \(M_{x}^{m},M_{y}^{m},M_{z}^{m}\) represent axis components of geomagnetic intensity measured by magnetometer in the magnetometer coordinate system. \(M_{x}^{b},M_{y}^{b},M_{z}^{b}\) represent the corrected values of each axis of geomagnetic field intensity in the magnetometer coordinate system. The slant angle of the magnetometer can be corrected by the accelerometer as shown in Equation (2). \[\left[ \begin{array}{c}M_{x}^{b}\\ M_{y}^{b}\\ M_{z}^{b}\end{array} \right]=\left[ \begin{array}{ccc}\cos\theta&0&\sin \theta\\ \sin\gamma\sin\theta&\cos\gamma&-\sin\gamma\cos\theta\\ -\cos\gamma\sin\theta&\sin\gamma&\cos\gamma\cos\theta\end{array} \right]\left[ \begin{array}{c}M_{x}^{m}\\ M_{y}^{m}\\ M_{z}^{m}\end{array} \right] \tag{2}\]  
The yaw angle of the moving object carrying the IMU can be obtained according to Equation (3):  
\[\phi=\arctan(\frac{M_{y}^{b}}{M_{x}^{b}}) \tag{3}\]  
The pitch angle and roll angle are calculated according to the components of gravity on each axis of the moving object measured by the accelerometer. \[\left[ \begin{array}{c}A_{x}^{b}\\ A_{y}^{b}\\ A_{z}^{b}\end{array} \right]=\left[ \begin{array}{ccc}\cos\theta\cos\phi&\cos \theta\sin\phi&-\sin\theta\\ \sin\gamma\sin\theta\cos\phi-\cos\gamma\sin\phi&\sin\gamma\sin\theta\sin\phi+ \cos\gamma\cos\phi&\sin\gamma\cos\theta\\ \cos\gamma\sin\theta\cos\phi+\sin\gamma\sin\phi&\cos\gamma\sin\theta\sin\phi- \sin\gamma\cos\phi&\cos\gamma\cos\theta\end{array} \right]\left[ \begin{array}{c} 0\\ 0\\ 1\end{array}