**1. Introduction**

**Background:** Availability in a secure IoT-enabled environment refers to the ease with which an organization's critical data, applications, and resources can be accessed by authorized users. Industry motors bear the features of being simple in design, robust in construction, reliable in operation, low in cost, and easy to maintain, and accordingly, are widely used in industry. However, induction motors are also prone to various faults [1–3], leading to their failure, which put the availability of resources at risk. If not detected in time, these faults will lead to irremediable mechanical failures. The objective of this research is,

**Citation:** Zuhaib, M.; Shaikh, F.A.; Tanweer, W.; Alnajim, A.M.; Alyahya, S.; Khan, S.; Usman, M.; Islam, M.; Hasan, M.K. Faults Feature Extraction Using Discrete Wavelet Transform and Artificial Neural Network for Induction Motor Availability Monitoring—Internet of Things Enabled Environment. *Energies* **2022**, *15*, 7888. https:// doi.org/10.3390/en15217888

Academic Editors: Antonio Cano-Ortega and Francisco Sánchez-Sutil

Received: 19 September 2022 Accepted: 19 October 2022 Published: 24 October 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

therefore, to develop a technique for detecting faults that appear on operational motors. The main faults detected and analyzed during induction-motor processing are related to stator faults, broken rotor bars, and air-gap eccentricity-related faults that have been investigated and reported extensively in the literature [4–7]. The motivation of this paper is derived from Internet resources and articles exploring faults using none-ANN techniques.

**Motivation:** Operational motors, as resources, generate data, and it is important that induction motors as data resources are easily accessible to authorized users bearing IoTenabled features. In particular, high contact resistance (HCR) and rotor bar faults have been considered in this study in order to investigate their availability as data resources. Because of these potential faults, it is crucial to monitor motor health and maintenance issues. Thus, the presentation as a platform for safe operation from the IoT-enabled scenario perfective is important, and refers to the ease with which organizations' critical data, applications, and resources can be accessed by their respective users [8].

**State-of-art works:** Multiple machine condition-monitoring strategies have already been investigated in the literature [9,10], including partial discharge, vibration analysis, current signature investigation, magnetic flux, and acoustic noise monitoring. However, the Motor Current Signature Analysis (MCSA) is considered to be the most commonly reported technique applied to fault analysis [11,12]. The phase current signal contains current motor operation-dependent components, which are the by-product of unique rotating flux components. In the supply current, the occurrence of faults brings about changes that have specific harmonic contents which are specific to the faults that occur. The MCSA technique works on stator current measurements to detect the harmonics generated under faulty conditions, which, although unwanted, are used for fault analysis. Furthermore, the MCSA provides current spectra that possess potential information for the detection of electrical and mechanical faults. In this investigation, motor parameters, mainly current, have been acquired for the three phases of a motor in operation.

**Novelty and contribution:** The novelty of this work is the current spectrum that has been analyzed over a wide range of distinct current patterns that could serve as signature values for fault detection. The two faults under investigation in this work are: (1) the high resistance connection fault (21%), and (2) the broken rotor bar fault (7%), both categories are caused by manufacturing defects [13,14]. The fault analysis of the induction motor is done through high resolution spectral analysis of the low frequency signals associated with various fault categories [15]. Statistical features extraction followed by a mix of classification algorithms are used in [16]. Induction motors make up between 40 to 60% of any industrial site's electrical loads employed. The online sensor-based detection of induction motors faults through the sensing of stray flux components containing information of relevance for the diagnosis of faults in induction motors is shown in [17]. The unbalanced supply voltage and inter-turns short circuits are studied in [18] through thermal behavior of the motors. The analysis of supply current signals under faulty condition of specific number of rotor bars as time–frequency features is commonly used in recent work [19].

The remainder of the paper is organized as follows. Section 2 consists of the work related to the two faults. Section 3 describes induction motors. Discrete Wavelet Transform (DWT) for fault detection is explained Section 4. Section 5 explains the ANN Classifier. Results are given in Section 6. The paper's conclusions are presented in Section 7.

#### **2. Related Work**

