Hybrid Wavelet–CNN Fault Diagnosis Method for Ships’ Power Systems

: Three-phase induction motors (IMs) are considered an essential part of electromechanical systems. Despite the fact that IMs operate efﬁciently under harsh environments, there are many cases where they indicate deterioration. A crucial type of fault that must be diagnosed early is stator winding faults as a consequence of short circuits. Motor current signature analysis is a promising method for the failure diagnosis of power systems. Wavelets are ideal for both time-and frequency-domain analyses of the electrical current of nonstationary signals. In this paper, the signal data are obtained from simulations of an induction motor for various stator winding fault conditions and one normal operating condition. Our main contribution is the presentation of a fault diagnostic system based on a hybrid discrete wavelet–CNN method. First, the time series of the currents are processed with discrete wavelet analysis. In this way, the harmonic frequencies of the faults are successfully captured, and features can be extracted that comprise valuable information. Next, the features are fed into a convolutional neural network (CNN) model that achieves competitive accuracy and needs signiﬁcantly reduced training time. The motivations for integrating CNNs into wavelet analysis results for fault diagnosis are as follows: (1) the monitoring is automated, as no human operators are needed to examine the results; (2) deep learning algorithms have the potential to identify even more indistinguishable and complex faults than those that human eyes could.


Introduction
Induction motors are widely used in the industry for converting electrical into mechanical energy. Three-phase AC squirrel-cage motors are used in shipping because of their robust construction and efficient operation under harsh environments. Applications include lifts, cranes, auxiliary engine pumps, and blower fans. Although 3-phase IMs are relatively reliable, there is a chance for damage or deterioration, mostly in the shaft, bearings, and stator windings, according to [1,2]. The faults of various components are classified into two categories, electrical and mechanical, depending on the nature of the fault. Examples of mechanical faults are broken rotor bars, rotor mass unbalance, and bearing faults [3]. Other examples of electrical faults are an unbalanced voltage supply, single phasing, and short circuits between phases [3]. The authors in [1,2] reported that 32% of IM damage occurs in stator windings as a consequence of the electrical faults of short circuits, mainly because of insulation problems. Stator winding short circuits cause the flow of high currents in the system, and they are extremely dangerous for both the IM and the health of human operators. Therefore, there is a strong interest in the condition monitoring of IMs for instant fault diagnosis. Monitoring a system's appropriate parameters is necessary to diagnose faults in electromechanical equipment. Examples of these monitoring parameters are vibrations, temperature, and current, according to [4].
Motor current-signature analysis is promising for achieving the condition monitoring for fault diagnosis, but in many cases, the time domain analysis of signals may not be Signals 2023, 4 151 sufficient. Frequency domain analysis is an alternative with respect to frequency rather than time, and Fourier techniques are employed for this kind of analysis. Wavelet analysis is a combination of both frequency-and time-domain analyses, and it is ideal for nonstationary signals composed of dynamic frequencies, according to [5]. Wavelet analysis is useful for fault diagnostic implementations when fast Fourier transform (FFT) is not efficient or time information about the fault is needed [5].
Machine learning (ML) is a subfield of artificial intelligence that regards techniques focusing on automatically recognizing patterns in data and drawing inferences. Deep learning (DL) is a subdomain of ML, and its algorithms imitate the way in which the human brain gains knowledge. DL and artificial neural networks (ANNs) are employed in various applications because of their high accuracy and generalization power, as highlighted in our previous studies [6][7][8].
This paper proposes a fault diagnostic system based on a hybrid discrete wavelet-CNN method. A 3-phase motor was simulated in MATLAB Simulink under healthy and faulty stator winding operation. Preliminary condition monitoring was achieved by performing discrete wavelet transform (DWT) analysis of the 3-phase stator currents. The next step involves using the results as input in a CNN model to automatically classify faults.
The remainder of this paper is organized as follows: Section 2 presents a review of related works. Section 3 describes the simulation model of the motor. Section 4 discusses the diagnostic methodology. The results of descriptive analysis, and the hybrid model's parameters and accuracy are discussed in Section 5. Section 6 draws the conclusions and outlines future directions.

