Mechanical equipment fault detection method based on sound signal feature analysis and random forest

By combining acoustic signal characteristic analysis and random forest methods, the accuracy and efficiency of mechanical equipment fault detection in complex industrial environments are solved, and high-precision fault diagnosis and equipment reliability are achieved.

CN119760556APending Publication Date: 2025-04-04UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202411884657.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify mechanical equipment failures in complex industrial environments, especially when generalization performance is poor and prediction accuracy is not high.

Method used

The mechanical equipment fault detection method based on acoustic signal characteristic analysis and random forests is adopted. Through the combination of time and frequency domain characteristic analysis and random forests, the collected acoustic signals are classified to achieve high-precision fault diagnosis.

Benefits of technology

It improves the accuracy and efficiency of mechanical equipment fault detection, can quickly identify abnormal sound patterns, help engineers quickly locate and solve equipment problems, and improve equipment reliability and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760556A_ABST
    Figure CN119760556A_ABST
Patent Text Reader

Abstract

The invention discloses a mechanical equipment fault detection method based on sound signal feature analysis and a random forest, and relates to the field of machine learning. Comprising the following steps: constructing a sound signal acquisition system at a key part of an industrial scene, simulating a fault scene, and acquiring operation sound signals of mechanical equipment under different working conditions to obtain original data; feature extraction is carried out on the collected sound signals, feature selection is carried out by adopting Pearson correlation analysis, and redundant features are removed; and using the processed variable data as model input, using the corresponding fault type as a training label, training a decision tree and a random forest to enable the fault type output by the algorithm to approach the training label, and obtaining a water turbine sound signal fault diagnosis model. The invention provides a fault diagnosis method based on sound signal feature analysis and random forest. Experiments show that the method can effectively detect various typical faults of the whole mechanical equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of acoustic signal feature extraction and fault detection, and in particular to a mechanical equipment fault detection method based on acoustic signal feature analysis and random forest. Background Art

[0002] With the continuous expansion of industrial production, the demand for reliability and safety of mechanical equipment is growing. In a complex industrial production environment, due to the long-term high-load operation of mechanical equipment, it is inevitable that wear, looseness or damage will occur due to various factors such as component wear, material aging, environmental impact, etc. These failures not only affect the normal operation and production efficiency of the equipment, but may also cause safety accidents, causing huge losses to industrial production.

[0003] With the continuous advancement of science and technology, mechanical equipment fault detection technology is also developing. Traditional fault detection methods mainly rely on manual inspections and regular maintenance, which is not only inefficient, but also restricted by the detection level of operation and maintenance personnel, and sometimes it is difficult to find some hidden faults. Modern fault detection technology uses advanced sensor technology, signal processing technology and artificial intelligence technology, which can realize real-time monitoring of the operating status of mechanical equipment and automatic fault diagnosis, greatly improving the accuracy and efficiency of fault detection.

[0004] In order to solve these problems, acoustic technology has gradually been introduced into the field of mechanical equipment fault detection due to its non-contact and strong real-time characteristics. Mechanical equipment will produce sounds of specific frequencies and amplitudes during operation, and these sounds contain rich information about the equipment's operating status. By collecting and analyzing these sound signals, features related to equipment failures can be extracted, thereby achieving preliminary identification of the failure.

[0005] Common fault detection methods based on acoustic signal feature analysis include time domain analysis, frequency domain analysis, envelope analysis, pattern recognition algorithm analysis, etc. However, the above methods alone cannot accurately analyze the operating signals of mechanical equipment under complex working conditions. Only using time and frequency domain analysis methods can often only determine whether there is an obvious fault in the equipment, but cannot accurately determine the type of fault. In the actual diagnosis process, defects such as poor generalization performance and low prediction accuracy occur.

[0006] Simple sound feature analysis is often difficult to cope with complex and changing industrial environments. Therefore, combining machine learning algorithms for intelligent diagnosis has become a research hotspot. As an integrated learning algorithm, random forest demonstrates powerful classification and regression capabilities by constructing and integrating multiple decision trees. In equipment fault detection, the random forest algorithm can use the multidimensional features in the sound signal to obtain the mapping relationship between the equipment failure mode and the sound features through training and learning, so as to achieve rapid and accurate diagnosis of the fault. The mechanical equipment fault detection method based on acoustic signal feature analysis and random forest combines the real-time nature of acoustic technology and the intelligence of the random forest algorithm. It extracts key features by collecting and analyzing the sound signals during the operation of the equipment, and uses the random forest model to identify the fault mode. This method not only improves the accuracy and efficiency of fault detection, but also provides strong technical support for equipment maintenance and fault prevention in industrial production. Summary of the invention