From a review of the literature, it was concluded that many different techniques have been used to diagnose machine faults in industry, and various classification methods have been implemented to obtain satisfactory results. Table 1 has been adopted from the state-ofthe-art paper, tabulated in [20], and presents the results obtained through artificial neural network (ANN) classification. A maximum of 95% accuracy was previously achieved, but details of the hidden layers and activation function were not mentioned. Conversely, in the present study, more than 96% accuracy has been attained at different Debauches levels, with detailed information reported on the hidden layers and activation functions. Moreover, stator winding faults, bearing faults, broken rotor bar faults, and eccentricity are the primary research interests in previous studies [21], whereas in this current research, HCR and broken rotor bar faults are discussed.



#### *2.1. High Connection-Resistance (HCR) Fault*

As the name implies, an HCR fault relates to poor and loose contacts with localized heat due to unbalance, and failures are associated with this fault, resulting in reduced efficiency and reliability. This fault can be located in circuit breakers, motor starter terminals, or other similar points in the power circuit where contacts and connections are involved. As the above-mentioned faults increase, the motor temperature also rises, and is associated with onset of insulation damage. According to standard electrical testing, an effective method of measuring HCR is to measure phase-to-phase resistance between the three phases.

In this research, a HCR fault has been designed in MATLAB software by connecting a 1 kΩ, 10 W resistor in series in one phase of the induction motor model, as shown in Figure 1. It may be noted that HCR faults can be modelled by resistance in the kΩ to MΩ range.

#### *2.2. Rotor Bar Fault*

When a rotor bar fault occurs in the motor and the current flowing through the broken bars stops, the broken bars stop sharing torque. This results in a burden on the healthy bars. In cases where there are many broken rods, the motor will not start. Broken rotor bar (BRB) fault occurs due to magnetic stresses, thermal stresses, contamination, or abrasion and wearing away of the rotor due to a lack of maintenance. Cracks from high temperatures are also a possible consequence. To investigate the rotor bar fault induced in this study, the MATLAB Simulink environment was designed, as shown in Figure 2.

Artificial intelligence (AI) procedures may be developed to diagnose faults in their early stages. The ANN model was preferred in this study, and discrete wavelet transform (DWT) was used to obtain features at different levels, for which the ANN classifier was trained accordingly. Finally, the test data were fed into the ANN classifier, which, along with the algorithmic details and steps, are illustrated in Figure 3.

**Figure 1.** High contact resistance (HCR) fault in a MATLAB Simulink environment. A–C shows stator phases.

**Figure 2.** Rotor bar fault in MATLAB Simulink Environment A–C stator phases and a–c rotor phases.

**Figure 3.** Proposed Algorithm Flowchart (Quality Improved also enlarged-300 dpi).

Figure 3 represents the proposed steps that were followed in this research. Part A represents the steps of signal analysis for feature extraction and selection. The features are acquired using wavelet db-4 transform technique, as shown in Figure 3. Part B shows how to extract relevant features to train the ANN model to predict the results, while Part C shows the feature of enabling IoT with a Wi-Fi module with the motor by adapting the technology [24] with less interference [25] and also with fast computational performance [26].

In an IoT-enabled environment, communication between the induction motors (resources) and central monitoring station is facilitated by two-way communication via a radio communication system that operates in the cloud, as shown in Figure 3. The features signifying faults become recognizable as indicators of the availability of inductors for use in industry. Alternatively, this makes it possible for employees with expert knowledge to gain easy access to motors in order to assess their availability as resources.

#### **3. Induction Motor Modelling**

Induction motor modelling MATLAB software was used to design the motor model in this research. The 5.4 HP (4 kW), 400 V, 50 Hz, 1430 RPM induction motor was designed in a MATLAB Simulink environment, as shown in Figure 4. HCR and rotor bar faults are illustrated in Figures 1 and 2, respectively. From the simulated motor design, the data were acquired from a healthy motor and a fault-induced motor.

**Figure 4.** Healthy Motor SIMULINK model with A–C stator phases.

### **4. Discrete Wavelet Transform (DWT)**

