# A Tutorial for Feature Engineering in the Prognostics and Health Management of Gears and Bearings
## 3 Feature Extraction
### Features for Gears  
In feature engineering for gears, several signal processing steps are usually taken and appropriate features are extracted from each step that enable fault identification from the normal. This is explained in Figure 3, which indicates that the raw data are processed step by step, and after each step, relevant features are extracted. The signal in the time domain and its Fourier transform in the frequency domain are also illustrated. Note that the features are divided into two groups: general features, which are the time domain features shown by the blue dotted box, and specific features for the gears as shown by the red dotted box. Note that the latter have been developed specifically for gears, for improved capability of fault diagnosis as found in many articles in the literature (e.g., [18; 19; 20; 21]). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Name of Dataset** & **Data Type** & **Sensor Type** & \multicolumn{3}{c}{**Number of Dataset**} \\ \hline HS (Gear) [14] & Diagnosis & Acceleration & \multicolumn{2}{c}{Normal} & Fault \\  & & & 6 & 11 \\ KAUG (Gear) & Diagnosis & Encoder & \multicolumn{2}{c}{Normal} & Spall & Crack \\  & & & 10 & 10 & 11 \\ CWRU (Bearing) [15] & Diagnosis & Acceleration & \multicolumn{2}{c}{Normal} & Inner & Outer \\  & & & 10 & 10 & 10 \\  & & & & 3 & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Dataset explanation. Figure 3: Features extraction process for gears. As shown in Figure 3, the raw signal includes the shaft and GMF frequencies (and their harmonics) as well as the noise existing at the low frequencies in the frequency spectrum. The first step is to remove these unnecessary signals, by the time synchronous averaging (TSA) and high pass filtering (HPF). TSA is to average out the signal over each revolution to remove random noise occurring during the rotation, which can be executed by the Matlab built-in function \(x=\textit{tsa}(x,\textit{fs},\textit{tach},\textit{'PulsePerotation'},\textit{ppr})\), where _fs_ is the sampling frequency, _tach_ is the tachometer signal, and _ppr_ is _PulsePerotation_. HPF is done to remove the low frequency components including the shaft and its harmonic frequencies, which are irrelevant to the gear fault. HPF first determines the filter parameters which are executed by the Matlab built-in function \([\textit{b},\textit{a}]=\textit{butter}(\textit{ord},\textit{Wn},\textit{' high'})\), where _ord_ is the filter order, and _Wn = \(\textit{sff}(\textit{fs}/2)\)_ is the Nyquist frequency, which is the shaft frequency _sf_ divided by _fs_/2. The filtering is then performed by \(x=\textit{filter}(\textit{b},\textit{a},\textit{x})\). In this study, the filter order is given by 1. As the order increases, the filtering becomes sharp, which improves the passing performance, but decreases group delay characteristics, causing phase distortion. Hence, the filter order should be properly selected. In this paper, filter order is given by 1 among the values 1 to 3 often used in the filtering. After this step, 11 time domain features are extracted, which are explained in Table 2. Recall that the time domain features can be extracted either from the raw signal directly or after taking this step depending on the problem. The Matlab function to extract the time domain features is given in Appendix A as _[feature, feature_name] = TimeFeatures(x)_, where _feature_ and _feature_name_ are the array of feature values and their names, respectively. Figure 4 is the result of extracted time domain features for the example of HS gear dataset: 6 normal and 11 fault data, in which the acronyms are found in Table 2. Note that each set of feature data is normalized by mean and standard deviation, respectively. In the result, most of the features classify the fault (x) from the normal (o) well, but some (SK and SF) do not, which means that further processing is necessary to select only the useful features.