The Average Coding Length of Hu ﬀ man Coding Based Signal Processing and Its Application in Fault Severity Recognition

: The transient impact components in vibration signal, which are the major information for bearing fault severity recognition, are often interfered with by ambient noise. Meanwhile, for bearing fault severity recognition, the frequency band selection methods which are employed to pre-process the contaminated vibration signal only select the partial frequency band of the vibration signal and cause information loss of other frequency band. Aiming at this issue, this paper proposes a novel fault severity recognition method based on Hu ﬀ man coding, which can retain all the information of the frequency band, and is applied for the ﬁrst time to bearing fault severity recognition. Speciﬁcally, the average coding length of Hu ﬀ man coding (ACLHC) of the original vibration signal is ﬁrst calculated to reduce the noise and highlight the impact components of the signal. Then, the ACLHC is encoded by symbolic aggregate approximation (SAX) to reﬂect the modulation information of bearing. Finally, the Lempel-Ziv indicator (LZ indicator) of the symbol sequence is calculated to reﬂect the fault severity. The proposed method is veriﬁed by the bearing datasets under di ﬀ erent working conditions. Compared with the methods based on frequency band selection, the proposed method e ﬀ ectively recognizes the fault severity of bearing for more working conditions.


Introduction
As an important part of rotating machinery, monitoring the health condition of bearings is very necessary during the industrial productions. Once a local fault occurs on the surface of a bearing, a series of impacts are aroused by the strikes between the rolling elements and the local fault on the outer or inner race [1]. However, the impacts caused by the local fault may be submerged in the noise as the severe environment. Therefore, effectively highlighting the impact components of the signal is beneficial to improving the recognition results of bearing fault severity.
Recently, the importance of bearing fault severity recognition has been paid more and more attention [2,3]. In general, the damage severity of bearings is usually measured from the aspect of signal complexity [4]. Currently, as the effective method for fault severity recognition, the Lempel-Ziv indicator (LZ indicator) is frequently used for the recognition of bearing fault severity. The LZ indicator can effectively reflect the change in frequency component in signals, and the different fault severities of the inner and outer race of the bearing will cause the change in the frequency component [4]. Thus, The LZ indicator can be effectively used for the recognition of bearing fault severity. However, although the LZ indicator can effectively recognize the fault severity of the inner and outer race of the bearing, The rest of this paper is organized as follows. Section 2 introduces the basic theory of ACLHC and symbolic aggregate approximation Lempel-Ziv indicator (SAX-LZ). In Section 3, the new recognition method of bearing fault severity is proposed and the characteristic of the ACLHC is discussed. In Section 4, the effectiveness of the proposed method is validated by the bearing datasets under different working conditions. Section 5 concludes this paper.

The Theory of ACLHC
Huffman coding is a variable-length source coding method which was proposed by Huffman in 1951 [21]. Huffman coding has been widely used in computer, data encryption, and communication fields because of its high efficiency. Huffman coding is a prefix code, which minimizes the average coding length [22]. The symbols with high probability are represented by short code words, while the symbols with low probability are represented by long code words. So, Huffman coding depends on the occurring probability of symbols. The closer the probability of each symbol appears, the higher the average coding length of Huffman coding is. For a symbol sequence, the ACLHC can be obtained as follows [23,24].
Step 1: Count the occurring probability p 1 , p 2 , · · · , p m of each symbol in the symbol sequence. Construct the binary tree set F = {T 1 , T 2 , · · · , T m } based on the statistical probability p 1 , p 2 , · · · , p m . In each binary tree T i , there is only one root node with the probability p i . The left and right subtrees of the binary tree are empty; Step 2: The two trees with minimum root node probability in the binary tree set F are selected as the left and right subtrees to construct a new binary tree. The probability of the root node of the new binary tree is the sum of the probabilities of the left and right root nodes of the subtree; Step 3: Delete the two trees with the minimum probability in the binary tree set F and add the new binary tree to F; Step 4: Repeat Step 2 and Step 3 until there is only one tree in the binary tree set F; Step 5: After the Huffman tree is constructed, the left child nodes of each father node are coded as 1 (0) and the right child nodes of each father node are coded as 0 (1). Search forward from the last binary tree, the Huffman coding of each symbol {H 1 , H 2 , · · · , H m } is the set of all codes on the corresponding path; Step 6: The average coding length of Huffman coding is obtained according to the length of the Huffman coding of each symbol and the corresponding probability, as follows: where ACL is the average coding length of Huffman coding, length(H i ) is the number of 0 or 1 contained in H i . To better illustrate the calculation process of ACLHC, suppose a probability sequence {0.35, 0.30, 0.15, 0.10, 0.10}, the Huffman tree and corresponding Huffman coding is shown in Figure 1.
where ACL is the average coding length of Huffman coding, ( ) i length H is the number of 0 or 1 contained in i H .
To better illustrate the calculation process of ACLHC, suppose a probability sequence {0.35, 0.30, 0.15, 0.10, 0.10}, the Huffman tree and corresponding Huffman coding is shown in Figure 1.  The average coding length of the probability sequence is calculated by (1). Therefore, the average coding length of the probability sequence is 2.2:

The Theory of SAX-LZ
The Lempel-Ziv complexity, which was proposed by Lempel and Ziv [25], has been widely used to recognize the fault severity of bearing, because signals of bearing with different fault severities have different complexities. In general, the LZ indicator is calculated based on a 0-1 sequence [26]. However, the application of SAX to code the time series in the calculation of LZ cannot only describe the details of time series, but also improve the computational efficiency. For a given time series X = {x 1 , x 2 , · · · , x n }, the process of the SAX-LZ is given as follows [27].
Step 1: The time series is normalized according to the equation, as follows: where NX is the normalized series of X, µ is the mean of the time series, and σ is its standard deviation; Step 2: According to the below equation, the normalized time series is represented by the average of each segment, which is divided according to Piecewise Aggregate Approximation (PAA): where x i is the average of the i th segment, x j is one point of time series X, j is the sequence number for each segment, N is the number of equal sized segments; Step 3: According to Table 1, determine the breakpoints β i according to the equiprobable regions α of the distribution space to be divided; Step 4: The symbolic sequence {s i } N i=1 is obtained based on the symbol which is assigned according to the region divided by the breakpoints; Step 5: Initialization, set S v,0 = {}, Q 0 = {}, C N = 0, r = 1; Step 6: Take Q r = (Q r−1 s r ) and judge whether Q r belongs to S v,r−1 = S v,r−2 s r−1 . If not, Q r = {}, then C N (r) = C N (r − 1) + 1, r = r + 1. If so, Q r = (Q r−1 s r ), C N (r) = C N (r − 1), r = r + 1, and repeat this step until symbolic sequence is completely covered; Step 7: The Lempel-Ziv complexity is normalized by: where, where k is the number of the alphabets (for binary string, k = 2).

The Proposed Method
SAX-LZ can effectively recognize the fault severity of a bearing. Nevertheless, the noise in the vibration signal limits the accuracy of SAX-LZ in the fault severity recognition of bearing. However, the ACLHC can effectively highlight the mutation components caused by bearing fault in the signal and reduce the noise in the signals. Therefore, the ACLHC can be effectively used to process the vibration signal of bearings to highlight the impact components and reduce the interference of noise. The recognition accuracy of SAX-LZ can be effectively improved after processing by ACLHC.
The calculation process is illustrated in Figure 2.
To illustrate the characteristics of the ACLHC in the description of impact, two sets of simulation signals with different SNR are constructed, as follows: where X(t) is the simulation signal with different signal-to-noise ratios (SNR), the waveform of the X(t) with SNR of 13dB is shown in Figure 3b, while that with SNR of 3dB is shown in Figure 4b. n(t) is the noise, x(t) is the simulation signal without noise, the x(t) is shown as follows: where d is the intensity of the impact forces, δ(t) is the unit impact function, z is the number of the impacts, T o = 1/ f o is the interval between two impacts, f o is the characteristic frequency of the bearing, e(t) is the attenuation function, f n is the resonance frequency.  Figure 3a and Figure 4a.

