# MTC-GAN Bearing Fault Diagnosis for Small Samples and Variable Operating Conditions
## 2 Theoretical Background  
### Construction of Vibration Images  
Sensors usually sample the signal continuously at a fixed sampling frequency. When training a classification model using acceleration vibration data, the raw data need to be split into multiple samples. Determining the length of the samples is a key issue. Setting the sample length too long introduces unnecessary information redundancy, while setting it too short results in insufficient sample information. As demonstrated by [PERSON] et al. [14], the sample length should cover a complete bearing failure cycle and be sufficient to distinguish between different fault frequencies. Additionally, they suggest using rectangular images to better preserve the signal's physical characteristics and improve texture consistency under varying conditions. The rolling elements of a bearing generate an impact force as they pass through the defective area, creating a bearing failure cycle. The complete cycle data provide a comprehensive picture of the impact event. The local load distribution may vary from one failure cycle to another, but all follow the same pattern. Therefore, the ideal sample length L should be no less than one failure cycle. The fault characteristic frequencies can be calculated based on the fault cycle of different failure types. The main types of faults in bearings include the following: outer ring, inner ring, cage, and rolling element faults. The calculation formula is as follows:  
\[f_{OR}=\frac{N}{2}\cdot f_{r}\cdot\left(1-\frac{d}{D}\cdot\cos\theta\right) \tag{1}\]  
\[f_{1R}=\frac{N}{2}\cdot f_{r}\cdot\left(1+\frac{d}{D}\cdot\cos\theta\right) \tag{2}\]  
\[f_{cage}=\frac{f_{r}}{2}\cdot\left(1-\frac{d}{D}\cdot\cos\theta\right) \tag{3}\]  
\[f_{ball}=\frac{D}{2\cdot d}\cdot f_{r}\cdot\left(1-\left(\frac{d}{D}\cdot\cos \theta\right)^{2}\right) \tag{4}\]  
where \(f_{OR},f_{IR},f_{cage}\), and \(f_{ball}\) represent the fault characteristic frequencies for the outer race, inner race, cage, and rolling element (ball), respectively; \(N\) is the number of rolling elements; \(f_{r}\) is the rotation frequency of the shaft, measured in Hertz (Hz); \(d\) is the diameter of the ball, measured in meters (m); \(D\) is the diameter of the section circle, measured in meters (m); and \(\theta\) is the initial contact angle of the bearing, measured in degrees (\({}^{\circ}\)). The number of measurements during the fault cycle is obtained by the sampling frequency, measured in Hertz (Hz). To ensure that the sample length meets the requirements in all possible fault cases, the sample length should satisfy the following equation:  
\[{L_{s}}^{\prime}\geq\frac{f_{s}\cdot\alpha}{\min\bigl{(}f_{OR},f_{IR},f_{cage},f_ {ball}\bigr{)}} \tag{5}\]  
where \(f_{s}\) is the sampling frequency, measured in Hertz (Hz) and \(\alpha\) (\(\alpha\geq 2\)) is the sampling factor determined according to [PERSON]'s sampling theorem. In bearing fault diagnosis, it is not only necessary to identify the fault eigenfrequencies but also to obtain the peak values of these eigenfrequencies at different orders. This requires finding the minimum frequency difference. Based on this difference, a sample length that can guarantee high frequency resolution can be determined. Therefore, the sample length should also satisfy the following equation:  
\[L_{s}^{\prime\prime}=\frac{f_{s}}{\min(|f_{FCF}\cdot i-f_{FCF}\cdot j|)} \tag{6}\]  
in order to distinguish different Fault Characteristic Frequency (FCF) peaks in the spectrum, as shown in Equation (6). In this way, by considering the minimum frequency difference as well as the minimum FCF, the sample length can be reasonably determined to optimize the efficiency and effectiveness of the model training. In Equation (6), \(f_{FCF}\) represents one of the possible FCFs, \(f_{FCF}\)\(\in\)[\(f_{OR},f_{IR},f_{cage},f_{ball}\)], \(i,j=1,2,3,\ldots\), \(N\), and \(N\) is the maximum order that is considered of FCF.