Mechanical Fault Diagnosis Using Color Image Recognition of Vibration Spectrogram Based on Quaternion Invariable Moment

. Automatic extraction of time-frequency spectral image of mechanical faults can be achieved and faults can be identified consequently when rotating machinery spectral image processing technology is applied to fault diagnosis, which is an advantage. Acquired mechanical vibration signals can be converted into color time-frequency spectrum images by the processing of pseudo Wigner-Ville distribution. Then a feature extraction method based on quaternion invariant moment was proposed, combining image processing technology and multiweight neural network technology. The paper adopted quaternion invariant moment feature extraction method and gray level-gradient cooccurrence matrix feature extraction method and combined them with geometric learning algorithm and probabilistic neural network algorithm, respectively, and compared the recognition rates of rolling bearing faults. The experimental results show that the recognition rates of quaternion invariant moment are higher than gray level-gradient cooccurrence matrix in the same recognition method. The recognition rates of geometric learning algorithm are higher than probabilistic neural network algorithm in the same feature extraction method. So the method based on quaternion invariant moment geometric learning and multiweight neural network is superior. What is more, this algorithm has preferable generalization performance under the condition of fewer samples, and it has practical value and acceptation on the field of fault diagnosis for rotating machinery as well.


Introduction
Quality of products and safety of entire production system are affected by working condition of rotary machineries directly.The fault diagnosis is performed and the working condition is monitored so that faults can be detected as early as possible, which is a key issue in the field of engineering.Moreover, signal processing, extractions of the fault features, and pattern recognition play a key role in the process of realization.At present, working state analysis based on vibration signal of machine parts is a common research method of the rotary machinery diagnosis and monitoring.There are many deficiencies of traditional methods of fault diagnosis.For example, time-domain analysis supplies limited information, so it can be only applied to simple machinery.Frequencydomain analysis is based on an assumption of stationary signals, and it analyzes the frequency-domain information of signals but it neglects time-domain characteristics of signals.However, actual signals of mechanical faults are usually nonstationary.In other words, the frequency of signals always changes with time, so time-domain and frequency-domain analysis are no longer suitable to handle complex fault diagnosis.Time-frequency analysis method is an effective method to cope with nonstationary and nonlinear signals.
It includes short time Fourier transform [1], Hilbert timefrequency spectrum analysis [2], Wigner-Ville distribution [3], Wavelet analysis [4], HHT time-frequency analysis, and high order spectral analysis [5,6].Time-frequency methods described above can solve problems of fault signal processing and features extraction successfully, but it is hard to analyze potential weak fault feature as vibration spectrum images are too subjective and the observation ability of operators varies.Only to use the combination of image features extraction and model recognition can avoid the subjective mistakes.Furthermore, the intelligent mechanical fault diagnosis is demanded urgently by the market, and researches to new feature extractions and recognition methods become a common trend.