Determination of breakpoints
Symbolic sequence S construction (n = length(S)) End Initialization Read a character s r and store it into Q r Store the preceding character s r-1 into Calculate normalized Lempel-Ziv complexity  In order to better illustrate the effect of ACLHC in noise reduction, the ACLHC was compared with other three frequency band selection methods (protrugram, sparsogram, and genetic algorithm sparsogram (GA-sparsogram)). The results of the simulation signals processed by the above four methods are shown in Figures 3 and 4. In order to better illustrate the effect of ACLHC in noise reduction, the ACLHC was compared with other three frequency band selection methods (protrugram, sparsogram, and genetic algorithm sparsogram (GA-sparsogram)). The results of the simulation signals processed by the above four methods are shown in Figures 3 and 4. For the simulation signal with high SNR, as shown in Figure 3a,c, as the amplitude of the signal was more dispersed when the impact occurred, the probability of the signal was dispersed at this time. So, the ACLHC of the impact component is lower than that of other components when there are impacts in the signals. Although there are some differences between Figure 3a and c, the location of each impact can be restored by ACLHC well. However, although the approximate shape of the impact could be restored by GA-sparsogram, as shown in Figure 3f, the number of impacts was less than that of the impact signal in Figure 3a. In addition, the location and shape of the impact in Figure  3d,e were completely different from that in Figure 3a. Therefore, compared with protrugram, sparsogram, and GA-sparsogram, the ACLHC can effectively restore the location of the impact and highlight the impact components of signal.
For the simulation signal with low SNR, the time-domain waveforms and frequency spectrums of the simulation signal processed by different methods are shown in Figure 4.  For the simulation signal with high SNR, as shown in Figure 3a,c, as the amplitude of the signal was more dispersed when the impact occurred, the probability of the signal was dispersed at this time. So, the ACLHC of the impact component is lower than that of other components when there are impacts in the signals. Although there are some differences between Figure 3a,c, the location of each impact can be restored by ACLHC well. However, although the approximate shape of the impact could be restored by GA-sparsogram, as shown in Figure 3f, the number of impacts was less than that of the impact signal in Figure 3a. In addition, the location and shape of the impact in Figure 3d,e were completely different from that in Figure 3a. Therefore, compared with protrugram, sparsogram, and GA-sparsogram, the ACLHC can effectively restore the location of the impact and highlight the impact components of signal.
For the simulation signal with low SNR, the time-domain waveforms and frequency spectrums of the simulation signal processed by different methods are shown in Figure 4. than that of the impact signal in Figure 3a. In addition, the location and shape of the impact in Figure  3d,e were completely different from that in Figure 3a. Therefore, compared with protrugram, sparsogram, and GA-sparsogram, the ACLHC can effectively restore the location of the impact and highlight the impact components of signal.
For the simulation signal with low SNR, the time-domain waveforms and frequency spectrums of the simulation signal processed by different methods are shown in Figure 4.  As shown in Figure 4b, due to the noise interference, the impact signal was completely submerged in the noise in the time-domain waveform. Besides this, the obvious characteristic frequency of the impact signal also could not be found in the frequency spectrum. The additional frequency component of 40 Hz was introduced by the noise. Although the obvious impact component cannot be found in the time-domain waveform by ACLHC in Figure 4c, the obvious characteristic frequency of the impact signal can already be found in the frequency spectrum. However, the characteristic frequency of the impact signal could not be found by protrugram, sparsogram, and GA-sparsogram, as shown in Figure 4d-f. Besides this, the high-frequency part of the frequency spectrum was also lost, while the frequency spectrum of ACLHC contained the whole frequency components. The information after 400 Hz of the frequency band processed by protrugram and GAsparsogram was lost, as shown in Figure 4d,f. After 600 Hz, the frequency band processed by Sparsogram was lost, as shown in Figure 4e. Therefore, the ACLHC not only highlights the impact components of the signal, but also retains the whole frequency components of signal.
Altogether, compared with protrugram, sparsogram, and GA-sparsogram, the ACLHC can effectively restore the location of impact in the signal when the SNR is high. Even if the ACLHC cannot obviously restore the location of impact in the signal when the SNR is low, it can also As shown in Figure 4b, due to the noise interference, the impact signal was completely submerged in the noise in the time-domain waveform. Besides this, the obvious characteristic frequency of the impact signal also could not be found in the frequency spectrum. The additional frequency component of 40 Hz was introduced by the noise. Although the obvious impact component cannot be found in the time-domain waveform by ACLHC in Figure 4c, the obvious characteristic frequency of the impact signal can already be found in the frequency spectrum. However, the characteristic frequency of the impact signal could not be found by protrugram, sparsogram, and GA-sparsogram, as shown in Figure 4d-f. Besides this, the high-frequency part of the frequency spectrum was also lost, while the frequency spectrum of ACLHC contained the whole frequency components. The information after 400 Hz of the frequency band processed by protrugram and GA-sparsogram was lost, as shown in Figure 4d,f. After 600 Hz, the frequency band processed by Sparsogram was lost, as shown in Figure 4e. Therefore, the ACLHC not only highlights the impact components of the signal, but also retains the whole frequency components of signal.
Altogether, compared with protrugram, sparsogram, and GA-sparsogram, the ACLHC can effectively restore the location of impact in the signal when the SNR is high. Even if the ACLHC cannot obviously restore the location of impact in the signal when the SNR is low, it can also effectively reflect the characteristic frequency of the impact in the frequency spectrum.

