A Statistical Approach for Optimal Order Adjustment of A Moving Average Filter
Rodrigo Gonzalez, GridTICs, National University of Technology, Argentina; Carlos A. Catania, ITICS, National University of Cuyo, Argentina
The moving average (MA) filter is a smoothing filter well-known in the navigation community. The MA filter is extensible used to de-noise inertial sensors signals. The use of MA performs a smoothing of the input signal, effectively reducing the level of short-term fluctuations. MA operates by averaging a predefined number of points from the input signal within a window time to produce one point in the output signal. MA can be seen as a window time that moves along the input signal performing a local average.
From a theory point of view, an MA filter is a finite-impulse filter with N coefficients, where each one has a value equal to 1/N. N defines the order of the filter. The convolution between the input signal and the MA kernel acts as a time-domain low-pass filter that smooths out short-term variations and, consequently, reduce the noise in the input signal. This type of noise is commonly modeled as white noise.
The value of N is the only parameter needed to adjust the smoothing effect of an MA filter. N and the sample time of the input signal will determine the duration of the time window of the filter. It is known that a bigger N will tend to remove more noise in the input signal, but this approach has certain limitations, since a bigger N will also tend to flat the original signal, producing a notable distortion.
Thus, the number of coefficients should be set carefully. Moreover, the digital signal processing theory behind MA filtering does not provide a formal method to determine N. Therefore, a navigation system designer must choose a value of N based on his/her previous experience.
Another issue with the MA filtering technique is that only provides good results on pseudo-static trajectories. In the case of kinematics trajectories, MA assumes that the vehicle dynamics remain constant during local average calculation, a situation that may not be always true. Thus, the dynamics of the vehicle has to be taken into account to choose the value of N as well.
In this work, the authors propose a novel approach to determine the value of N. The method consist of optimally adjusting the number of coefficients of an MA filter by comparing two signals, one coming from an MA-filtered low-cost inertial sensor, and another coming from a high-end inertial sensor, both for the same trajectory. The tuning stage starts with a small N and increments it by some predefined step. For each new N, the root mean squared error (RMSE) between both signals is calculated. The process is repeated until N reaches a predefined and sufficiently large value. Finally, the optimal N is determined by following an statistical significance analysis of the residual RMSE among all found values. An Analysis of Variance (ANOVA) test is used for checking the significant differences on all the resulting N.
The dataset used in this work was generated during a real-world trajectory. Several mid- and low-range inertial measurement units (IMU) and one navigation-grade IMU were mounted on a ground vehicle and logged for about 24 minutes. The dataset is divided in two parts, one part for the adjusting stage and another for evaluating the optimal MA filters on unseen data. This proposed method is compared with the approach for fixing the value of N according to the vehicle dynamics.
Preliminaries results expose some interesting conclusions. Firstly, the values of N for different inertial sensors in the same IMU are not the same. This scenario is not the common MA filter design approach, where the same N is used for all IMU's sensors. Secondly, the proposed technique sets a lower value of N when compared to the common approach.
In conclusion, this proposed technique can provide a practical solution to determine the optimal order of the window time of an MA filter.