# An Orthogonal Wavelet Transform-Based K-Nearest Neighbor Algorithm to Detect Faults in Bearings

Authors: Weipeng Li; Yan Cao; Lijuan Li; Siyu Hou
Journal: Shock and Vibration
 (2022)

---

## Abstract

We aim to address the issues of difficult acquisition of bearing fault data, few feature data sets, and low efficiency of intelligent diagnosis. In this paper, an orthogonal wavelet transform K-nearest neighbor (OWTKNN) diagnosis method has been proposed. The (OWT) method extracts the peaks of each detail signal as training samples and uses the K-Nearest Neighbor (KNN) method for fault classification. The classification results of the multiple fault test data obtained through rolling bearing tests show that the method can reach a fault recognition rate of 100%, and compared with KNN without extracted eigenvalues, it significantly improves the classification effects from various unknown fault data of the bearing inner ring and ball, shortens classification time, and improves the intelligent diagnosis efficiency. In addition, it achieves an overall recognition rate exceeding 95%, Comparing OWT, EMD, and VMD feature extraction methods, both the OWTKNN and k-center point clustering algorithm do not exceed 80% (KCA), also bearing testimony of the effectiveness of this method.


---

## Body

## 1. Introduction

Fault intelligent diagnosis and identification are an important reason to develop machine learning methods [1, 2] and apply them in mechanical fault diagnosis technology [3, 4] in recent years. In supervised learning [5, 6], the process of using a set of samples from a known class to adjust the parameters of a classifier to achieve the required performance is also known as supervised training or teacher-guided learning. The supervised learning algorithm is a function that analyzes this training data and produces an inference that can be used to map new instances. An optimal solution will allow the algorithm to correctly determine class labels for those unseen instances. K-Nearest Neighbor (KNN) [7–9], originally proposed by Cover and Hart in 1968, is a comparatively theoretically mature classification algorithm. It is a commonly used supervised learning method with a very simple mechanism: when a test sample is given, find the k training samples that are near it in the set based on distance measurements, and then make predictions based on the information of these k “neighbors.” Those methods that learn the samples during the training phase are called “eager learning” [10]. However, in engineering applications, since most fault signals have rough signals and positive and negative data, traditional signal processing methods are not applicable, and if the collected signals are directly used in the K-Nearest Neighbor algorithm for fault diagnosis, incorrect classifications will occur. On the other hand, the KNN algorithm is better suited for automatically classifying the class domain with large sample sizes, while those with small sample sizes are prone to misclassifications. Therefore, using an appropriate method for signal feature extraction not only reflects the feature information contained in the signal more accurately, it also greatly reduces data dimensions so that the KNN algorithm can quickly and accurately give fault diagnostic results. KNN is extremely effective in classifying vibration signals from faults in bearings, analyzing and classifying angle grinder working conditions, and analyzing acoustic signals with infrared (IR) thermal imaging and infrared image processing technology, solidifying its promise as a tool that can improve accuracy in fault diagnosis [11–13].Wavelet transform is an emerging branch of applied mathematics that was developed in the late 1980s. Wavelet transform has multiresolution characteristics (multiscale characteristics) that can gradually observe coarse and fine signals. Its multiresolution properties also manifest through its “zoom” feature, which is crucial for localized analyses of nonstationary signals [14, 15]. Feature extraction does possess a critical bottleneck because noiseless weak fault signals directly affect the accuracy, effectiveness, or abnormal values of whole-body vibration fault diagnosis in aero-engines. When predicting the service lives of key bearing components in fault diagnosis [16, 17], it is crucial to reflect the running state [18] of the system through extracted features and remain highly sensitive to abnormal signals, and the wavelet entropy theory analysis technology that has been proposed can effectively process vibration signals for general industrial equipment. However, since fault signals are prone to interference from noise and outliers, it is impractical to completely rely on the wavelet entropy method to diagnose whole-body vibration faults in aero-engines [19, 20]. The orthogonal wavelet transform is a wavelet transform with an orthogonal wavelet function that can characterize the local signal attributes in both the time and frequency domains, which can decompose the original signal into the corresponding local details at each scale. Analyzing these local detail signals can more effectively acquire attributed information from the original data. Therefore, this paper proposes combining orthogonal wavelet transform (OWT) [21, 22] with the KNN algorithm [23, 24], and this Orthogonal Wavelet Transform K-Nearest Neighbor (OWTKNN) is applied to fault diagnosis. The OWT method extracts peak-to-peak signals of each detail as training samples of the KNN algorithm, and learning the unlabeled training samples reveals the intrinsic properties and laws of the data. The results show the following: (1) Compared with KNN without extracted eigenvalues, this method can effectively process complex mechanical vibration signals. (2) Obviously improve the classification effect of various fault data of the bearing inner ring and the ball, shorten the classification time, and improve the efficiency of intelligent diagnosis. (3) By changing the features of different layers of orthogonal wavelet. (4) Compared with the K center clustering algorithm (KCA), the effectiveness of this method is also proved [25–27].The innovations and main contributions of this paper are described as follows [28–30]:(1)
This paper proposes a method combining the Orthogonal Wavelet Transformation (OWT) and K-Nearest Neighbor (KNN)(2)
The orthogonal wavelet transform refers to the selection of orthogonal wavelet function for the wavelet transform to be able to characterize the local characteristics of the signal in both the time domain and the frequency domain(3)
The Orthogonal Wavelet Transformation (OWT) method is used to extract the peak-to-peak value of each detail signal as a training sample for OWTKNN fault classification(4)
The effectiveness of the OWTKNN method of the method has been verified by comparing it with the commonly used signal feature extraction methods EMD and VMD


## 2. K-Nearest Neighbor Algorithm

### 2.1. Principles of the K-Nearest Neighbor Algorithm