Case Study 1
The data are from the Konstruktions-und Antriebstechnik (KAt), in the school of Mechanical Engineering at University Paderborn [28]. The bearing test rig is shown in Figure 5a (II). The modular test rig consisted of an electric motor, a torque-measurement shaft, a rolling bearing test module, a flywheel, and a load motor. The bearings 6203-with different types of damage caused by an accelerated lifetime test on the apparatus, as shown in Figure 5a (I)-were mounted in the bearing test module (as shown in Figure 5a (II)) to generate the experimental data. The severity of the damage was described by the percentage of length relative to pitch circumference. The three levels for 6203 are shown in Table 2 Figure 5a (I)-were mounted in the bearing test module (as shown in Figure 5a (II)) to generate the experimental data. The severity of the damage was described by the percentage of length relative to pitch circumference. The three levels for 6203 are shown in Table 2 [28].  The information of the test bearings with real damages caused by the accelerated lifetime test is shown in Table 3. The rotational speed of the drive system, the radial force onto the test bearing, and the load torque in the drive train were the main operating parameters. The parameters were defined as shown in Table 4. All three parameters were kept constant for the time of each measurement.   The information of the test bearings with real damages caused by the accelerated lifetime test is shown in Table 3. The rotational speed of the drive system, the radial force onto the test bearing, and the load torque in the drive train were the main operating parameters. The parameters were defined as shown in Table 4. All three parameters were kept constant for the time of each measurement. The experimental data came from the Dynamic and Identification Research Group (DIRG), in the Department of Mechanical and Aerospace Engineering at Politecnico di Torino [29]. The bearing test rig is shown in Figure 5b. The test rig mainly contained three major parts: a high-speed spindle, a load cell, and a lubrication part. The bearings of the spindle, for which the main geometrical properties of the bearings are listed in Table 5, were grease lubricated and their temperature was limited by a liquid (glycol/water) refrigeration circuit. Two accelerometers were installed on the key position. The sampling frequency was 51,200 Hz. The bearing fault with artificial damage occurred on the inner race. The diameter of an indentation on the inner race was 150, 250, and 450 µm. The application of the static load was 1000, 1400, and 1800 N. The rotational frequency of the shaft increased from 100 Hz to 400 Hz with steps 100 Hz. The speed-load combinations of the bearing data used below are shown in Table 6.

Fault Severity Recognition by the Proposed Method
In order to verify the effectiveness of the proposed method in fault severity recognition, the proposed method was used to calculate the complexity of the above bearing datasets. The results of LZ and SAX-LZ were also used to compare with the proposed method. The calculated results of the two datasets are shown in Figures 6 and 7, respectively.

Fault Severity Recognition by the Proposed Method
In order to verify the effectiveness of the proposed method in fault severity recognition, the proposed method was used to calculate the complexity of the above bearing datasets. The results of LZ and SAX-LZ were also used to compare with the proposed method. The calculated results of the two datasets are shown in Figures 6 and 7, respectively.  According to Yan [4], the complexity value should decrease with an increase in the fault severity of the bearing inner race. However, as shown in Figures 6 and 7, the complexity values of the traditional LZ method did not decrease with the increase in the fault severity of bearing inner race. Although the complexity values of the SAX-LZ decreased with the increase in the fault severity of bearing inner race under most working conditions, there were also some non-monotonous trends in the complexity values obtained by SAX-LZ, such as the N09-M07-F10 in KAt datasets and the 100 Hz and 200 Hz in DIRG datasets. However, the complexity values of the proposed method showed all monotonous decreasing trends under all working conditions. Therefore, for the problem of fault severity recognition, although the monotonicity of SAX-LZ was better than that of LZ, that of SAX-LZ was also affected by noise and interference. However, the SAX-LZ could effectively recognize the fault severity of bearing after the signal was processed by ACLHC.
Therefore, the ACLHC can effectively reduce the influence of noise and interference and highlight the fault information. The proposed method can be effectively used to recognize the fault severity of bearings. According to Yan [4], the complexity value should decrease with an increase in the fault severity of the bearing inner race. However, as shown in Figures 6 and 7, the complexity values of the traditional LZ method did not decrease with the increase in the fault severity of bearing inner race. Although the complexity values of the SAX-LZ decreased with the increase in the fault severity of bearing inner race under most working conditions, there were also some non-monotonous trends in the complexity values obtained by SAX-LZ, such as the N09-M07-F10 in KAt datasets and the 100 Hz and 200 Hz in DIRG datasets. However, the complexity values of the proposed method showed all monotonous decreasing trends under all working conditions. Therefore, for the problem of fault severity recognition, although the monotonicity of SAX-LZ was better than that of LZ, that of SAX-LZ was also affected by noise and interference. However, the SAX-LZ could effectively recognize the fault severity of bearing after the signal was processed by ACLHC.
Therefore, the ACLHC can effectively reduce the influence of noise and interference and highlight the fault information. The proposed method can be effectively used to recognize the fault severity of bearings.

