# Feature Extraction of Bearing Weak Fault Based on Sparse Coding Theory and Adaptive EWT
## 2 Sparse Coding Algorithm Based on Optimized LWD and FSS
### Laplace Wavelet Dictionary and Parameter Determination  
As the analysis dictionary has the characteristics of high precision in signal sparse representation and is resistant to interference by noise, it can achieve signal denoising and reconstruction. In this way, combined with EWT (EWT theory is described in the next section), a mathematical model is used to build a sparse dictionary. By analyzing the rotating dynamic model of a bearing with a pitting or spalling fault, the real part of the Laplace wavelet [21] is the best match, and the real part of the wavelet has similar attenuation properties to the impulse response waveform. Its analytical expression is:  
\[\psi(f,\varepsilon,v,t)=\psi_{r}(t)=e^{\frac{-2\pi v}{\sqrt{1-\varepsilon^{2} }}/(t-v)}\cos[2\pi f(t-v)],t\in[v,v+w_{s}] \tag{4}\]  
where \(r=\{f,\varepsilon,v\}\) is the parameter vector, \(f\) is the resonance frequency of the system excited by the fault shock, \(\varepsilon\in(0,1)\) is the viscous damping ratio, which indicates the damping attenuation characteristics of the shock response, \(v\) is the time shift, and \(w_{s}\) is the width of the atomic support interval.  
The parameter \(w_{s}\) can be determined by the duration of a single shock response. Assuming that \(f_{s}\) is the frequency of signal sampling, and \(f_{p}\) is the characteristic frequency of the fault signal, and \(w_{s}\) is determined by the formula as:  
\[w_{s}=round(f_{s}/f_{p}) \tag{5}\]  
The morphological parameter \((f,\varepsilon)\) of a wavelet atom can be obtained by combining EWT. The EWT decomposes the signal initially to get a series of components. The component containing the periodic impact component is selected, and its frequency band is analyzed. It can be seen that the shock signal is modulated to one or more resonance bands, and the median frequency or peak frequency corresponding to each band is taken as the value of the morphological parameter f. At the same time, the selected components are used as the input signals of the sparse coding algorithm-that is, the initial noise reduction is realized.  
In practical engineering applications, a bearing is usually a small damping system, that is, the damping ratio \(\varepsilon\) is in the order of \(10^{-2}\), and the size of \(\varepsilon\) is also less affected by the speed. By analyzing a large number of bearing vibration signal data and comparing the results, it is found that the damping ratio can achieve good results if it is within the range [0.05, 0.15]. At the same time, in the same bearing, the attenuation characteristics of its components are similar, so different faults can take similar damping ratios. In addition, the value of the damping ratio must ensure that the atom attenuates to zero within its own length.  
The characteristic morphological parameters \(\left(\overline{f},\overline{\varepsilon}\right)\) corresponding to the measured signal can be obtained by the above method, and the basis function of sparse dictionary \(D\) can be obtained by bringing the parameter values to Equation (4). Then, the basis function is expanded according to different time shift parameters, and an overcomplete dictionary is obtained. Here, the value of \(u\) is the reciprocal of the sampling frequency, and overcomplete sparse dictionary \(D\) is:  
\[D(t,v)=\left\{\psi\left(\overline{f},\overline{\varepsilon},v,t\right) \right\},v\in\left\{\frac{1}{f_{s}},2.\frac{1}{f_{s}},\cdots,N\frac{1}{f_{s}}\right\} \tag{6}\]If multiple components were selected, dictionary \(D\) can be defined as:  
\[LD=\begin{cases}LD_{1}(t,\
u)=\left\{\psi_{1}\Big{(}\overline{f}_{1},\bar{\epsilon }_{1},v,t\Big{)}\right\};\\ LD_{2}(t,v)=\left\{\psi_{2}\Big{(}\overline{f}_{2},\bar{\epsilon}_{2},v,t\Big{)} \right\};\quad v\in\left\{\frac{1}{f_{s}},2\cdot\frac{1}{f_{s}},\cdots,N\frac{ 1}{f_{s}}\right\}\\ \qquad\qquad\vdots\end{cases} \tag{7}\]