Mathematical Problems in Engineering
With the development of information theories and machine-vision, fault diagnosis technologies based on image processing has improved a lot.The focus on intelligent image processing is how to exact information to characterize the image features from images.The methods of features extraction which are related to the vibration spectral images usually can be divided into three categories: spectral feature, texture feature, and shape feature.The spectral feature recognition is on the basis of grey level histogram with single spectral band or color histogram with multispectral bands.It is simple, intuitive, and robustness.Zhou et al. [7] and others identified the voice signals successfully according to combinations of spectral features and prosodic features.Combined with spectroscopy, structural, and semantic features, the classification for high-resolution remote sensing images is performed in the literature [8], and it resulted significantly with the support vector machine (SVM).However, different objects may have the same spectral feature, so these algorithms cannot describe specific object accurately.The texture features describe the spatial changes situation of the color, the gradation or the fine structure, and shape of the images [9].Texture feature extraction proposed in literature [10] considered global nature of images, so it can describe regional features steadily.In addition, it has favorable rotation invariance and anti-interference capability.Haralick et al. [11] firstly proposed fourteen feature parameters to show the gray information of the images based on the texture features.The literature [12] effectively realized the image classification by utilizing the wavelet transform to extract the texture feature of the SAR images, selecting wavelet energy feature kurtosis which constitutes the feature vector for the SVM classifier.In literature [13], three-dimensional discrete wavelet texture was utilized to realize the image classification and achieved better result than the spectral-spatial classification method widely used.The disadvantages are that the more the changes of image pixel resolution, the more the deviation of texture feature.Shape features are not only an inherent feature of the rigid body but also an important feature of human object recognition.Shape features can be expressed by form factors and profile factors.Literature [14] applied a feature extraction based on anomaly detection and the local shape features to the high resolution video images of the vessel detection.In addition, some researchers have proposed some image shape feature detection operators.Gool et al. [15] constructed a line moment feature, which is not effected by translation and rotation; Belongie et al. [16] proposed SC (Shape Context) features for detecting edge points; Fergus et al. [17] used the Canny algorithm to select the image edge; Kadir et al. [18] used to calculate the color histogram of the local maximum entropy, and circular the feature extraction area.Shape feature extraction is researched on the necessary part of the image and the integrality of the target is grasped well.The disadvantage is that when the image's target is deformed, the stability of the characterization would decline [19].However, there is no target deformation on the mechanical vibration's time-frequency images that we researched on; consequently, it is appropriate for the field of mechanical fault diagnosis.The "," "," and "" channels of color image can be processed independently as three gray images.However, the relationships between trichannels are ignored, and the processed image will get distortion.Quaternion is a branch of non-Euclidean geometry and is firstly put forward by mathematician Hamilton.In literature [20], some researchers raised up a color images processing method based on the quaternion.Compared with traditional methods, it can sufficiently describe the color relations of the images.Literature [21] rose up a quaternion geometric moment calculation method of the medical images to realize the registration of the skull images.
Images recognition technology is one of the hot spots in the area of artificial intelligence, which has the intuitive and extensive statistical significances.When this method is applied to the faults diagnosis, not only human experience evaluation can be liberated, but also accurate and timely fault warning can be achieved to prevent faults.Time-frequency analysis of the vibration signals can get 2dimensional or 3-dimensional time-frequency distribution images which reflect the features, and image recognition technology can be applied to the color time-frequency images [22].Image recognition methods are usually divided into statistical method [23], syntactic recognition method [24], neural networks method [25], template matching method [26], and geometrical transformation method [27].Furthermore, multiagent system is used in image recognition widely [28][29][30].Multiweight neural network is utilized to identify the faults in the paper.This method especially has unique advantages on solving the pattern recognition problems for the few samples, and it successfully solves a lot of few samples, nonlinearity, and high dimensional and other problems.It has the practical significance on the solutions of faults diagnosis.
This paper utilized image recognition technology to process the mechanical vibration spectral images.The main idea is to analyze mechanical fault signals by using pseudo Wigner-Ville distribution method and explore the feature information of different mechanical faults in time-frequency domain.In order to prevent the color image information losing and ensure the integrality and relevance of the image's triphosphor, the images' invariant moment in quaternion domain has been analyzed; at last quaternion invariable moment features were sent to multiweights neural network for training and testing, and recognition results were got by using unknown samples' test.The experimental result proved that modeling for color images by using quaternion invariable moment created a new method for color images processing, and this method has some practical values as well.