The K-Nearest Neighbor (KNN) classification algorithm, a theoretically mature method, is also one of the simplest machine learning algorithms. The idea behind this method is that if the majority of the k nearest (i.e., the closest neighbors in the feature space) samples in the vicinity of a sample belong to a certain class, the sample also belongs to that class [31, 32]. That is, given a training dataset, for a new input instance, find the k nearest instances to the instance in the training dataset (i.e., the k neighbors mentioned above), and if the majority of these k instances belong to a certain class, classify the input instance into this class. As shown in Figure 1, if k = 3, the nearest 3 neighbors of the green dot are 2 red triangles and 1 blue square. The minority is subordinate to the majority. Based on the statistical method, the green point will be classified as a red triangle class. If k = 5, the nearest 5 neighbors of the green dot are 2 red triangles and 3 blue squares; the minority is still subordinate to the majority. Based on the statistical method, it is determined that this green point to be classified is subordinate to the class of blue squares. When it is not possible to determine which class the current point to be classified is subordinate to, we can look at its location characteristics based on the statistical theory, measure the weights of its surrounding neighbors, and classify it as (or assign it to) the class with the greater weights. This is the core concept of the KNN algorithm.Figure 1
Example of the KNN method.


### 2.2. Characteristics of the KNN Algorithm

The advantages of the KNN algorithm are as follows:(1)
Simple, effective, low recurrence, no parameter estimation, no training.(2)
Highly accurate, unaffected by noise.(3)
Since the KNN method primarily relies on a limited number of neighboring samples, rather than on the discriminative class domain to determine its class, it is more suitable than other methods for a set of samples to be assigned with more intersection or overlap of class domains.(4)
It is especially suitable for multiclassification problems and features a superior SVM performance.The disadvantages of the KNN algorithm are as follows:(1)
For computing classifications, the computational volume is large, as each sample to be classified has to calculate the distance with all known samples to get thek nearest neighbors.(2)
Poor interpretability, as it cannot be explained as effectively as the decision tree algorithm.(3)
When the samples are unbalanced, if the sample size of one class is large and the other sizes are small, it is possible that when a new sample is an input, the class will account for the majority of thek neighboring samples of that sample.(4)
This algorithm is suitable for automatically classifying classes with large sample sizes. If this algorithm is applied when small sample sizes are presented, it is prone to misclassification.The choice ofk values will significantly impact the algorithm results. A smaller value means that only the training instance that is closer to the input instance can contribute to the prediction results, but overfitting easily occurs. Although a larger value can reduce estimation errors while learning, the disadvantage is that the approximate errors when learning increase. Training instances far away from the input instance will still affect predictions, making those predictions unreliable. When practically applied, the value of k is usually a smaller value, and the intersection and verification method is usually used to determine the optimal value of k [33].The original KNN algorithm is shown in equation (1), and after the weights are introduced, the distance formula is shown in formula (2).(1)dij=∑h=1naih−ajh21/2,(2)dij=∑h=1nωhaih−ajh21/2.In the formula,dij represents the distance between sample i and sample j; n represents the total number of attributes; aij represents the h-th attribute in sample i; the ωh represents the weight of the h-th attribute. By introducing the weights, one can act as an attribute equilibrium, similar to normalization processing.To overcome the unreasonable situation caused by the weight, each class of weight formula is shown in equation (3). After introducing the similarity parameter, the weight calculation formula is shown in equation (4).(3)px,Cj=∑i=1kpaai,Cj,(4)px,Cj=∑i=1kSimai,xpaai,Cj.Suppose that thek nearest neighbor samples of sample x to be classified are collectively divided into the j class, where px,Cj indicates the sample x to be classified. A weight is belonging to class j. Simai,x represents the resemblance between the nearest neighbor sample ai and x, which can be expressed as the reciprocal of the European distance between ai and x.


## 2.1. Principles of the K-Nearest Neighbor Algorithm

The K-Nearest Neighbor (KNN) classification algorithm, a theoretically mature method, is also one of the simplest machine learning algorithms. The idea behind this method is that if the majority of the k nearest (i.e., the closest neighbors in the feature space) samples in the vicinity of a sample belong to a certain class, the sample also belongs to that class [31, 32]. That is, given a training dataset, for a new input instance, find the k nearest instances to the instance in the training dataset (i.e., the k neighbors mentioned above), and if the majority of these k instances belong to a certain class, classify the input instance into this class. As shown in Figure 1, if k = 3, the nearest 3 neighbors of the green dot are 2 red triangles and 1 blue square. The minority is subordinate to the majority. Based on the statistical method, the green point will be classified as a red triangle class. If k = 5, the nearest 5 neighbors of the green dot are 2 red triangles and 3 blue squares; the minority is still subordinate to the majority. Based on the statistical method, it is determined that this green point to be classified is subordinate to the class of blue squares. When it is not possible to determine which class the current point to be classified is subordinate to, we can look at its location characteristics based on the statistical theory, measure the weights of its surrounding neighbors, and classify it as (or assign it to) the class with the greater weights. This is the core concept of the KNN algorithm.Figure 1
Example of the KNN method.


## 2.2. Characteristics of the KNN Algorithm

