# Mechanical Fault Prognosis through Spectral Analysis of Vibration Signals
## 2 Key Algorithms Based on Spectral Analysis
### Digital Integral  
The vibration acceleration stands for the impact force, the vibration velocity for the energy, and the vibration displacement for the vibration amplitude. It can also be considered that the vibration intensity is proportional to the acceleration in the high frequency range, to the velocity in the intermediate frequency range, and to the displacement in the low frequency range. In order to reduce costs and size, the vibration analyzer often uses only one sensor, e.g., a vibration acceleration sensor, to sample the acceleration. Then, the first-order and second-order digital integrations are, respectively, used to obtain the corresponding velocity and displacement signals. The reason for not using analog integrators is, again, to reduce hardware costs. For example, an A/D (Analog-to-Digital) converter is required if an analog integrator is used. Digital integration can be done in time domain or in frequency domain. Frequency domain integration can effectively avoid the cumulative amplification effect of small errors in the time domain signal during the time domain integration process, making the calculation results more accurate. Moreover, the time for time domain integration is longer when the number of samples is large, while the time for frequency domain integration is less sensitive to the number of samples. In this paper, we choose the frequency domain for integration. As it is well known, the transfer function of the integrator is \(G_{I}(s)=\frac{1}{s}\), and its frequency characteristic function is \(G_{I}(f)=\frac{1}{\gamma Z\pi f}\), where \(j=\sqrt{-1}\). Let \(a(t)\) be the time-domain signal of acceleration. Applying the Fourier transform, the corresponding spectrum \(A(f)\) will be  
\[A(f)=\mathbb{F}[a(t)]=\int_{-\infty}^{+\infty}a(t)e^{-2\pi ft}\mathrm{d}t\, \tag{1}\]  
where \(\mathbb{F}[\cdot]\) denotes the continuous Fourier transform. Let \(V(f)\) be the spectrum of the velocity signal \(v(t)\). It is well known that the integral of \(a(t)\) is the velocity signal \(v(t)\), i.e., \(v(t)=\int_{-\infty}^{t}a(\tau)\mathrm{d}\tau\). Correspondingly, there is \(V(f)=A(f)G_{I}(f)\) in the frequency domain. Thus, we have  
\[v(t)=\mathbb{F}^{-1}[V(f)]=\mathbb{F}^{-1}[A(f)G_{I}(f)]=\frac{1}{2\pi}\int_{- \infty}^{+\infty}\frac{A(f)}{j2\pi f}e^{j2\pi ft}\mathrm{d}f\, \tag{2}\]  
where \(\mathbb{F}^{-1}[\cdot]\) denotes the continuous Fourier inverse transformation. Let \(D(f)\) be the spectrum of the displacement signal \(d(t)\). Similarly, the second-order integration of \(a(t)\) is the displacement signal \(d(t)\). Correspondingly, there is \(D(f)=A(f)G_{l}^{2}(f)\) in the frequency domain. Thus, we have  
\[d(t)=\mathbb{F}^{-1}[D(f)]=\mathbb{F}^{-1}\Big{[}A(f)G_{l}^{2}(f)\Big{]}=-\frac{ 1}{2\pi}\int_{-\infty}^{+\infty}\frac{A(f)}{(2\pi f)^{2}}e^{2\pi ft}\mathrm{d}f. \tag{3}\]  
For each vibration acceleration signal, the velocity signal is obtained by the first-order digital integration and the displacement signal is obtained by the second-order digital integration. Equations (1)-(3) are performed in the analog domain and must be digitized for implementation. The process of digital integration is given as follows. The sampled time-domain sequence of acceleration over a period of time, \(\mathbf{a}=\{a_{n},n=0,1,\cdots,N-1\}\), is applied by FFT with \(N\) nodes to obtain the corresponding frequency-domain sequence \(\mathbf{A}=\{A_{k},k=0,1,\cdots,N-1\}\), that is,  
\[A_{k}=\sum_{n=0}^{N-1}a_{n}W_{N}^{nk}\ \Rightarrow\mathbf{A}=\mathbb{F}[ \mathbf{a}]\, \tag{4}\]  
where \(W_{N}=e^{-2\pi/N}\), and \(\mathbb{F}[\cdot]\) denotes the discrete Fourier transform, which is a slight abuse of notation but does not affect the understanding. Let the sampling frequency of the DAU (Data Acquisition Unit) be \(f_{s}\), and then the frequency resolution is \(\Delta f=f_{s}/N\). From Equations (2) and (3), it can be seen that the integrand includes the reciprocal of the frequency, \(f^{-1}\) (or \(f^{-2}\) in Equation (3), thus, the integration can be unstable when the frequency is close to 0.