Generation of Mechanical Vibration Time-Frequency Spectral Image
Methodology of fault diagnosis based on mechanical vibration time-frequency color image recognition mainly consists of three steps: (1) generating of vibration spectral color image reflecting mechanical vibration fault's feature; (2) extracting features of vibration spectral image accurately; (3) recognizing the extracted vibration spectral feature effectively.Wigner-Ville distribution can accurately define timefrequency structure of signals [31].For a certain signal denoted here as (), the Wigner-Ville distribution can be defined as There is interference of cross terms in the transformation expressed as (1), and the cross terms will not disappear with the changes of time-frequency distance.In order to eliminate the interference of these cross terms, windowing processing is applied to (1), and a novel transformation, denoted here as pseudo Wigner-Ville distribution, can consequently be obtained and expressed as follows: Wherein, ℎ() of (2) should meet some requirements listed as follows [5]: The length of window ℎ() is limited, which can be set as Δ, and then for any || > Δ/2, ℎ() = 0 is right.(IV) Fourier Transform () for ℎ() is a low-pass function.
Here, ℎ() is selected as rectangular window.Because actual collected signal is discrete, ℎ() should be discredited.Considering the length of ℎ() denoted as Δ is limited, that is, for any || > Δ/2, it has ℎ() = 0, and then (2) The length of discrete window ℎ() is 2 − 1. Equation ( 4) is discretized in frequency domain; that is, Δ = 2/(2 − 1),  = Δ, and  = 0 ∼ 2 − 1; then (4) can be adapted as (5) Equation ( 5) is a formulation of discrete pseudo Wigner-Ville distribution.Pseudo Wigner-Ville distribution inherits good performance in time-frequency concentration of Wigner-Ville distribution.In addition, it can suppress cross-terms interference and has higher time-frequency resolution.So it can reflect time-frequency feature information of vibration signals of rotation machinery.

Vibration Spectrum Feature Extraction
From the perspective of image pattern recognition analysis, it is a new way to extract effective vibration spectrum characteristics and combine with intelligent recognition method.To solve the key technology of image features extract and reflect accurately in the fault diagnosis of vibration spectra, this paper used quaternion invariant moment and gray levelgradient cooccurrence matrix for image feature extraction.

Quaternion Geometric Moment of Image.
When different faults happen, their vibration signals have different vibration information.In terms of the same fault, timefrequency distributions of the vibration signal in different cycle period are similar.However, under different fault conditions, time-frequency distribution of vibration varies significantly, especially in the features extraction method of quaternion invariable moment.Taking advantage of this nature, effective features can be extracted from the timefrequency spectral images of rotation machinery.
Quaternion theory [32] is an extension of plurality basic theory, which consists of one-dimensional real part together with three-dimensional imaginary part, and can be expressed as where  0 ,  1 ,  2 , and  3 are real numbers and , , and  are quaternion's imaginary part element.If real part  0 = 0, ℎ is a pure imaginary quaternion and meets Hamilton rules; that is, Conjugate of quaternion ℎ is named as ℎ and can be expressed as The mold of quaternion ℎ is denoted as |ℎ| and can be expressed as Color images can commonly be described as combinations of three primary colors, that is, Red, Green, and Blue (RGB) [33].In the present work, three primary values of color image pixel values are represented by pure imaginary quaternion; therefore, any pixel denoted here as (, ) can be expressed as where (, ), (, ), and (, ) represent the channels' values of , , and  of image coordinates (, ); therefore, a color image can be expressed as a purely imaginary quaternion matrix.Compared with traditional methods, quaternion model can better reflect the integrity and relevance of the color image.Regarding a time-frequency distribution of certain vibration for rotation machinery, its essence is a two-dimensional color image, expressed here as [(, )] × ∈ H. From the uniqueness theorem proposed by Hu in literature [34], it can be deduced that if a two-dimensional image is piecewise continuous and has nonzero value in limited area, then any order moment will exist.Set of quaternion moment {  } ∈ H can be uniquely identified by (, ) ∈ H; otherwise, two-dimensional image (, ) ∈ H can also be determined by set of quaternion moment {  } ∈ H; that is, the set of quaternion moment that we obtained can describe information of this time-frequency image partly.Moreover, based on Hu, and combining quaternion as well, taking full advantage of color information of images, quaternion invariant moment reflects the integrity and relevance of the image.
The image quaternion geometric moment is an expansion of grayscale images geometric moment concept [35].  is a quaternion vector and contains images' color information.It not only describes global features of the image shape but also provides plenty of geometric feature information of images.Each order moment has different physical meanings.
3.1.1.Quaternion Zeroth-Order Moment.In (11), if  =  = 0,  00 is quaternion zeroth-order moment and represents color sum of entire image.We can consider it as the "mass" of the image; moreover, this "mass" takes information of both size and direction.

