Research on adaptive modulus maxima selection of wavelet modulus maxima denoising

: Microelectromechanical system (MEMS) accelerometers are small in size, low in power consumption and easily integrated. They can be used in intelligent hydraulic components to obtain the dynamic acceleration of the system and monitor the operating status of the system. In this study, based on the noise characteristics of MEMS accelerometer output signals, a wavelet modulus maxima denoising algorithm based on adaptive threshold estimation is proposed, in which SureShrink threshold estimation is used to choose the right modulus maxima. Then, the signal-to-noise ratio and mean-square-error are used as the evaluating indices of the denoising performance for the wavelet modulus maxima denoising based on SureShrink threshold estimation, the wavelet modulus maxima denoising based on BayesShrink threshold estimation and the normal wavelet modulus maxima denoising. The simulation results show that the wavelet modulus maxima denoising based on SureShrink threshold estimation has better denoising performance than the normal modulus maxima denoising and the wavelet modulus maxima method based on BayesShrink threshold estimation, and effectively eliminates the noise of MEMS accelerometer output signals.


Introduction
When studying the impact performance of the alternating impact mechanism, the dynamic speed and displacement signal of the impact mechanism are often required. However, in many cases, it is difficult to obtain the speed signal and displacement signal of the impact mechanism, and even it cannot be directly obtained through measuring. Even if it can be measured by precision instruments, there are still problems such as high cost, difficulty in installation of the test device, and being easily damaged. The commonly used methods include stress wave method, high-speed photography method, photoelectric displacement differential method, electromagnetic induction method, contact method, dynamometer chart method and gas pressure method etc [1]. Such methods cannot directly measure the speed and displacement of the impact mechanism. It is also very difficult to monitor the impact of the impact mechanism in order to obtain the speed and displacement of the impact mechanism under actual working conditions. With the wide application of low-cost microelectromechanical system (MEMS) accelerometers, it is an effective method to obtain acceleration signals by using small measuring devices with integrated MEMS sensors and microcontrollers, and then integrate the acceleration to obtain the velocity and displacement of the impact mechanism [2].
The random drift characteristics of MEMS accelerometers often show weak non-linearity, non-stationary and long-term correlation [3], so the acceleration signals acquired in measurement are mixed with a large amount of random noise. Since the random noise of the MEMS accelerometer is mainly consisted of the fractal noise (1/f noise) and mechanical thermal noise which present different statistical characteristics from the signal after wavelet transform, and the wavelet analysis decomposes the non-stationary process into a series of stationary processes [4], these features can be used to perform threshold estimation on the wavelet transform modulus maxima while filtering the modulus maxima of the signal and removing the modulus maxima of noise at each level. Finally, the wavelet transform coefficients are reconstructed by the remaining modulus maxima and the wavelet inverse transform is performed to obtain the denoised signal.

Mathematical model of MEMS accelerometer output signal
Considering the drift, scale factor error, installation error and other factors, the mathematical model of accelerometer output error is expressed as [5] where u(t) is the MEMS accelerometer output value, u 0 (t) is the MEMS accelerometer drift, r(t) is the true acceleration value and S k is the scale factor for MEMS accelerometer. The drift of the accelerometer in the model consists of constant drift of the MEMS accelerometer and circuit noise. The drift of the accelerometer is where x d (t) is the zero offset value of each axis of the MEMS accelerometer and a time-varying variable and e(t) is circuit noise. The circuit noise includes not only the mechanical-thermal noise of a series of identically distributed zero-mean non-correlated white noise random variables, but also the noise generated by the Brownian motion of the detection mass, i.e the fractal noise and the variation of the temperature due to the change of the ambient temperature or the heating of the sensor. The main noise sources of MEMS accelerometers are mechanical thermal noise and fractal noise in the case of little temperature change.
The purpose of denoising is to obtain an approximation signal of the useful signal from the signal containing the noise, and at the same time make the approximation signal the best approximation of the useful signal under a given error criterion. Traditional signal detection theory such as correlation detection, matched filtering etc. can achieve good results in extracting useful signals from signals containing white noise. If the signal containing noise has fractal noise with local self-similarity and long correlation, it is very difficult for traditional signal detection theory to detect useful signals. The characteristics of the fractal noise's dyadic wavelet transform coefficient are studied detailed in the literatures [6,7]. It is pointed out that the wavelet transform coefficient of fractal noise is fractional white noise at each level. This transforms the long correlation fractal noise into white noise and superimposes it on the original white Gaussian noise will form generalized Gaussian white noise. Therefore, it is feasible to eliminate the noise component in the output signal of MEMS accelerometer by using wavelet denoising and the characteristics of the noise wavelet transform coefficient in the output signal of the MEMS accelerometer.

