# A Tutorial for Feature Engineering in the Prognostics and Health Management of Gears and Bearings
## 3 Feature Extraction
### Features for Bearings  
Figure 6 illustrates the typical features extraction process in the bearings PHM, of which the basic philosophy is the same: carry out the signal processing steps to remove unnecessary signal or noise. In general, the bearing signal consists of the discrete (predictable) part, which is irrelevant to the fault since it is from the other components such as the shaft or gears, and the remaining (unpredictable) part. With this in mind, the first step is to remove the discrete signal by using the autoregressive (AR) filter, which is to obtain the discrete part of the signal based on the past data for a certain period. Then the residual part of the signal, which may include the fault information, is obtained by subtracting this from the raw data. In the figure, this usually corresponds to the removal of the low frequency components in the frequency domain. The discrete signal is made by the AR model:  
\[x_{p}(n)=-\sum_{k=1}^{p}a(k)x(n-k). \tag{9}\]  
where \(x\) is the raw signal, \(x_{p}\) is the discrete (predicted) signal, \(n\) and \(k\) are the indices in time, \(a(k)\) and \(p\) are the parameters and order of the AR model, respectively. The residual signal is then obtained by  
\[e(n)=x(n)-x_{p}(n). \tag{10}\]  
The AR model is obtained by Matlab built-in functions \(a=\textit{argule(x,p)}\) followed by \(xp=\textit{filter([0 -a(2:end)],1,x)}\). Note here that the order \(p\) should be assigned carefully since it affects the performance greatly: too high may include even the fault signal, too low may lose the periodicity in the prediction. In general, the order \(p\) is determined such that the kurtosis of the residual signal is maximized. General time domain features are extracted from the residual signal as depicted by the blue dotted box. After removing the discrete signal with the AR filter, the next step is the demodulation of the signal. Whenever the fault exists in the race or elements, the bearing produces impact (fault) signals with a certain period called bearing fault frequencies. However, it is usually amplitude-modulated by much higher resonant frequencies, as found in Figure 6, which means that the fault signal is buried by the resonance signals. In order to separate the fault signal from this, envelope analysis, also called the demodulation process [13], is carried out to extract the amplitudes modulated by the carrier (resonance)  
Figure 6: Features extraction process for bearing. signal. To this end a Hilbert transform is conducted, to shift the phase by \(-90\) degrees. Then the so-called analytic signal is defined by extending the real signal to the imaginary dimension as follows:  
\[x_{analytic}(t)=x(t)+j\hat{x}(t), \tag{11}\]  
where \(\hat{x}(t)\) is the Hilbert transformed signal. The envelope signal is then obtained by calculating the magnitude \(x_{analytic}(t)\) by using the Matlab built-in function \(x\) = _abs_(_Hilbert(x)_). As a result, the signals of resonant (higher) frequencies are removed in the envelope signal, and only those of the bearing fault (lower) frequencies remain in the frequency domain as shown in the figure, from which the bearing-specific features can be extracted. The bearing fault frequencies can be identified by the bearing geometry as shown in Figure 7. Bearings consists of inner, outer race and balls or rollers. If one of them includes the defect, the bearing produces signals at the specific frequencies while it rotates and passes through the defect.