Quaternion
First-Order Moment. 10 ,  01 are firstorder moment of the color image regarding -axis and axis, and color moment center denoted here as ( 0 ,  0 ) can be expressed as where ( 0 ,  0 ) is the centroid of the image, ,  = 0, 1, 2, . . ., and  00 =  00 ,  10 =  01 = 0.The second-order moments are a measure of variance of the image intensity distribution about the origin.The central moments  02 ,  20 represent the variance about the mean (centroid ( 0 ,  0 )). 11 is the covariance measure of them.
In order to make   with scale and rotation invariance [36], (13) should be transferred to In 1962, Hu firstly proposed invariant moment in literature.
Seven invariant moments are also a nonlinear combination of second-order and third-order central moment given in (14).
They have performance of invariance in transformation of translation and rotation and can be expressed as follows: Gray mean square error Large gradient advantage Average of gray where matrix  = ( 1 ,  2 ,  3 ,  4 ,  5 ,  6 ,  7 ) is a matrix extracted from a characteristic matrix of matrix with respect to each time-frequency color image.

Gray Level-Gradient Cooccurrence Matrix Feature Extraction.
The element of gray level-gradient cooccurrence matrix is defined as gray value and grade value pixels between normalization gray image and normalization grade image.In the process of normalization gray level-gradient cooccurrence matrix, the sum of each element is expressed as follows: And ∑ −1 =0 ∑   −1 =0 (, ) =  ×  =  2 ; the above formula can be expressed as follows: where Ĥ(, ) is the element of gray level-gradient cooccurrence matrix,  is gray value, and  is grade value.
Exacted 15 feature statistics, small gradient advantage, large gradient advantage, gray distribution heterogeneous, gradient distribution heterogeneous, energy, the average of gray, the average of gradient, gray mean square error, gradient mean square error, correlation, gray entropy, gradient entropy, mixed entropy, inertia, and inverse difference moment [37], are recorded as  1 ,

Construction of Multiweights Neural Network
Main difficulty in intelligent diagnosis of mechanical faults is lack of typical fault samples which consequently result in quantity imperfectness of training samples.Other difficulties are shortage of faults characteristic knowledge.These two difficulties restrict the development of mechanical faults diagnosis.Multiweights neural network takes the best coverage of similar samples in specific space as a target.All samples with respect to similar objects exist in an irregular connected area, and a high-dimensional complex geometry in corresponding space is built to cover the area according to certain rules.If a sample is in the enclosed area recognition is correct, on the contrary, the recognition is rejected.In other words, the subspace structure of each type sample depends only on the sample type.Relationships among the samples of each type are analyzed based on high-dimensional space complex geometry coverage recognition method [38].The method described above is completely different with traditional method of pattern recognition, which depends on a subspace constructed according to relationships of various types of samples.Therefore, multiweights neural network is selected to identify the quaternion invariant moment features of rotation machine vibration spectrum images, and a multiweights neuron model in the multiweights neural network is illustrated in Figure 1.
A basic model of the general neurons is established as where  1 , where Step 1. Calculations of Euclidean distances between all the points in the training samples  and denoted two points the Euclidean distance of them is minimum as  11 and  12 .Among the rest of the points in the sample set , a point to which the sum of distance from  11 and  12 is shortest is selected and denoted as  13 .Three points described above can construct a closed region, denoted here as  1 .A neuron 3 is applied to cover this region, and the coverage is Step 2. It is judged that whether the reset of points are covered by the geometry  1 constructed in the previous step.Every point should be eliminated if it lies within the coverage of geometry.With respect to those points lying out of the geometry, we should find a point to which the sum of distance from  11 ,  12 , and  13 is shortest according to Step where   2 represents the distance from point  to the closed region  2 .
Step 3. Eliminate all points lying in the coverage of region  −1 and then calculate the minimum value of the sum of Euclidean distance from each of the rest of points to the group of three points that make up  −1 .We mark this point as  1 .Similarly, we calculate the Euclidean distance from  1 to the points that make up  −1 , choose two of the points with smaller and smallest values, and mark them as  2 and  3 .Points  1 ,  2 , and  3 construct the th closed region Δ 1  2  3 which is marked as   .At last, a neuron 3 is applied to cover this region, and the coverage is Step 4. Repeat the operation described in Step 3 until the processing of all sample points is over.Ultimately, we can construct  geometry and denote their combo as Ω: Schematic diagram of fault recognition for rotating machinery is illustrated as Figure 2. Firstly, vibration signals that can reflect characteristic of mechanical faults are collected and preprocessed by pseudo Wigner-Ville distribution, and a twodimensional color time-frequency image can subsequently be obtained.Secondly, methodology of quaternion invariable moment is utilized to extract character of the image obtained in previous step and a feature Matrix  can consequently be obtained.Thirdly, different image feature matrixes are randomly selected as the training sets and test sets.Then, multiweights neural network is built and trained.At last, Euclidean distances from each point in testing set to multiweights neuron are calculated.According to methodology described above, faults can be recognized.