[0007] Technical problem to be solved by the invention: Inspired by the above research background, the present invention proposes a mechanical equipment fault detection method based on acoustic signal feature analysis and random forest, which classifies the collected acoustic signals by combining time and frequency domain feature analysis with random forest, so as to realize a high-precision diagnosis scheme for mechanical equipment faults.

[0008] In order to achieve the above object, the present invention adopts the following technical solution: a mechanical equipment fault detection method based on acoustic signal feature analysis and random forest, comprising the following steps:

[0009] S1: Build an acoustic signal acquisition system at key locations of industrial production operations, simulate fault scenarios, and collect acoustic signals of mechanical equipment under different working conditions as the original data for the model;

[0010] S2: Preprocess and extract features from the collected data, extract short-term features and medium-term features respectively; then remove redundant features, use the processed data set as the input data of the model, and use the corresponding fault type as the training label;

[0011] S3: Select decision tree as the base classifier model for fault diagnosis, use Bootstrap resampling method to perform random sampling with replacement on the training data, build corresponding decision tree for each sub-data set, each decision tree performs fault diagnosis based on the corresponding new data sample, and the obtained n decision trees form a random forest; further use the random forest model as the fault diagnosis model, divide the original data set into a training set and a test set, train the random forest model parameters so that the fault type output by the random forest is close to the training label, and obtain a mechanical equipment fault detection model based on acoustic signal feature analysis; vote on the prediction results of each decision tree, use the principle of minority obeys majority, output the fault diagnosis result, and obtain the fault type currently predicted by the random forest;

[0012] S4: Use the trained mechanical equipment fault detection random forest model to classify the mechanical equipment acoustic signals under unknown working conditions, and evaluate the classification accuracy of the model through performance indicators.

[0013] Furthermore, the features of the acoustic signal extracted and collected in S2 include:

[0014] The short-term features of each collected sound signal are extracted, which are:

[0015] Time domain maximum value, time domain peak value, time domain standard deviation;

[0016] Seven frequency domain features are: spectral entropy, spectral flatness, spectral width, spectral slope, and spectral centroid. The maximum value or peak-to-peak value is extracted from the short-term features as the medium-term features of the data for subsequent model training.

[0017] Furthermore, the method for removing redundant features in S2 is:

[0018] Calculate the correlation between two features r , and its calculation formula is:

[0019]

[0020] Among them, x and y are two features whose correlation needs to be calculated, cov(x, y) is the covariance of the two, σ(x) and σ(y) are the standard deviations of the two features, respectively; the r value is between -1 and 1, and the larger the absolute value, the stronger the correlation; when the correlation coefficient is 0, the two variables x and y are independent; when the value of x increases or decreases, the value of y increases or decreases accordingly, then the two variables are positively correlated, and the corresponding correlation r is between [0, 1]; when the value of x increases or decreases, the value of y decreases or increases accordingly, then the two variables are negatively correlated, and the corresponding correlation r is between [-1, 0];

[0021] First, the correlation between each two features is calculated, and the correlation matrix between the features is given. For features with a correlation greater than a set threshold, the data characteristics they represent are considered to be highly similar, and duplicate features are removed to improve model performance and generalization ability. Furthermore, the fault diagnosis base classifier model based on the decision tree described in S3 mainly includes:

[0022] The variable data with repeated features removed is used as the model input, the corresponding fault type is used as the label, and a single decision tree is used for fault diagnosis; the decision tree is trained so that its output fault type is close to the training label, and the data is used to test the classification performance of the decision tree.

[0023] Furthermore, when the decision tree in step 3 adopts the following judgment value Gr as the division criterion, the calculation method of Gr is: first, the purity of the current sample set is measured by using information entropy, and the calculation method of information entropy is:

[0024]

[0025] The proportion of the k-th class samples in the current sample set D is p k , k=1,2,...,|γ|, then the information entropy of sample set D is defined as Ent(D);

[0026] Assume that a discrete attribute a has V possible values ​​{a 1 ,a 2 ,...,a V}, use D v To represent all the values ​​in D where attribute a takes value a v Samples of

[0027] Then calculate the judgment value Gr:

[0028]

[0029] in,

[0030]

[0031] IV(a) is called the intrinsic value of attribute a. The more values ​​attribute a takes, the larger the value of IV(a) will be.

[0032] The specific partitioning criterion is: first find the attributes whose G(D,a) is higher than the average value from the candidate partitioning attributes, and then select the attribute with the highest Gr as the final prediction attribute.

[0033] Furthermore, when the decision tree in step 3 uses the judgment value Gi as the partition attribute, the calculation method of Gi is:

[0034] Calculate data purity C(D);

[0035]

[0036] C(D) reflects the probability that two samples randomly selected from data set D have inconsistent category labels. Therefore, the smaller C(D), the higher the purity of data set D.

[0037] Calculate the judgment value Gi of attribute a:

[0038]

[0039] The partitioning criterion is: in the candidate attribute set, select the attribute that minimizes the judgment value Gi after partitioning as the optimal partitioning attribute.

[0040] Furthermore, the short-term characteristics in step 3 also include: short-time energy and zero-crossing rate;

[0041] The acoustic signal is windowed and divided into L short-term segments of equal length. There may be overlaps between the windows. Let x i (n) is the i-th short-term segment (n=1,2,..,F L , i=1,2,...,L),F L is the length of the short-term segment, the short-time energy calculation formula is as follows:

[0042]

[0043] The calculation method of zero crossing rate ZCR(i) is:

[0044]

[0045] Furthermore, the long-term characteristics in step 3 also include: SCF(i), SD(i);

[0046] The spectrum of the short-term segment obtained by discrete Fourier transform is as follows:

[0047]

[0048] Assume k and f k They are the transformed spectrum X i The magnitude and magnitude of [K] k The corresponding frequency, subscript k from b1 to b2, s b1 It represents the amplitude of the spectrum when the subscript is b1. The short-term characteristics SCF(i) and SD(i) are calculated as follows:

[0049]

[0050] The above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0051] The present invention uses feature analysis and random forest methods to perform fault diagnosis on the acoustic signals of mechanical equipment operation. Acoustic signals usually contain a large amount of spectrum and time domain information, which is critical for identifying anomalies in equipment operation. Random forests can effectively process high-dimensional data and perform model training and fault classification without the need for complex feature engineering. Its ensemble learning strategy based on decision trees improves the accuracy and robustness of the overall classification by combining the prediction results of multiple decision trees. In acoustic signal fault diagnosis, random forests can quickly identify abnormal sound patterns, thereby helping engineers quickly locate and solve equipment problems, and improve equipment reliability and maintenance efficiency.

[0052] At the same time, before using random forest for fault diagnosis, feature extraction, correlation analysis and other methods are used to process the data, which reduces the complexity of calculation without reducing the accuracy of the algorithm, and also removes redundant information in the original data, further improving the diagnostic efficiency of the model. Compared with the time and frequency domain analysis methods, the invented mechanical equipment fault detection method based on acoustic signal feature analysis and random forest has obvious advantages in fault diagnosis.

[0053] Instruction Manual

[0054] Figure 1 This is the feature analysis and random forest flow chart of the present invention.

[0055] Figure 2 This is a thermal diagram of the feature correlation analysis of the present invention.

[0056] Figure 3 This is a binary classification decision tree generated by the present invention based on the training set.

[0057] Figure 4 This is a three-category decision tree knowledge graph generated by the present invention based on the training set.

[0058] Figure 5 This is a flow chart for implementing the random forest of the present invention.

[0059] Figure 6 This is a corresponding relationship diagram between the out-of-bag error rate of the random forest and the number of trees of the present invention.

[0060] Figure 7 This is the ROC curve of the random forest test set of the present invention. DETAILED DESCRIPTION

[0061] The flow chart of the mechanical equipment fault detection method based on acoustic signal feature analysis and random forest proposed in the present invention is as follows: Figure 1As shown. In order to make the purpose and technical solution of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as they do not conflict with each other. The solution of this embodiment is further described below in conjunction with a specific process.

[0062] Step 1: Collect the acoustic signals of the hydropower station turbine under normal operating conditions and fault simulation experiments to obtain the original data.

[0063] The field acquisition device was built around the turbine of the hydropower station, and the acoustic signals of the turbine were collected at four locations: the waterwheel room, wind tunnel, volute manhole door and tailwater manhole door of the unit. Due to the large space and severe reverberation in the waterwheel room and wind tunnel environment, a distributed data acquisition solution was adopted, that is, 8 acoustic signal acquisition devices were evenly distributed on the circular indoor wall towards the turbine. The single-channel audio file acquired by the device is 60 seconds long and the sampling rate is 96KHz.

[0064] The experiment collected acoustic signal data under three different working conditions, namely normal working conditions, knocking on steel pipes to simulate abnormal noise test, and valve plate shaking sound test under critical conditions of vacuum breaking valve opening and closing. The knocking on steel pipe experiment simulates the "dong dong" sound caused by the tearing and falling off of the steel lining of the turbine. The single fault sound of this experimental signal is strong and short, which can simulate transient faults. The sound of the valve plate shaking under the critical condition of vacuum breaking valve opening and closing is the sound collected during the routine shutdown test of the unit during the maintenance of the hydropower station. When the valve plate of the turbine shakes under this condition, a short and harsh whistling sound will be generated, and then the unit will gradually stop running.