This paper focuses on extracting features of the mean and RMS for fault diagnosis using DWT. These features were used as input into the ANN model [27,28]. They were investigated in this study, as shown in Figure 5, then analyzed to obtain the most relevant information from the signals for further processing. The main contributions of this study are that we propose a method to convert time-series data, such as current signals, into grayscale images, using the EWT transformation coupled with the deep CNN model for fault diagnosis [29]. The use of ML algorithms and the DL to machine failure diagnosis is reported in [22]. Discrete wavelet transform is mostly used where analysis of the time– frequency domain signal is required. It is the most efficient tool for extracting transientbased nature signals. Discrete wave transform computes the series of wavelet coefficients, approximation for low frequency feature points, and detail coefficients for high frequency feature points [30]. In a very closely related report, an ensemble machine learning-based fault classification scheme using DWT to compare both raw and filtered separately through wavelet decomposition was reported [31]. In practical terms, DWT can be implemented by using a pair of low-pass and high-pass filters. Wavelet transform is formed from a wavelet of a prototype signal—called a 'mother' or 'single modeling' wavelet y (t)—through shifting

operation and dilation. This relationship is shown in the following equation. For the case of Discrete Wavelet Transform, the mother wavelet is shifted and scaled by the powers of two, where j and k are scale and shift parameters, both representing integer values. Here, the mother wavelet is shifted and scaled by a power of two.

$$
\psi(j,k)(t) = \frac{1}{\sqrt{2^j}} \psi\left(\frac{\left(t - k2^j\right)}{2^j}\right) \tag{1}
$$

where *j* is scaling parameter, *k* represents shifting parameter, *t* is time and *ψ* (*t*) represents the function of mother wavelet. Mathematically, DWT can be computed by convolving the signal *x*(*t*) with the dilated, reflected, and normalized version of the mother-wavelet *ψ*(*j*, *k*). The Equation (3) is result of convolution of the samples with the mother-wavelet.

**Figure 5.** Decomposition procedure for the DWT: representation of the low-pass and high-pass filters, convolving with signal 'S'. (Figure Reduced in size-300 dpi).

Recalling the wavelet coefficient *γ* of a signal *x*(*t*) is a projection of *x*(*t*) onto a wavelet, and let *x*(*t*) be a signal of length 2*N*, in the case of child wavelet in the discrete family above.

$$\gamma\_{j,k} = \int\_{-\infty}^{\infty} x(t) \frac{1}{\sqrt{2}^j} \Psi(\frac{t - k2^j}{2^j}) dt \tag{2}$$

By fixing *j* at a scale, so that *γj*,*<sup>k</sup>* is a function of k only, by the Equation (2), γ*j*,*<sup>k</sup>* can be viewed as a convolution of *x*(*t*) with reflected, dilated and normalized version of motherwavelet, *<sup>h</sup>*(*t*) = <sup>1</sup> <sup>√</sup><sup>2</sup> *<sup>j</sup> <sup>ψ</sup>*((−*t*) <sup>2</sup>*<sup>j</sup>* ), sampled at the points 1, 2*<sup>j</sup>* , 22*<sup>j</sup>* ... 2*N*. But this is precisely what the detail coefficients give at different levels of *j* for DWT as shown in the Figures 6–8. Therefore an appropriate choice for the signals, g[n] and h[n], the detail coefficients of the filter bank correspond exactly to a wavelet coefficient of discrete set of child wavelet for a given mother wavelet *ψ*(*j*, *k*)(*t*).

$$dwt(j,k)(t) = y[n] = (\mathbf{x} \* \boldsymbol{\Psi}(j,k)(t))[n] = \frac{1}{\sqrt{2^j}} \int \mathbf{x}(t)\boldsymbol{\Psi}\left(\frac{(t-k2^j)}{2^j}\right)dt\tag{3}$$

Filters decompose the signals into approximation and detail coefficients, and their computation is given as [17]

$$y\_{low}[n] = (\mathbf{x} \* \mathbf{g})[n] = \sum\_{k=-\infty}^{\infty} \mathbf{x}[k] \mathbf{g}[2n - k] \tag{4}$$

$$y\_{high}[n] = (\mathbf{x} \* h)[n] = \sum\_{k=-\infty}^{\infty} \mathbf{x}[k]h[2n-k] \tag{5}$$

The above equations can be more precisley described by the given convolution approach (6), (7).

$$y\_{low} = (\mathfrak{x} \* \mathfrak{g}) \downarrow \mathfrak{2} \tag{6}$$

$$y\_{h\bar{\otimes}h} = (\mathfrak{x} \ast h) \downarrow \mathfrak{Z} \tag{7}$$