Case Study of Two Methods of Features Extraction
Time-frequency images reflect vibration of rotating machinery under the condition that the frequency changes at any time.In present work, bearing faults of rotation machines are analyzed by utilizing pseudo Wigner-Ville distribution.Experimental data come from bearing fault research center of Case Western Reserve University of United States.We chose 3 hp motor, rotation speed is 1725 rpm, and bearing to be detected at the drive end is SKF 6205.And the installed acceleration sensor at the bearing seat of drive end is used to collect the vibration acceleration signal.Figure 3, respectively, gives time-frequency images with respect to inner race fault, outer race fault, normal bearing, and ball bearing fault.
In the present work, image processing technology is utilized to find characteristic information from the image.Figure 3 is illustrated for distinguishing the faults.Traditional images processing technology of color image is a continuation of grayscale images.In which, color image is divided into three components, which are processed, respectively.Unfortunately, relationships amongst three components are ignored, so some information of the color image will be lost.In the present work, quaternion invariant moment theory is firstly utilized to the extraction of mechanical faults features.A pure imaginary quaternion is utilized to indicate three colors (Red, Green, and Blue) of an image and loss of images' color information can consequently be avoided.Furthermore, invariant moment is an effective description for two-dimensional image shape features, and it describes images' constant feature when the image changes on the plane.Quaternion invariant moment makes effective description on color and shape features of color images.Different samples with respect to the same fault can be obtained after the transformations of translation, flex, and rotation to one image.However geometric moments are an effective method to deduce translation, flex, and rotation invariant.We selected three samples of four types of bearing and got their pseudo Wigner-Ville time-frequency image and subsequently calculated their quaternion invariant moment.
Result is listed in Table 2.It can be found from this table that seven quaternion invariant moments of the same faults close to each other; however, quaternion invariant moments of different faults ( 3 ∼ 7 ) change significantly and can be selected as the features of the fault recognition.Texture feature data from four types of bearing are shown in Table 3.