[0065] The above three data represent three typical working conditions of turbines. In addition, due to the different collection locations, the signal-to-noise ratio of the data is also different. According to the sound intensity of the normal operation of the turbine at the experimental site, the four locations can be divided into two groups: "waterwheel room and wind tunnel" with high sound intensity and "volute manhole door and tailwater manhole door" with weak sound intensity. The sound of turbine operation is louder at high sound intensity, and the fault test signal is almost submerged in the normal operation sound, and the difference cannot be clearly distinguished. At low sound intensity, the sound of turbine operation is smaller, and it can be clearly distinguished whether there is a fault.

[0066] A total of 330 sets of data were collected at different locations, and their numbers and labels are shown in the following table:

[0067] Table 1 Data of turbine under different working conditions

[0068]

[0069] Step 2: Process the data, calculate its short-term features, and extract the medium-term statistics of each feature.

[0070] After obtaining a single-channel audio file of the same length, the signal is processed in the short term and in the medium term respectively. Short-term processing means decomposing the audio signal into short-term segments, calculating and analyzing the feature sequence based on the short-term segments, and medium-term processing means decomposing the feature sequence into medium-term segments based on the short-term processing, calculating the medium-term statistics based on the medium-term segments, and the medium-term statistics can describe the changes of the feature sequence in a longer time scale.

[0071] In short-term processing, the acoustic signal is divided into L short-term segments of equal length after windowing. There may be overlap between windows. Let x i (n) is the i-th short-term segment (n=1,2,..,F L , i=1,2,...,L),F L is the length of the short-term segment, for x i (n) Perform discrete Fourier transform to obtain the spectrum of the short-term segment as follows:

[0072]

[0073] Assume k and f k They are the transformed spectrum X i The magnitude and magnitude of [K] k The corresponding frequencies, subscript k, are from b1 to b2.

[0074] The medium-term processing method calculates the medium-term statistics of the feature sequence obtained by short-term processing. Common statistics include extreme value, mean, median, standard deviation, peak value, skewness, etc. The obtained statistics are used as the final extraction result of the feature.

[0075] The present invention extracts a total of 12 features, including five time domain features and seven frequency domain features, and the calculation methods thereof are as follows:

[0076] The time domain maximum value, time domain peak value and time domain standard deviation are all features that intuitively characterize the signal morphology of the short-term segment of the acoustic signal, and they respectively characterize the distribution of the maximum value in the short-term segment, the distribution range of the signal and the degree of dispersion, as shown in equations (2) to (4), where max(·), min(·) and mean(·) represent the calculation of x i (n) Maximum, minimum and average values.

[0077] TM(i)=max(x i ) (2)

[0078] TP(i)=max(x i )-min(x i) (3)

[0079]

[0080] Short-term energy can reflect the overall volume change of a short-term segment, as shown in formula (5). When a turbine fails, the volume increases significantly, resulting in an increase in the energy of the acoustic signal. The STE of the crisp part of the short-term segment is lower, while the STE of the turbid part is higher.

[0081]

[0082] The zero crossing rate is a measure of the rate at which the sign of a signal changes in a short-term segment, as shown in equation (6). ZCR is often used for voice detection in acoustic signal detection, and the ZCR of the voiced part of the signal is greater than that of the silent part. ZCR is also used to estimate the fundamental frequency of the signal, which is numerically equal to twice the signal frequency and can indirectly describe the frequency of a short-term segment.

[0083]

[0084] The basis of spectrum entropy is Shannon entropy in information theory. SE is a measure of the power distribution of a short-term spectrum. SE is calculated by treating the normalized power distribution in the spectrum as a probability distribution and then calculating Shannon entropy to measure the degree of spectrum disorder. As shown in the following formula:

[0085]

[0086] Spectral flatness and SCF(i) are used to describe the flatness of the spectrum of a short-term segment of an acoustic signal. SF is a measure of the uniformity of the frequency distribution of the spectrum, and SCF indicates the extreme degree of the peak in the spectrum. They can be used to distinguish harmonics from Gaussian-like noise, as shown in equations (8) and (9):

[0087]

[0088] The spectral centroid and spectral width are both features that describe the position and shape of the spectrum, as shown in equations (10) and (11). The design of the SC feature refers to the calculation method of the centroid, which describes the distribution of the spectral mass center in a short-term segment and can be used to describe the distribution of the loud components in the sound, that is, the brightness feature of the sound. SSP is the second-order central moment of the spectrum and is also a feature that measures the instantaneous spectral width of a short-term segment.

