Processing method of acceleration signal with zero drift

An economical and effective method to measure displacement is to integrate the acceleration signal. Because of the zero drift in the acceleration sensor, there will be a trend term in the process of acceleration secondary integration, which will cause some errors in displacement measurement. In this paper, several methods of acceleration signal processing with zero drift are given, and the advantages and disadvantages of these methods as well as the applicable occasions are analysed, which have important reference value for selecting reasonable methods in dealing with engineering problems.


Introduction
In engineering practice, it is often necessary to measure the displacement, but sometimes it is difficult to obtain the displacement signal directly, and the acceleration signal is often easy to obtain, so in engineering, the displacement can be obtained by secondary integration after obtaining the acceleration signal. In large-scale structural health diagnosis, vibration displacement is one of the important indexes reflecting structural health [1,2,3]. At present, the commonly used methods include precision level method, suspension hammer method, static leveling method, integrated grating interference micro displacement measurement method, etc., but constrained by the actual conditions and surrounding environment, vibration displacement measurement is sometimes difficult to obtain, so it is often obtained by measuring vibration acceleration signal integration.
In addition, in the process of mechanical vibration test, when measuring displacement by eddy current sensor, it is difficult to implement in vehicles and other moving machinery due to the inconvenient sensor arrangement, and it is only applicable to metal parts [4]. Inertial displacement sensor can be directly installed on the surface of the measured object, but its measurement frequency range is relatively small, and the mass additional effect is sometimes more significant. The laser speed and displacement sensor can only measure the vibration speed and displacement of the object surface, but cannot measure some hidden positions, and it is not suitable for the vibration measurement of vehicles and other moving machinery.
Some other displacement measurement methods, such as radar, infrared interferometer, need the signal feedback of the measured object [5,6], which causes great trouble to the displacement 2 measurement. Therefore, it is a common method in engineering application to directly measure the acceleration signal and then obtain the displacement signal through the relationship between acceleration and displacement [7].
But there is usually zero drift in acceleration sensor, that is, the theoretical value is 0, but the actual output is not 0. The existence of zero drift will make the acceleration signal produce linear error in the first integration process, and will continue to amplify the error in the second integration process. With the accumulation of time, the displacement measurement error will be large. To solve this problem, there is a time-domain correction algorithm to remove the trend term., high pass filter and numerical integration, FFT transform and frequency domain calculation, empirical mode decomposition and wavelet analysis.
In this paper, the mechanism of the trend term error caused by the sensor zero drift is analyzed by taking a simulated acceleration function as an example. Then the existing methods to remove the trend term are analyzed and compared.

The mechanism of trend term error
Assuming that the sensor has zero drift and the drift value is ξ, the actual measured acceleration is: )' (t a are the measured acceleration and the actual acceleration respectively, and the velocity can be obtained by integrating the acceleration once.
Where η is the constant term after the first integration, and the displacement expression can be obtained after the second integration.
Where a is the constant term after the second integration. From the above formula, we can see that the velocity error after the first integration is t  , and the displacement error term after the second integration is This error increases sharply according to the square of time.

Time domain correction algorithm for removing trend term
Time domain correction algorithm is based on the method of numerical integration [8] (trapezoidal formula, Simpson formula, Newton Cotes formula, etc.) to get the discrete velocity value from the discrete acceleration value. At the same time, it is assumed that the zero-drift value of the sensor is a constant, and the velocity value obtained by one-time integration of the acceleration value has linear trend term error, so the least square principle is used to fit the linear equation Then, the measured velocity value is subtracted from the corresponding value of the fitting curve to obtain a relatively accurate velocity value. Similarly, the displacement value obtained by quadratic integration can be fitted 3 by quadratic curve, and the relatively accurate displacement value can also be obtained. The least square method can eliminate the trend term well, but it needs to predict the type of the trend term first. In the case of lack of prior knowledge, it is difficult to achieve the ideal effect.

Method based on high pass filter and numerical integration
The method based on high pass filter and numerical integration is to get the acceleration signal, then go through the high pass filter and then go through a numerical integration to get the velocity signal, then go through a high pass filter to remove the trend term to get the available velocity signal, and then go through an integration to get the displacement signal, and then go through a high pass filter to remove the trend term to get the available displacement signal [9]. The calculation results of this method are usually quite different from the theoretical values due to the calculation errors caused by the transition band of the filter and the repeated use of the filter.