The advantages of the KNN algorithm are as follows:(1)
Simple, effective, low recurrence, no parameter estimation, no training.(2)
Highly accurate, unaffected by noise.(3)
Since the KNN method primarily relies on a limited number of neighboring samples, rather than on the discriminative class domain to determine its class, it is more suitable than other methods for a set of samples to be assigned with more intersection or overlap of class domains.(4)
It is especially suitable for multiclassification problems and features a superior SVM performance.The disadvantages of the KNN algorithm are as follows:(1)
For computing classifications, the computational volume is large, as each sample to be classified has to calculate the distance with all known samples to get thek nearest neighbors.(2)
Poor interpretability, as it cannot be explained as effectively as the decision tree algorithm.(3)
When the samples are unbalanced, if the sample size of one class is large and the other sizes are small, it is possible that when a new sample is an input, the class will account for the majority of thek neighboring samples of that sample.(4)
This algorithm is suitable for automatically classifying classes with large sample sizes. If this algorithm is applied when small sample sizes are presented, it is prone to misclassification.The choice ofk values will significantly impact the algorithm results. A smaller value means that only the training instance that is closer to the input instance can contribute to the prediction results, but overfitting easily occurs. Although a larger value can reduce estimation errors while learning, the disadvantage is that the approximate errors when learning increase. Training instances far away from the input instance will still affect predictions, making those predictions unreliable. When practically applied, the value of k is usually a smaller value, and the intersection and verification method is usually used to determine the optimal value of k [33].The original KNN algorithm is shown in equation (1), and after the weights are introduced, the distance formula is shown in formula (2).(1)dij=∑h=1naih−ajh21/2,(2)dij=∑h=1nωhaih−ajh21/2.In the formula,dij represents the distance between sample i and sample j; n represents the total number of attributes; aij represents the h-th attribute in sample i; the ωh represents the weight of the h-th attribute. By introducing the weights, one can act as an attribute equilibrium, similar to normalization processing.To overcome the unreasonable situation caused by the weight, each class of weight formula is shown in equation (3). After introducing the similarity parameter, the weight calculation formula is shown in equation (4).(3)px,Cj=∑i=1kpaai,Cj,(4)px,Cj=∑i=1kSimai,xpaai,Cj.Suppose that thek nearest neighbor samples of sample x to be classified are collectively divided into the j class, where px,Cj indicates the sample x to be classified. A weight is belonging to class j. Simai,x represents the resemblance between the nearest neighbor sample ai and x, which can be expressed as the reciprocal of the European distance between ai and x.


## 3. Orthogonal Wavelet Transformations

Wavelet bases are not necessarily orthogonal ones in wavelet transformations, but finding orthogonal wavelet bases is desired in practical applications. The important method for constructing the orthogonal wavelet basis is the multiscale analysis. When the orthogonal wavelet basis is chosen for wavelet transformation, it can decompose the original signals in both time and frequency one by one into the corresponding local detail signals at each scale. By analyzing the local detail signals, one can capture characteristic information from the original data more effectively. The number of orthogonal wavelet decomposition layers, the scale corresponding to one-to-one, and the number of decomposition layers have several scales. Scaling is like using a ruler, and each decomposition layer measures the original signal with a different ruler. Therefore, there are a few decomposition layers with a few rulers. However, the analysis frequency determines the number of decomposition layers. Thus, a finer ruler is required to measure the signal, only related to the original signal data quantity, independent of the sampling frequency, frequency, and sampling period [34].The expansion of functionzt in an arbitrary space L2R under a wavelet basis is called the wavelet transform of function zt (abbreviated as WT) [35], and its expression is as follows:(5)WTza,b=zt,ϕa,bt=1a∫Rztϕt−badt.The wavelet basis in wavelet transform is not necessarily an orthogonal basis, but in practical applications, it prefers to find an orthogonal wavelet basis. An important method for constructing orthogonal wavelet bases is called multiscale analysis.The multiscale analysis is strictly defined by function space terms, assuming that the subspace sequenceVmm∈Z in the space L2R satisfies the following conditions:(1)
(nestedness)：…V2⊂V1⊂…⊂V−2⊂….(2)
(approximation property)：∩m∈zVm=0,∪m∈zVm=L2R.(3)
(scalability)：ft∈Vn⇔f2t∈Vm−1.(4)
Vm=spanφm,nt,n∈Z, i.e., any level of subspace can be formed by the same function of the corresponding scale by translation.(5)
Vm−1=Vm⊕Wm, that is, any level of subspace can be summarized by the next level of subspace and its orthogonal complement space, and the sequences Wm do not overlap with each other and are orthogonal systems.Thus, we call the subspace sequencesVm and Wm multiscale analyses of the function space. Among them, φm,n is called the scale function, and m and n are the scale and translation parameters, respectively.From the aforementioned definitions, we have the following:(6)V0=Vm⊕∑i=1mWi.The application of multiscale analyses in signal processing can be expressed by equation (6). The arbitrary function ft∈V0 can be decomposed on the next level of scale space V1 and wavelet space W1, as follows:(7)ft=p1ft+q1ft,where p1ft=∑kC1,kφ1,k and q1ft=∑kD1,kθ1,k.p1ft is the approximation part, and q1ft is the detail part. Then, the approximation part is further decomposed repeatedly to obtain the approximation and detail parts on any scale. The iterative formula is as follows:(8)pm−1ft=pmft+qmft=∑kCm,kφm,k+∑kDm,kθm,k,where Cm=HCm−1 and Dm=GCm−1. H is the low-pass filter. For each decomposition, the sampling of pmft is twice as sparse as the original, and the resolution is getting coarser while the waveform is getting smoother. G is the mirror high-pass filter of H, and the bandwidth is also reduced by a factor of two each time. After m decompositions, we have the following:(9)ft=pmft+∑j=1mqjft.The formula is the low-frequency global information of the function, and the second term is the corresponding local detail information offt on each scale from V0 to Vm−1, obtained by successive decompositions [36], and the aforementioned decompositions are shown in Figure 2.Figure 2
Orthogonal wavelet analysis.


## 4. Orthogonal Wavelet Transform KNN Multiclassification Diagnosis Method