[0089]

[0090] The spectrum slope is a measure of the slope of the amplitude of the short-term segment spectrum. Linear regression is used to calculate the speed at which the short-term segment spectrum decays to high frequencies. SD(i) characterizes the degree to which energy changes with frequency. It is the average value of the slope from frequency to frequency, so this feature is sensitive to the low-frequency part of the spectrum, as shown in equations (12) and (13), where μ f and μ s are the average values ​​of spectral frequency and amplitude respectively.

[0091]

[0092]

[0093] The calculation parameters are set in the feature extraction process as shown in Table 2:

[0094] Table 2 Calculation parameters of short-term characteristics of turbine acoustic signals

[0095]

[0096] After extracting the short-term features using the above method, the medium-term statistics of each short-term feature are calculated as shown in Table 3. By calculating the medium-term statistics, the short-term feature sequence can be converted into a value, and the medium-term statistics constitute a feature data set.

[0097] Table 3 Calculation parameters and characteristic abbreviations of mid-term statistics

[0098]

[0099] Step 3: Perform Pearson correlation analysis on the features and extract redundant features.

[0100] Feature selection is a key step in machine learning and data mining. It is used to select the most predictive subset from the original features to improve model performance and generalization ability. Correlation analysis of features is helpful to find potential connections between features, and feature selection based on correlation is more conducive to increasing the stability of model prediction.

[0101] Pearson correlation analysis is a commonly used correlation analysis method. Its correlation coefficient is recorded as r, which is used to reflect the linear correlation between two variables. Its calculation formula is:

[0102]

[0103] Among them, x and y are two variables that need to calculate the correlation, cov(x,y) is the covariance of the two, σ(x) and σ(y) are the standard deviations of the two variables. The r value is between -1 and 1, and the larger the absolute value, the stronger the correlation. When the correlation coefficient is 0, the two variables x and y are independent. When the value of x increases (decreases), the value of y increases (decreases) accordingly, then the two variables are positively correlated, and the corresponding Pearson correlation coefficient is between [0,1]; when the value of x increases (decreases), the value of y decreases (increases) accordingly, then the two variables are negatively correlated, and the corresponding Pearson correlation coefficient is between [-1,0].

[0104] When using Pearson correlation to analyze features, first calculate the correlation between each two features, and then give the heat map between the features. Figure 2 As shown in the figure, the darker the grid, the stronger the correlation between the two features on the horizontal and vertical axes. It can be seen that there are extremely strong correlations between several groups of features (r≥0.97). If they are used as inputs to the machine learning model at the same time, it will cause feature collinearity problems and lead to instability in model prediction. In particular, the five frequency domain features SCF(i), spectrum centroid (SC), spectrum width (SSP), spectrum slope (SSL), and SD(i) all have extremely strong correlations. For features with strong correlation coefficients, it is believed that the data characteristics they represent are highly similar, so duplicate features are removed, and four features, TPmax, SSLppv, SSPppv, and SDppv, are removed from the original 12 features.

[0105] Step 4: Use the decision tree as the base classifier model for fault diagnosis and test its classification effect.

[0106] When the decision tree uses the following judgment value Gr as the division criterion, the calculation method of Gr is:

[0107] First, information entropy is used to measure the purity of the current sample set. The information entropy is calculated as follows:

[0108]

[0109] The proportion of the k-th class samples in the current sample set D is p k , k=1,2,...,γ|, then the information entropy of sample set D is defined as Ent(D);

[0110] Assume that a discrete attribute a has V possible values ​​{a 1 ,a 2 ,...,a V}, use D v To represent all the values ​​in D where attribute a takes value a v Samples of

[0111] Then calculate the judgment value Gr:

[0112]

[0113] in,

[0114]

[0115] IV(a) is called the intrinsic value of attribute a. The more values ​​attribute a takes, the larger the value of IV(a) will be.

[0116] The specific partitioning criterion is: first find the attributes whose G(D,a) is higher than the average value from the candidate partitioning attributes, and then select the attribute with the highest Gr as the final prediction attribute.

[0117] When the decision tree uses the judgment value Gi as the partition attribute, the calculation method of Gi is:

[0118] Calculate data purity C(D);

[0119]

[0120] C(D) reflects the probability that two samples randomly selected from data set D have inconsistent category labels. Therefore, the smaller C(D), the higher the purity of data set D.

[0121] Calculate the judgment value Gi of attribute a:

[0122]

[0123] The partitioning criterion is: in the candidate attribute set, select the attribute that minimizes the judgment value Gi after partitioning as the optimal partitioning attribute.