Related Works
Recently, researchers have separately utilized DL and wavelets to diagnose various faults in power systems. Jayaswal et al. [9] presented a review of recent advances, mentioning applications of ANNs, fuzzy logic, and wavelet transform. Verma et al. [10] studied the stator current time series from an experimental setup of an IM for both healthy and faulty operation. Statistical features were extracted from the acquisitioned raw time series and then fed into the ANN for classification. In this way, the authors claimed that the time required for training the DL model was reduced. Similarly, Duan et al. [11] used a DL model for the interturn fault diagnosis of a transformer. The time series included both primary and secondary voltage and current waveforms. The signals were obtained from MATLAB Simulink simulations. In total, the study included 16 different interturn short-circuit faults, and the time series with the corresponding labels were fed into an autoencoder to classify the fault. Laamari et al. [5] simulated the stator winding interturn short circuits of a permanent-magnet synchronous motor. On the basis of stator current analysis, the authors concluded that time-frequency domain analysis with DWT is more reliable than frequency domain analysis with FFT. Ashfaq et al. [12] applied DWT to determine if the operation of a transformer was healthy or faulty. The transformer was simulated in MATLAB Simulink, and the authors highlighted that there was a change in the analyzed DWT wave shape when a fault occurred. Lastly, Hussain et al. [13] studied signal-processing techniques such as fast Fourier transform, short-time Fourier transform, and mainly continuous wavelet transform for the diagnosis of short circuits in the stator of a simulated 3-phase IM. Additionally, the authors applied many DL models, such as ANN, CNN, and RNN, to the raw time series of the currents, and successfully identified the type of fault.
A new trend in fault diagnosis is to apply signal processing, such as the various wavelet techniques for feature extraction, and then to use the extracted data in DL methods. Hsueh et al. [14] studied an experimental setup and proposed a diagnostic system in a 3-phase IM. Specifically, five different types of fault and a normal operation could be classified after current analysis. By applying an empirical wavelet transform, the raw signals were transformed into two-dimensional grayscale images retaining valuable information. Then, a CNN model was utilized to detect the faults by automatically extracting robust features from grayscale images. Towards the same direction, Wang et al. [15] studied an experimental rotor system, and the authors concluded that CNN models could reach higher classification accuracy when the models had been trained with scalograms of continuous wavelet transform (CWT) instead of hand-crafted features from the signals. Agrawal et al. [16] presented a comparative study of ANN and support vector machines (SVMs) using CWT for the diagnosis and classification of rolling element bearing faults. SVM are considered supervised ML models and are implemented as advanced signalprocessing techniques. The signals were obtained from experiments, and statistical features were extracted from the wavelet coefficients. The results showed that SVMs are more efficient than ANNs. Xiaoan et al. [17] presented a novel method, the deep order-wavelet convolutional variational autoencoder. Specifically, the authors presented a method on the experimental vibration data of a motor to diagnose bearing faults under fluctuating speed conditions. Attallah et al. [18] designed a similar method to ours for detecting stator interturn winding faults, but focusing on 2D data (images). DWT, as a time-frequency feature extraction method, was utilized before DL implementation. DL models included three advanced 2D CNN architectures (Inception, MobileNet, Xception).
Early fault detection is extremely crucial in the energy sector, and a combination of wavelets and DL is applied in various power systems. The authors in [19] presented a method based on a CNN in coordination with DWT that could diagnose and locate defects in power system operators for substation equipment. Tang et al. [20] diagnosed defects in the hydraulic piston pump of a transmission system. The authors conducted their analysis on an experimental setup, and besides the normalized CNN in conjunction with the wavelet transform, an interesting addition was the Bayesian algorithm that was implemented to automatically tune the model. Many of the latest studies of 2022 focused on fault event classification in grid-connected photovoltaic systems [21][22][23]. Ahmadipour et al. [21] tested an intelligent scheme using a wavelet transform and an extreme learning machine, and achieved outstanding accuracy on simulated noisy data. Similarly, Allan et al. [22] introduced an approach based on CNN and CWT for the extraction of scalograms. The grid-connected photovoltaic system was modeled in Simulink, and the detection was achieved within 2 s. Venkatesh et al. [23] presented a method for the visual faults of photovoltaic modules such as discoloration, delamination, and glass breakage. DWT was applied to preprocess captured images, and other signal-processing techniques were evaluated, including the gray-level co-occurrence matrix, FFT, and the gray-level difference method. Afterwards, the preprocessed experimental images were fed into ensemble deep neural networks.
In our previous work [8], 1D CNN models were utilized for fuel-oil consumption estimation and failure detection. Moreover, we proposed signal-preprocessing methods in conjunction with DL for condition monitoring cases [6,7]. Specifically, we generated spectrograms to train 2D CNN models, efficiently detecting defective behavior in the operational state of vessels [6], and oil and gas pipelines [7]. Going one step further in the current study, we investigate wavelet efficiency for preliminary signal analysis instead of spectrograms.

