Performance Enhancement of INS and UWB Fusion Positioning Method Based on Two-Level Error Model

In GNSS-denied environments, especially when losing measurement sensor data, inertial navigation system (INS) accuracy is critical to the precise positioning of vehicles, and an accurate INS error compensation model is the most effective way to improve INS accuracy. To this end, a two-level error model is proposed, which comprehensively utilizes the mechanism error model and propagation error model. Based on this model, the INS and ultra-wideband (UWB) fusion positioning method is derived relying on the extended Kalman filter (EKF) method. To further improve accuracy, the data prefiltering algorithm of the wavelet shrinkage method based on Stein’s unbiased risk estimate–Shrink (SURE-Shrink) threshold is summarized for raw inertial measurement unit (IMU) data. The experimental results show that by employing the SURE-Shrink wavelet denoising method, positioning accuracy is improved by 76.6%; by applying the two-level error model, the accuracy is further improved by 84.3%. More importantly, at the point when the vehicle motion state changes, adopting the two-level error model can provide higher computational stability and less fluctuation in trajectory curves.


Introduction
In global navigation satellite system-denied (GNSS-denied) environments, the multisensor fusion positioning method is mainstream, and most of them are based on INS to realize fusion positioning. With the development of micro-electro-mechanical system (MEMS) technology, applications of the inertial navigation system (INS) on small UAVs are becoming more and more extensive. This is because compared to high-precision inertial sensors, MEMS-IMU has the advantages of small size and low cost. These merits of MEMS-IMU present an attractive option for advanced applications, such as intelligent navigation and positioning in GNSS-denied environments [1]. Nevertheless, the drawbacks of high noise levels, instability of characteristics and large stochastic variance make it a challenge to use MEMS-IMU for extended periods. The noise (or error) estimation and compensation of MEMS-IMU are the key points to realize the high-precision positioning of INS-based fusion methods.
At present, INS error estimation and compensation methods are divided into two aspects: one is modeling the errors of MEMS-IMU from a mechanism level [2][3][4][5][6][7]; the other is establishing the error propagation model based on the principle of navigation. In terms of IMU error modeling methods, especially MEMS-IMU, some studies divide IMU errors into two types, which are deterministic errors, such as scale factor, bias and misalignment, and stochastic errors such as bias instability and scale factor instability [2]. The measurement of deterministic error is the main part of this type of error compensation algorithm, and extensive experimentation is required to determine the error parameters [2][3][4]. The authors of [2] summarized the methodology of how to define deterministic errors by a 27-state static test setup and a 60-state dynamic test setup and how these errors were used one accelerometer and one gyroscope, which can measure three-axes acceleration and threeaxes angular velocity. The measurements of MEMS-IMU always contain a certain amount of noise, which leads to non-negligible drifts in vehicle path estimation due to time integration. There are two categories of noise: short-term noise with a high frequency and long-term noise with a low frequency. In the time domain, the vehicle motion information mixes with such noise, and they cannot be distinguished directly. While in the frequency domain, the movement frequency of a vehicle is usually no more than 20 Hz, and a land vehicle is usually below 5 Hz [22], whereas short-term noise can reach more than 50 Hz. Therefore, we need to employ data prefiltering methods before utilizing the two-level error model to eliminate short-term noise whose frequency is around the vehicle movement frequency.