Wavelet modulus maximal reconstruction denoising principle
The Lipschitz exponent of the signal at a certain point characterises the abrupt change. The larger the Lipschitz exponent, the higher the smoothness of the point. The smaller the Lipschitz exponent, the greater the singularity of the point. The singularity of the signal can also be detected by tracking the modulus maxima of the wavelet coefficients of the signal, and it can be shown that the Lipschitz exponent of the common signal is > 0, while the Lipschitz exponent of the white noise is < 0 [8].
When the Lipschitz exponent is >0, the wavelet transform modulus maxima increase with the wavelet decomposition level; when the Lipschitz exponent is <0, the wavelet transform modulus maxima decreases as the level decreases. Therefore, the wavelet transform modulus maxima generated by the signal increases as the level increases when the modulus maxima generated by the noise becomes smaller as the level becomes larger. As a result, the wavelet transform modulus maxima at the maximum decomposition level is mainly generated by the signal. The wavelet modulus maxima denoising uses this rule and the characteristics of wavelet transform coefficient for noise to process the wavelet transform coefficients obtained after the wavelet transform. So after removing the wavelet transform coefficient modulus maxima of the noise in the maximum level, we can construct a proper neighbourhood centred on the modulus maxima point of the wavelet transform coefficients on the maximum level, and use this neighbuorhood to gradually determine the wavelet transform modulus maxima point of the signal on the neighbouring smalllevel wavelet transform coefficients. Finally, the signal is reconstructed according to the remaining modulus maxima points, which will reduce the noise.

Improved wavelet modulus maxima denoising algorithm
Accurately obtaining the wavelet transform modulus maxima points requires constructing a neighbourhood around the modulus maxima points to perform a modulus maxima tracking. Therefore, constructing an effective neighbourhood is an important factor that affects the tracking speed. In order to improve the efficiency in tracking the wavelet transform modulus maxima of useful signal, this paper considers using wavelet shrinkage to remove the modulus maxima corresponding to some noises, and then track the modulus maxima points at each level according to the wavelet modulus maxima propagation of the signal. The wavelet thresholds at each level are estimated based on the wavelet coefficient distributions of signals and noise at different levels. The thresholds are used to get the wavelet transform modulus maxima of the signal, reduce the number of neighbourhoods to be tracked and appropriately control the range of effective neighbourhoods, which can improve tracking efficiency.