System Description
The experimental analysis of electromechanical systems is not feasible for both healthy and faulty operation because the equipment could be damaged through experiments. Moreover, the damage caused in laboratory and/or industrial environments cannot be fully controlled, causing fault parameters to exhibit large deviations that do not contribute to proper system fault diagnostic verification and fine tuning. Hence, a 3-phase low-voltage squirrel-cage motor was simulated in MATLAB Simulink. Specifically, a 3-phase squirrelcage motor was chosen because it is used in a wide variety of electromechanical systems, including of ships, and it was simulated as a low-voltage motor since a similar setup was available for future experimental analysis.

Description of Simulation Model
The simulation model was based on a 3-phase squirrel-cage 4 kW IM and a fault block for simulating the faulty operation. The completed model is depicted in Figure 1, and information about the basic blocks of our model, which are the IM and the block of fault, is presented in Table 1. Our aim was to simulate stator winding faults in the IM that were caused by short circuits. The 3-phase block of faults provided by Simulink is ideal for causing not only phase to phase faults, but also phase to ground faults. Six different kinds of short circuits were simulated: Phase A-ground (G), Phases B-G, Phases C-G, Phases A-B, Phases A-C, and Phases C-B. Lastly, fault resistance (R) is an important parameter of the simulation model since it controls the fault intensity. When the value of the fault resistance decreases to near zero, the insulation faults increase to a full interturn short-circuit value, according to [5]. On the other hand, increased resistance causes indistinguishable faults.
phase squirrel-cage motor was chosen because it is used in a wide variety of electromechanical systems, including of ships, and it was simulated as a low-voltage motor since a similar setup was available for future experimental analysis.

Description of Simulation Model
The simulation model was based on a 3-phase squirrel-cage 4 kW IM and a fault block for simulating the faulty operation. The completed model is depicted in Figure 1, and information about the basic blocks of our model, which are the IM and the block of fault, is presented in Table 1. Our aim was to simulate stator winding faults in the IM that were caused by short circuits. The 3-phase block of faults provided by Simulink is ideal for causing not only phase to phase faults, but also phase to ground faults. Six different kinds of short circuits were simulated: Phase Α-ground (G), Phases Β-G, Phases C-G, Phases Α-Β, Phases Α-C, and Phases C-B. Lastly, fault resistance (R) is an important parameter of the simulation model since it controls the fault intensity. When the value of the fault resistance decreases to near zero, the insulation faults increase to a full interturn shortcircuit value, according to [5]. On the other hand, increased resistance causes indistinguishable faults.

Running the Simulation
Each simulation lasted 5 s, and the sampling rate of the monitored parameters, which were the 3-phase stator's currents, was 20.000 Hz. The IM was subjected to variable load torque that had been induced by a step function; the value, duration, and rotational speed for each load torque are summarized in Table 2. The time series of the 3-phase currents of the stator during healthy operation are depicted in Figure 2, and the maximal current flowed during the maximal load torque. When there was a change in the load, there was a proportional change in the waveforms of the currents, as expected. The time series of the 3-phase currents of the stator during faulty operation are depicted in Figure 3, where we can easily distinguish that the operation was faulty from 1.4 to 1.7 s. Our ultimate goal was to develop a method for both the accurate and automated condition monitoring of power systems. The research methodology that is presented in Section 4 was utilized for the diagnosis of stator winding faults.

