## 2 Materials and Methodology
### Fault Diagnosis Methodology  
The methodology used in this study for fault detection in rotating electrical machine bearings follows a structured approach. It begins with data acquisition, where vibration signals are collected from the Case Western Reserve University (CWRU) database using sensors. These signals are stored in an appropriate format for further analysis. Next, data preprocessing is performed to enhance signal quality. This involves filtering and removing noise, normalizing and segmenting the signals. Once the signals are preprocessed, they are transformed into scalograms, which are two-dimensional representations of time-frequency characteristics. This step employs wavelet transforms, specifically the amor and morse wavelets, to highlight fault patterns. The resulting scalogram images are stored for neural network training. In the training phase, a deep learning approach is applied using transfer learning with the SqueezeNet convolutional neural network. The model is fine-tuned by configuring hyperparameters such as the learning rate, number of epochs and minibatch size. The network is trained on the scalograms and validated using test data to ensure reliability. After training, the model is evaluated and optimized. Performance is assessed using a confusion matrix, which helps identify misclassifications. Hyperparameters are adjusted as needed, and comparisons between different wavelet transforms are made to determine the most effective feature extraction method. Finally, the trained model is deployed for fault classification and diagnosis. It is used to analyze new vibration data and classify conditions as either normal, inner race fault or outer race fault. Based on the predictions, reports are generated, and alerts are issued for predictive maintenance, helping to prevent costly machine failures and downtime. (Figure 3). In this study, SqueezeNet was selected for transfer learning due to its efficiency in extracting meaningful features from scalograms while maintaining a compact architecture. However, other lightweight convolutional neural networks, such as MobileNet and ShuffleNet, are also commonly used in similar applications. A comparative analysis of these architectures provides deeper insight into the advantages of choosing SqueezeNet over alternative models. MobileNet employs depthwise separable convolutions, significantly reducing computational cost while maintaining high classification accuracy. It is particularly effective in mobile and embedded systems where computational resources are limited. Similarly, ShuffleNet optimizes efficiency by introducing pointwise group convolutions and channel shuffling, which enhance computational speed and reduce model complexity. These architectures have been widely adopted in tasks that require real-time inference with limited hardware capabilities. SqueezeNet, on the other hand, was designed specifically to achieve a significantly smaller model size. By utilizing fire module combinations of squeeze and expand layers, it dramatically reduces the number of parameters while maintaining high accuracy. This architecture is particularly well suited for fault diagnosis applications, where real-time processing and low memory usage are essential. Additionally, the reduced model size of SqueezeNet enables faster inference speeds, making it an optimal choice for industrial settings where rapid fault detection is critical. A preliminary assessment suggests that while MobileNet and ShuffleNet offer competitive accuracy, SqueezeNet achieves similar classification performance with fewer parameters, leading to reduced memory consumption and faster training times. This balance between efficiency and accuracy reinforces its suitability for the proposed fault diagnosis system. The methodology also includes continuous optimization, where machine learning algorithms are fine-tuned and improved as feedback is obtained on their performance. This iterative approach seeks to maximize accuracy and minimize false positives and negatives in fault diagnosis.