The aforementioned orthogonal wavelet transform is used to decompose vibration signals, extract the features for the corresponding local signalft on each scale, extract the local signals as a feature vector, and then use the KNN algorithm to classify any faults. This can achieve intelligent fault diagnosis [37]. The specific method is below.Step 1.
The original signal is subjected to anm-layer orthogonal wavelet transform, and the corresponding local detail signals of ft on each scale from V0 to Vm−1 are extracted, which are analyzed as seen in Figure 2, where V0 is the original signal.Step 2.
The peak-to-peak values of the signals on each scale are founded, and the feature vector is constructed. Let the corresponding peak-to-peak value ofWii=1,2,…,m−1 be Xppi=maxWi−minWi,i=1,2,3…,m−1, and the feature vector T is constructed as follows:(10)T=Xpp1,Xpp2,Xpp3,…,Xppm−1.Step 3.
Use the feature vectors constructed in Step2 as learning samples to construct the classification model and train the KNN classifier.Step 4.
The trained KNN multiclassifier is used to classify fault signals.
The steps for the OWTKNN algorithm are shown in the flowchart in Figure3.Figure 3
Flow chart of OWTKNN.


## 5. Experimental Analysis

### 5.1. Experimental Conditions

The bearing fault data from the electrical engineering laboratory of Case Western Reserve University, USA, on the rolling bearing experimental bench in Figure4 were analyzed [38] to validate the effectiveness of the OWTKNN multiclassification diagnostic method. The bearing model was 6205-2RS deep groove ball bearing, which was mounted on the drive end of the right side of the motor to support the motor shaft. The rolling bearing multichannel fault signal was synchronously collected by three acceleration sensors, and the sensor installation positions are shown in Figure 4 [39, 40]. The sampling frequency was 12 kHz, and the sampling length was 512 points in the normal state of the bearing. Two sets of normal data were collected at a bearing rotation speed of 1797 r/min and under 0 HP load and at a bearing rotation speed of 1772 r/min and under 1 HP load, respectively. Using electrical discharge machining (EDM) for motor bearing fault implantations, a fault with a diameter of 0.007 in. It was introduced between the inner track and the ball. 4 sets of data were collected for 0 HP and 1 HP load under the same sampling conditions, with the inner ring and ball faults each having 2 sets of data. For the fault with a diameter of 0.014 in., another 4 sets of data were also collected for 0 HP and 1 HP loads under the same conditions, with the inner rings and ball faults each having 2 sets of data. As a result, 8 sets of data were collected in total. The eight sets of data collected were used as input vectors for the OWTKNN multiclassifier to test fault signal classification. Figures 5 and 6 show the waveforms after 5 layers of orthogonal wavelet decomposition when the bearing under 0 HP load was normal and in the inner ring fault (0.007 in.), respectively. From the figures, it can be seen that as the decomposition layers increased, the local signal’s regularity increased, which was especially noticeable in the second and third layers. With the increase in decomposition layers, nonstationary signals were transformed into stationary signals, signal periodicity was enhanced from the lower to the higher levels, and the effective information weakened and was even lost. When selecting the number of layers of orthogonal wavelet decomposition, it is necessary to consider both stationarity and signal validity to ensure the best classification effect.Figure 4
Rolling bearing test bench.Figure 5
5-layer normal signal wavelet decomposition.Figure 6
5-layer fault signal wavelet decomposition.


### 5.2. Experiment Steps