The DWT decomposition process of 2-level DWT is illustrated in Figure 5, Equation (2), presented above, helps compute DWT, and Equations (4) and (5) represent the low- and high-pass filters, respectively, showing the high-frequency and low-frequency components. The outputs give the detail coefficients (from the high-pass filter) and approximation coefficients (from the low-pass filter).

**Figure 6.** Representation of DWT Approximation Coefficients and Detail Coefficients of Healthy Phase-A Currents with 2000 samples.

**Figure 7.** Representation of DWT approximation coefficients and detail coefficients of HCR fault in Phase-A currents with 2000 samples.

**Figure 8.** Representation of DWT approximation coefficients and detail coefficients of a faulty signal rotor bar fault in Phase-A currents with 2000 samples.

#### *Designation of Frequency Band*

Each Debauches wavelet db-4 contains multiple levels. As a 10 kHz frequency was used to sample the current signals in this research, a single sample of 10 kHz was distributed across 9 db-4 wavelet levels. The distribution of frequency band is tabulated in Table 1. All wavelet levels except for 7, 8 and 9 were discarded, because these levels possessed no valuable information. Moreover, the signals with line noise at 50 Hz were also discarded, as noise reduction clarified the target signals more effectively. Table 2 shows distribution frequency bands.

**Table 2.** Distribution of frequency bands.


In this research, DWT 1-dimension analysis was used for the healthy and faulty motor signals, and the following graphs were derived from the 2000 data samples gathered. Figure 6 represents the DWT approximation levels (a7 only, using level-7 alone) and detail coefficient levels (d1–d7) of a current healthy conditions signal in Phase A, using just seven levels of decomposition. It may be concluded that on starting, the induction motor current showed greater amplitude, due to higher torque, which gradually settled down into a steady state from 800 samples onward. Signals were decomposed into seven levels to obtain high- and low-frequency information about the current signal. The authors in [31] report successful implementation of the DWT technique, with accuracy more than 99%. In comparison, this research work also achieves more than 98% accuracy, possibly because of the dataset used. The authors in [23] also present successful fault diagnosis using DWT and achieve claimable accuracy. The authors in Refs. [32,33] show techniques other than the DWT, such as data augmentation-based, feature learning-based and classifier designing-based, using different datasets, calling them intelligent diagnosis models with deep networks to conclude how to reduce the consumption of computing time. However, these strategies are complex and need improvement for data generation ability and data dimensionality issues based on the different dataset conditions. Finally, the authors in [34] report on the identification of faults using coupled neuron-based approach, mainly focusing on enhancing the weak useful signature, and not applying a classifierbased approach to find accuracy using a relatively complex approach compared to the proposed approach, where the condition of fault is the main interest.

Figure 7 displays the DWT coefficient levels (a7 only) and detail coefficient levels (d1–d7) for the HCR fault in the Phase-A current. The fault was analyzed and the detail coefficients, d1, d2, d3, and d4, were found to contain less information and fewer features, as most of the noise was contained by d1, d2, d3, and d4. All detail coefficients, representing most of the high-frequency content and the approximate coefficients containing low-frequency information about the current signals, were obtained at level 7, with a clearly visible difference between the healthy and damaged motor signals.

Figure 8 displays the DWT coefficients of Phase-A currents with rotor bar fault, wherefrom, it may be concluded that initially, the motor was running normally. A rotor bar fault was subsequently introduced at 350 samples, due to which, the motor displayed the fault with spikes at corresponding coefficients. This indicated that the fault had been detected, and the DWT coefficients had received frequency information about the currents. The signal contamination was due to the rotor bar fault. Moreover, feature points were extracted using DWT. The signal and approximation coefficients at level 1 are very identical. However, they become gradually different at higher and higher levels. A similar tendency can be visibly noted in the case of the bearing fault using DWT and ensemble machine learning algorithms [31].

Figure 9 represents the feature points for a healthy motor in Phase-A at level 9, and similar features were extracted for the remaining faults at different levels, using DWT. In this research, the mean and RMS features were investigated. In addition, Figures 6 and 8 show the detail and approximation coefficients for healthy motor and rotor bar fault signals, containing both low-frequency and high-frequency content information about the approximation and detail coefficients, respectively.

**Figure 9.** Healthy motor phase: a feature point representation with 1000 samples. (Figures Titled-300 dpi).