Adaptive modulus maximum selection:
The commonly used wavelet threshold selection principles are the following four: VisuShrink threshold, SureShrink threshold, Maximum-minimum criterion threshold, and BayesShrink threshold. SureShrink thresholds and BayesShrink thresholds are wavelet threshold estimation criteria that can determine thresholds based on wavelet coefficients at each level. Considering that the wavelet coefficients of noisy signals obey the generalised Gaussian distribution on different levels, BayesShrink thresholds determine the wavelet threshold, which is an adaptive threshold of the wavelet coefficients that varies with different levels. The SureShrink threshold gives a Stein unbiased risk estimation of the threshold after the wavelet coefficients of the observation data are obtained and the wavelet coefficients processed by the given threshold quantisation function. This threshold should minimise the error of the wavelet coefficients processed by the threshold function under the terms of mean square error and the wavelet coefficients of the original observation data.
The mathematical model of noisy signals is The wavelet coefficient U obtained after wavelet decomposition is the wavelet coefficient of the noisy signal u 0 (t), E is the wavelet coefficient corresponding to the noise e(t), E ∼ N(0, δ 2 ), and X is the wavelet coefficient obtained after wavelet decomposition of x d (t).
The BayesShrink threshold estimation: The GG σ X , β is Also Γ(t) = ∫ 0 ∞ e −u u t − 1 du is the gamma function, β is the shape parameter and σ X is the standard deviation of the wavelet coefficient at a certain level.
To obtain smaller Bayes risk, we use soft-threshold quantisation function to process wavelet coefficients. The soft-threshold quantisation function η T (U) = sgn(U) ⋅ max ( U − T, 0) takes the argument and shrinks it towards zero by the threshold T.
The adaptive threshold is estimated under the Bayes risk minimisation principle, that is, a threshold T that minimises the Bayes risk is obtained for a given set of parameters.
The Bayes risk is The optimal threshold obtained by this risk function is The literature [9] gives the approximate solution to the optimal threshold where σ j is the wavelet coefficient of the noisy signal and σ X ji is the standard deviation of wavelet coefficients in a sliding window that is centred on position i and has length k in level j.
Noise standard deviation [10] σ j is Estimated value [11] of σ X ji is where U jk is the wavelet transform coefficient of k points in the window on the level j of the noisy signal. SureShrink threshold estimation: The error function is is an estimate U of the signal X based on observations. So g(U) is a function from R N into R N and is weakly differentiable. The threshold estimation based on SURE [12] is The soft-threshold quantisation function η T (X) = sgn(X) ⋅ max ( X − T, 0) chosen in this paper has non-conducting points and the literature gives an unbiased estimated of risk: ξ(X, X) as We use such an unbiased estimated of risk to select the threshold according to the sequence of observations, which is T x = arg min y ∈ {y 0 , y 1 , y 2 , …, y N − 1 } ξ(X, X) .

Algorithm design:
(i) Signal decomposition: Select appropriate wavelet bases to carry out discrete binary wavelet transform on the noisy signal to get wavelet coefficients of each level. The selected level should make the number of modulus maxima points of the signal dominant at the maximum decomposition level, and the important singularity of signal is not lost.
(ii) Wavelet coefficient threshold quantification: Use the selected threshold estimation rule to find the wavelet threshold corresponding to the wavelet transform coefficients on each decomposition level, and use the corresponding threshold quantisation function to perform threshold quantisation on the wavelet coefficients; (iii) Wavelet coefficient modulus maxima tracking: Find the modulus maxima points of the wavelet coefficient on the maximum level, construct the neighbourhood, and then track for the modulus maxima propagation points on the level j − 1 in the neighbourhood, and the propagation points for the non-modulus maxima were set to zero; (iv) The step (iii) is performed on the wavelet coefficients from the level 1 to the level j − 1; After the processing of the above steps, a new wavelet modulus maxima points of the signal containing noise is obtained. It is necessary to reconstruct the wavelet coefficients before using the modulus maxima of wavelet coefficients to recover the signal. Due to the alternating projection method proposed by Mallat is complex in the reconstruction of wavelet coefficients, the calculation speed is slow, and a large number of oscillations of the reconstructed wavelet coefficients occur, resulting in a large amount of noise in the reconstructed signal. In this paper, cubic hermite interpolations are used to reconstruct the wavelet coefficients, and finally a binary wavelet inverse transform is used to obtain denoised signals.