Wavelet Denoising Method
Fourier transform (FT) is the most common and extremely useful method for frequency analysis. However, through transforming the signal to the frequency domain by FT, the time-domain information is lost. Short-time Fourier transform (STFT) can overcome this drawback by adding a window function. However, both time localization and frequency resolution cannot be optimal at the same time. Therefore, performing a wavelet transform to realize IMU signal decomposition in both the time and frequency domains is a superior method.
From multiresolution analysis, φ(x) and ψ(x) are the scaling function and wavelet function, respectively, and they satisfy the following equations: The coefficients of the scaling and wavelet functions obey the following equations: where h n has the characteristic of a finite impulse response (FIR) low-pass digital filter, and the FIR digital filter that consists of the wavelet coefficient, g k , is a high-pass digital filter [23]. By performing discrete-time FT as Equations (5) and (6), we can get the frequency response of both filters.
Based on the Mallat algorithm [24] and the filter bank method, the wavelet denoising method is divided into three parts: decomposition, threshold denoising method and reconstruction. For example, the three-level decomposition is shown in Figure 1. x(n) is the raw IMU signal in the time domain. By applying convolution with digital filter banks derived from the scaling and wavelet functions, the raw signal is decomposed into the wavelet coefficient, d 1 , with high frequency and the scaling coefficient, c 1 , with low frequency. Both d 1 and c 1 are in the frequency domain. After three times repetitions, there are four parts of the signal corresponding to different frequency intervals. The coefficients containing motion information have a large amplitude, so setting a suitable thresholding in specific methods can eliminate a certain amount of noise. After thresholding denoising, by implementing the inverse wavelet transform that is G and H in Figure 1 on c 3 and d 3 , we can get the reconstructed coefficient, c 2 . Additionally, if repeated three times, the Sensors 2023, 23, 557 4 of 20 denoised IMU signal, x(n), can be obtained. In the decomposition part, digital filter banks and downsampling are taken to realize the discrete wavelet transform. While in the reconstruction part, digital filter banks and upsampling are taken to reconstruct the signal.
are four parts of the signal corresponding to different frequency intervals. The coefficients containing motion information have a large amplitude, so setting a suitable thresholding in specific methods can eliminate a certain amount of noise. After thresholding denoising, by implementing the inverse wavelet transform that is G and H in Figure 1  c . Additionally, if repeated three times, the denoised IMU signal, ( ) xn , can be obtained. In the decomposition part, digital filter banks and downsampling are taken to realize the discrete wavelet transform. While in the reconstruction part, digital filter banks and upsampling are taken to reconstruct the signal. Hard thresholding [25] and soft thresholding [26] are two common thresholding methods, and some scholars have conducted in-depth research on the selection of thresholds [25,[27][28][29]. In the hard-thresholding method, coefficients with amplitudes less than thresholding are set to 0, and coefficients that are greater than thresholding remain unchanged, and the equation is as (7).
While in the soft-thresholding method, coefficients with magnitudes less than thresholding are set to 0, and coefficients with magnitudes larger than thresholding are reduced to the difference in them, and the equation is Considering the characteristics of the raw IMU signal, this paper presents the softthresholding method for IMU data denoising. More detailed information will be introduced in Section 2.2.

Implementation Details
The fundamental theory of the wavelet shrinkage method is that wavelet function has a better time-frequency property, and discrete wavelet transform (DWT) has an ability to "focus" on signals because of its multiresolution property. The "focus" ability makes signal energy fasten on several coefficients, while noise is evenly distributed across the whole scale space, and this is determined by the distribution property of noise.
The IMU data acquired from MEMS-IMU usually include a large amount of noise; one reason is that MEMS-IMU lacks high accuracy, and the other is that the movements of a vehicle always bring vibrations, and this affects the measurement of MEMS-IMU. We perform two levels of wavelet decomposition on account of the UAV motion frequency and IMU sampling frequency. Based on the soft-thresholding method, we selected the Hard thresholding [25] and soft thresholding [26] are two common thresholding methods, and some scholars have conducted in-depth research on the selection of thresholds [25,[27][28][29]. In the hard-thresholding method, coefficients with amplitudes less than thresholding are set to 0, and coefficients that are greater than thresholding remain unchanged, and the equation is as (7).
While in the soft-thresholding method, coefficients with magnitudes less than thresholding are set to 0, and coefficients with magnitudes larger than thresholding are reduced to the difference in them, and the equation is Considering the characteristics of the raw IMU signal, this paper presents the softthresholding method for IMU data denoising. More detailed information will be introduced in Section 2.2.

Implementation Details
The fundamental theory of the wavelet shrinkage method is that wavelet function has a better time-frequency property, and discrete wavelet transform (DWT) has an ability to "focus" on signals because of its multiresolution property. The "focus" ability makes signal energy fasten on several coefficients, while noise is evenly distributed across the whole scale space, and this is determined by the distribution property of noise.
The IMU data acquired from MEMS-IMU usually include a large amount of noise; one reason is that MEMS-IMU lacks high accuracy, and the other is that the movements of a vehicle always bring vibrations, and this affects the measurement of MEMS-IMU. We perform two levels of wavelet decomposition on account of the UAV motion frequency and IMU sampling frequency. Based on the soft-thresholding method, we selected the SURE-Shrink algorithm to evaluate the noise threshold. This algorithm is a hybrid algorithm based on the SURE threshold and Universal threshold; it considers the differences in the statistical properties of the coefficients of different wavelet sub-bands, and it is one of the best sub-band adaptive wavelet shrinkage algorithms. The calculation is as follows: where η N = log 2 (N) 3/2 (10) Here, N is the number of coefficients of the wavelet sub-band, and Y t is the t-th coefficient of the current wavelet sub-band. The two thresholds, T univ and T sure , are calculated by where #{·} represents the number of elements that satisfy the conditions. From [25], σ n can be estimated as the median absolute deviation in the wavelet coefficients at the finest level and divided by 0.6745. The finest level of the wavelet coefficients contains the highest frequency level of the signal, which we think most of them are noise. Additionally, the equation form is σ n = median(|d N − median(d N )|)/0.6745 (14) Here, d N is the wavelet coefficients of the finest level. Additionally, the flow chart of the wavelet shrinkage algorithm is shown in Figure 2.  (11) Here, N is the number of coefficients of the wavelet sub-band, and t Y is the t-th coefficient of the current wavelet sub-band. The two thresholds, univ T and sure T , are calculated by where  #  represents the number of elements that satisfy the conditions. From [25], n  can be estimated as the median absolute deviation in the wavelet coefficients at the finest level and divided by 0.6745. The finest level of the wavelet coefficients contains the highest frequency level of the signal, which we think most of them are noise. Additionally, the equation form is Here, N d is the wavelet coefficients of the finest level. Additionally, the flow chart of the wavelet shrinkage algorithm is shown in Figure 2.  The denoising results are detailed in Section 4.1.2.

Methodology
In this chapter, according to the mechanism of MEMS-IMU errors and the motion characteristics of UAV, we introduce the two-level error model EKF method in detail, which is the main innovation of this paper. The two-level error model is established from two levels: one is from the mechanism, and the other is from the propagation. In the mechanism error model, we aim to build an error model that can describe the accelerometer and gyroscope sensor errors simply and generally. While in the propagation error model, we intend to establish the error propagation path based on the state equations of the navigation system.

Mechanism Error Model
From the mechanism of error occurrence, the error variables we focus on are δa and δw, which are errors of state a and w. For these two variables, we selected the stochastic process model as the mechanism error model; the arguments are as follows: 1.
It is convenient to analyze and calculate the parameters of the stochastic model; 2.
There are little application condition limitations on the stochastic model; 3.
There is no need to calibrate a large number of parameters in contrast to other methods.
The common stochastic models used to describe errors are the autoregressive (AR) model and Gauss-Markov (GM) process model. More detailed information about the mechanism error model is discussed in Sections 3.1.1 and 3.1.2.

Stochastic Process Model
In most KF implementations for the INS-based fusion positioning method, the firstorder GM model is used to describe inertial sensor errors with a decaying exponential autocorrelation sequence [30][31][32][33]. The first-order GM model for an inertial sensor error is given as: .
Here, β is the reciprocal of correlation time, and σ 2 is the variance in system noise w(t). The discrete-time equation is written as follows: where ∆t is the time interval. The other stochastic model of inertial sensor errors is the higher-order AR model. To use this model, long-term measurements from each inertial sensor while stationary are required for computing the higher-order AR model. The pth-order AR model for a discrete-time-domain sequence can be described by the following difference equation: where α 1 , α 2 , α 3 , . . . , α p are the model parameters, and β 0 is standard deviation in sensor white noise. However, to achieve higher accuracy, the model needs to use a higher order. Since the AR model is applied to all six axes of inertial sensors, each increase in the model order will lead to six more states added to the KF state error vector.

Implementation Details
Our aim in this paper is not to establish a noise model to describe the physical properties of sensor errors in detail but merely to derive generic, simple noise models that are suitable for the INS-based fusion positioning method. The mechanism error model is derived from (16); in the discrete-time domain, the equation is as follows: where x k is the slowly varying process with the correlation time, τ b , in the discrete-time domain, w k is the white noise component of x k , and v k represents the white noise component of the error model. and v are independent, zero mean, white Gaussian processes of strength σ b and σ w , and in the discrete-time domain: We define w = w + v, and then Now the mechanism error model in the discrete-time domain becomes When we apply the mechanism error model to six axes of inertial sensors, the parameters that need to be obtained beforehand are θ = {τ b , σ b , σ w }. By keeping the IMU stationary for more than 3 h, which means the outputs of IMU only contain noise (including long-term noise and short-term noise), the parameters σ b , σ w can be directly read off of the Allan deviation plot [33], and τ b is the correlation time of the output signals.

Propagation Error Model
For the propagation error model, we derive model equations based on the state differential equations of navigation systems. The variables we focus on are δp, δv, δq, which are errors of state p, v, q. We use quaternions, q, instead of Euler angles to describe the rotations of navigation systems because solving in quaternions can avoid singularities and the gimbal lock problem. The differential equations that characterize the motion of navigation systems are given as: . . .
where p, v are the position and velocity of the navigation systems, respectively, in the inertial reference frame; a is the specific acceleration vector; the gravitational acceleration g[p(t)] changes with the unit position; and the rotation matrix based on Hamilton form can be calculated by The differential equation of quaternion is given as (27): where w is the angular velocity, and q = [q w , q v ] T is the Hamilton form of quaternions with the scalar part, q w , and the vector part, q v ; in this form, rotation corresponds to the right-hand rule. ⊗ denotes quaternion multiplication; the latter two are equivalent forms, which are matrix multiplication rather than quaternion multiplication. Additionally, the matrix Ω(w), Q(q) is given as: Equations (23)-(25) characterize the true attitude and position of a navigation system based on true specific acceleration and angular velocity. However, in an actual system, only measurements are available. For a quantity z, z m = the measurement of z and δz = the error of z. Additionally, the true quantity can be characterized by the sum of measurement and error. In the navigation system, there are equations listed as (31)-(35).
The differential equation of the position error can be derived as follows: The differential equation of the velocity error can be derived as: The rotation matrix and gravitational acceleration can be approximated with measurements, with first-order errors, as (38) and (39).
Then, the new differential Equation (40) of the velocity error can be obtained from (38) and (39). Considering sufficiently small errors, the products of errors can be neglected, and (40) can finally become (41).
The differential equation of quaternion can be derived as It can be easily approved that Q(q) · w = Ω(w) · q, and (42) becomes Neglecting the products of small errors, the error equation of quaternions becomes The propagation error model can finally be obtained:

Basic EKF Method
The continuous-time nonlinear system's state equation is Additionally, the continuous-time nonlinear measurement equation is The discrete-time nonlinear system equations can be obtained by discretization, and (48) and (49) become Applying Taylor series expansion and keeping the first order at x k−1 =x + k−1 , the state Equation (50) becomes Here, Additionally, the nonlinear measurement equation becomes (55) after a first-order approximation at Here, Here, the basic Kalman filter equations can be applied after the above discretization and linearization; there are the state estimations of (58) and (59) and the measurement updates of (60)-(62).

Two-Level Error Model EKF Method
In this section, the two-level error model is applied to the EKF method. We take the ultra-wideband (UWB) system as the measurement and derive the EKF method based on this. The state vectors that need to be considered include p: position; v: velocity; and q: quaternion; especially, in this paper, we need to discriminate their nominal states and error states. Therefore, the state vector is given as follows: where δa is the error state of acceleration obtained by the accelerometer, and δw is the error state of angular velocity obtained by the gyroscope. The state vector, x, is a 26 × 1 column vector. In order to facilitate the subsequent matrix derivation, the following statements are given here. Variables except for quaternion, which is a 1 × 4 row vector, are composed of three elements, which are (we take the position as an example): p 1×3 = [p 1 , p 2 , p 3 ], and they match the x, y and z axes, respectively. The elements in the state vector are divided into three groups: sensor errors corresponding to mechanism error model variables, δa, δw; motion errors corresponding to propagation error model variables, δp, δv, δq; and motion nominal state variables, p, v, q. Modifications need to be applied to the traditional EKF method to adopt the two-level error model. At the moment, k, the state estimation of the navigation system is divided into two layers: (a) the motion nominal state performs a prediction based on sensor errors of moment k-1 and is updated based on UWB measurements at the moment, k; (b) the motion errors perform a prediction based on their state at the moment, k-1, and sensor errors at the moment, k-1. Additionally, the sensor errors at the moment, k, are predicted by the mechanism error model. The true motion state of the navigation system at the moment, k, is the sum of the motion nominal state and motion errors. The data fusion process is shown in Figure 3. level error model. At the moment, k, the state estimation of the navigation system is divided into two layers: (a) the motion nominal state performs a prediction based on sensor errors of moment k-1 and is updated based on UWB measurements at the moment, k; (b) the motion errors perform a prediction based on their state at the moment, k-1, and sensor errors at the moment, k-1. Additionally, the sensor errors at the moment, k, are predicted by the mechanism error model. The true motion state of the navigation system at the moment, k, is the sum of the motion nominal state and motion errors. The data fusion process is shown in Figure 3.  The state equations with propagation error models in continuous time are as follows: . .
By discretization, (64)-(69) become Additionally, the mechanism error models are where Applying Taylor series expansion and keeping the first order, the state equations finally become where w k−1 = w k−1 a , w k−1 w T , and w a is the associated white noise process of the accelerometer with the known covariance; w w is that of the gyroscope with the known covariance. The state transition matrix F is a 26 × 26 matrix and is calculated as: The derivations in the individual elements of the state transition matrix F can be found in Appendix A. For the noise vectors w a and w w , the noise coefficient matrix G is a 26 × 6 matrix and is calculated by The measurement vector z contains four distances because of the deployment of four UWB base stations. The distance is measured based on the arrival time difference of electromagnetic waves. Additionally, the vector z is given as (83).
where p(k) = [p 1 (k), p 2 (k), p 3 (k)] T , in which subscript (1,2,3) corresponds with the axes (x, y, z). (x i , y i , z i ) make up the coordinate of the i-th UWB base station. The discrete-time measurement equation is given by (85): where H is the measurement coefficient matrix, and r is the measurement noise vector, which is the assumed white noise. The matrix H is derived by (86).
The matrix H d p,4×3 has the form of The algorithm flow of the two-level error model EKF is shown in Algorithm 1. Algorithm 1. Process of two-level error model EKF.

Experiment Results and Discussion
In this section, we discuss the experiment results of the two-level error model EKF method based on the UWB-drone dataset [34]. We present the results in three sections. In Section 4.1, we introduce the dataset used in this paper and present the prefiltering results. In Section 4.2, the parameters in the two-level error model, which need to be acquired beforehand, are shown. Additionally, in Section 4.3, the comparison results of the two-level error model and the basic EKF method are presented.

Dataset Description
The UWB-drone dataset is about UWB-based UAV localization in GNSS-denied environments, and we selected UAV/anchor_in_room_corners to carry out the experiment. This dataset contains UAV IMU information, UWB anchor distance and position and Mocap data as the ground truth. The positions of the x-y planes in relation to UWB and Mocap are shown in Figure 4a, and the distance sequence figure of the four anchors is shown in Figure 4b.

Data Prefiltering Results
The data prefiltering results of the gyroscope are shown in Figure 5, with the accelerometer similarly. From the three-axes raw data figures and their spectrum maps, it can be seen that the raw signals from IMU have obvious fluctuations. After applying two-level wavelet decomposition and reconstruction from the SURE-Shrink thresholding method, the results are shown in Figure 5c,g,k, and the last column of figures corresponds to the spectrum map. The fluctuation of raw signals is significantly reduced after denoising. In the spectrum maps of data after denoising, the high-frequency signal amplitude is significantly weakened.

Dataset Description
The UWB-drone dataset is about UWB-based UAV localization in GNSS-denied environments, and we selected UAV/anchor_in_room_corners to carry out the experiment. T

Data Prefiltering Results
The data prefiltering results of the gyroscope are shown in Figure 5, with the accelerometer similarly. From the three-axes raw data figures and their spectrum maps, it can be seen that the raw signals from IMU have obvious fluctuations. After applying two-level wavelet decomposition and reconstruction from the SURE-Shrink thresholding method, the results are shown in Figure 5c,g,k, and the last column of figures corresponds to the spectrum map. The fluctuation of raw signals is significantly reduced after denoising. In the spectrum maps of data after denoising, the high-frequency signal amplitude is significantly weakened.

Two-Level Error Model Parameter Estimation Results
In the two-level error model, especially the mechanism error model, we need to estimate the parameters

Two-Level Error Model Parameter Estimation Results
In the two-level error model, especially the mechanism error model, we need to estimate the parameters θ = {τ b , σ b , σ w } beforehand. τ b can be obtained by calculating correlation time, while σ b , σ w can be obtained from the Allan variance plot. The dataset UAV/anchor_in_room_corners does not contain long-term IMU stationary data, and the experiment was conducted on a UAV with a Pixhawk2.4 controller whose IMU was MPU6000. Thus, we performed the inertial sensor stationary experiment on MPU6000 for 5 h to obtain static IMU data, and then, we created the Allan variance plot, as shown Figure 6. In this figure, the raw data of a six-axes IMU are plotted in solid lines, and the prediction curves of six-axes data are plotted in fine-dotted lines. σ w is the strength of the rate or the acceleration white noise process and is often termed "angular/velocity random walk", while in Figure 6, this corresponds to the curve with slope −1/2. σ b is termed "bias diffusion" and corresponds to the curve with slope 1/2. The fine-dotted curves are plotted according to the estimated parameters σ b , σ w .

Two-Level Error Model-Based EKF Method Results
We now apply the two-level error model proposed in Section 3 to the UAV dataset. We show that the two-level error model can improve the attitude estimation performance of the fusion algorithm in the UAV motion process by comparing three-axes trajectory plots, which indicate attitude estimation performance, and error figures. The methods we use to compare are the EKF method based on the two-level error model, the basic EKF method and the EKF method based on the data after wavelet denoising. Figure 7 shows the trajectory comparison of three methods in the x, y and z axes. The ground truth is plotted in black lines, and the UWB position is plotted in red lines. The sub-graphs g-i correspond to the EKF method based on the two-level error model; a-c correspond to the basic EKF method; and d-f correspond to the EKF method based on the data after denoising. By comparing d-f with a-c, we can see that the SURE-Shrink wavelet The parameter estimation results are shown in Table 1.

Two-Level Error Model-Based EKF Method Results
We now apply the two-level error model proposed in Section 3 to the UAV dataset. We show that the two-level error model can improve the attitude estimation performance of the fusion algorithm in the UAV motion process by comparing three-axes trajectory plots, which indicate attitude estimation performance, and error figures. The methods we use to compare are the EKF method based on the two-level error model, the basic EKF method and the EKF method based on the data after wavelet denoising. Figure 7 shows the trajectory comparison of three methods in the x, y and z axes. The ground truth is plotted in black lines, and the UWB position is plotted in red lines. The sub-graphs g-i correspond to the EKF method based on the two-level error model; a-c correspond to the basic EKF method; and d-f correspond to the EKF method based on the data after denoising. By comparing d-f with a-c, we can see that the SURE-Shrink wavelet denoising method brings a large performance enhancement to the EKF fusion method, and the mean positioning error is eliminated to 0.457 m from 1.949 m, as shown in Figure 8. At the points where the UAV motion state changes, applying the two-level error model can provide better computational stability, which manifests by less curve fluctuations in the figures-blue widow parts in d-f as examples.  Applying the EKF fusion method based on raw IMU data does not effectively improve the UAV positioning accuracy, even though the UWB positions are quite close to the ground truth, as shown in Figure 7a-c. However, by applying the two-level error model, the fusion positions are closer to ground truth than the UWB positions, as shown partially enlarged in Figure 8. At the beginning of EKF based on the two-level error model fusion, the curve has large fluctuations because the initial gain matrix deviates far from  Figure 9 shows the error figures of the three methods. Applying the EKF fusion method on raw inertial data causes a large error, and the average error of the basic EKF method is 1.949 m. After applying the SURE-Shrink wavelet denoising method, the fusion accuracy is greatly improved, and the average error is eliminated to 0.457 m; the accuracy is improved by 76.6%. After applying the two-level error model, the computational stability is largely enhanced at UAV motion state change points, and the accuracy is improved by 84.3%. Figure 9. Error figure of all three methods, basic EKF ("B" for short), EKF based on data after denoising ("E" for short) and two-level error model EKF method ("T" for short). The mean errors are on the right.

Conclusions
This paper set out to modify the INS-based fusion positioning method by providing generic noise models. In this paper, the IMU wavelet denoising method based on SURE-Shrink threshold was summarized, and the two-level error model was proposed, which includes the mechanism error model and the propagation error model. The mechanism error model was established from stochastic process theory, and the propagation error model was derived from navigation principles; both compensate for the inertial sensor Applying the EKF fusion method based on raw IMU data does not effectively improve the UAV positioning accuracy, even though the UWB positions are quite close to the ground truth, as shown in Figure 7a-c. However, by applying the two-level error model, the fusion positions are closer to ground truth than the UWB positions, as shown partially enlarged in Figure 9. At the beginning of EKF based on the two-level error model fusion, the curve has large fluctuations because the initial gain matrix deviates far from the optimal value. Compared to x and y axes' results of the two-level error model EKF method, the z-axis result has larger fluctuations. The reasons that cause these fluctuations can be divided into two aspects: one is that the UWB positioning accuracy is poorer in the z-axis than the x and y axes, which causes large fluctuations in the UWB position results; the other is that the inertial data in this UAV dataset generally contain much vibration, and these two reasons explain the large fluctuations.  Figure 9 shows the error figures of the three methods. Applying the EKF fusion method on raw inertial data causes a large error, and the average error of the basic EKF method is 1.949 m. After applying the SURE-Shrink wavelet denoising method, the fusion accuracy is greatly improved, and the average error is eliminated to 0.457 m; the accuracy is improved by 76.6%. After applying the two-level error model, the computational stability is largely enhanced at UAV motion state change points, and the accuracy is improved by 84.3%. Figure 9. Error figure of all three methods, basic EKF ("B" for short), EKF based on data after denoising ("E" for short) and two-level error model EKF method ("T" for short). The mean errors are on the right.

Conclusions
This paper set out to modify the INS-based fusion positioning method by providing generic noise models. In this paper, the IMU wavelet denoising method based on SURE-Shrink threshold was summarized, and the two-level error model was proposed, which includes the mechanism error model and the propagation error model. The mechanism error model was established from stochastic process theory, and the propagation error Figure 9. Error figure of all three methods, basic EKF ("B" for short), EKF based on data after denoising ("E" for short) and two-level error model EKF method ("T" for short). The mean errors are on the right. Figure 9 shows the error figures of the three methods. Applying the EKF fusion method on raw inertial data causes a large error, and the average error of the basic EKF method is 1.949 m. After applying the SURE-Shrink wavelet denoising method, the fusion accuracy is greatly improved, and the average error is eliminated to 0.457 m; the accuracy is improved by 76.6%. After applying the two-level error model, the computational stability is largely enhanced at UAV motion state change points, and the accuracy is improved by 84.3%.

Conclusions
This paper set out to modify the INS-based fusion positioning method by providing generic noise models. In this paper, the IMU wavelet denoising method based on SURE-Shrink threshold was summarized, and the two-level error model was proposed, which includes the mechanism error model and the propagation error model. The mechanism error model was established from stochastic process theory, and the propagation error model was derived from navigation principles; both compensate for the inertial sensor errors. We derived the EKF fusion method based on the two-level error model, and the experimental verification was carried out with UWB measurements. The experimental results suggest that applying the wavelet denoising method could largely improve positioning accuracy by 76.6% compared to the basic EKF method. Additionally, applying the two-level error model could further improve positioning accuracy by 84.3% compared to basic EKF. Meanwhile, at the points where the UAV motion state changes, using the two-level error model could provide higher computational stability and less trajectory curve fluctuations.
At the end of the curve for the z-axis in the two-level error model EKF method in Figure 7i, huge data fluctuations exist in the fusion. This is an interesting phenomenon, and we do not consider the case of unknown inputs in the system. This is an issue for future research to explore.