## 2 Background and Related Works
### PHM of CMG  
As mentioned in the first part, CMG is the inertial actuator of the spacecraft, and the spacecraft performs attitude adjustment based on CMG through angular momentum transfer. The fault prediction and health management technology of CMG is the key to the stable operation of spacecraft in orbit. Two of the four CMGs used by the International Space Station failed unexpectedly after 1.3 and six years of service, respectively, and both crews had to return to Earth for investigation [29]. The PHM problem of CMG mainly focuses on anomaly detection and fault isolation. Data to watch include speed, shaft temperature, current, frame angle, and commands.  
The anomaly detection methods of CMG have evolved from the early expert manual-based methods to data-driven based methods. Reference work [30] proposed an adaptive threshold fault detection, identification, and isolation algorithm, which combined lossless Kalman filter with residual and innovation sequence, and used binary grid search method to detect the fault and then adapted to jointly estimate the covariance matrix of a Kalman filter. In reference work [5], a chaotic integration method of an online cyclic extreme learning machine is proposed to predict and reconstruct the temperature signal of a controlling torque gyroscope. The model can predict temperature dynamically and overcome the nonlinear and chaotic characteristics of the CMG temperature signal. Reference work [4; 31] proposes a data-driven method that integrates the symmetry and orientation attributes of satellite attitude rate data into the neural network model, greatly reducing the need for historical data. In reference work [32], physical information is integrated into neural networks, and a neural network inspired by the physical mechanism of CMG is designed, which integrates various types of data to detect anomalies in CMG, and fine-adjusts by adopting transfer learning. This method integrates prior knowledge into neural networks and explores the fusion of data-driven and physical model methods for anomaly detection.  
In reference work [9], the wavelet denoising method and Short-Time Fourier Transform (STFT) are utilized to preprocess the signal of CMG to obtain the frequency spectrum of each failure mode. Then, a Slice Residual Attention Network (SRAN) based on the ResNeXt model, attention mechanism, and random slice idea is proposed, which can fully capture the edge features of images while satisfying the learning efficiency. Reference work [10] converts seven types of fault signals into spectrum datasets through STFT, and a new CNN network scheme called AECB-CNN is proposed based on Attention-Enhanced Convolutional Blocks (AECB), which can achieve high training accuracy for the CMG fault diagnosis datasets under different sliding window parameters. In reference work [11], a disturbance observer based on a neural network is developed for active anti-disturbance so as to improve the accuracy of fault diagnosis. The periodic disturbance in an orbit can be decoupled with fault by resorting to the fitting and memory ability of the neural network.  
However, existing deep learning methods do not pay sufficient attention to the unbalanced nature of the CMG anomaly data.