# A Lightweight Fault Diagnosis with Domain Adaptation for Defected Bearings
## 2 Methodology
### Backbone Design
#### 2.2.2 Feature Extraction Using Mobilenet  
With the time-frequency images generated, a deep learning model is proposed to extract fault features. In this work, Mobilenet is chosen as the backbone network due to its efficiency and effectiveness in image classification. Mobilenet is a lightweight convolutional neural network (CNN) designed for mobile and embedded systems. It employs depth  
Figure 1: The main framework of the proposed method.  
wise separable convolutions, which significantly reduce the number of parameters and computational complexity compared to traditional CNNs, making it suitable for real-time applications.  
The MobileNet architecture consists of a series of depth-wise separable convolutional layers, followed by batch normalization and ReLU activation functions. The network is trained to classify the time-frequency images into different fault categories (e.g., normal, inner race fault, outer race fault, ball fault). During training, the network learns to extract discriminative features from the time-frequency images that are indicative of the bearing's health condition.  
The output of the MobileNet backbone is a high-dimensional feature vector that encapsulates the essential information about the bearing's condition. These features are then passed to a fully connected layer for classification. However, the high dimensionality of the feature vector may lead to increased computational complexity and memory usage, which can be problematic for deployment on resource-constrained devices.  
In this study, we propose a lightweight convolutional neural network based on MobileNetV3 for processing time-frequency matrices derived from vibration signals. The input to the network is a time-frequency matrix of size \(128\times 128\), obtained using the S-transform with a sampling rate of 4096 Hz and a sampling duration of 1 s. The network architecture is designed as follows:  
* **Input Layer**: The input to the network is a single-channel time-frequency matrix of size \(128\times 128\times 1\).
* **Initial Convolutional Layer**: A convolutional layer with 16 filters of size \(3\times 3\), stride \(2\times 2\), and padding'same' is applied, followed by the h-swish activation function. This reduces the spatial dimensions to \(64\times 64\times 16\).
* **Botlleneck Layers**: A series of bottleneck layers are employed, each consisting of depthwise separable convolutions, Squeeze-and-Excitation (SE) modules, and h-swish activations. The number of output channels in these layers progressively increases from 16 to 160, with intermediate channel sizes of 24, 40, 80, and 112. Strides of \(2\times 2\) are used for downsampling, while strides of \(1\times 1\) maintain spatial resolution.
* **Global Average Pooling**: A global average pooling layer reduces the spatial dimensions to a vector of size 160.
* **Fully Connected Layers**: Two fully connected layers with 1024 and 128 neurons, respectively, are applied, each followed by the h-swish activation. The final output layer uses a softmax activation for classification, with the number of neurons equal to the number of classes.  
Moreover, in this paper, the MobileNet network is trained using the Adam optimizer with an initial learning rate of 0.001, which decays by a factor of 0.1 every 20 epochs. To ensure sufficient convergence, the model is trained for 100 epochs with a batch size of 32. Moreover, a dropout rate of 0.2 is set in the fully connected layer in order to enhance generalization capability. Furthermore, data augmentation techniques, including random horizontal flipping, cropping, and brightness adjustment, are employed to improve the robustness of the model against overfitting and variations in input data.