## 3 Fault Diagnosis Method
### Feature Extraction Based on Local Spectrum of Time-Domain Signal  
The focus of the feature extraction of the segmented data is to maximize the difference between different categories of samples under the premise of ensuring that the loss of sample data information is minimized. The main points of data feature parameter extraction include dimensionality reduction and noise elimination. The method mainly includes time-domain feature extraction and frequency-domain feature extraction [34]. The time-domain feature extraction method mainly extracts the time-domain feature value of each sample data as the feature value of the sample and is generally based on statistics or shape. The frequency-domain feature extraction transforms the original data from the time-domain to the frequency-domain by using the Fourier transform, so that features that are difficult to find in the time-domain can be mined. The main frequency-domain feature acquisition methods are divided into two categories - one is the global frequency defined for harmonic signals from a global perspective. While another is the instantaneous frequency, which is the reciprocal of the period [35]. In the analysis of rolling bearing faults, the time-domain analysis is random, the accuracy is not high, the feature comparison is not obvious, and the ability of noise reduction is poor. The frequency-domain analysis is effective because the vibration frequency of the bearing will be different due to the existence of the fault, which will produce a clear difference in the spectrum or power spectrum. Therefore, the frequency characteristics can not only diagnose faulty bearings but also diagnose sub-health bearings. According to the concept of global frequency and instantaneous frequency mentioned above, it is found that the applicable conditions are relatively harsh. The global frequency is suitable for periodic signals with infinite smooth fluctuations, and the instantaneous frequency is suitable for narrow-bandwidth non-stationary signals. The applicable conditions of the two are not suitable for the data signals extracted by the rolling bearings of rail train and lack of universality. So, a method for extracting fault characteristics of rolling bearings based on the local spectrum is proposed [30]. This method defines the concept of local frequency of time-domain data. The original signal can be approximated as consisting of a series of V-waves containing two adjacent segmentation points and data points between them. The local period \(T(t)\) of the original signal \(x(t)\) can be defined by the V-wave, as follows:  
\[T(t)=t_{k+1}-t_{k},t_{k}<t<t_{k+1} \tag{4}\]  
\(T(t)\) represents the time required for the signal to complete a local vibration in the local time range. The starting position \(t(k)\) is the moment of the i-th local maximum in the original signal \(x(t)\), and then the local frequency \(v(t)\) is defined as the reciprocal of the generalized local period \(T(t)\), namely:  
\[v(t)=\frac{1}{T(t)}=\frac{1}{t_{k+1}-t_{k}},t_{k}<t<t_{k+1} \tag{5}\]  
The local frequency \(v(t)\) indicates the number of vibrations completed in the unit local time, and \(v(t)\) is used to measure the speed of local vibration in Hz. Besides, the local frequency spectrum is constructed by using the idea of constructing the frequency-domain in the global frequency spectrum, which is used to analyze the rolling bearing data. The construction method of local spectrogram and time-frequency-domain construction method are used to extract the local features of the original signal, and the segmentation points obtained by the denoising process with spectrum analysis are ingeniously combined. A set of feature extraction methods based on the local spectrum is constructed, which provides a very reliable feature vector for subsequent fault classification of rolling bearings. The physical meaning of this method, which can better highlight the local features of the data, is clearer and has strong anti-noise ability.