[0124] The above two division criteria are used to construct decision trees. In order to eliminate the adverse effects of unbalanced data division on the test results, the K-fold validation method is used to divide the training set and the test set, K = 10, and the maximum depth of each tree is set to 8. Decision trees are used to complete the two tasks of determining whether a fault occurs (two-classification) and diagnosing a specific fault type (three-classification). The average accuracy of the decision tree after testing is shown in Table 4.

[0125] Table 4 Decision tree test results

[0126]

[0127]

[0128] It can be seen that when using a decision tree to determine whether a data set is faulty or not, its test accuracy can reach more than 90%. However, when it is necessary to accurately diagnose the specific fault type, the test accuracy of the decision tree decreases. In order to further improve the fault diagnosis performance, consider using the decision tree ensemble algorithm - random forest to improve performance. The biggest advantage of decision trees is their good interpretability. Using the above division criteria, a binary decision tree is drawn as follows: Figure 3 As shown in Figure 2, a fault diagnosis knowledge graph is further drawn based on the training set. Figure 4 As shown, according to Figure 4 , operation and maintenance personnel can quickly check whether there is a fault in the operation signal, and realize real-time monitoring and diagnosis of the turbine operation signal.

[0129] Step 5: Use random forest as the fault diagnosis algorithm and train it to achieve the best classification performance, and give the final test results through evaluation indicators.

[0130] The specific implementation of random forest is as follows Figure 5 As shown in the figure, firstly, the original sample set is sampled using the bagging method, that is, the initial data set is sampled with replacement. After repeated multiple times, multiple training subsets can be obtained, and the samples that are not extracted are used as test sets. Using the bagging method as the sub-sample set of the random forest can eliminate the influence of high variance and low bias data sets on the results, and multiple sub-sample sets can be performed in parallel to improve time efficiency. Set the number of decision trees in the random forest to N. After obtaining N sub-sample sets, randomly select some features in each sample set as the generation features of the decision tree, and generate a decision tree based on the selected data and features. Finally, the ensemble learning algorithm generated by N decision trees is the random forest. In the test phase, the test set is input into the random forest, and its data obtains N results on N decision trees, and the final prediction category is output based on the results of the collective vote.

[0131] In the training process of random forest, the more important parameters are: the division criteria of decision trees in random forest, the number of decision trees in random forest and the number of randomly selected attributes of each subtree in random forest. As can be seen from Table 4, the accuracy of using judgment value Gr as the division criteria is higher than that of using judgment value Gi as the division criteria, so judgment value Gr is selected as the division criteria of decision trees in random forest. Generally speaking, the more decision trees there are in random forest, the higher the accuracy of the algorithm, but the speed of the program will decrease.

[0132] When using the bagging method, two independent sets are created. One is the in-bag sample set, which is the "in-bag" data selected by unweighted replacement sampling; the other is the out-of-bag set, which is all the data that has not been selected during the sampling process. The out-of-bag error rate refers to the average prediction error of each training sample. Now construct multiple random forest classifiers. The number of subtree random selection attributes set by each classifier is different. Now adjust the value of the number of trees in the random forest, and get the relationship between the out-of-bag error rate and the number of trees in the forest. Figure 6 shown.

[0133] As can be seen from the figure, when the number of trees in the random forest is small, the classification error is large, and as the number of trees increases, the classification error of the random forest gradually decreases. In theory, the more trees there are, the better the effect will be, but in fact, the error rate begins to fluctuate after exceeding a certain number. When the number of sub-features in the forest is selected as 3, the error rate is the smallest, and the error rate basically converges after the number of trees in the random forest exceeds 100, so the number of trees is specified as 200 as a parameter for model training.

[0134] Step 6: Input the test set and evaluate the random forest fault diagnosis performance through evaluation indicators.

[0135] After the model training is completed, the out-of-bag test set is input to evaluate the fault diagnosis performance of the model. In the binary classification problem, the main performance evaluation indicators used include accuracy, precision, recall, F1 value and AUC.

[0136] For the binary classification problem, the samples can be divided into four cases according to the combination of their true categories and the categories predicted by the learner: true positive examples (TP), false positive examples (FP), true negative examples (TN), and false negative examples (FN). Let TP, FP, TN, and FN represent the corresponding number of samples, respectively. The confusion matrix of the classification results is shown in Table 5:

[0137] Table 5. Classification results confusion matrix

[0138]

[0139] Accuracy, that is, the probability of predicting correctly among all samples, is calculated as follows:

[0140]

[0141] Precision, that is, the probability that all samples predicted to be positive are actually positive samples, is also called the precision rate, which is calculated as follows:

[0142]