First, no OWT was conducted on the data. Feature extraction was not conducted on the original data that was collected when the bearing was normal, and the bearing’s inner ring was faulty (0.007 inch), respectively, under 0 HP load, with both cases each having 100 sets. 200 sets of data were used as the input vector of the KNN multiclassifier for testing the fault signal classification, with the parameterk = 3. The test results are shown in Figure 7. In this figure, the red∗represents the normal data under 0HP, and the blue×represents the inner ring fault data under 0HP. It can be seen in the figure that the red ∗ and blue× are cross-distributed along the path, which made it difficult to distinguish fault categories. After that, no feature extraction was performed for the data collected when the bearing was normal, and the bearing’s inner ring was faulty (0.007 inch), respectively, under 1 HP load, with both cases each having 10 sets. The 20 sets of data were used as training samples, and the trained KNN multiclassifier mentioned earlier was used to observe the classification results for the fault categories. As can be seen in Figure 7, the red ○ and blue □ represent the normal data and fault data for the 1HP cases, respectively. It can be seen that the red ○ and blue □ are cross-distributed in the figure, which made it difficult to distinguish between the fault category.Figure 7
KNN when the bearing was normal and subject to 0.007 in. inner ring fault, respectively.Next, the OWT peak-to-peak feature extraction was conducted on the data.OWT was conducted on 200 sets of data. With 5-layer decomposition and the orthogonal wavelet function being 10db, the peak-to-peak feature vectors of the 5th and 4th layers were extracted as the input vectors of the OWTKNN multiclassifier to test fault signal classifications. The classification results are shown in Figure8. In this figure, the red ∗ represents the normal data under 0HP, and the blue × represents the inner ring fault data under 0HP. It can be seen that the red∗and blue×are well divided into two parts in the figure. The boundaries of these two types of data are clearly defined, the classification effect stands out, and the correct diagnostic rate reaches 100%. After that, another 20 sets of data were collected when the bearing was normal and the bearing’s inner ring was faulty (0.007 inch), respectively, under 0 HP load, with both cases each having 10 sets. The peak-to-peak feature vectors of the 5th and 4th layers were extracted as the sample data to be classified. The trained OWTKNN multiclassifier was used to observe the results of the fault category classification. The red ○ and blue □ in Figure 8 represent the normal data the fault data of the 0HP case, respectively. As seen in the figure, the two sets of data to be classified and represented by red ○ and blue □, respectively, can be identified completely and correctly in the figure, and the recognition rate is 100%, which means it identifies the fault category very well. Then the 20 sets of data were collected when the bearing was normal and the bearing’s inner ring was faulty (0.007 inch), respectively, under 1 HP load, with both cases each having 10 sets. The same method was employed to observe the classification results of the fault category. In Figure 9, the red ○ and blue □ represent the normal data and fault data of the 1HP case, respectively. It can also be seen in the figure that red ○ and blue □ for the two sets of data to be classified can be recognized completely and correctly in the figure with a 100% recognition rate, which means that unknown fault categories can be well identified.Figure 8
OWTKNN of the 4th and 5th layers when the bearing was normal and with an inner ring fault (0.007 in.), respectively.Figure 9
OWTKNN of the 4th and 5th layers when the bearing was exhibiting an inner ring fault (0.007 in.) for the 1 HP case.Again, we changed the orthogonal wavelet feature extraction method. For the 200 sets of data in Figure7, the peak-to-peak feature vectors of the 4th and 3rd layers were extracted as the input vectors of the OWTKNN multiclassifier to test fault signal classification. The classification results are shown in Figure 10. In this figure, the red∗represents normal data under 0HP, and the blue×represents inner ring fault data under 0HP. It can be seen that the red∗and blue×are well divided into two parts in the figure, and the two types of data are clearly bounded by farther distances, with a clear classification effect and 100% correct diagnostic rate. The two sets of data are more concentrated. In particular, the normal data samples are concentrated near the vertical coordinate 0.2 unit line, with a better clustering effect. It also shows that after the orthogonal wavelet feature extraction in the 3rd and 4th layers, although regularity was reduced, more information from the original samples was retained, and the classification effect was better. Then the 20 sets of data were collected when the bearing was normal, and the bearing’s inner ring was faulty (0.007 inches), respectively, under 1 HP load, with both cases each having 10 sets subject to the same OWT. The peak-to-peak feature vectors of the 4th and 3rd layers were extracted as samples to be classified. The trained OWTKNN multiclassifier was used to observe the results of fault category classification. In Figure 10, the red ○ and blue □ represent the normal data and fault data of the 1HP case, respectively. It can also be seen in the figure that red ○ and blue □ for the two sets of data to be classified can be recognized completely and correctly in the figure with a 100% recognition rate, which means that the fault category can be recognized very well. The unknown normal samples were more concentrated and clustered more obviously after recognition.Figure 10
OWTKNN of the 3th and 4th layers when the bearing was normal and with an inner ring fault (0.007 in.).Different feature extraction methods are subsequently compared with Orthogonal Wavelet k-Nearest Neighbors (OWTKNN). Compared with Figure8, the original 0 HP bearing fault data were collected for every 100 sets of 200 sets of data, which have been used to test different algorithms and feature extraction for fault signal classification, as illustrated in Figure 11. As inferred from the figure (EMD), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundaries of the two types of data are unclear cross-distributed, and the classification effect is not obvious, each of which consists of more than 20 parts. The fault data is misclassified, and the diagnosis accuracy rate is only about 80%. As inferred from the figure (VMD), the boundaries of red∗normal data and blue∗inner circle fault data are unclear, the two types of data cannot be distinguished, and the diagnostic accuracy rate only reaches 50%. The classification effects of rms, kurtosis, and impulse factor feature extraction are compared in Table 1.Figure 11
EMD and VMD feature extraction were compared with OWTKNN.Table 1
Comparison of OWTKNNs for different feature extraction methods.
AlgorithmEvery 100 sets of data OWTKNN classification effect 0HPEMD algorithm feature extractionIn Figure11 (EMD), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundaries of the two types of data are unclear, cross-distributed, and the classification effect is not obvious. Each consists of over 20 parts, the fault data is misclassified, and the correct rate of diagnosis only reaches 20%.VMD algorithm feature extractionIn Figure11 (VMD), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, cross-distributed, the two types of data cannot be distinguished, and the diagnostic accuracy rate is only about 50%.K-centre clustering algorithm (KCA)In Figure12 (KCA), the red ∗ normal data and the blue × inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, the cross distribution, and the classification effect is inconspicuous, each with more than 20 parts the fault data is misclassified, and the diagnosis accuracy rate is only about 80%.Rms extractionIn Figure12 (rms), the red∗normal data and the blue∗inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, and the boundary is cross-distributed, and the classification effect is not obvious, each with 10 multiple fault data are misclassified, and the diagnosis accuracy rate is only about 90%.KurtosisExtractionIn Figure12 (kurtosis), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is not very clear, cross-distributed. The two types of data cannot be distinguished, and the diagnostic accuracy is only around 30%.Impulse factors feature extractionIn Figure12 (impulse factor), the red∗normal data and the blue∗inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, cross-distributed, the two types of data cannot be distinguished, and the diagnostic accuracy rate only reaches about 30%.Figure 12
KCA, Rms, Kurtosis, Impulse factor feature extraction, and comparison of OWTKNN.Finally, OWTKNN verification was conducted on the multiple fault signals obtained. Compared to Figure9, for the 200 sets of data originally collected when the bearing was in faulty under 0 HP load with both cases each having 100 sets, the peak-to-peak feature vectors of the 5th and 4th layers were extracted as the input vectors of the OWTKNN multiclassifier to test fault signal classification. 20 sets of data were subsequently collected when the bearing was faulty (0.007 inches), under 1 HP load, with both cases each having 10 sets. The peak-to-peak feature vectors of the 5th and 4th layers were extracted as samples to be classified. The trained OWTKNN multiclassifier was used to observe the results of the fault category classification, and the fault classification effect is listed in Table 2.Table 2
Comparison of OWTKNNs for multiple fault signals.
Fault 1Fault 2OWTKNN classification effect of every 100 sets of data for the 0 HP caseOWTKNN multiclassification effect for every 10 datasets for the 1 HP caseThe bearing was normalInner ring 0.007 in.In Figure9, the red ∗ and blue × for the normal data from the bearing and fault data of the inner ring are smoothly divided into two parts. The boundary of the two types of data is clear, with obvious classification effects and a correct diagnosis rate of 100%.In Figure9, for the two sets of classified data, the normal bearing and inner ring fault represented by red ○ and blue □, respectively, can be correctly identified with a recognition rate of 100%. This means that the fault category can be effectively recognized.Inner ring 0.007 in.Ball 0.007 in.In Figure13, the red ∗ and blue × for the fault data of the inner ring and ball are well divided into two parts. The boundary of the two types of fault data is clear except for 2 data points in close proximity, with obvious classification effects and a correct diagnosis rate exceeding 99%.In Figure13, for the two sets of data to be classified, the faults of the inner ring and the ball represented by red ○ and blue □, respectively, can be completely correctly identified with a recognition rate of 100%. This means that the fault category can be well recognized.Inner ring 0.007 in.Ball 0.014 in.In Figure14, the red ∗ and blue × for the fault data of the inner ring and ball are well divided into two parts. The boundary of the two types of fault data is clear except that 2 blue × ball fault data points are improperly classified. The classification effect is obvious, and the correct diagnosis rate exceeds 98%.In Figure14, to classify the two sets of data to, the faults of the inner ring and the ball represented by red ○ and blue □, respectively, can be correctly identified with a recognition rate of 100%. This means that the fault category can be recognized quite well.Inner ring 0.007 in.Inner ring 0.014 inIn Figure15, the red ∗ and blue × for the fault data of the inner ring and ball are divided into two parts quite well. For the data points, except for 2 red ∗ inner circle faults (0.007 in.) and 5 blue × inner circle faults (0.014 in.) which are improperly classified, the other data boundaries are clearly defined, the classification effect is obvious, and the correct diagnosis rate over 95%.In Figure15, to classify the two sets of data to, the fault (0.007 in.) and the fault (0.014 in.) of the inner ring represented by red ○ and blue □, respectively, can be correctly identified with a recognition rate of 100%. This means that the fault category can be effectively recognized.Figure 13
OWTKNN of 0.007 in. inner ring fault and 0.007 in. ball fault.Figure 14
OWTKNN of 0.007 in. inner ring fault and 0.014 in. ball fault.Figure 15
OWTKNN of 0.007 in. and 0.014 in. inner ring faults.