Running the Simulation
Each simulation lasted 5 s, and the sampling rate of the monitored parameters, which were the 3-phase stator's currents, was 20.000 Hz. The IM was subjected to variable load torque that had been induced by a step function; the value, duration, and rotational speed for each load torque are summarized in Table 2. The time series of the 3-phase currents of the stator during healthy operation are depicted in Figure 2, and the maximal current flowed during the maximal load torque. When there was a change in the load, there was a proportional change in the waveforms of the currents, as expected. The time series of the 3-phase currents of the stator during faulty operation are depicted in Figure 3, where we can easily distinguish that the operation was faulty from 1.4 to 1.7 s. Our ultimate goal was to develop a method for both the accurate and automated condition monitoring of power systems. The research methodology that is presented in Section 4 was utilized for the diagnosis of stator winding faults.

Discrete Wavelet Analysis
There are several types of wavelet transformations, each with its own set of applications, but the two main ones are continuous wavelet transform (CWT) and discrete wavelet transform (DWT), as highlighted in [9,12,24]. The CWT is mathematically expressed with the following equation [24]: where is the mother wavelet, is the scale factor, and is the translation factor. The

Discrete Wavelet Analysis
There are several types of wavelet transformations, each with its own set of applications, but the two main ones are continuous wavelet transform (CWT) and discrete wavelet transform (DWT), as highlighted in [9,12,24]. The CWT is mathematically expressed with the following equation [24]: where φ is the mother wavelet, a is the scale factor, and b is the translation factor. The values of the factors are continuous, which means that there is an infinite number of wavelets. The main difference of DWT is that discrete values are used for the scale and translation factors. DWT is mathematically expressed with the following equation [24]: DWT can be utilized as a filter bank, meaning that the signal is decomposed into several frequency sub-bands (Stephane Mallat multidecomposition theory). According to the authors of [9], the DWT is implemented by convoluting the signal with sub-band lowand high-pass filters. The output of the filters returns the DWT coefficients. Decomposition theory is applied to many levels. At the first level, the signal is split into a high-and a low-frequency part to analyze it at its maximal frequency. At the second level, the previous low-frequency part is again split into high-and low-frequency parts in order to analyze it at half of its maximal frequency. This process is repeated until the maximal decomposition level, ending up with a set of approximation and detail coefficients from each level. The coefficients can be used to reconstruct the original signal.
In some cases, it is desirable to exclude detail coefficients from various levels to reconstruct the original signal without the high-frequency behavior (denoising). Harmonic frequencies are generated during faulty operation in the current; thus, in our case, it was desirable to reconstruct the original signal by keeping the detail coefficients from the appropriate levels at which faulty operation was indicated if it existed. Additionally, the selection of the appropriate mother wavelet for signal representation is crucial. There are several DWT families and they are categorized on the basis of the features of the produced basis functions. Examples of different families are Haar, the discrete approximation of Meyer, Symlet, and Daubechies.
There were cases in our simulation where the fault was indistinguishable in the time series of the currents (Figure 4). DWT was utilized to solve this problem since it is ideal for the analysis of nonstationary signals [5]. As mentioned above, the selection of an appropriate type of Wavelet is significant. In addition, the level of decomposition is important for the efficient implementation of the DWT. Reconstructed signals from various detail coefficients are depicted in Figure 5 for the case of an indistinguishable fault in the time series. On the basis of the descriptive analysis in Figure 5 and after experimenting with various types of DWT, we concluded that the discrete approximation of Meyer (Dmey) was a good option. Dmey is ideal for the computation of fast discrete wavelet transforms and it does not exhibit many disadvantages compared to other DWT types [25]. Moreover, we decided to focus on the results of the reconstructed signals from the detail coefficients of Level 5 (d5) since higher levels add unnecessary complexity, as depicted in Figure 5. Diagnosis using DWT was successful since the harmonic frequencies of the fault were captured. The MATLAB Wavelet Toolbox was used for the implementation of DWT analysis.
of Meyer (Dmey) was a good option. Dmey is ideal for the computation of fast discrete wavelet transforms and it does not exhibit many disadvantages compared to other DWT types [25]. Moreover, we decided to focus on the results of the reconstructed signals from the detail coefficients of Level 5 (d5) since higher levels add unnecessary complexity, as depicted in Figure 5. Diagnosis using DWT was successful since the harmonic frequencies of the fault were captured. The MATLAB Wavelet Toolbox was used for the implementation of DWT analysis.

