# Mechanical Fault Prognosis through Spectral Analysis of Vibration Signals
## 2 Key Algorithms Based on Spectral Analysis
### Fault Prognosis Algorithm  
In this subsection, we describe in detail a fault prognosis algorithm that makes use of the above spectral analyses. We divide the fault prognosis into simple prognosis and precise prognosis. In this paper, we first use simple prognosis, that is, we compare the statistics on the time domain of the vibration signals (acceleration, velocity, and displacement) with the preset thresholds, then determine whether the equipment is malfunctioning according to whether the measured values exceed the thresholds given by the standard, in order to decide whether further precision prognosis is needed. The simple prognosis standard here means that the vibration of the same part of the equipment is monitored for a long time, and the vibration value in the normal state of the equipment is used as the standard value (reference value). The standard value is then multiplied by an appropriate empirical coefficient, which is the threshold value. The precision prognosis process here is very complex. Let us take the bearing detection as an example. We can use the vibration signal waveform and its autocorrelation waveform in the time domain, combined with the frequency spectrum, envelope spectrum, and cepstrum in the frequency domain to roughly distinguish that the fault appears on the outer ring, inner ring, or ball of the bearing. Especially in the frequency domain, the frequency spectrum will appear significantly different for different faults. The information on the time-frequencydomain combined with deep learning and artificial intelligence may yield a more accurate fault prognosis. This step is not yet realized and is also our future research. Multiple TCP messages are received from the data acquisition unit and parsed to collect vibration acceleration sequence, \(\mathbf{a}=\{a_{0},\cdots,a_{N-1}\}\), from a sensor within a time period. Its spectrum sequence, \(\mathbf{A}\), is obtained by applying FFT with \(N\) nodes. In order to obtain the corresponding velocity and displacement sequences, \(\mathbf{v}\) and \(\mathbf{d}\), from the acceleration sequence \(\mathbf{a}\), the first-order and second-order digital integrations are applied, according to (6) and (7), respectively. Thus, the time-domain statistics, such as the maximum \(\mathbf{x}_{max}\), minimum \(\mathbf{x}_{min}\), and effective value \(\mathbf{x}_{rms}\) of a sequence \(\mathbf{x}\), are calculated to evaluate the impact force or energy of the vibration signal, where \(\mathbf{x}\in\{\mathbf{a},\mathbf{v},\mathbf{d}\}\). Since envelope spectral analysis can be used to effectively demodulate and extract the low-frequency vibration signal, the envelope spectrum \(\mathbf{B}_{\mathbf{x}}\) is calculated by (20) to evaluate the modulation information. The cepstrum of a sequence \(\mathbf{c}_{\mathbf{x}}\) is calculated by (23) to detect the periodic components on its spectrum. Finally, thresholds for feature parameters \(\mathbf{\Theta}_{th}\) are set and alarms are generated when the value of a feature parameter exceeds the threshold. The threshold is empirically set 2 to 3 times the value for the normal machine operation. These steps are outlined in Algorithm 1. One can also calculate the signal envelope, and then apply cepstrum analysis on the signal envelope. This may extract the fault features more effectively. We will validate this idea in the future. ```
Input: Acceleration sequence \(\mathbf{a}\) Output: Fault diagnosis: normal or warning
1 Initialize thresholds \(\mathbf{\Theta}_{th}\) empirically, \(\mathbf{G}\) by (5), \(\mathbf{H}\) by (16) or (17), and a return flag \(b\leftarrow\) normal. Compute the power spectrum sequence \(\mathbf{A}\) by (4). Compute the velocity sequence \(\mathbf{v}\) by (6), and the displacement sequence \(\mathbf{d}\) by (7). foreach sequence \(\mathbf{x}\) in \(\{\mathbf{a},\mathbf{v},\mathbf{d}\}\)do
2 Compute the time-domain statistics: \(\mathbf{x}_{max}=\max\{\mathbf{x}\},\mathbf{x}_{min}=\min\{\mathbf{x}\}\), and effective value \(\mathbf{x}_{rms}=\sqrt{\frac{\sum_{i=1}^{N}\mathbf{x}_{i}^{2}}{N}}\).