## 5.1. Experimental Conditions

The bearing fault data from the electrical engineering laboratory of Case Western Reserve University, USA, on the rolling bearing experimental bench in Figure4 were analyzed [38] to validate the effectiveness of the OWTKNN multiclassification diagnostic method. The bearing model was 6205-2RS deep groove ball bearing, which was mounted on the drive end of the right side of the motor to support the motor shaft. The rolling bearing multichannel fault signal was synchronously collected by three acceleration sensors, and the sensor installation positions are shown in Figure 4 [39, 40]. The sampling frequency was 12 kHz, and the sampling length was 512 points in the normal state of the bearing. Two sets of normal data were collected at a bearing rotation speed of 1797 r/min and under 0 HP load and at a bearing rotation speed of 1772 r/min and under 1 HP load, respectively. Using electrical discharge machining (EDM) for motor bearing fault implantations, a fault with a diameter of 0.007 in. It was introduced between the inner track and the ball. 4 sets of data were collected for 0 HP and 1 HP load under the same sampling conditions, with the inner ring and ball faults each having 2 sets of data. For the fault with a diameter of 0.014 in., another 4 sets of data were also collected for 0 HP and 1 HP loads under the same conditions, with the inner rings and ball faults each having 2 sets of data. As a result, 8 sets of data were collected in total. The eight sets of data collected were used as input vectors for the OWTKNN multiclassifier to test fault signal classification. Figures 5 and 6 show the waveforms after 5 layers of orthogonal wavelet decomposition when the bearing under 0 HP load was normal and in the inner ring fault (0.007 in.), respectively. From the figures, it can be seen that as the decomposition layers increased, the local signal’s regularity increased, which was especially noticeable in the second and third layers. With the increase in decomposition layers, nonstationary signals were transformed into stationary signals, signal periodicity was enhanced from the lower to the higher levels, and the effective information weakened and was even lost. When selecting the number of layers of orthogonal wavelet decomposition, it is necessary to consider both stationarity and signal validity to ensure the best classification effect.Figure 4
Rolling bearing test bench.Figure 5
5-layer normal signal wavelet decomposition.Figure 6
5-layer fault signal wavelet decomposition.


## 5.2. Experiment Steps