Figures 10 and 11 display the features obtained using DWT at level 9. These features are the composite form of different detail levels, as represented in Figure 6.

**Figure 10.** High contact resistance fault in Phase-A: Representation of feature points with 1000 samples. (Figures Titled-300 dpi).

**Figure 11.** Rotor bar fault in Phase-A: Representation of feature points with 1000 samples (Figures Titled-300 dpi).

#### **5. ANN Classifier**

The concept of ANN is to classify deniable features that characterize target parameters in real-world applications. Artificial neural networks are brain-inspired neural network (NN) systems. The Neural Network (NN) works similar to neurons in our nervous system, and is capable of learning from past data; the ANN is able to learn from data and provide responses in the form of classifications. It is the most widely used form of AI [27], mostly preferred for fault detection and diagnosis. An ANN can be trained by causing the interconnected nodes (called neurons) to learn in a way that resembles that of the human brain by recognizing speech patterns and tendencies in images. The behavior is defined by the weights assigned to these interconnections, ensuring that the desired task is performed correctly. Artificial neurons networks are excellent tools for identifying complex problems. The multi-layer feed-forward NN with a back-propagation training algorithm is the classic NN proposed in this study. Neural Networks have already been successfully applied and proven suitable for fault detection [22,28–31], and pseudocode has been provide in Appendix A.

In this research, supervised learning was applied to train both healthy and faulty motors [22,27–31]. There are three main components of an ANN: the input layer, hidden layers, and output layers, as shown in Figure 12. In an ANN, layers possess nodes, and these nodes relate to the nodes in the next layer. Moreover, each connection has proportionated weights, considered as the effect of the nodes on the layers. The hidden layers contain information that is transformed onto higher order node layers. Each node is associated with a predefined activation function, which will determine whether the node will be activated on a node in a higher layer. The way in which it is activated will depend on the summarized values obtained by multiplying the values of the nodes with their associated weights. The neuron in an ANN is the computational unit that takes x1, x2, and x3 as inputs, as well as an intercept term. The output '*y*' is obtained by

$$y = f\left(\mathcal{W}^T \mathbf{x}\right) = f\left(\sum\_{i=1}^3 \mathcal{W}\_i \mathbf{x}\_i + b\right) \tag{8}$$

where the activation function is represented by '*f*', and often chosen to be the sigmoid function (as in this research), different activation functions are investigated by taking 21 hidden layers and 11 epochs. 'W' is the ANN model weight, while '*b*' is the scalar value, known as the bias. Here, Equation (8) was used to compute output '*y*' of the ANN. Performance indicator parameters for NN model are shown in Figure 13, below, where it can be seen that the overall cross entropy error of the trained NN is 0.59872 at epoch 10. The model was trained for an HCR fault at level 9, with RMS features. During the analysis of results for different activation functions and size of layers, it was observed that the designing of Neural Network could be accomplished with a lesser number of hidden

layers without affecting the accuracy. In this work, at 21 hidden layers, good accuracies are obtained for all transfer functions while the rest of the parameters are kept the same.

**Figure 12.** Neural network (NN) model.

**Figure 13.** Neural network model performance parameters and cross-entropy error.

Figure 13 shows that validation and training have similar characteristic curves with efficient testing. As in NNs, the hyper-parameters were tuned to provide a high quality solution for the ANN model and the number of epochs consisted of numerical figures indicating the number of times that the entire dataset was propagated forward and backward through an NN. The epochs were chosen to control the number of complete passes through the training dataset. These epochs were divided into batches for processing.

It may be pointed out that all the ROC's figures (Train, Test, and Validation, etc.) if accommodated in a few plots, will result in the cramping of many of our interests, considering we do not have any ZOOMING option in the tool used.

From the above figure, it is concluded that all faults are classified with 76% accuracy, All ROC curves point out that the grey diagonal line of ROC means that the samples lying on this line show that the proportion of correctly classified samples is the same as the proportion of incorrectly classified samples.

Class-1 (Healthy Phase A)

Class-2 (Healthy Phase-B)

Class-3 (Healthy Phase-C)

Class-4 (Faulty Phase-A) Rotor Bar/High-Contact Resistance

Class-5 (Faulty Phase-B) Rotor Bar/High-Contact Resistance