Method based on FFT transform and frequency domain calculation
The method based on FFT transform and frequency domain calculation is to transform the acceleration signal from time domain to frequency domain. First, the acceleration signal is processed by FFT to get the frequency spectrum of DFT, then the data outside the frequency range of interest is set to 0, and then the velocity spectrum is obtained by dividing  j , and then the time domain velocity signal is obtained by IFFT. After filtering, the acceleration spectrum is divided by the displacement spectrum, and the displacement signal in time domain is also obtained through IFFT [10,11]. This method does not need to predict the error model of trend term in advance, so FFT based frequency domain calculation method will be selected in many engineering applications. However, there will be leakage in FFT. Increasing the data length and using appropriate window function can improve the leakage to a certain extent. In addition, the method based on FFT transform and frequency domain calculation needs to collect data for a period of time before operation, and the amount of calculation of the data causes a large CPU overhead, so it is not suitable for the occasions with high real-time requirements, and it is suitable for offline data processing. However, the accuracy of this method is higher than that of time domain correction method and numerical integration method based on high pass filter.

Wavelet analysis
Wavelet analysis is a time-frequency analysis method that approximates the signal with wavelet basis function. Wavelet basis function is used to decompose the signal to realize the separation of directional signal and zero mean stationary random signal [12]. Wavelet basis function is a set of function sequences generated by scaling and translation of finite length or fast decaying wavelet functions. The commonly used method to construct wavelet basis function is Mallat algorithm based on multi-resolution analysis theory. In this algorithm, scale function and wavelet function are used to decompose and reconstruct the signal according to the tower structure. Different wavelet basis functions have different ability to eliminate the trend, so the key of wavelet analysis is to find the optimal wavelet basis function. Therefore, the general method is to determine the applicability of wavelet basis function by comparing the actual effect of various wavelet basis functions in signal processing, and the evaluation method is to calculate the detrended error index of wavelet basis function [13]. Therefore, the important premise of this method to remove the trend term is to select the appropriate wavelet basis function to decompose the signal.

Empirical mode decomposition
EMD method decomposes the signal according to the time scale characteristics of the data itself, and does not need to set the basis function in advance. This is essentially different from the Fourier decomposition and wavelet decomposition methods based on the prior harmonic and wavelet basis functions. EMD decomposition method assumes that the signal is composed of a group of natural vibration modes, and decomposes the signal into the sum of several intrinsic mode functions (IMF).These natural vibration modes can be either linear or nonlinear, that is, they can be stationary or non-stationary [14,15]  the time delay between the adjacent extreme points of the signal itself Because of this characteristic, EMD method can be applied to any type of signal decomposition in theory, so it has obvious advantages in dealing with non-stationary and non-linear data. Therefore, EMD method has been widely used in engineering.

Conclusion
Based on the application background of measuring acceleration signal integral to obtain displacement, this paper analyzes and explains that the zero drift of acceleration sensor will cause the trend term error of calculated displacement. On the problem of removing the trend term error, five common methods of removing the trend term are introduced. The analysis shows that the time-domain correction algorithm for removing trend term is only suitable for the case that the sensor's zero drift value is a constant. Although it can eliminate the trend term error well in theory, the effect is not good in engineering application. The method based on high pass filter and numerical integration has not been widely used in engineering because of the large calculation error caused by filter transition band and multiple use of filter, especially when there is more clutter in the signal. The method based on FFT transform and frequency domain calculation has achieved good results in some engineering applications, but its calculation is large and the real-time performance of displacement measurement is not high. If we want to further improve the accuracy, the leakage in the process of Fourier transform should be considered. The advantage of wavelet analysis is that there is no need to know the error type of trend term, and the wavelet basis function is used to separate the trend signal from the zero mean stationary random signal. However, the ability of wavelet analysis to remove the trend term signal can be improved by selecting the appropriate wavelet basis function. EMD method is also used to decompose the signal, but it does not need to find the optimal basis function. Theoretically, it can decompose any form of signal. Especially, it has obvious advantages in processing stable and nonlinear data, so it has a wide range of engineering application.