First, no OWT was conducted on the data. Feature extraction was not conducted on the original data that was collected when the bearing was normal, and the bearing’s inner ring was faulty (0.007 inch), respectively, under 0 HP load, with both cases each having 100 sets. 200 sets of data were used as the input vector of the KNN multiclassifier for testing the fault signal classification, with the parameterk = 3. The test results are shown in Figure 7. In this figure, the red∗represents the normal data under 0HP, and the blue×represents the inner ring fault data under 0HP. It can be seen in the figure that the red ∗ and blue× are cross-distributed along the path, which made it difficult to distinguish fault categories. After that, no feature extraction was performed for the data collected when the bearing was normal, and the bearing’s inner ring was faulty (0.007 inch), respectively, under 1 HP load, with both cases each having 10 sets. The 20 sets of data were used as training samples, and the trained KNN multiclassifier mentioned earlier was used to observe the classification results for the fault categories. As can be seen in Figure 7, the red ○ and blue □ represent the normal data and fault data for the 1HP cases, respectively. It can be seen that the red ○ and blue □ are cross-distributed in the figure, which made it difficult to distinguish between the fault category.Figure 7
KNN when the bearing was normal and subject to 0.007 in. inner ring fault, respectively.Next, the OWT peak-to-peak feature extraction was conducted on the data.OWT was conducted on 200 sets of data. With 5-layer decomposition and the orthogonal wavelet function being 10db, the peak-to-peak feature vectors of the 5th and 4th layers were extracted as the input vectors of the OWTKNN multiclassifier to test fault signal classifications. The classification results are shown in Figure8. In this figure, the red ∗ represents the normal data under 0HP, and the blue × represents the inner ring fault data under 0HP. It can be seen that the red∗and blue×are well divided into two parts in the figure. The boundaries of these two types of data are clearly defined, the classification effect stands out, and the correct diagnostic rate reaches 100%. After that, another 20 sets of data were collected when the bearing was normal and the bearing’s inner ring was faulty (0.007 inch), respectively, under 0 HP load, with both cases each having 10 sets. The peak-to-peak feature vectors of the 5th and 4th layers were extracted as the sample data to be classified. The trained OWTKNN multiclassifier was used to observe the results of the fault category classification. The red ○ and blue □ in Figure 8 represent the normal data the fault data of the 0HP case, respectively. As seen in the figure, the two sets of data to be classified and represented by red ○ and blue □, respectively, can be identified completely and correctly in the figure, and the recognition rate is 100%, which means it identifies the fault category very well. Then the 20 sets of data were collected when the bearing was normal and the bearing’s inner ring was faulty (0.007 inch), respectively, under 1 HP load, with both cases each having 10 sets. The same method was employed to observe the classification results of the fault category. In Figure 9, the red ○ and blue □ represent the normal data and fault data of the 1HP case, respectively. It can also be seen in the figure that red ○ and blue □ for the two sets of data to be classified can be recognized completely and correctly in the figure with a 100% recognition rate, which means that unknown fault categories can be well identified.Figure 8
OWTKNN of the 4th and 5th layers when the bearing was normal and with an inner ring fault (0.007 in.), respectively.Figure 9
OWTKNN of the 4th and 5th layers when the bearing was exhibiting an inner ring fault (0.007 in.) for the 1 HP case.Again, we changed the orthogonal wavelet feature extraction method. For the 200 sets of data in Figure7, the peak-to-peak feature vectors of the 4th and 3rd layers were extracted as the input vectors of the OWTKNN multiclassifier to test fault signal classification. The classification results are shown in Figure 10. In this figure, the red∗represents normal data under 0HP, and the blue×represents inner ring fault data under 0HP. It can be seen that the red∗and blue×are well divided into two parts in the figure, and the two types of data are clearly bounded by farther distances, with a clear classification effect and 100% correct diagnostic rate. The two sets of data are more concentrated. In particular, the normal data samples are concentrated near the vertical coordinate 0.2 unit line, with a better clustering effect. It also shows that after the orthogonal wavelet feature extraction in the 3rd and 4th layers, although regularity was reduced, more information from the original samples was retained, and the classification effect was better. Then the 20 sets of data were collected when the bearing was normal, and the bearing’s inner ring was faulty (0.007 inches), respectively, under 1 HP load, with both cases each having 10 sets subject to the same OWT. The peak-to-peak feature vectors of the 4th and 3rd layers were extracted as samples to be classified. The trained OWTKNN multiclassifier was used to observe the results of fault category classification. In Figure 10, the red ○ and blue □ represent the normal data and fault data of the 1HP case, respectively. It can also be seen in the figure that red ○ and blue □ for the two sets of data to be classified can be recognized completely and correctly in the figure with a 100% recognition rate, which means that the fault category can be recognized very well. The unknown normal samples were more concentrated and clustered more obviously after recognition.Figure 10
OWTKNN of the 3th and 4th layers when the bearing was normal and with an inner ring fault (0.007 in.).Different feature extraction methods are subsequently compared with Orthogonal Wavelet k-Nearest Neighbors (OWTKNN). Compared with Figure8, the original 0 HP bearing fault data were collected for every 100 sets of 200 sets of data, which have been used to test different algorithms and feature extraction for fault signal classification, as illustrated in Figure 11. As inferred from the figure (EMD), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundaries of the two types of data are unclear cross-distributed, and the classification effect is not obvious, each of which consists of more than 20 parts. The fault data is misclassified, and the diagnosis accuracy rate is only about 80%. As inferred from the figure (VMD), the boundaries of red∗normal data and blue∗inner circle fault data are unclear, the two types of data cannot be distinguished, and the diagnostic accuracy rate only reaches 50%. The classification effects of rms, kurtosis, and impulse factor feature extraction are compared in Table 1.Figure 11
EMD and VMD feature extraction were compared with OWTKNN.Table 1
Comparison of OWTKNNs for different feature extraction methods.
AlgorithmEvery 100 sets of data OWTKNN classification effect 0HPEMD algorithm feature extractionIn Figure11 (EMD), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundaries of the two types of data are unclear, cross-distributed, and the classification effect is not obvious. Each consists of over 20 parts, the fault data is misclassified, and the correct rate of diagnosis only reaches 20%.VMD algorithm feature extractionIn Figure11 (VMD), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, cross-distributed, the two types of data cannot be distinguished, and the diagnostic accuracy rate is only about 50%.K-centre clustering algorithm (KCA)In Figure12 (KCA), the red ∗ normal data and the blue × inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, the cross distribution, and the classification effect is inconspicuous, each with more than 20 parts the fault data is misclassified, and the diagnosis accuracy rate is only about 80%.Rms extractionIn Figure12 (rms), the red∗normal data and the blue∗inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, and the boundary is cross-distributed, and the classification effect is not obvious, each with 10 multiple fault data are misclassified, and the diagnosis accuracy rate is only about 90%.KurtosisExtractionIn Figure12 (kurtosis), the red∗normal data and the blue×inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is not very clear, cross-distributed. The two types of data cannot be distinguished, and the diagnostic accuracy is only around 30%.Impulse factors feature extractionIn Figure12 (impulse factor), the red∗normal data and the blue∗inner circle fault data are divided into two parts in the figure. The boundary of the two types of data is unclear, cross-distributed, the two types of data cannot be distinguished, and the diagnostic accuracy rate only reaches about 30%.Figure 12
KCA, Rms, Kurtosis, Impulse factor feature extraction, and comparison of OWTKNN.Finally, OWTKNN verification was conducted on the multiple fault signals obtained. Compared to Figure9, for the 200 sets of data originally collected when the bearing was in faulty under 0 HP load with both cases each having 100 sets, the peak-to-peak feature vectors of the 5th and 4th layers were extracted as the input vectors of the OWTKNN multiclassifier to test fault signal classification. 20 sets of data were subsequently collected when the bearing was faulty (0.007 inches), under 1 HP load, with both cases each having 10 sets. The peak-to-peak feature vectors of the 5th and 4th layers were extracted as samples to be classified. The trained OWTKNN multiclassifier was used to observe the results of the fault category classification, and the fault classification effect is listed in Table 2.Table 2
Comparison of OWTKNNs for multiple fault signals.
Fault 1Fault 2OWTKNN classification effect of every 100 sets of data for the 0 HP caseOWTKNN multiclassification effect for every 10 datasets for the 1 HP caseThe bearing was normalInner ring 0.007 in.In Figure9, the red ∗ and blue × for the normal data from the bearing and fault data of the inner ring are smoothly divided into two parts. The boundary of the two types of data is clear, with obvious classification effects and a correct diagnosis rate of 100%.In Figure9, for the two sets of classified data, the normal bearing and inner ring fault represented by red ○ and blue □, respectively, can be correctly identified with a recognition rate of 100%. This means that the fault category can be effectively recognized.Inner ring 0.007 in.Ball 0.007 in.In Figure13, the red ∗ and blue × for the fault data of the inner ring and ball are well divided into two parts. The boundary of the two types of fault data is clear except for 2 data points in close proximity, with obvious classification effects and a correct diagnosis rate exceeding 99%.In Figure13, for the two sets of data to be classified, the faults of the inner ring and the ball represented by red ○ and blue □, respectively, can be completely correctly identified with a recognition rate of 100%. This means that the fault category can be well recognized.Inner ring 0.007 in.Ball 0.014 in.In Figure14, the red ∗ and blue × for the fault data of the inner ring and ball are well divided into two parts. The boundary of the two types of fault data is clear except that 2 blue × ball fault data points are improperly classified. The classification effect is obvious, and the correct diagnosis rate exceeds 98%.In Figure14, to classify the two sets of data to, the faults of the inner ring and the ball represented by red ○ and blue □, respectively, can be correctly identified with a recognition rate of 100%. This means that the fault category can be recognized quite well.Inner ring 0.007 in.Inner ring 0.014 inIn Figure15, the red ∗ and blue × for the fault data of the inner ring and ball are divided into two parts quite well. For the data points, except for 2 red ∗ inner circle faults (0.007 in.) and 5 blue × inner circle faults (0.014 in.) which are improperly classified, the other data boundaries are clearly defined, the classification effect is obvious, and the correct diagnosis rate over 95%.In Figure15, to classify the two sets of data to, the fault (0.007 in.) and the fault (0.014 in.) of the inner ring represented by red ○ and blue □, respectively, can be correctly identified with a recognition rate of 100%. This means that the fault category can be effectively recognized.Figure 13
OWTKNN of 0.007 in. inner ring fault and 0.007 in. ball fault.Figure 14
OWTKNN of 0.007 in. inner ring fault and 0.014 in. ball fault.Figure 15
OWTKNN of 0.007 in. and 0.014 in. inner ring faults.