Class-6 (Faulty Phase-C) Rotor Bar High-Contact Resistance

In the ROC-training section, the six different classes have been classified. During the validation process, each class has transmit data according to its specific feature type. Different colours represent the different phases and types of classes. The third section describes the testing of ROC using a different scheme of classes, and the classification was categorized according to features. The tangent/diagonal line was received in ALL-ROC sections, which shows that if the line of different Phases exists above the ROC diagonal grey coloured line, it means the samples are correctly and properly classified with a true positive rate, else, if the lines of Phases exist below the diagonal lines, it means the samples are classified incorrectly, and do not belong to the same Phases. From Figure 14, it can be concluded that some of the samples of the Phases (features) are correctly classified and some samples are incorrectly classified, therefore, the accuracy obtained is 76.0%, as shown in the Confusion Matrix.

From Figure 15, it is clear that with an accuracy of 82.6%, compared to Figure 14, with 76.0%, we have obtained a more appropriate classification of the different faults and Phases with the same number of samples and activation function. Almost all Phases lines drawn are received above the grey diagonal line, and this line is supposed to represent the threshold line for the ROC Curves.

Figure 16 makes the things more clear by showing the grey diagonal line and almost all Phase lines with their samples very appropriately classified with a good True Positive rate by obtaining an accuracy level of about 92.2%, which, as compared to the results obtained in Figures 14 and 15, are better. Moreover, a single Phase line is below that diagonal line, meaning that only the Phase samples are incorrectly classified.

Similarly, Figure 17 represents less accurate accuracy results compared to Figure 16, and the ROC curves also represent that some Phases are classified appropriately, while others have incorrect classification. However, this time, the training/activation function is 'lm'.

Figure 18 clearly represents the ROC's result, showing very proper classification results as compared to Figures 17 and 19, with the same training/activation function and number of samples. All Phases results are above the grey diagonal line with good accuracy of 93.1%, which means the faults are classified more accurately, with a true positive rate. As far as accuracy is concerned, from the previous last two figures, we obtain better accuracy in comparison, and therefore, receive good results for the ROCs.

From the above figures, it is shown that, with 91.0% accuracy, most of the Phases are classified with good results, and in Figure 20, with am accuracy of 85.8%, some faults are incorrectly classified, with Phase lines below the diagonal line. In addition to this, the CGP training/activation function here is used to obtain results with same number of samples.

**Figure 14.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for OSS Train Fcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 76.0% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 15.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for OSS TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 82.6% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 16.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for OSS TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 92.2% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 17.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for LM TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 74.8% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 18.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for LM TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 93.1% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 19.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for LM TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 80.0% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 20.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for CGP TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 85.8% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

The rate value of a full load current of 5.5 HP (4 kW) three-phase motor is between 8–10 A under normal working conditions. Motors typically generate 3.6 times the normal rate current under short circuit conditions. In this paper, a short circuit current of approximately (9.2 × 3.6 = 33.12 A) is obtained. The results are validated by iteration three times. In the open circuit, there is no current flow. In this case, there are no characteristic signs of motor current, as our algorithm takes a single-phase current as the input for the balanced three-phases. The high contact resistance accuracy results for RMS features are tabulated at different levels and with different accuracies, and the derived tabulated results are shown.

The ROC's curves and confusion matrix are as shown in Figures 14–21, accordingly. Table 3 shows 76.0%-TrainFcn = 'oss', 82.6%-TrainFcn = 'oss', 92.2%-TrainFcn = 'oss', 74.8%- TrainFcn = 'lm', 80.0%-TrainFcn = 'lm', 93.1%-TrainFcn = 'lm', 85.8%-TrainFcn = 'cgp' and 91.0%-TrainFcn = 'cgp' accuracies using different TrainFcn are obtained, respectively, for High Contact resistance faults, as presented in Table 3 for level 9 RMS features. Similarly, for the accuracies obtained from the rest of the levels, as shown in the table for RMS features of HCR Faults, or for any other type of fault at different levels for different features, we can get the ROCs and Confusion matrix results, as shown in the Figures 14 and 15, and so on.

**Figure 21.** *Cont*.

**Figure 21.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for CGP TrainFcn/Activation Function at level 9 (RMS) Features for High Contact Resistance Fault with 91.0% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.