Fault Recognition
Every sample's time-frequency image can be obtained by pseudo Wigner-Ville distribution, and quaternion invariant moment of all the samples can be calculated as fault characteristics of the late recognition.Twenty samples are selected randomly as training set in every kinds of fault, the remaining twenty samples as test set.A diagnostic test was carried out on the test sample, and the classification result is shown in Table 4.At the same time, texture features of time-frequency gray image were carried out to recognize faults based on geometrical study and we got test results in Table 5.
We can know that normal bearing and rolling bearing fault are all correctly identified in Table 4, and there are two inner race faults, and an outer race fault was identified  incorrectly as rolling ball fault.The correct recognition rate is 96.25% in entire identification process.We can know that outer race fault and rolling bearing fault are all correctly identified in Table 5, and the correct recognition rate is 95% in entire identification process.The experimental results show that recognition rate of quaternion invariant moment based on geometric learning is higher than gray level-gradient cooccurrence matrix based on geometric learning.
In additional, we also used the same training and test samples to carry out the probabilistic neural network (PNN) identification test.PNN is a feed-forward neural network; when it classified through pattern, the structure of PNN generally consists of input layer, hidden layer, and output layer.It is classified by using bias minimum risk rule to carry out parallel processing and classification estimation operation.The recognition result of using quaternion invariant moment feature extraction method was shown in Figure 4. "1" means "normal bearing," "2" means "inner race fault," "3" means "outer race fault," and "4" means "rolling ball fault."Seven samples did not identify in Figure 4, and the recognition rate is 91.25%.The recognition results of using gray level-gradient cooccurrence matrix feature extraction method were shown in Figure 5. "1" means "inner race fault," "2" means "outer race fault," "3" means "normal bearing," and "4" means "rolling ball fault."Four inner race faults were identified incorrectly, six-normal bearing was identified as others in Figure 5, and the recognition rate is 87.5%.
In order to test the stability and practicality of geometric learning recognition method with few samples, the training samples in turn reduced 20%, and test sample still took the original 20 samples to identify.Four kinds of recognition results are shown in Table 6.
With the increase of the number of training samples, the known fault recognition rates also grow in Figure 6.The rates of geometric learning algorithm are higher than probabilistic neural network algorithm in the same feature extraction method.The recognition rates of quaternion invariant moment are higher than gray level-gradient cooccurrence matrix in the same recognition.Quaternion invariant moment combined geometric learning, which improved recognition rates.

Conclusion
Mechanical fault diagnosis is a complex process and it mainly includes vibration signal of the fault acquisition, the fault information of feature extraction, and recognition.In order to prevent losses of color image information, considering the relevance of triphosphor, the time-frequency image information would be processed in the quaternion field, and invariant moment features are also extracted in the quaternion field.From this perspective, the paper took fault diagnosis of rolling bearing as an example and used pseudo Wigner-Ville distribution time-frequency to get timefrequency spectrum of fault signals.Color image feature extraction method based on quaternion invariant moment was presented creatively and expressed the information of color image and shape characteristics of the image effectively.In addition, the paper compared quaternion invariant moment with gray level-gradient cooccurrence matrix.In order to avoid identifying the error of vibration spectrum through experience, we applied geometric learning method to intelligent mechanical diagnosis.The superiority of geometric learning algorithm was verified by comparing with probabilistic neural network algorithm.It was useful to combine the feature extraction method of quaternion invariant moment with geometric learning algorithm through the simulation results.And it could distinguish normal bearing and fault types.It had a good recognition result in reducing the number of training samples.

Figure 2 :Figure 3 :
Figure 2: Schematic diagram of fault recognition for rotating machinery.

Figure 4 :
Figure 4: The recognition results of quaternion invariant moment based on PNN.

Figure 5 :
Figure 5: The recognition results of gray level-gradient cooccurrence matrix based on PNN.

Figure 6 :
Figure 6: Comparing results of different feature exaction methods and recognition methods.
Certain training sample set extracted from specific type of fault is supposed as  = { 1 ,  2 , . . .,   },  is total number of sample points,   = (  1 ,   2 , . . .,    ) represents one of the samples,  represents the dimensions of the sample point,    represents the Euclidean distance from point  to space   ,  1 ∈ [0, 1], and  2 ∈ [0, 1].Construction steps of the multiweights neural network are described as follow.
1 and mark it as point  21 .Besides, we calculate the Euclidean distances from  11 to  21 , from  12 to  21 , and from  13 to  21 , respectively, to facilitate description, then choose two of them with smaller and smallest values, and mark them as  22 and  23 .Thus,  21 ,  22 , and  23 construct the second closed region, denoted here as  2 .Therefore, another neuron 3 is applied to cover this region, and the coverage is

Table 2 :
Quaternion invariant moments data from four types of bearing.

Table 3 :
Texture feature data from four types of bearing.

Table 4 :
The recognition results of quaternion invariant moment based on geometric learning.

Table 5 :
The recognition results of gray level-gradient cooccurrence matrix based on geometric learning.

Table 6 :
Results of different feature exaction methods and recognition methods.