A method and system for real-time detection and early warning of compressor failure
By constructing a compressor failure detection model composed of TimeMixer model and GBDT model, and using the improved Kepler optimization algorithm to optimize model parameters, real-time detection and early warning of compressor failures is achieved, and the problems of inaccurate fault prediction and long response time in the existing technology are solved, and fault response speed and prediction accuracy are improved.
Patent Information
- Application Number
- CN202411010828.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-07-26
AI Technical Summary
The compressor may experience a variety of faults during operation, such as liquid return, overheating, excessive vibration, etc., resulting in reduced production efficiency, equipment damage and safety accidents. The existing technology is difficult to respond quickly and effectively predict these faults.
A real-time detection and early warning method and system of compressor faults is adopted to preprocess historical operating data, data decomposition and feature extraction are carried out, and a fault detection model consisting of TimeMixer model and GBDT model is constructed, and a model parameter is optimized using the improved Kepler optimization algorithm to achieve real-time fault prediction and early warning.
It realizes accurate prediction of compressor operation fault types, improves fault response speed and prediction accuracy, reduces the risk of equipment damage and safety accidents, and enhances the robustness and reliability of the system.
Smart Images

Figure CN118940090B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of compressor health management, and in particular relates to a compressor fault real-time detection and early warning method and system. Background Art
[0002] As a core equipment, compressors are widely used in the chemical, petroleum, natural gas and refrigeration industries. The stability and reliability of their operation are crucial to the entire production process. Compressors may have various faults during operation, such as liquid return, overheating, excessive vibration, etc. These faults not only affect production efficiency, but may also cause equipment damage and safety accidents, which will bring huge economic losses and safety risks to enterprises.
[0003] As one of the important industrial equipment, the materials and related systems of the compressor itself have strong robustness. However, once the compressor fails, it will have irreversible consequences. Manual maintenance has long response time and high maintenance cost. Therefore, a method with strong robustness and stability is needed to respond quickly and prevent minor failures from expanding their impact in time, so as to prevent the failure of the compressor from bringing greater impact to the enterprise.
[0004] Traditional compressors have unstable operating conditions and harsh working environments. Over time, compressors gradually face the problem of operating data concept drift caused by equipment aging and changes in operating conditions. This data drift not only blurs the boundaries of normal equipment operation, but also easily makes traditional fault prediction methods invalid, thereby increasing the probability and unpredictability of compressor failures. Therefore, a fault prediction method and system that can adapt to complex situations is needed, which can quickly respond to the real-time situation of the compressor and make accurate predictions. Summary of the invention
[0005] Purpose of the invention: The present invention provides a method and system for real-time detection and early warning of compressor faults, which can accurately predict the type of compressor operation faults and give early warnings.
[0006] Technical solution: A compressor fault real-time detection and early warning method according to the present invention comprises the following steps:
[0007] (1) Obtain historical compressor operation data in advance;
[0008] (2) The operating data is preprocessed to remove missing values and outliers and normalize them. The seasonal trend decomposition (STL) is used to decompose the data into periodic terms, trend terms, and residual terms. The discrete time domain Fourier transform (DTFT) is used to extract features from the decomposed data.
[0009] (3) Using the K-fold cross-validation method, the period term, trend term, and residual term are divided into K groups of data sets, which are divided into training sets and test sets;
[0010] (4) Construct a compressor fault real-time detection model composed of a TimeMixer model and a GBDT model; input the periodic term and trend term in the training set data into the Timemixer model for training; input the residual term in the training set data into the gradient decision boosting tree GBDT model for training; accumulate the outputs of the two models to obtain the final output result of the compressor fault real-time detection model;
[0011] (5) Evaluate the performance of the compressor fault real-time detection model, calculate the mean and standard deviation of each performance indicator of the root mean square error RMSE, mean symmetric absolute percentage error SMAPE and mean absolute error MAE for each training, and use envelope entropy to assign adaptive weights ω to RMSE, SMAPE and MAE, weight the three performance indicators, and construct a weighted prediction function based on the adaptive weights;
[0012] (6) Using the improved Kepler optimization algorithm to optimize the key parameter groups of the TimeMixer model and the GBDT model, the optimized model is transferred to step (4) for retraining and re-verification. If the mean value and the standard deviation are not less than the set threshold, this step is repeated; if the mean value and the standard deviation are less than the set threshold, the offline compressor fault real-time detection model is output;
[0013] (7) collecting compressor operation data in real time, using the trained compressor fault real-time detection model to perform real-time prediction, and monitoring the model accuracy in real time; if the accuracy of the compressor fault real-time detection model is not within the threshold, returning to step (4) to perform model update training;
[0014] (8) The prediction result failure probability threshold α is set in a graded manner to issue a real-time failure alarm.
[0015] Furthermore, the compressor operation data in step (1) includes temperature, pressure, flow, liquid level and vibration.
[0016] Furthermore, the implementation process of step (5) is as follows:
[0017] An embedding vector is constructed based on the time series data of each performance indicator. For each embedded vector, its distance to all other vectors within tolerance r is calculated and the similarity is determined. For the embedding dimension m and tolerance r, the proportion of vectors φ(m, r, indicator) that are similar to at least one other vector within the tolerance is calculated. For each indicator, its envelope entropy is calculated as follows:
[0018] ApEn(m,r,RMSE)=φ(m,r,RMSE)-φ(m+1,r,RMSE)
[0019] ApEn(m,r,SMAPE)=φ(m,r,SMAPE)-φ(m+1,r,SMAPE)
[0020] ApEn(m,r,MAE)=φ(m,r,MAE)-φ(m+1,r,MAE)
[0021] Use the envelope entropy results to assign weights ω to each performance metric z , and normalize the weights so that the sum of all weights is 1, giving the formula:
[0022]
[0023] In the formula, z is one of RMSE, SMAPE, and MAE. The larger the envelope entropy, the smaller the weight. z is the sum of all weights; the three performance indicators are weighted to construct a weighted prediction function L(ω), the formula is:
[0024] L(ω)=ω RMSE RMSE+ω SMAPE ·SMAPE+ω MAE ·MAE.
[0025] Furthermore, in step (6), the improved Kepler optimization algorithm is used to optimize the key parameter groups of the TimeMixer model and the GBDT model, specifically:
[0026] Initialize the key parameter combination, the formula is:
[0027]
[0028] Where, X i is the i-th key parameter group, N is the number of key parameter groups in the search space, and are the upper and lower bounds of the jth key parameter, d is the number of key parameters of the TimeMixer and GBDT models to be optimized, and rand[0,1] is a randomly generated number between 0 and 1;
[0029] Define the search trend of key parameters. Each key parameter group will search in the direction of the optimal group. According to the law of universal gravitation, the formula is:
[0030]
[0031] In the formula, and Indicates M s and m iThe normalized values of represent the size of the optimal key parameter group and the general key parameter group, respectively. ε is a very small value. μ(t) is a function that decreases exponentially with time t to control the search accuracy. i is the orbital eccentricity of the planet to adjust the balance between exploration and development, r1 is a randomly generated number between 0 and 1 to make the search trend more varied during the optimization process, YesR i The normalized value of represents the Euclidean distance between the optimal key parameter group and the general key parameter group, γ is a constant, μ0 is the initial value, t and T max is the current number of iterations and the maximum number of iterations;
[0032] The size of the optimal key parameter group and the general key parameter group at time t is evaluated by fitness. At this time, L1 regularization is added to construct a comprehensive fitness function. The formula is:
[0033] J(ω)=L(ω)+λ||ω||1
[0034]
[0035] In the formula, is the L1 norm, λ is the regularization coefficient, fit(t) is the comprehensive weighted prediction function, and r2 is a randomly generated number between 0 and 1, which is used to disperse the sizes of different candidate solutions;
[0036] When the general key parameter group is close to the optimal key parameter group, the search will be more active, and the search speed will be increased accordingly. On the contrary, when the general key parameter group is far away from the optimal key parameter group, the search speed will be slowed down. The update speed of the candidate solution is calculated as follows:
[0037]
[0038]
[0039] M=(r3×(1-r4)+r4)
[0040]
[0041] Where V i (t) is the speed of the general key parameter group at time t, r3 and r4 are randomly generated numbers in the interval [0, 1], is a vector of random values between 0 and 1, and is a solution randomly selected from the population, Γ is the sign that the algorithm escapes from the local optimum, and R i-norm (t) is the Euclidean distance between the optimal solution and the candidate solution at time t, and is normalized. The formula is:
[0042]
[0043] In the formula, if R i-norm (t)≤0.5, then the key parameter group is close to the optimal key parameter group, and because the optimal key parameter group has a directional search trend, the update speed of the general key parameter group will be increased to prevent drifting to the optimal key parameter group, otherwise, the update speed of the general key parameter group will be slowed down;
[0044] When the general key parameter group approaches the optimal key parameter group and falls into the local optimum, the elite strategy is added to change the search direction to escape the local optimum;
[0045] In a certain period of time, the general key parameter group will gradually approach the optimal key parameter group, and then gradually move away from the optimal key parameter group. The algorithm mainly uses the development stage and the exploration stage to simulate these two stages. In the exploration stage, the gap between the general key parameter group and the optimal key parameter group is large, and the new position of each general key parameter group that is far away from the optimal key parameter group will be updated. The formula is:
[0046]
[0047] In the formula, is the speed required for the general key parameter group to reach the new position, is the position of the current optimal key parameter group;
[0048] When the general key parameter group is close to the optimal key parameter group, the algorithm enters the development stage. When the general key parameter group is far away from the optimal key parameter group, the algorithm enters the exploration stage and introduces the parameter h. When h is large, the detection operator is used to expand the search range of candidate solutions. When h is small, the development operation is used to develop the area. If the distance between the general key parameter group and the optimal key parameter group is the smallest, it is the best solution at present. The formula is:
[0049]
[0050] η=(a2-1)×r4+1
[0051]
[0052] In the formula, h is an adaptive factor to control the distance between the optimal key parameter group and the current key parameter group, r is a number randomly generated by normal distribution, η is a linear decreasing factor from 1 to -2, and a2 is a cyclic control parameter that gradually decreases from -1 to -2 within T cycles;
[0053] Execute the elite strategy to ensure the best position of the general key parameter group and the optimal key parameter group. The formula is:
[0054]
[0055] Furthermore, in step (6), the trained model is used for real-time prediction and the model performance indicators are monitored in real time to ensure that the indicators are within the threshold, specifically:
[0056] When the offline model part outputs a comprehensive model trained with the improved Kepler optimization algorithm, the comprehensive model is used in the online early warning part to predict faults in real time. At this time, the comprehensive model output results are statistically analyzed, the accuracy of the comprehensive model output results is calculated, and a threshold for the accuracy is set. When the accuracy is lower than the set threshold, the model needs to return to the offline model part to retrain the model, and at the same time update the database used for offline model training to solve possible concept drift problems.
[0057] Furthermore, the implementation process of step (8) is as follows:
[0058] If 0.7>α≥0.5, it is judged as a warning; if 0.9>α≥0.7, it is judged as severe; if 1≥α≥0.9, it is judged as an emergency.
[0059] A compressor fault real-time detection and early warning system according to the present invention comprises:
[0060] Data storage module: stores historical compressor operation data to prepare for data input for the central integrated processing module to train the model;
[0061] Data optimization and extraction module: pre-process the running data, remove missing values and outliers, and perform normalization. Use seasonal trend decomposition STL to decompose the data into periodic terms, trend terms, and residual terms. Use discrete time domain Fourier transform DTFT to extract features from the decomposed data. Use K-fold cross-validation to divide the periodic terms, trend terms, and residual terms into K groups of data sets, which are divided into training sets and test sets.
[0062] The compressor fault real-time detection model construction and training module constructs a compressor fault real-time detection model composed of a TimeMixer model and a GBDT model; the periodic term and trend term in the training set data are input into the Timemixer model for training; the residual term in the training set data is input into the gradient decision boosting tree GBDT model for training; the outputs of the two models are accumulated to obtain the final output result of the compressor fault real-time detection model; the performance of the compressor fault real-time detection model is evaluated, and the mean and standard deviation of each performance indicator of the root mean square error RMSE, mean symmetric absolute percentage error SMAPE and mean absolute error MAE for each training are calculated, and the envelope entropy is used to assign adaptive weights ω to RMSE, SMAPE and MAE, weight the three performance indicators, and construct a weighted prediction function in combination with the adaptive weights;
[0063] Compressor fault real-time detection model optimization module: Use the improved Kepler optimization algorithm to optimize the key parameter groups of the TimeMixer model and the GBDT model, and output the offline compressor fault real-time detection model;
[0064] Alarm module: Set the fault probability threshold of the prediction results in a graded manner and issue real-time fault alarms.
[0065] Furthermore, the system also includes a general monitoring screen module for monitoring the operating status of the entire system.
[0066] Furthermore, the system also includes a real-time data acquisition module, which collects compressor operation data in real time, uses a trained compressor fault real-time detection model to perform real-time prediction, and monitors the model accuracy in real time; if the accuracy of the compressor fault real-time detection model is not within a threshold, the data is transmitted to the compressor fault real-time detection model construction and training module, and the model is retrained.
[0067] Furthermore, the real-time faults include three types: warning, serious and emergency.
[0068] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects:
[0069] 1. By constructing a weighted prediction function, the present invention can assign different weights according to the performance of the model in different aspects, comprehensively consider the characteristics of each model, improve the generalization ability of the early warning system, and combine L1 regularization to effectively reduce the risk of overfitting. In addition, by assigning weights to the three indicators, the prediction accuracy and robustness of the model's operating status can be improved;
[0070] 2. The present invention optimizes TimeMixer and GBDT models together through the Kepler optimization algorithm, which can reduce the workload and time of manually adjusting model parameters, so that the optimized model has stronger robustness and stability when facing different data sets and noisy data. In addition, the Kepler optimization algorithm has an elite strategy that can jump out of the local optimum and quickly find the global optimum, thus reducing the time of model training and improving the work efficiency and speed of the system.
[0071] 3. The present invention adopts accuracy as an evaluation indicator to determine whether to retrain the model. It can effectively deal with the problem of concept drift of operating data caused by equipment aging and changes in operating conditions, increase the flexibility of the system, and better adapt to changes in the external environment. By combining the offline model and the online early warning, the training efficiency of the model when dealing with large amounts of data can be improved. By predicting the results and the actual situation, the timeliness of decision-making can be improved, the dynamic needs of users can be better met, and it can adapt to complex scenarios and needs, thereby improving the robustness and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 This is a flow chart of the real-time detection and early warning method for compressor failure;
[0073] Figure 2 This is a flowchart of the KOA optimization TimeMixer and GBDT models proposed in the present invention. DETAILED DESCRIPTION
[0074] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0075] like Figure 1 As shown, the present invention provides a real-time detection and early warning method for compressor faults. The Kepler optimization algorithm (KOA) optimizes the TimeMixer and gradient decision boosting tree (GBDT) models to effectively improve the robustness and stability of the model, and divides the model into two parts: an offline model and an online early warning. The rapidity and applicability of the system can be effectively improved. Taking the liquid backflow fault of the compressor as an example, the method specifically includes the following steps:
[0076] Step 1: Collect historical operating data of the compressor through sensors, which is source data, including but not limited to obtaining corresponding data using data from temperature sensors, pressure sensors, flow sensors, liquid level sensors and vibration sensors.
[0077] Step 2: Preprocess the source data, remove missing values and outliers, and perform normalization. Use seasonal trend decomposition (STL) to decompose the data into periodic terms, trend terms, and residual terms. Use discrete time domain Fourier transform (DTFT) to extract features from the decomposed data.
[0078] Step 3: Use the K-fold cross-validation method to divide the period term, trend term, and residual term into K groups of data sets, which are divided into training sets and test sets.
[0079] Step 4: Construct a compressor fault real-time detection model composed of the TimeMixer model and the GBDT model; input the periodic term and trend term in the training set data into the Timemixer model for training; input the residual term in the training set data into the gradient decision boosting tree GBDT model for training; accumulate the outputs of the two models to obtain the final output result of the compressor fault real-time detection model.
[0080] Step 5: Evaluate the performance of the compressor fault real-time detection model, record the root mean square error RMSE, mean symmetric absolute percentage error SMAPE, and mean absolute error MAE of each training, calculate the mean and standard deviation of each performance indicator, and use envelope entropy to assign adaptive weights ω to RMSE, SMAPE, and MAE. Weight the three performance indicators and construct a weighted prediction function in combination with the adaptive weights.
[0081] K-fold cross validation is used to divide the training set and test set, and the mean and standard deviation of the three performance indicators are calculated. The formula is:
[0082]
[0083] Where RMSE is the root mean square error of the i-th test set, SMAPE is the mean symmetric absolute percentage error of the i-th test set, and MAE is the mean absolute error of the i-th test set.
[0084] An embedding vector is constructed based on the time series data of each performance indicator. For each embedded vector, its distance to all other vectors within tolerance r is calculated and the similarity is determined. For the embedding dimension m and tolerance r, the proportion of vectors φ(m, r, indicator) that are similar to at least one other vector within the tolerance is calculated. For each indicator, its envelope entropy is calculated as follows:
[0085] ApEn(m,r,RMSE)=φ(m,r,RMSE)-φ(m+1,r,RMSE)
[0086] ApEn(m,r,SMAPE)=φ(m,r,SMAPE)-φ(m+1,r,SMAPE)
[0087] ApEn(m,r,MAE)=φ(m,r,MAE)-φ(m+1,r,MAE)
[0088] Use the envelope entropy results to assign weights ω to each performance metric z, and normalize the weights so that the sum of all weights is 1, giving the formula:
[0089]
[0090] In the formula, z is one of RMSE, SMAPE, and MAE. The larger the envelope entropy, the smaller the weight. z is the sum of all weights.
[0091] The above three performance indicators are weighted to construct the weighted prediction function L(ω), the formula is:
[0092] L(ω)=ω RMSE RMSE+ω SMAPE ·SMAPE+ω MAE ·MAE.
[0093] Step 6: Set the thresholds of RMSE, SMAPE, and MAE, and compare the mean and standard deviation of the performance indicators after each iteration. If the final results of the mean and standard deviation are both less than the set thresholds, the model has good overall performance and robustness, and no model optimization is required; otherwise, the model needs to be further optimized.
[0094] Step 7: If any mean value or standard deviation is not less than the set threshold, the compressor fault real-time detection model needs to be further optimized. The key parameters of the TimeMixer model and the GBDT model are mixed and encoded, and the key parameter group is optimized using the Kepler optimization algorithm. The optimized comprehensive model is transferred to step 4 for retraining and verification. If the mean value and standard deviation are not less than the set threshold, repeat this step; if the performance index is less than the set threshold, output the offline model. The specific process is as follows: Figure 2 As shown:
[0095] Initialize the key parameter combination, the formula is:
[0096]
[0097] Where, X i is the i-th key parameter group, N is the number of general key parameter groups in the search space, and are the upper and lower bounds of the jth key parameter, d is the number of key parameters of the TimeMixer and GBDT models to be optimized, and rand[0,1] is a randomly generated number between 0 and 1.
[0098] Define the search trend of general key parameter groups. Any general key parameter group will search in the direction of the optimal key parameter group. According to the law of universal gravitation, the formula is:
[0099]
[0100] In the formula, and Indicates M s and m i The normalized values of represent the size of the optimal key parameter group and the general key parameter group, respectively. ε is a very small value. μ(t) is a function that decreases exponentially with time t to control the search accuracy. i is the orbital eccentricity of the planet to adjust the balance between exploration and development, r1 is a randomly generated number between 0 and 1 to make the gravity value more variable during the optimization process, YesR i The normalized value of represents the Euclidean distance between the optimal key parameter group and the general key parameter group, γ is a constant, μ0 is the initial value, t and T max is the current number of iterations and the maximum number of iterations.
[0101] The size of the optimal key parameter group and the general key parameter group at time t can be evaluated by fitness. At this time, L1 regularization is added to construct a comprehensive fitness function. The formula is:
[0102] J(ω)=L(ω)+λ||ω||1
[0103]
[0104] In the formula, is the L1 norm, λ is the regularization coefficient, fit(t) is the comprehensive weighted prediction function, and r2 is a randomly generated number between 0 and 1, which is used to disperse the sizes of different general key parameter groups.
[0105] When the general key parameter group is close to the optimal key parameter group, the search will be more active, and the search speed will be increased accordingly. On the contrary, when the general key parameter group is far from the optimal key parameter group, the search speed will be slowed down. The update speed of the general key parameter group is calculated as follows:
[0106]
[0107] M=(r3×(1-r4)+r4)
[0108]
[0109] Where V i (t) is the speed of the general key parameter group at time t, r3 and r4 are randomly generated numbers in the interval [0, 1], is a vector of random values between 0 and 1, and is a solution randomly selected from the population, Γ is a sign that the algorithm escapes from the local optimum, and R i-norm (t) is the Euclidean distance between the optimal key parameter group and the general key parameter group at time t, and is normalized. The formula is:
[0110]
[0111] In the formula, if R i-norm (t)≤0.5, the general key parameter group is close to the optimal key parameter group, and because the optimal key parameter group has a directional search trend, the update speed of the general key parameter group will be increased to prevent it from drifting toward the optimal key parameter group. Otherwise, the update speed of the general key parameter group will slow down.
[0112] Most general key parameter groups will follow a certain pattern to approach the optimal key parameter group, which makes it easy to fall into the local optimum. At this time, the elite strategy is added to change the search direction to escape the local optimum.
[0113] In a certain period of time, the candidate solution will gradually approach the optimal key parameter group, and then gradually move away from the optimal key parameter group. The algorithm mainly uses the development phase and the exploration phase to simulate these two phases. In the exploration phase, the gap between the general key parameter group and the optimal key parameter group is large, and the new position of each general key parameter group that is far away from the optimal key parameter group will be updated. The formula is:
[0114]
[0115] In the formula, is the speed required for the general key parameter group to reach the new position, is the position of the current optimal key parameter group.
[0116] When the general key parameter group is close to the optimal key parameter group, the algorithm enters the development stage. When the general key parameter group is far away from the optimal key parameter group, the algorithm enters the exploration stage and introduces the parameter h. When h is large, the detection operator is used to expand the search range of candidate solutions. When h is small, the development operation is used to develop the area. If the distance between the general key parameter group and the optimal key parameter group is the smallest, it is the best solution at present. The formula is:
[0117]
[0118] η=(a2-1)×r4+1
[0119]
[0120] Where h is an adaptive factor to control the distance between the optimal key parameter group and the current key parameter group, r is a number randomly generated by normal distribution, η is a linear decreasing factor from 1 to -2, and a2 is a cyclic control parameter that gradually decreases from -1 to -2 within T cycles.
[0121] Execute the elite strategy to ensure the best position of the general key parameter group and the optimal key parameter group. The formula is:
[0122]
[0123] Step 8: Collect compressor operation data in real time. If the prediction result is that the compressor has a liquid backflow failure, monitor the model performance indicators in real time to ensure that the indicators are within the threshold. If the performance indicator (accuracy) output by the prediction result is lower than the threshold, return to step 4 for model update training.
[0124] Step 9: Set the predicted result fault probability threshold α in a graded manner and perform real-time fault alarm. The alarm is divided into three categories: warning, serious, and emergency; if 0.7>α≥0.5, it is judged as a warning, and a text message is sent to notify the maintenance personnel, and the monitoring station is notified by email; if 0.9>α≥0.7, it is judged as serious, and a text message is sent to notify the maintenance personnel, and the monitoring station is notified by sound and light alarm; if 1≥α≥0.9, it is judged as emergency, and a text message is sent to notify the maintenance personnel, and the monitoring station is notified by email, and the relevant departments are notified by sound and light alarm.
[0125] The detailed information of the alarm is recorded in the background, including but not limited to: time, type, and processing method; the maintenance personnel will perform maintenance according to the processing suggestions and the fault site, and complete all the information of the fault and fault processing after processing.
[0126] The present invention also provides a compressor fault real-time detection and early warning system, comprising:
[0127] Data storage module: stores historical compressor operation data and prepares data input for the central integrated processing module to train the model.
[0128] Data optimization and extraction module: The operating data is first preprocessed to remove missing values and outliers and perform normalization. The seasonal trend decomposition STL is used to decompose the data into periodic terms, trend terms and residual terms. For the decomposed data, discrete time domain Fourier transform DTFT is used to extract features from the data. The K-fold cross-validation method is used to divide the periodic terms, trend terms and residual terms into K groups of data sets, which are divided into training sets and test sets.
[0129] The compressor fault real-time detection model construction and training module constructs a compressor fault real-time detection model composed of a TimeMixer model and a GBDT model; the periodic term and trend term in the training set data are input into the Timemixer model for training; the residual term in the training set data is input into the gradient decision boosting tree GBDT model for training; the outputs of the two models are accumulated to obtain the final output result of the compressor fault real-time detection model; the performance of the compressor fault real-time detection model is evaluated, and the mean and standard deviation of each performance indicator, namely the root mean square error RMSE, the mean symmetric absolute percentage error SMAPE and the mean absolute error MAE, are calculated for each training, and the envelope entropy is used to assign adaptive weights ω to RMSE, SMAPE and MAE, weight the three performance indicators, and construct a weighted prediction function in combination with the adaptive weights.
[0130] Compressor fault real-time detection model optimization module: Use the improved Kepler optimization algorithm to optimize the key parameter groups of the TimeMixer model and the GBDT model, and output the offline compressor fault real-time detection model.
[0131] Alarm module: Set the prediction result failure probability thresholds in a graded manner and issue real-time fault alarms; real-time faults include warning, serious and emergency.
[0132] The main monitoring screen module is used to monitor the operating status of the entire system.
[0133] The real-time data acquisition module collects the compressor operation data in real time, uses the trained compressor fault real-time detection model to make real-time predictions, and monitors the model accuracy in real time; if the accuracy of the compressor fault real-time detection model is not within the threshold, the data is transmitted to the compressor fault real-time detection model construction and training module for re-model training.
[0134] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for real-time detection and early warning of compressor failure, characterized in that: The following steps are involved: (1) Obtain historical compressor operation data in advance; (2) Preprocess the running data, remove missing values and outliers, and perform normalization; Seasonal trend decomposition STL is used to decompose the data into periodic terms, trend terms and residual terms; discrete time domain Fourier transform DTFT is used to extract features from the decomposed data; (3) Using the K-fold cross-validation method, the period term, trend term, and residual term are divided into K groups of data sets, which are divided into training sets and test sets; (4) Construct a real-time compressor fault detection model composed of a TimeMixer model and a GBDT model; input the periodic term and trend term in the training set data into the Timemixer model for training; input the residual term in the training set data into the gradient decision boosting tree GBDT model for training; The outputs of the two models are accumulated to obtain the final output result of the compressor fault real-time detection model; (5) Evaluate the performance of the compressor fault real-time detection model, calculate the mean and standard deviation of each performance indicator of the root mean square error RMSE, mean symmetric absolute percentage error SMAPE and mean absolute error MAE for each training, and use envelope entropy to assign adaptive weights ω to RMSE, SMAPE and MAE, weight the three performance indicators, and construct a weighted prediction function based on the adaptive weights; (6) Using the improved Kepler optimization algorithm to optimize the key parameter groups of the TimeMixer model and the GBDT model, the optimized model is transferred to step (4) for retraining and re-verification. If the mean value and the standard deviation are not less than the set threshold, this step is repeated; if the mean value and the standard deviation are less than the set threshold, the offline compressor fault real-time detection model is output; (7) Collect compressor operation data in real time, use the trained compressor fault real-time detection model to make real-time predictions, and monitor the model accuracy in real time; If the accuracy of the compressor fault real-time detection model is not within the threshold, return to step (4) to perform model update training; (8) The prediction result failure probability threshold α is set in a graded manner to issue a real-time failure alarm.
2. A compressor fault real-time detection and early warning method according to claim 1, characterized in that: The compressor operating data in step (1) includes temperature, pressure, flow, liquid level and vibration.
3. A compressor fault real-time detection and early warning method according to claim 1, characterized in that: The implementation process of step (5) is as follows: An embedding vector is constructed based on the time series data of each performance indicator. For each embedded vector, its distance to all other vectors within tolerance r is calculated and the similarity is determined. For the embedding dimension m and tolerance r, the proportion of vectors φ(m, r, indicator) that are similar to at least one other vector within the tolerance is calculated. For each indicator, its envelope entropy is calculated as follows: ApEn(m,r,RMSE)=φ(m,r,RMSE)-φ(m+1,r,RMSE) ApEn(m,r,SMAPE)=φ(m,r,SMAPE)-φ(m+1,r,SMAPE) ApEn(m,r,MAE)=φ(m,r,MAE)-φ(m+1,r,MAE) Use the envelope entropy results to assign weights ω to each performance metric z , and normalize the weights so that the sum of all weights is 1, giving the formula: In the formula, z is one of RMSE, SMAPE, and MAE. The larger the envelope entropy, the smaller the weight. z is the sum of all weights; the three performance indicators are weighted to construct a weighted prediction function L(ω), the formula is: L(ω)=ω RMSE ·RMSE+ω SMAPE ·SMAPE+ω MAE ·MAE.
4. A compressor fault real-time detection and early warning method according to claim 1, characterized in that: Step (6) uses the improved Kepler optimization algorithm to optimize the key parameter groups of the TimeMixer model and the GBDT model, specifically: Initialize the key parameter combination, the formula is: Where, X i is the i-th key parameter group, N is the number of key parameter groups in the search space, and are the upper and lower bounds of the jth key parameter, d is the number of key parameters of the TimeMixer and GBDT models to be optimized, and rand[0,1] is a randomly generated number between 0 and 1; Define the search trend of key parameters. Each key parameter group will search in the direction of the optimal group. According to the law of universal gravitation, the formula is: In the formula, and Indicates M s and m i The normalized values of represent the size of the optimal key parameter group and the general key parameter group, respectively. ε is a very small value. μ(t) is a function that decreases exponentially with time t to control the search accuracy. i is the orbital eccentricity of the planet to adjust the balance between exploration and development, r1 is a randomly generated number between 0 and 1 to make the search trend more varied during the optimization process, YesR i The normalized value of represents the Euclidean distance between the optimal key parameter group and the general key parameter group, γ is a constant, μ0 is the initial value, t and T max is the current number of iterations and the maximum number of iterations; The size of the optimal key parameter group and the general key parameter group at time t is evaluated by fitness. At this time, L1 regularization is added to construct a comprehensive fitness function. The formula is: J(ω)=L(ω)+λ||ω||1 In the formula, is the L1 norm, λ is the regularization coefficient, fit(t) is the comprehensive weighted prediction function, and r2 is a randomly generated number between 0 and 1, which is used to disperse the sizes of different candidate solutions; When the general key parameter group is close to the optimal key parameter group, the search will be more active, and the search speed will be increased accordingly. On the contrary, when the general key parameter group is far away from the optimal key parameter group, the search speed will be slowed down. The update speed of the candidate solution is calculated as follows: M=(r3×(1-r4)+r4) Where V i (t) is the speed of the general key parameter group at time t, r3 and r4 are randomly generated numbers in the interval [0, 1], is a vector of random values between 0 and 1, and is a solution randomly selected from the population, Γ is the sign that the algorithm escapes from the local optimum, and R i-norm (t) is the Euclidean distance between the optimal solution and the candidate solution at time t, and is normalized. The formula is: In the formula, if R i-norm (t)≤0.5, then the key parameter group is close to the optimal key parameter group, and because the optimal key parameter group has a directional search trend, the update speed of the general key parameter group will be increased to prevent drifting to the optimal key parameter group, otherwise, the update speed of the general key parameter group will be slowed down; When the general key parameter group approaches the optimal key parameter group and falls into the local optimum, the elite strategy is added to change the search direction to escape the local optimum; In a certain period of time, the general key parameter group will gradually approach the optimal key parameter group, and then gradually move away from the optimal key parameter group. The algorithm mainly uses the development stage and the exploration stage to simulate these two stages. In the exploration stage, the gap between the general key parameter group and the optimal key parameter group is large, and the new position of each general key parameter group that is far away from the optimal key parameter group will be updated. The formula is: In the formula, is the speed required for the general key parameter group to reach the new position, is the position of the current optimal key parameter group; When the general key parameter group is close to the optimal key parameter group, the algorithm enters the development stage. When the general key parameter group is far away from the optimal key parameter group, the algorithm enters the exploration stage and introduces the parameter h. When h is large, the detection operator is used to expand the search range of candidate solutions. When h is small, the development operation is used to develop the search range. The distance between the general key parameter group and the optimal key parameter group is the smallest, which is the best solution at present. The formula is: η=(a2-1)×r4+1 In the formula, h is an adaptive factor to control the distance between the optimal key parameter group and the current key parameter group, r is a number randomly generated by normal distribution, η is a linear decreasing factor from 1 to -2, and a2 is a cyclic control parameter that gradually decreases from -1 to -2 within T cycles; Execute the elite strategy to ensure the best position of the general key parameter group and the optimal key parameter group. The formula is:
5. A compressor fault real-time detection and early warning method according to claim 1, characterized in that: In step (7), the trained model is used for real-time prediction and the model performance indicators are monitored in real time to ensure that the indicators are within the threshold. Specifically: When the offline model part outputs a comprehensive model trained with the improved Kepler optimization algorithm, the comprehensive model is used in the online early warning part to predict faults in real time. At this time, the comprehensive model output results are statistically analyzed, the accuracy of the comprehensive model output results is calculated, and a threshold for the accuracy is set. When the accuracy is lower than the set threshold, the model needs to return to the offline model part to retrain the model and update the database used for offline model training.
6. A compressor fault real-time detection and early warning method according to claim 1, characterized in that: The implementation process of step (8) is as follows: If 0.7>α≥0.5, it is judged as a warning; if 0.9>α≥0.7, it is judged as severe; if 1≥α≥0.9, it is judged as an emergency.
7. A compressor fault real-time detection and early warning system using the method according to any one of claims 1 to 6, characterized in that: include: Data storage module: stores historical compressor operation data to prepare for data input for the central integrated processing module to train the model; Data optimization and extraction module: pre-process the running data, remove missing values and outliers, and perform normalization. Use seasonal trend decomposition STL to decompose the data into periodic terms, trend terms, and residual terms. Use discrete time domain Fourier transform DTFT to extract features from the decomposed data. Use K-fold cross-validation to divide the periodic terms, trend terms, and residual terms into K groups of data sets, which are divided into training sets and test sets. The compressor fault real-time detection model construction and training module constructs a compressor fault real-time detection model composed of a TimeMixer model and a GBDT model; the periodic term and trend term in the training set data are input into the Timemixer model for training; the residual term in the training set data is input into the gradient decision boosting tree GBDT model for training; the outputs of the two models are accumulated to obtain the final output result of the compressor fault real-time detection model; the performance of the compressor fault real-time detection model is evaluated, and the mean and standard deviation of each performance indicator of the root mean square error RMSE, mean symmetric absolute percentage error SMAPE and mean absolute error MAE for each training are calculated, and the envelope entropy is used to assign adaptive weights ω to RMSE, SMAPE and MAE, weight the three performance indicators, and construct a weighted prediction function in combination with the adaptive weights; Compressor fault real-time detection model optimization module: Use the improved Kepler optimization algorithm to optimize the key parameter groups of the TimeMixer model and the GBDT model, and output the offline compressor fault real-time detection model; Alarm module: Set the fault probability threshold of the prediction results in a graded manner and issue real-time fault alarms.
8. A compressor fault real-time detection and early warning system according to claim 7, characterized in that: The system also includes a total monitoring screen module for monitoring the operating status of the entire system.
9. A compressor fault real-time detection and early warning system according to claim 7, characterized in that: The system also includes a real-time data acquisition module, which collects compressor operation data in real time, uses the trained compressor fault real-time detection model to make real-time predictions, and monitors the model accuracy in real time; If the accuracy of the compressor fault real-time detection model is not within the threshold, the data is transmitted to the compressor fault real-time detection model construction and training module to re-train the model.
10. A compressor fault real-time detection and early warning system according to claim 7, characterized in that: The real-time faults include warning, serious and emergency.
Citation Information
Patent Citations
SaaS software performance fault diagnosis method based on a GBDT decision tree
CN109918313A
Wind turbine generator fault early warning method based on self-adaptive dual-control strategy
CN117744859A