**Table 3.** High Contact Resistance Fault with RMS Feature Accuracies under different Activation Functions.

Figures 22–27 have ROCs with good positive rates and all Phases with good classification, which means that good accuracy results have good ROCs with Phase lines above the grey diagonal line.

**Figure 22.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for OSS TrainFcn/Activation Function at level 9 (RMS) Features for Rotor Bar Fault with 83.8% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 23.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for CGP TrainFcn/Activation Function at level 9 (RMS) Features for Rotor Bar Fault with 91.3% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 24.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for CGP TrainFcn/Activation Function at level 9 (RMS) Features for Rotor Bar Fault with 97.9% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 25.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for LM TrainFcn/Activation Function at level 9 (RMS) Features for Rotor Bar Fault with 84.7% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 26.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for LM TrainFcn/Activation Function at level 9 (RMS) Features for Rotor Bar Fault with 91.3% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

**Figure 27.** Neural Network Model ROC (Receiver Operating Characteristics) and Confusion Matrix for LM TrainFcn/Activation Function at level 9 (RMS) Features for Rotor Bar Fault with 98.6% Accuracy. Grey line shows diagonal of the ROC for indicating Class 1–6 lines are lying above or below or on it.

Table 4, presents the accuracy results for rotor bar fault with RMS features at different levels, and it is concluded that ROCs curves and confusion matrix of Figures 22–27 with accuracies and respective training functions are obtained for rotor bar fault, as shown in Table 4 for level 9 RMS features. By a similar approach, we can get the results of ROCs and confusion matrix for accuracy perspective for different faults at different levels for different features. Tables 5 and 6 show HCR fault and Rotor Bar faults respectively with Mean features accuracies under different actions functions.

**Fault Activation Function Characteristic Feature Accuracy Level 5 Level 7 Level 8 Level 9 Rotor Bar Fault** Trainscg **RMS** 89.5% 72.8% 82.6% 79.2% Trainbfg 83.4% 75.0% 85.8% 83.2% Traincgp 80.6% 81.5% 82.2% 94.1%/91.3%/97.9% Traincgb 87.5% 82.2% 91.9% 85.7% Traingda 90.5% 76.3% 80.1% 77.3% Traingdx 87.8% 86.6% 77.8% 87.6% Traingdm 89.3% 90.6% 87.3% 83.6% Trainlm 91.1% 92.0% 85.2% 93.3%/84.7%/91.3%/98.6% Trainoss 90.0% 87.3% 68.0% 94.1%/83.8%

**Table 4.** Rotor Bar Fault with RMS Feature Accuracies under different Activation functions.

**Table 5.** High Contact Resistance Fault with Mean Feature Accuracies under different Activation Functions.


**Table 6.** Rotor Bar Fault with Mean Feature Accuracies under different Activation Functions.


#### **6. Results**

The results show that different activation functions have been used to obtain greater accuracy by changing the optimizing parameters, as compared to the results obtained in [21], where it may be noted in Table 1 that 95% accuracy had been achieved using an ANN. Moreover, in this research, 96.3%, 97.1%, and 98.0% accuracy are achieved, respectively, using Trainbfg, Trainlm, and Trainoss activation functions for the HCR and rotor bar faults at different levels, specifically for the mean and RMS features. The mean features show the functioning or working features for the fault detection, as well as contain the overall important and useful information (features/data points) of the faults. Moreover, mean covers all the values of the dataset. From the Table 1 in [23], this research contributes mainly regarding two faults (high-contact resistance fault and rotor bar fault) with the implementation of an ANN classifier. Although the ANN classifier has been used with different type of faults, particularly for stator winding faults, as tabulated in Table 1 in [24] and discussed in the 'Related Work' section of this paper, the accuracies of fault detection and classification for the mentioned faults with different techniques are lower than the accuracies achieved in this research.

### *Discussion*

Technically speaking, some other approaches are also recommended for detection and classification of faults for the features that are fed as an input to the system. Linear Discriminant Analysis (LDA) and Principle Component Analysis (PCA), supervised and unsupervised machine learning techniques for dimensionality reduction approaches of data, both look for linear combinations of the features which best explain the data. Furthermore, ANN as a classifier uses an iterative-based approach, and accordingly, by retraining the classifier we get higher accuracy. In that case, LDA is preferred for obtaining perfect accuracy without further iterations, and LDA is trained on the dataset one time to get good accuracy. Both LDA and PCA are recommended for future work. Moreover, the ANN approach is iterative and retrains the system several times to achieve the highest accuracy, and preferably, for good classification results. On the contrary, this is not a mechanism for the LDA and PCA classifiers.