Simulation
In order to quantitatively analyse the effectiveness of the improved algorithm, we choose two evaluating indices to measure the denoising effect of the signal with noise and check whether the improved algorithm is better than the traditional method: the signal-to-noise ratio (SNR) of the reconstructed signal, and the mean-squared-error (MSE) of the reconstructed signal and the real signal.
The formulas for the SNR and the mean square error are where f (i) is the original signal value of the ith point; f^(i) is the ith value after being denoised. Before using MATLAB to perform numerical simulation experiments, the two test signals: Bumps and Blocks provided by MATLAB are added noise. The noise mainly includes fractal noise and Gaussian white noise. The fractal noise is generated by the method provided by the literature [8]. The input signal is where s(n) is Bumps or Blocks, x(n) is fractal noise and w(n) is Gaussian white noise with a variance of 1. The sampling points are 1024 points. (Fig. 1) Considering the filtering performance and the programme running time comprehensively, this paper uses orthogonal and tightly supported Daubechies wavelets. Both the wavelet transform and the inverse transform can be implemented in a simple matrix linear orthogonal transform, suitable for late real-time system programming. Simulation experiments show that the signal is seriously distorted when Daubechies wavelet decomposition layer exceeds three levels. In order to obtain a good denoising performance, the Daubechies wavelet with different vanishing moments is used in the same decomposition level and the appropriate wavelet base is selected according to the MSE of the Bumps signal after denoising. As shown in Table 1, when the number of decomposition level is 3, the minimum MSE value can be obtained using the Daubechies 6 wavelet base.
The normal wavelet maxima denoising, the wavelet maxima denoising based on adaptive BayesShrink threshold estimation and the wavelet maxima denoising based on adaptive SureShrink threshold estimation were, respectively, used to denoise the signal with noise. The results of denoising for Bumps, which has been added noise, are shown in Fig. 2.
Compared with the normal wavelet modulus maxima denoising, the wavelet modulus maxima denoising based on adaptive BayesShrink threshold estimation or based on adaptive SureShrink threshold estimation obtain higher SNR and smaller MSE. The noise removing results obtained by the wavelet modulus maxima denoising based on the two adaptive thresholds estimation have higher smoothness. We find that the wavelet modulus maxima denoising based on adaptive SureShrink threshold estimation showed in subfigure c preserves the singularity of the original signal more effectively than the wavelet modulus maxima denoising based on adaptive BayesShrink threshold estimation showed in subfigure c.
The MSE from the various methods applied on Bumps, which has been added noise, is compared in Table 2. The data are collected from an average of five runs.
The results of denoising for Blocks, which has been added noise, are shown in Fig. 3. Among the results obtained by denoising the noisy Blocks signal by different methods, the signal obtained by the wavelet modulus maxima denoising method based on adaptive SureShrink threshold estimation has the lowest MSE and the highest SNR.
Since the wavelet modulus maximum denoising method based on adaptive BayesShrink threshold estimation loses too many signal singular points, the resulting signal is excessively smooth and the denoising effect is poor.   The MSE from the various methods applied on Blocks, which has been added noise, is compared in Table 3. The data are collected from an average of five runs.

Test results
In order to verify the performance of the modulus maxima denoising algorithm based on the adaptive threshold estimation on the noise removal of the MEMS accelerometer output signal, this paper denoises the data acquired by the data acquisition node based on MEMS accelerometer in the static state and the simple working condition, respectively.
The Z-axis of the data acquisition node is placed vertically on the workbench, and a certain amount of data is collected at a sampling frequency of 400 Hz in a static state, and then the data is denoised to test the denoising performance of the algorithm on the output signal noise of the MEMS accelerometer (Fig. 4).
The data acquisition node is installed on the front end surface of the reciprocating linear motion hydraulic cylinder piston rod, and a certain amount of data is collected at a sampling frequency of 400 Hz, and then the data is denoised to test the denoising performance of the algorithm under simple working conditions (Fig. 5).

Conclusion
According to the mathematical model and noise characteristics of MEMS accelerometer output signal, combined with adaptive threshold estimation and wavelet modulus maximum denoising, a wavelet modulus maxima denoising algorithm based on adaptive threshold estimation is proposed. Simulation and experimental results show that the wavelet modulus maxima denoising based on adaptive SureShrink threshold estimation can better remove the noise component in the output signal of MEMS accelerometer and preserve the singularity in the signal. This is because the wavelet coefficients of the fractal noise and mechanical-thermal noise contained in the MEMS accelerometer output signal present different statistical characteristics and variation laws from the wavelet coefficients of the signal after wavelet multi-scale decomposition. According to the statistical characteristics and variation laws of noise, the algorithm can achieve the separation of signal and noise well, and has a good effect on the noise removal of the output signal of MEMS accelerometer.