# Mechanical Fault Prognosis through Spectral Analysis of Vibration Signals
## 2 Key Algorithms Based on Spectral Analysis
### Cepstrum  
The vibration signal of a gear consists of two main components, namely the gear mesh vibration signal (high frequency) and the rotational frequency vibration signal of the gear shaft (low frequency). The mixing of high and low frequency signals produces modulation, which is multiplied in the time domain and convolved in the frequency domain. The modulated frequency-domain signal approximates the convolution of a set of pulse functions with larger frequency intervals and a set of pulse functions with smaller frequency intervals, forming a number of side frequencies on the spectrum around the meshing frequency and their octave components on both sides. For the vibration spectrum of a gearbox with multiple pairs of gears meshing at the same time, since each pair of gears will produce side bands and multiple side bands are crossed together, sometimes the spectrum structure cannot be clearly seen and cepstrum analysis is further required.  
Cepstrum can be used to better detect the periodic components on the power spectrum. It is usually not possible to make a quantitative estimate of the overall level of the side frequencies in the power spectrum. The cepstrum can be used to \"generalize\" the side frequency components, which can simplify the original spectral families of the side band lines into a single spectrum line. That is very easy to observe. When a fault occurs, the vibration spectrum of the gear has a structure of equal intervals (fault frequency). The property of the cepstrum can be used to detect the periodic signals that are difficult to identify in the power spectrum.  
For sensors arranged at different positions, the power spectrum is different because of different transmission paths. However, in cepstrum, the vibration effect of the signal source is separated from the effect of the transmission path, thus the cepstrum frequency components representing the gear vibration are almost identical, except for the lower cepstrum frequency bands due to the different transfer functions. In cepstrum analysis, the effects of signal attenuation and calibration coefficient during signal acquisition can be disregarded. This advantage is extremely useful for fault identification.  
A cepstrum is the absolute value of the inverse Fourier transform of the logarithm of the magnitude of the Fourier transform of a sequence. For a real-valued function \(x(t)\) sampled at a sampling rate of \(f_{s}\), denoted the sequence as \(\mathbf{x}=\{x_{0},\cdots,x_{N-1}\}\), the cepstrum sequence \(\mathbf{c}=\{c_{0},\cdots,c_{N-1}\}\) is defined as  
\[\mathbf{c}=\left|\mathbb{F}^{-1}[\log|\mathbb{F}[\mathbf{x}]|]\right|. \tag{23}\]  
Obviously, multiple discrete Fourier transforms are used in the computation of the digital integral, envelope spectrum, and cepstrum. Therefore, a fast and low-complexity discrete Fourier transform is very important to speed up the computation. The FFTW (the Faster Fourier Transform in the West) is used in the proposed analyzer. The FFTW is an open-source library developed by [PERSON] and [PERSON] of MIT [24], which can be used for one- or multi-dimensional real and complex data of arbitrary size (i.e., the number of FFT nodes can be an arbitrary integer). It is a standard C library for quickly computing discrete Fourier transforms. It is highly portable and is generally faster than any other current open-source Fourier transform program.