## 6. Conclusion

A method (OWTKNN) for peak-to-peak feature extraction by OWT and fault diagnosis and identification by the KNN multiclassifier was proposed. The method fully utilizes the wavelet decomposition to handle rough signals and the KNN algorithm to classify mechanical fault data signals efficiently with limited surrounding nearest neighbors and extracts peak-to-peak feature information through wavelet decomposition. It can be verified that the proposed method is effective for diagnosing bearing faults by classifying the data for normal bearings and inner ring faults, inner ring faults, and ball faults, and by comparing them with the KCA method. The conclusions drawn are as follows:(1)
This method extracts peak-to-peak feature information by wavelet decomposition. Compared with the KNN methods lacking feature extraction, OWTKNN is more efficient for classifying fault data, with a recognition rate of 100%.(2)
This method can correctly identify and classify the inner ring and ball, inner ring, and inner ring fault signals of various bearing faults, with a total recognition rate exceeding 95%.(3)
By changing the features in different orthogonal wavelet layers, the classification effect witnessed improvements, the classification time was shortened, and the efficiency and accuracy of intelligent diagnosis were significantly improved.(4)
A comparison with the KCA method also proved the effectiveness of the proposed method, and the recognition rate for the KCA method only exceeded 80%.(5)
This method fully utilizes the features that allow wavelet decomposition to properly handle nonstationary signals, and the KNN method can classify mechanical fault data signals with limited neighbors, thereby improving the classification effect by changing the features in different orthogonal wavelet layers(6)
Only the fault data can be clustered properly. If the input fault samples have a large capacity while other capacities are small, a possibility exists that large-capacity samples will account for the majority, leading to misclassification.(7)
The proposed algorithm is more suitable for automatically classifying class domains with large sample sizes, while those with small sample sizes are prone to misclassification. If this fault misclassification were to be overcome, the sample feature extraction method would then be continually improved to allow fault samples to be more representative.OWTKNN is widely used in online fault diagnosis, artificial intelligence, data processing, and other fields, which can substantially improve fault diagnosis and data classification efficiencies. Future research will focus on improving fault diagnosis techniques based on signal analysis of vibrations, acoustic signals, thermal signals, etc. Various types of faults and machines will be analyzed to develop improved mechanical fault diagnosis methods.



---

*Source: 5242106-2022-02-18.xml*