Comparison with Other Frequency Band Selection Methods
In order to further illustrate the advantages of the proposed method in the fault severity recognition of bearings, the SAX-LZ of the bearing vibration signals processed by three frequency band selection methods (protrugram, sparsogram, and GA-sparsogram) was employed to compare with the proposed method. The calculated results of the two datasets are shown in Figures 8 and 9.

Comparison with Other Frequency Band Selection Methods
In order to further illustrate the advantages of the proposed method in the fault severity recognition of bearings, the SAX-LZ of the bearing vibration signals processed by three frequency band selection methods (protrugram, sparsogram, and GA-sparsogram) was employed to compare with the proposed method. The calculated results of the two datasets are shown in Figures 8 and 9.    As shown in Figures 8 and 9, compared with SAX-LZ, although the monotonicity of SAX-LZ As shown in Figures 8 and 9, compared with SAX-LZ, although the monotonicity of SAX-LZ could be improved by the three frequency band selection methods in some cases, the overall monotonicity was not better than that of SAX-LZ without treatment. The reason for this could be that although the above frequency band selection methods could effectively select the frequency band which contained the most fault information, some useful information was also lost. Therefore, the calculated results based on the frequency band selection methods might not be better than those of SAX-LZ without treatment. However, the ACLHC did not need to select the frequency band of the signal in the process of reducing the influence of noise and highlighting the impact components of signal. Therefore, the signals processed by ACLHC cannot only reduce the influence of noise, but also contain all the fault information. The calculated results of the proposed method were better than those of the SAX-LZ of the bearing vibration signals processed by the three frequency band selection methods. Therefore, the signals processed by ACLCH can effectively improve the recognition results of bearing fault severity. The proposed method can be effectively used to recognize the fault severity of bearings under different working conditions.  As shown in Figures 8 and 9, compared with SAX-LZ, although the monotonicity of SAX-LZ could be improved by the three frequency band selection methods in some cases, the overall monotonicity was not better than that of SAX-LZ without treatment. The reason for this could be that although the above frequency band selection methods could effectively select the frequency band which contained the most fault information, some useful information was also lost. Therefore, the

Conclusions
This paper proposed an improved method for fault severity recognition. This paper, for the first time, proposed a noise reduction method based on ACLHC for processing bearing vibration signals. The main finding was that, compared with the frequency band selection methods, the ACLHC did not need to select the frequency band of the signal in the process of reducing the influence of noise and highlighting the impact components of signal. Therefore, the signals processed by ACLHC could not only reduce the influence of noise, but also contained all the fault information. Then, the modulation information of the processed vibration signal, which is an essential fault characteristic of bearing, was reflected by SAX. Finally, the complexity of the symbol sequence coded by SAX was calculated by the LZ indicator. Through the verification of the single-point fault dataset of KAt and that of DIRG, it was proven that the ACLHC can reduce the influence of noise and highlight the impact components of signal without losing the fault information. Also, the signals processed by ACLHC can effectively improve the recognition results of bearing fault severity. In conclusion, the proposed method can effectively improve the recognition results of fault severity by reducing noise while retaining all frequency band information, and can be used in different working conditions.
Although some important problems associated with the proposed method have been investigated in this paper, there are still a few questions that are worthy of further consideration, such as the application scope of ACLHC.