[0143] Recall, that is, the probability of being predicted as a positive sample among all actually positive samples, is also called recall rate, and is calculated as follows:

[0144]

[0145] Precision and recall are a pair of contradictory metrics. Generally speaking, when precision is high, recall is often low; and when recall is high, precision is often low. In order to comprehensively examine the above two performance indicators, a balancing variable - F1 value is introduced, which is based on the harmonic mean of precision and recall, and is calculated as follows:

[0146]

[0147] AUC refers to the area under the receiver operating characteristic curve (ROC curve). This value can quantitatively reflect the performance of the model measured based on the ROC curve. The value of AUC is generally between 0.5 and 1. The larger the AUC, the more likely the classifier is to rank the true positive samples first, and the better the classification performance. The ROC curve for testing the performance of the random forest model is as follows: Figure 7 As shown in the figure, it can be seen that the curve is closer to the point (0,1), which proves that the model classification performance is good.

[0148] In multi-classification problems, the above evaluation indicators can still be used to analyze model performance, but they need to be averaged. There are mainly three ways to average the evaluation indicators:

[0149] Macro average: add up the same evaluation index of different categories to get the average;

[0150] Micro-average: Add the TP, FP, TN, and FN of each category, and then calculate according to the binary classification formula;

[0151] Weighted average: Weight ratio = the proportion of the category in the sample. This method takes into account the imbalance of categories, so its value is more easily affected by common categories.

[0152] The macro average of the evaluation indicators is selected as the evaluation indicator for the three categories. The final test results are shown in Table 6.

[0153] Table 6 Random forest fault diagnosis performance

[0154]

[0155] From the data in the table, we can see that random forests have shown good classification performance in both determining whether a fault exists and diagnosing specific fault types, and their accuracy is higher than that of decision trees. Using random forests for fault diagnosis has the following advantages:

[0156] 1) Due to the use of an integrated algorithm, the accuracy of random forest is better than most single algorithms, so the accuracy rate is high;

[0157] 2) It performs well on the test set. Due to the introduction of two randomnesses (sample randomness and feature randomness), random forests are not prone to overfitting.

[0158] 3) In industry, due to the introduction of two randomnesses, random forests have a certain ability to resist noise and have certain advantages over other algorithms;

[0159] 4) Due to the combination of decision trees, random forest can handle nonlinear data, which itself belongs to nonlinear classification (fitting) model;

[0160] 5) Random forest can process high-dimensional data without feature selection. It has strong adaptability to data sets and can process both discrete and continuous data without data normalization.

[0161] 6) Fast training speed, able to meet the requirements of real-time diagnosis;

[0162] 7) Due to the existence of out-of-bag data, an unbiased estimate of the true error can be obtained during the model generation process without losing the amount of training data;

[0163] 8) Due to its simple implementation, high accuracy and strong resistance to overfitting, it is suitable as a benchmark model when facing nonlinear data.

[0164] The present invention expands the application of acoustic signals in turbine fault detection, and can monitor and detect turbine faults in the actual operating environment, reducing the workload of operation and maintenance personnel, improving maintenance accuracy, and has positive significance for promoting the intelligent development of hydropower stations and improving the level of informatization.

Claims

1. A mechanical equipment fault detection method based on acoustic signal feature analysis and random forest, comprising the following steps: S1: Build an acoustic signal acquisition system at key locations of industrial production operations, simulate fault scenarios, and collect acoustic signals of mechanical equipment under different working conditions as the original data for the model; S2: Preprocess and extract features from the collected data, extract short-term features and medium-term features respectively; then remove redundant features, use the processed data set as the input data of the model, and use the corresponding fault type as the training label; S3: Select decision tree as the base classifier model for fault diagnosis, use Bootstrap resampling method to perform random sampling with replacement on the training data, build corresponding decision tree for each sub-data set, each decision tree performs fault diagnosis based on the corresponding new data sample, and the obtained n decision trees form a random forest; further use the random forest model as the fault diagnosis model, divide the original data set into a training set and a test set, train the random forest model parameters so that the fault type output by the random forest is close to the training label, and obtain a mechanical equipment fault detection model based on acoustic signal feature analysis; vote on the prediction results of each decision tree, use the principle of minority obeys majority, output the fault diagnosis result, and obtain the fault type currently predicted by the random forest; S4: Use the trained mechanical equipment fault detection random forest model to classify the mechanical equipment acoustic signals under unknown working conditions, and evaluate the classification accuracy of the model through performance indicators.