No doubt, IoT enables the exchange of data and connection of technologies with other devices using cloud-based networks and systems over the Internet, however, the most recent advancements in technology have also supported the opportunity and facility of Mobile Edge Computing (MEC) approaches [24], which can manage the time delay and energy consumption of IoT devices more appropriately.

#### **7. Conclusions**

The results show that mean features had greater accuracy than RMS features. Furthermore, when a fault appeared, the variance in detail coefficients had increased beyond the coefficients of healthy motor signal details. Moreover, in this research, the ANN classifier was used; by retraining the classifier and optimizing the parameters, even 100% accuracy could be obtained. However, so far, an accuracy of 98.0% was achieved using mean rotor bar fault features. Table 7 shows entropy features for the rotor bar fault, and it is found that with entropy features, 0.0% accuracies are obtained. Here, an ANN classifier with 21 hidden layers and 11 epochs was trained. The results obtained are based on an iterative method, since repeatedly training the algorithm can yield more accurate results. Accordingly, the best result is considered and achieved by training the algorithm several times. As presented in the tables, different accuracies are obtained using the ANN classifier at various levels. In addition, 98.0% accuracy is obtained using mean features for the rotor bar fault at level 7, while 98.6% accuracy is obtained for rotor bar fault with RMS features at level 9. Furthermore, 96.4% accuracy was achieved for the HCR fault, and was classified using RMS features at level 5. Therefore, it may be concluded that the faults have been classified according to different features with good accuracy. Figure 13 presents the tested results for the HCR fault at level 9 with RMS features, using the 'npr' tool in MATLAB. Meanwhile, the ANN was trained to obtain results and for training and testing purposes. The utility of this work lies in its application in monitoring induction motors to ensure their availability in an IoT environment. Availability, as the core component of cyber-security, is the ease with which an organization's critical data, applications, induction machines, and system resources can be accessed by authorized users in times of need.

**Table 7.** Rotor Bar Fault with Entropy Features Accuracies with different Activation Functions.


**Author Contributions:** Conceptualization, M.Z., F.A.S. and S.K.; methodology, M.Z., F.A.S. and S.K.; software, M.Z., F.A.S., S.K. and M.I.; validation, M.Z., F.A.S., S.K., A.M.A., M.U., M.K.H. and W.T.; formal analysis, M.Z., W.T., F.A.S., S.K. and M.I.; investigation, M.Z., F.A.S. and A.M.A.; writing original draft preparation, M.Z., F.A.S., W.T. and M.U.; writing—review and editing, M.Z., F.A.S., S.K., M.I. and A.M.A.; supervision, F.A.S., W.T., M.U. and S.K.; funding acquisition, A.M.A., M.I., S.K. and S.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** The researchers would like to thank the Deanship of Scientific Research Qassim University for funding the publication of this project.

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

### **Appendix A**


*% 'trainscg' uses less memory. Suitable in low memory situations.*

**trainFcn = 'trainlm';** *% Scaled conjugate gradient backpropagation. %(trainFcn(Activation-Funcation)can be replaced with, i-e 'oss','lm','cgp' and so on) % Create a Pattern Recognition Network* **hiddenLayerSize = 21; net = patternnet(hiddenLayerSize, trainFcn);** *% Setup Division of Data for Training, Validation, Testing* **net.divideParam.trainRatio = 70/100; net.divideParam.valRatio = 15/100; net.divideParam.testRatio = 15/100;** *% Train the Network* **[net, tr] = train (net, x, t);** *% Test the Network* **y = net(x); e = gsubtract(t, y); performance = perform (net, t, y) tind = vec2ind (t); yind = vec2ind(y); percentErrors = sum(tind ~= yind)/numel(tind);** *% View the Network* **view(net) % Plots** *% Uncomment these lines to enable various plots.* **%figure, plotperform(tr) %figure, plottrainstate(tr) %figure, ploterrhist(e) %figure, plotconfusion(t, y) %figure, plotroc (t, y) end**
