A Fault Diagnosis Method Based on Random Walk and Machine Learning
By using a random walk optimization algorithm in troubleshooting for hyperparameter optimization and principal component analysis and dimensionality reduction, the problem of insufficient fault diagnosis efficiency and accuracy in the existing technology is solved, and more efficient and accurate fault diagnosis is achieved.
Patent Information
- Application Number
- CN202310888223.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-07-19
AI Technical Summary
Existing machine learning-based fault diagnosis methods have problems such as inefficiency and insufficient accuracy in hyperparameter optimization and high-dimensional data processing, resulting in limited fault diagnosis efficiency and accuracy.
The machine learning model is optimized hyperparameters based on random walks, and the optimal feature parameters are selected through principal component analysis (PCA) to improve the efficiency and accuracy of fault diagnosis.
The stochastic walk optimization algorithm significantly improves the hyperparameter optimization efficiency of the machine learning model, reduces the feature dimension, improves the accuracy and efficiency of fault diagnosis, and reduces the model training time.
Smart Images

Figure CN116881700B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of structural system fault diagnosis, and in particular relates to a fault diagnosis method based on random walk and machine learning. Background Art
[0002] With the continuous improvement of equipment reliability and safety requirements, modern industrial processes and structural equipment are becoming more and more automated, intelligent, and high-speed. The structure of the system is becoming more and more complex, and the connection between various systems is becoming closer and closer, and it can operate normally in harsh environments. However, it is precisely because of this complex process that the fault presents a development trend of high integration, high complexity, and high coupling. Once a fault occurs, a series of chain reactions will occur, causing catastrophic major accidents and huge economic losses. In addition, due to the large scale and high complexity of the control process, it is difficult for operators to find the cause of the fault in time and eliminate the fault. Therefore, how to effectively monitor the health status of the moving parts structure, find faults in time, and correctly diagnose the fault type is an important research topic currently facing us. It is of great significance to study the fault prediction and health management technology of the transmission system.
[0003] At present, in the fault diagnosis method based on machine learning, the commonly used hyperparameter optimization methods are mainly grid search and random search. Grid search is to use an exhaustive method to combine all the hyperparameters involved, model and analyze each combination, and finally select the combination with the highest evaluation as the final hyperparameter of the model. However, the main disadvantage of this method is that when there are many parameter combinations, it takes a long time to find the optimal hyperparameter combination. Random search mainly randomly searches for hyperparameters in the hyperparameter distribution for modeling. The main disadvantage is that it is impossible to obtain the global optimal solution, and it is often easy to ignore some optimal hyperparameters.
[0004] At the same time, in machine learning tasks, we often face the situation where the data feature dimensions are high, which will cause the dimensionality curse problem. This will greatly increase the amount of algorithm calculations, reduce the speed of program execution, make the model training time longer, and reduce the efficiency of fault diagnosis. Summary of the invention
[0005] The purpose of the present invention is to solve the problem of hyperparameter optimization of machine learning models, while achieving dimensionality reduction of high-dimensional data features and screening of optimal feature parameters, laying the foundation for subsequent fault diagnosis of traditional systems.
[0006] In order to achieve the purpose of the present invention, the present invention discloses a fault diagnosis method based on random walk and machine learning, comprising the following steps:
[0007] S1, collecting vibration signal data of moving parts and performing preprocessing;
[0008] S2. For the pre-processed vibration signal, a fault feature extraction algorithm is used to extract feature parameters that can reflect the health status and fault information of the moving parts;
[0009] S3, perform principal component analysis PCA on the characteristic parameters obtained in S2, assuming that there are M samples {X 1 ,X 2 ,...,X M}, each sample has N-dimensional features Each feature x j All have their own eigenvalues;
[0010] S4, construct a random walk optimization algorithm;
[0011] S5. Use random walk optimization algorithm to optimize the hyperparameters of machine learning models;
[0012] S6, divide the sample data after PCA dimension reduction in S3 into a training set and a test set, put the training set into the optimized machine learning model in S5 for training, use the test set for fault prediction, and obtain the prediction accuracy under different features;
[0013] S7. Compare and analyze the prediction accuracy obtained in S6, and select the feature with the highest accuracy as the best feature. In subsequent fault diagnosis, only such features need to be extracted for principal component analysis.
[0014] Furthermore, S1 specifically includes the following steps:
[0015] S11, using a data acquisition device to collect state information of the moving parts, and importing the collected vibration signals into a computer;
[0016] S12, processing the vibration signal imported into the computer using signal analysis software, and dividing the data according to the working time of the moving parts under different working conditions;
[0017] S13, pre-processing the divided vibration signals in turn, filtering outliers, and improving the accuracy of signal analysis.
[0018] Furthermore, S3 specifically includes the following steps:
[0019] S31. Center all features, find the average value of each feature, and then for all samples, subtract the mean value of each feature from its own.
[0020] S32, calculating the covariance matrix of the sample data;
[0021]
[0022]
[0023] in, is the mean of feature x1, is the mean of feature x2;
[0024] S33, solving the eigenvalue and eigenvector of the covariance moment;
[0025] S34, arranging the eigenvalues in descending order, selecting K larger ones, and then forming a projection matrix with the corresponding K eigenvectors;
[0026] S35, project the sample points and calculate, complete the PCA dimension reduction task, and retain 85% of the main components.
[0027] Furthermore, S4 specifically includes the following steps:
[0028] S41, determine the objective function F(s), assuming that the objective function has multiple decision variables, that is, s = (s1, s2, ..., s3);
[0029] S42. Determine the number of iterations before optimization IT max , initial step length ΔL start , the initial value s0 of the optimization variable and the control accuracy ξ;
[0030] S43, set the initial iteration value iter=1, and determine whether the set number of iterations has been reached, that is, whether iter>N is satisfied, iter=iter+1;
[0031] S44, if iter = 1, the first random walk is performed, then D random numbers are randomly generated between (0, 1), that is, r = {r1, r2, ..., r D}, and then perform random variable rounding, s id = l d +round[r d ·(u d -l d )], we can get a random vector composed of D random walking particles, namely s i =(s i1 ,...,s iD ), substitute the objective function value for calculation, obtain a set of solutions that minimize the objective function value, and complete the first iteration;
[0032] S45, if the set number of iterations is reached, determine whether the update step length ΔL meets the preset accuracy, that is, ΔL>ξ,
[0033] S46, calculate the optimization model and determine F i )s i)>F(s), then find a point better than the initial value, then s=s i , return to S43, if the condition is not met, set iter = iter + 1, Return to S44;
[0034] S47. If the number of iterations has met the conditions and the optimal value has not been found, then the current solution is output, but it is not the optimal solution. When the termination condition is met, that is, ΔL>ξ, the algorithm terminates. If the termination condition is not met, the iteration continues.
[0035] Furthermore, S5 specifically includes the following steps:
[0036] S51, determine the decision variables and initialize them, and randomly give m sets of hyperparameter combination sets s1, s2, ..., s m ;
[0037] S52, bring the decision variables into the objective function, and then start the machine learning model training to obtain the corresponding prediction accuracy F1(s1), F2(s2), ..., F m (s m ), forming a prediction accuracy data set D;
[0038] S53. Based on data set D, if F is satisfied i (s i )>F(s), that is, the prediction accuracy corresponding to the hyperparameter combination at this time is the highest, and the best hyperparameter s is selected i ;
[0039] S54: Determine whether the iteration termination condition is currently met. If not, return to S51 until the global optimal solution is found.
[0040] Compared with the prior art, the significant progress of the present invention is that: 1) the random walk intelligent algorithm is used for optimization, which solves the problem that the traditional algorithm takes too long to find the optimal solution and cannot find the global optimal solution; 2) by optimizing the hyperparameters of the machine learning model, the prediction accuracy of the model can be significantly improved while ensuring the prediction performance of the model; 3) by the principal component analysis method, the feature dimension is reduced; and by screening out the best features, only a certain type of features needs to be calculated for feature extraction of subsequent vibration test data, which speeds up the execution of the program, shortens the model training time, and improves the efficiency of fault diagnosis.
[0041] In order to more clearly illustrate the functional characteristics and structural parameters of the present invention, further description is given below in conjunction with the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0043] Figure 1 It is a schematic diagram of the iterative process of the random walk optimization algorithm;
[0044] Figure 2 It is a flowchart of the random walk algorithm to optimize hyperparameters;
[0045] Figure 3 It is a schematic diagram of the optimal feature screening process. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] The transmission system has a complex structure and is a typical moving component structure. Due to technical and cost limitations, the transmission system is often unable to be designed redundantly. In a high-power, high-speed, and high-load working environment, once a failure occurs, it will cause a catastrophic accident. Therefore, how to achieve high-precision fault diagnosis has become the key to the health status detection of the transmission system. This patent proposes a fault diagnosis method based on random walks and machine learning, which improves the calculation efficiency of fault feature parameters and model training while ensuring the model prediction performance, and improves the accuracy of dynamic component fault diagnosis.
[0048] When using machine learning models for fault diagnosis, the accuracy of the prediction model depends not only on the model itself, but also on the characteristic parameters of the test data and the selection of hyperparameters. Unlike model parameters generally obtained through data training, hyperparameters are set manually before model training. Due to the differences in machine learning models, the hyperparameters and model parameters of each model are also different. Different hyperparameter settings often lead to different classification results. It is necessary to optimize the main hyperparameters of the machine learning model to improve the accuracy of fault diagnosis while ensuring the prediction performance of the model.
[0049] In the test data preprocessing stage, feature extraction algorithms (time domain features, frequency domain features, EMD features, and DWT features) are used to obtain the characteristic parameters of the data. In order to reduce the complexity of the system without reducing the accuracy of the system, the obtained characteristic parameters are subjected to principal component analysis, retaining 85% of the main components, solving the characteristic dimension disaster problem and greatly reducing the model training time.
[0050] In the fault diagnosis model training phase, the random walk optimization algorithm is used to optimize the hyperparameters of several commonly used machine learning models (support vector machine SVM, logistic regression LR, Adaboost, random forest RF, and decision tree DT). The random walk optimization algorithm has the ability to quickly obtain the optimal value and can optimize the hyperparameter values of each machine learning model. The hyperparameters of the model are used as decision variables and the prediction accuracy is used as the objective function to achieve hyperparameter optimization; then the corresponding machine learning model is established based on the optimized hyperparameters, and the optimized model is evaluated and compared; finally, the machine learning model with the highest prediction accuracy is selected as the best fault diagnosis model.
[0051] A fault diagnosis method based on random walk and machine learning specifically includes the following steps:
[0052] Step 1: Use data acquisition equipment to collect status information of moving parts, and import the collected vibration signals into a computer;
[0053] Step 2: Process the vibration signal imported into the computer using signal analysis software, and divide the data according to the working time of the moving parts under different working conditions, so as to facilitate subsequent data preprocessing and data feature extraction;
[0054] Step 3: Preprocess the divided vibration signals in turn, filter out some abnormal values, and improve the accuracy of signal analysis;
[0055] Step 4: including time domain and frequency domain features, DWT energy features, and EMD energy features, etc., as sample data for subsequent use;
[0056] Step 5: Perform principal component analysis (PCA) on the characteristic parameters obtained in step 4. Assume that there are M samples {X 1 ,X 2 ,...,X M}, each sample has N-dimensional features Each feature x j All have their own eigenvalues;
[0057] Step 51: Center all features, find the average value of each feature, and then for all samples, subtract the mean value of each feature from its own.
[0058] Step 52: Calculate the covariance matrix of the sample data;
[0059]
[0060]
[0061] in, is the mean of feature x1, is the mean of feature x2.
[0062] Step 53: Solve the eigenvalue and eigenvector of the covariance moment;
[0063] Step 54: Arrange the eigenvalues in descending order, select the K largest ones, and then form a projection matrix with the corresponding K eigenvectors;
[0064] Step 55: Project the sample points and complete the PCA dimension reduction task, retaining 85% of the main components.
[0065] Step 6: Construct a random walk optimization algorithm, such as Figure 1 As shown, the specific steps are as follows:
[0066] Step 61: Determine the objective function F(s), assuming that the objective function has multiple decision variables, that is, s = (s1, s2, ..., s3));
[0067] Step 62: Determine the number of iterations before optimization IT max , initial step length ΔL start , the initial value s0 of the optimization variable and the control accuracy ξ (where ξ>0, generally a very small value);
[0068] Step 63: Set the initial iteration value iter=1, and determine whether the set number of iterations has been reached, that is, whether iter>N is satisfied, iter=iter+1;
[0069] Step 64: If iter = 1, the first random walk is performed, and D random numbers are randomly generated between (0, 1), that is, r = {r1, r2, ..., r D}, and then perform random variable rounding, s id = l d +round[r d ·(u d -l d )], we can get a random vector composed of D random walking particles, namely s i =(s i1 ,...,s iD ), substitute the objective function value for calculation, and obtain a set of solutions that minimize the objective function value, completing the first iteration.
[0070] Step 65: If the set number of iterations is reached, determine whether the update step length ΔL meets the preset accuracy, that is, ΔL>ξ.
[0071] Step 66: Calculate the optimization model and determine F i (s i )>F(s), then find a point better than the initial value, then s=s i , return to step 63, if the condition is not met, set iter = iter + 1, Return to step 64;
[0072] Step 67: If the number of iterations has met the conditions and the optimal value has not been found, then the current solution is output, but it is not the optimal solution. At this time, when the termination condition is met, that is, ΔL>ξ, the algorithm terminates; if the termination condition is not met, the iteration continues.
[0073] Step 7: Use the random walk optimization algorithm to optimize the hyperparameters of the machine learning model, such as Figure 2 As shown, the steps are as follows:
[0074] Step 71: Determine the decision variables and initialize them, and randomly assign m sets of hyperparameter combinations s1, s2, ..., s m ;
[0075] Step 72: Substitute the decision variables into the objective function, and then start the machine learning model training to obtain the corresponding prediction accuracy F1(s1), F2(s2), ..., F m (s m ), forming a prediction accuracy data set D;
[0076] Step 73: Based on data set D, if F is satisfied i (s i )>F(s), that is, the prediction accuracy corresponding to the hyperparameter combination at this time is the highest, and the best hyperparameter s is selected i ;
[0077] Step 74: Determine whether the iteration termination condition is currently met. If not, return to step 71 until the global optimal solution is found.
[0078] Step 8: Divide the sample data after PCA dimensionality reduction in step 5 into a training set and a test set, and put the training set into the machine learning model optimized in step 7 for training. Use the test set to predict faults and obtain the prediction accuracy under different features. The process is as follows: Figure 3 As shown;
[0079] Step 9: Compare and analyze the prediction accuracy obtained in step 8, and select the feature with the highest accuracy as the best feature. In subsequent fault diagnosis, you only need to extract such features for principal component analysis.
[0080] The optimal machine learning model and optimal features obtained through the above steps can be applied in subsequent fault diagnosis, which can not only improve the efficiency of fault diagnosis, but also improve the accuracy of fault diagnosis.
[0081] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0082] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A fault diagnosis method based on random walk and machine learning, characterized in that: The following steps are involved: S1, collecting vibration signal data of moving parts and performing preprocessing; S2. For the pre-processed vibration signal, a fault feature extraction algorithm is used to extract feature parameters that can reflect the health status and fault information of the moving parts; S3, perform principal component analysis PCA on the characteristic parameters obtained in S2, assuming that there are M samples {X 1 ,X 2 ,...,X M }, each sample has N-dimensional features Each feature x j All have their own eigenvalues; S4, construct a random walk optimization algorithm; S5. Use random walk optimization algorithm to optimize the hyperparameters of machine learning models; S6, divide the sample data after PCA dimension reduction in S3 into a training set and a test set, put the training set into the optimized machine learning model in S5 for training, use the test set for fault prediction, and obtain the prediction accuracy under different features; S7, compare and analyze the prediction accuracy obtained in S6, and select the feature with the highest accuracy as the best feature. In the subsequent fault diagnosis, only such features need to be extracted for principal component analysis; S4 specifically includes the following steps: S41. Determine the objective function F(s). Assume that the objective function has multiple decision variables, i.e., s=(s1, s2, ..., s n ); S42. Determine the number of iterations before optimization IT max , initial step length ΔL start , the initial value s0 of the optimization variable and the control accuracy ξ; S43, set the initial iteration value iter=1, and determine whether the set number of iterations has been reached, that is, whether iter>N is satisfied, iter=iter+1; S44, if iter = 1, the first random walk is performed, then D random numbers are randomly generated between (0, 1), that is, r = {r1, r2, ..., r D }, and then perform random variable rounding, s id = l d +round[r d ·(u d -l d )], we can get a random vector composed of D random walking particles, namely s i =(s i1 ,...,s iD ), substitute the objective function value for calculation, obtain a set of solutions that minimize the objective function value, and complete the first iteration; S45, if the set number of iterations is reached, determine whether the update step length ΔL meets the preset accuracy, that is, ΔL>ξ, S46, calculate the optimization model and determine F i (s i )>F(s), then find a point better than the initial value, then s=s i , return to S43, if the condition is not met, set iter = iter + 1, Return to S44; S47, if the number of iterations has met the conditions and the optimal value has not been found, then the current solution is output, but it is not the optimal solution; when the termination condition is met, that is, ΔL>ξ, the algorithm terminates; if the termination condition is not met, the iteration continues; S5 specifically includes the following steps: S51, determine the decision variables and initialize them, and randomly give m sets of hyperparameter combination sets s1, s2, ..., s m ; S52, bring the decision variables into the objective function, and then start the machine learning model training to obtain the corresponding prediction accuracy F1(s1), F2(s2), ..., F m (s m ), forming a prediction accuracy data set Data; S53, based on the data set Data, if F is satisfied i (s i )>F(s), that is, the prediction accuracy corresponding to the hyperparameter combination at this time is the highest, and the best hyperparameter s is selected i ; S54: Determine whether the iteration termination condition is currently met. If not, return to S51 until the global optimal solution is found.
2. A fault diagnosis method based on random walk and machine learning according to claim 1, characterized in that: S1 specifically includes the following steps: S11, using a data acquisition device to collect state information of the moving parts, and importing the collected vibration signals into a computer; S12, processing the vibration signal imported into the computer using signal analysis software, and dividing the data according to the working time of the moving parts under different working conditions; S13, pre-processing the divided vibration signals in turn, filtering outliers, and improving the accuracy of signal analysis.
3. A fault diagnosis method based on random walk and machine learning according to claim 1, characterized in that: S3 specifically includes the following steps: S31. Center all features, find the average value of each feature, and then for all samples, subtract the mean value of each feature from its own. S32, calculating the covariance matrix of the sample data; in, For feature X 1 The mean of For feature X 2 The mean of S33, solving the eigenvalues and eigenvectors of the covariance matrix; S34, arranging the eigenvalues in descending order, selecting K larger ones, and then forming a projection matrix with the corresponding K eigenvectors; S35. Project the sample points and calculate to complete the PCA dimension reduction task, retaining 85% of the main components.
Citation Information
Patent Citations
Fault real-time diagnosis method based on experimental design
CN115659143A