Convolutional Neural Networks
Convolutional neural networks (CNNs) are similar to ANNs since they are composed of neural networks, but they include some distinctive features, which are the convolutional and pooling layers. Convolution acts as a sliding filter and it was first introduced by Kunihiko Fukushima [26] back in 1980. Researchers utilize CNN to cope with challenging problems that are mainly divided into two main categories: (1) computer vision tasks with 2D input data such as image classification, object detection, and image segmentation; (2( sequential problems with 1D input data such as time series forecasting, time series classification, and natural language processing. The power of CNNs lies in extracting valuable regional information. Furthermore, they are more effective to search for features in smaller portions rather than the entire data. The structure of a 1D CNN consists of three

Convolutional Neural Networks
Convolutional neural networks (CNNs) are similar to ANNs since they are composed of neural networks, but they include some distinctive features, which are the convolutional and pooling layers. Convolution acts as a sliding filter and it was first introduced by Kunihiko Fukushima [26] back in 1980. Researchers utilize CNN to cope with challenging problems that are mainly divided into two main categories: (1) computer vision tasks with 2D input data such as image classification, object detection, and image segmentation; (2) sequential problems with 1D input data such as time series forecasting, time series classification, and natural language processing. The power of CNNs lies in extracting valuable regional information. Furthermore, they are more effective to search for features in smaller portions rather than the entire data. The structure of a 1D CNN consists of three basic types of layers: 1D convolutional and 1D pooling layers for feature extraction, and fully connected layers for the final decision. The 1D CNN operation is briefly explained below, as described in our previous work [8]: First, raw 1D input vector x[n] is fed into a 1D convolutional layer. Output f [n] is called the feature map and it is calculated as in (3).
Equation (3) is a linear elementwise multiplication, and the filters of kernels κ[n] are convolved with x[n] to produce feature map f [n]. The most important parameter is the size of the kernel, expressed as w, because it defines the size of the feature map [8].
The feature map of the convolutional operation is fed into a nonlinear activation function, expressed as F, to produce output Z(n) on the basis of Equation (4). A common activation function was sigmoid, but gradient vanishing problems during back-propagation prompted researchers to investigate alternative activation functions according to the authors of [8]. One of the most promising is rectifier linear unit (ReLU), expressed as in (5).
The output of the activated convolutional layer is then fed into a pooling layer, aiming at decreasing computational costs. There is a variety of pooling operations, but 1D max pooling is a good option [27]. A window, such as the kernel stated in the convolutional layer, slides through the activated feature map to keep only the maximal values while discarding all other information.
Many convolutional and pooling layers could be combined for a final output feature map. A special layer flattens the output, which is then fed into some fully connected layers. The fully connected layers follow the ANN structure. To overcome problems of overfitting, a dropout layer is implemented in many cases. This layer drops some neurons from the neural network during the training process. Lastly, depending on the task, the number of neurons and the type of activation function of the final dense layer must be chosen wisely. For a 3-class classification task, the dense layer is expressed as in (6).

Hybrid Discrete Wavelet-CNN Method
The hybrid method consists of two main blocks, DWT analysis and a CNN model. For concluding an inference model, it is necessary to train the model with pairs of batches of DWT-analyzed signals and the corresponding labels for normal and faulty operation. The DWT analysis block is utilized for the feature extraction of valuable information from the time series. The features could be generated from the coefficients of each level. In more detail, these features could be statistical values, such as variance, standard deviation, mean, median, and the 70th percentile or just the raw values of the coefficients. Data preparation is needed to prepare a training dataset that is employed to train a CNN model.

Descriptive Analysis
This subsection presents a descriptive analysis for the diagnosis of various faults using DWT. The time series of the currents were generated from various cases of simulations, and DWT was then applied to them. The various cases included different:

2.
Intensities of fault, controlled by the fault resistance (R).
Load conditions (Table 2).  There was a level for every fault detection case depending on how easy it was to identify the fault. In total, there were 5 levels, as presented in Table 3. In the Level 1 cases, the comparison with a threshold value was sufficient to detect the fault in d5. The threshold was calculated from the reconstructed range of d5 during healthy operation (Table 4). In the Level 2 cases, the fault was identified in d5, while in Level 3, the fault could not be identified in d5, and it was necessary to observe many levels of detail coefficients. In Level 4, it was extremely difficult to identify the fault from any level of detail coefficients. Lastly, in Level 5, it was unrecognizable. The results of the analysis for each monitoring parame-  There was a level for every fault detection case depending on how easy it was to identify the fault. In total, there were 5 levels, as presented in Table 3. In the Level 1 cases, the comparison with a threshold value was sufficient to detect the fault in d5. The threshold was calculated from the reconstructed range of d5 during healthy operation (Table 4). In the Level 2 cases, the fault was identified in d5, while in Level 3, the fault could not be identified in d5, and it was necessary to observe many levels of detail coefficients. In Level 4, it was extremely difficult to identify the fault from any level of detail coefficients. Lastly, in Level 5, it was unrecognizable. The results of the analysis for each monitoring parameter (3-phase currents) are summarized in Tables 5-7 for the step load torque, and in Tables  8 and 9 for the ramp load torque. There was a level for every fault detection case depending on how easy it was to identify the fault. In total, there were 5 levels, as presented in Table 3. In the Level 1 cases, the comparison with a threshold value was sufficient to detect the fault in d5. The threshold was calculated from the reconstructed range of d5 during healthy operation (Table 4). In the Level 2 cases, the fault was identified in d5, while in Level 3, the fault could not be identified in d5, and it was necessary to observe many levels of detail coefficients. In Level 4, it was extremely difficult to identify the fault from any level of detail coefficients. Lastly, in Level 5, it was unrecognizable. The results of the analysis for each monitoring parameter (3-phase currents) are summarized in Tables 5-7 for the step load torque, and in Tables 8  and 9 for the ramp load torque.  Table 5. Operation with fault at 1.4-1.7 s for the step load toque.

Current of Phase A
5.0 5 A-G 5.0 5 Table 6. Operation with fault at 1.9-2.2 s for step load torque. Table 7. Operation with fault at 1.4-1.7 s for step load torque and W-N = 60 Eb/No. Table 8. Operation with fault at 1.4-1.7 s for ramp load torque.  Table 9. Operation with fault at 1.4-1.7 s for ramp load torque and W-N = 60 Eb/No.

Current of Phase C
Some limitations exist with the descriptive analysis using DWT. The fault was hardly detected in cases where there was W-N in the time series (Figure 8). Figure 8 depicts reconstructed signal from the detail coefficients of levels 1-6 (d1-d6), the reconstructed signal from the approximate coefficients of level 6 (a6), and the original signal (s). The fault was unrecognizable in cases with a nonintense fault (R5.0). Moreover, it was indistinguishable whether a frequency had been caused by a load change or by a fault in some cases. The classification of the fault type (A-B, A-G, B-C) could not be achieved. In the next subsection, we show how our hybrid method was implemented to tackle the limitations. Signals 2023, 4, FOR PEER REVIEW 13 Figure 8. Reconstructed W-N signals using DWT.

Hybrid Discrete Wavelet-CNN Model
The hybrid discrete wavelet-CNN model recognizes if the operation of IM is healthy or faulty on the basis of the analyzed DWT current of Phase A. It was also trained to recognize two types of fault (A-B and A-G short circuits); thus, it is considered a 3-class classifier. It is crucial that our trained hybrid model does not have problems with overfitting. Overfitting means that the model is excellent at recognizing faults in a training set, but is not capable of recognizing them in cases outside of the distribution of the training set. Therefore, the time series were processed from various simulations. The hybrid discrete wavelet-CNN method was implemented in Python.

Training Parameters
The training process of the hybrid discrete wavelet-CNN model is depicted in pseudocode form in Figure 9. First, the time series of Current A were analyzed using DWT with the efficient Dmey wavelet. Then, the raw values of detail coefficients of Level 5 were extracted. The samples of the time series were 100,000, while the samples of the batches were 1562 after DWT analysis. In this way, the data were compressed without losing information, and the training time of CNN model was extremely shorter. The model's architecture is presented in Table 10, and the hyperparameters employed for training were as follows: • Epochs = 100.

Hybrid Discrete Wavelet-CNN Model
The hybrid discrete wavelet-CNN model recognizes if the operation of IM is healthy or faulty on the basis of the analyzed DWT current of Phase A. It was also trained to recognize two types of fault (A-B and A-G short circuits); thus, it is considered a 3-class classifier. It is crucial that our trained hybrid model does not have problems with overfitting. Overfitting means that the model is excellent at recognizing faults in a training set, but is not capable of recognizing them in cases outside of the distribution of the training set. Therefore, the time series were processed from various simulations. The hybrid discrete wavelet-CNN method was implemented in Python.

Training Parameters
The training process of the hybrid discrete wavelet-CNN model is depicted in pseudocode form in Figure 9. First, the time series of Current A were analyzed using DWT with the efficient Dmey wavelet. Then, the raw values of detail coefficients of Level 5 were extracted. The samples of the time series were 100,000, while the samples of the batches were 1562 after DWT analysis. In this way, the data were compressed without losing information, and the training time of CNN model was extremely shorter. The model's architecture is presented in  Figure 9. Pseudocode of the training process.

Results
After every iteration, the model was evaluated in the validation set to verify its accuracy. Figure 10a depicts both training and validation accuracy, while Figure 10b depicts the desirable loss reduction. The trained model was implemented for predictions in the

Results
After every iteration, the model was evaluated in the validation set to verify its accuracy. Figure 10a depicts both training and validation accuracy, while Figure 10b depicts the desirable loss reduction. The trained model was implemented for predictions in the test set, and its predictions were correct in all cases. Figure 11 depicts the confusion matrix of the model, and the results of the matrix were distributed on the diagonal, which means that the introduced model predicted only true positives and true negatives.
Signals 2023, 4, FOR PEER REVIEW 15 test set, and its predictions were correct in all cases. Figure 11 depicts the confusion matrix of the model, and the results of the matrix were distributed on the diagonal, which means that the introduced model predicted only true positives and true negatives.   test set, and its predictions were correct in all cases. Figure 11 depicts the confusion matrix of the model, and the results of the matrix were distributed on the diagonal, which means that the introduced model predicted only true positives and true negatives.  . Confusion matrix of the model. Figure 11. Confusion matrix of the model.

Discussion
The custom fault-detection challenge-indicative levels from Tables 5-9 show that the harmonic frequencies of the faults were captured in most cases, providing valuable initial information, but there were cases where it was extremely difficult to diagnose nonintense faults, especially in noisy simulated data. Furthermore, the appropriate selection of the mother wavelet and the level of decomposition are key factors for this particular application. After feature extraction using DWT, the power of 1D CNN models was utilized to complete the novel hybrid discrete wavelet-CNN model.
A main distinction of our research compared to related works is that the currents were obtained from simulations that included various load conditions, types, intensities of faults, and scales of white noise. The combination of 1D CNN and DWT is the other distinction of our research, and it was employed to automatically diagnose even more indistinguishable and complex faults. The proposed method could also be considered the first step towards the development of a complete diagnostic system that is able to detect and predict all types of IM faults from transfer learning on the basis of simulation data, and able to be implemented to reduce the training costs of experimental analysis.

Conclusions
The related works mentioned in Section 2 involved only a few proposed methods related to wavelet techniques in coordination with DL. Additionally, there is a strong interest to diagnose faults adequately early when the current exceeds the rated amperage capacity of the circuit of the connected equipment since, in cases of failure faults, the power system could be damaged, and the health of human operators could be threatened. The present work introduced a hybrid wavelet-CNN and a corresponding method for current analysis to diagnose stator winding faults of 3-phase IMs; its main contributions are as follows:

1.
It can automatically and effectively classify faults related to short circuits even in indistinguishable cases where white noise and load changes occur.

2.
It can drastically reduce both the training time and the data volume employed for training the neural network while maintaining competitive accuracy. Therefore, the proposed method could be considered a data compression method as well.
In contemporary sensor network applications that often include mist and edge computing systems with limited processing power and storage capabilities, reductions in model training time and data volume are crucial.
Future work will be conducted to test the hybrid method with experimental data of IM operation to verify the system's accuracy. We are also interested in testing the method for fault detection in a variety of other applications and classifying several types of faults. An example is the thermographic fault diagnosis of motor shafts. Lastly, possible future work could involve its implementation to other power systems, including power transformers, power generators, and other types of motors, such as brushless DC electric and permanent-magnet motors.

Conflicts of Interest:
The authors declare no conflict of interest.