2. A mechanical equipment fault detection method based on acoustic signal feature analysis and random forest as claimed in claim 1, characterized in that: The features of the acoustic signal extracted and collected in S2 include: Extract the short-term features of each collected sound signal, which are: time domain maximum value, time domain peak value, and time domain standard deviation; The medium-term features are: spectral entropy, spectral flatness, spectral width, spectral slope, and spectral centroid. The maximum value or peak-to-peak value is extracted from the short-term features as the medium-term features of the data for subsequent model training.

3. A mechanical equipment fault detection method based on acoustic signal feature analysis and random forest as claimed in claim 1, characterized in that: The method for removing redundant features in S2 is: Calculate the correlation between two features r , and its calculation formula is: Among them, x and y are two features whose correlation needs to be calculated, cov(x,y) is the covariance between the two, and σ(x) and σ(y) are the standard deviations of the two features respectively; r The value is between -1 and 1. The larger the absolute value, the stronger the correlation. When the correlation coefficient is 0, the two variables x and y are unrelated. When the value of x increases or decreases, the value of y increases or decreases accordingly, then the two variables are positively correlated, and the corresponding correlation is r Between [0,1]; when the value of x increases or decreases, the value of y decreases or increases accordingly, then the two variables are negatively correlated, and the corresponding correlation r Between [-1, 0]; First, the correlation between each two features is calculated and the correlation matrix between the features is given. For features whose correlation is greater than the set threshold, it is considered that the data characteristics they represent are highly similar. Duplicate features are removed to improve model performance and generalization ability.

4. The mechanical equipment fault detection method based on acoustic signal feature analysis and random forest as claimed in claim 1, characterized in that: When the decision tree in S3 adopts the following judgment value Gr as the division criterion, the calculation method of Gr is: First, information entropy is used to measure the purity of the current sample set. The information entropy is calculated as follows: The proportion of the k-th class samples in the current sample set D is p k , k=1,2,...,|γ|, then the information entropy of sample set D is defined as Ent(D); Assume that a discrete attribute a has V possible values ​​{a 1 ,a 2 ,...,a V }, use D v To represent all the values ​​in D where attribute a takes value a v Samples of Then calculate the judgment value Gr: in, IV(a) is called the intrinsic value of attribute a. The more values ​​attribute a takes, the larger the value of IV(a) will be. The specific partitioning criterion is: first find the attributes whose G(D,a) is higher than the average value from the candidate partitioning attributes, and then select the attribute with the highest Gr as the final prediction attribute.

5. The mechanical equipment fault detection method based on acoustic signal feature analysis and random forest as claimed in claim 1, characterized in that: When the decision tree in S3 uses the judgment value Gi as the partition attribute, the calculation method of Gi is: Calculate data purity C(D); C(D) reflects the probability that two samples randomly selected from data set D have inconsistent category labels. Therefore, the smaller C(D), the higher the purity of data set D. Calculate the judgment value Gi of attribute a: The partitioning criterion is: in the candidate attribute set, select the attribute that minimizes the judgment value Gi after partitioning as the optimal partitioning attribute.

6. A mechanical equipment fault detection method based on acoustic signal feature analysis and random forest as claimed in claim 2, characterized in that: The short-term characteristics in S2 also include: short-time energy and zero-crossing rate; The calculation method of the short-time energy STE(i) is: The acoustic signal is windowed and divided into L short-term segments of equal length. There may be overlaps between the windows. Let x i (n) is the i-th short-term segment n = 1, 2, .., F L , i=1,2,...,L,F L is the length of the short-term segment, the short-time energy calculation formula is as follows: The calculation method of zero crossing rate ZCR(i) is:

7. A mechanical equipment fault detection method based on acoustic signal feature analysis and random forest as claimed in claim 2, characterized in that: The short-term features in S2 also include: SCF(i), SD(i); The spectrum of the short-term segment obtained by discrete Fourier transform is as follows: Assume k and f k They are the transformed spectrum X i The magnitude and magnitude of [K] k The corresponding frequency, subscript k from b1 to b2, s b1 It represents the amplitude of the spectrum when the subscript is b1. The short-term characteristics SCF(i) and SD(i) are calculated as follows:

Citation Information

Patent Citations

  • High-speed train bearing fault diagnosis method based on improved random forest

    CN114371009A

  • Rolling bearing fault diagnosis method based on random forest algorithm and related equipment

    CN118395313A

  • Multi-measurement fusion equipment fault diagnosis algorithm and application

    CN118606768A

  • Method for Fault Diagnosis of an Aero-engine Rolling Bearing Based on Random Forest of Power Spectrum Entropy

    US20200200648A1

Cited By

  • Lithium ion battery thermal runaway early warning method based on sound signals

    CN120674631A

  • GIS flange bolt pretightening force and axial stress detection method and electronic equipment

    CN120721279A