Fault analysis method for natural gas pipeline compressor unit based on matching degree calculation

CN121030360BActive Publication Date: 2026-09-18BEIJING BODA SHUNYUAN NATURAL GAS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511142003.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2026-09-18
Estimated Expiration
2045-08-15

AI Technical Summary

Technical Problem

[0004]现有的故障诊断方法缺乏有效的匹配度计算机制,难以准确识别复杂工况下的故障特征,导致故障判断精度不高,容易出现误判或漏判现象

Benefits of technology

[0048] The natural gas pipeline compressor unit fault analysis method based on matching degree calculation provided by this invention establishes a complete fault diagnosis system by constructing a virtual fault scenario library and fault feature templates, combined with expert experience and knowledge. It can accurately identify a variety of complex fault types and effectively improve the accuracy and reliability of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121030360B_ABST
    Figure CN121030360B_ABST
Patent Text Reader

Abstract

The application provides a natural gas pipeline compressor unit fault analysis method based on matching degree calculation, relates to the technical field of natural gas, comprises the following steps: obtaining real-time operation data to establish a parameter benchmark threshold, constructing a virtual fault scene library and a feature template, generating a diagnosis rule through matching degree calculation, establishing an expert knowledge base, performing online diagnosis on real-time data, generating a result and a suggestion, and continuously optimizing the diagnosis rule. The application realizes accurate identification, hierarchical early warning and trend prediction of compressor unit faults, and improves diagnosis accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to natural gas technology, and more particularly to a method for fault analysis of natural gas pipeline compressor units based on matching degree calculation. Background Technology

[0002] Natural gas pipeline compressor units are key equipment in the long-distance transportation of natural gas, and their safe and stable operation is of great significance to ensuring natural gas supply. With the continuous expansion of natural gas pipeline networks and the increasingly complex operating conditions of compressor units, traditional fault diagnosis methods are no longer sufficient to meet practical needs. Currently, fault diagnosis of natural gas pipeline compressor units mainly relies on manual experience and regular maintenance, lacking a scientific fault early warning and diagnosis mechanism.

[0003] In recent years, with the development of information technology and artificial intelligence, data analysis-based fault diagnosis methods have been gradually applied to the operation and maintenance of natural gas pipeline compressor units. These methods achieve early identification and diagnosis of faults by collecting operating data from the compressor units and combining it with fault characteristic analysis.

[0004] Existing fault diagnosis methods lack effective matching degree calculation mechanisms, making it difficult to accurately identify fault characteristics under complex working conditions, resulting in low fault judgment accuracy and a tendency for misjudgment or omission.

[0005] Existing technologies fail to fully utilize expert experience and knowledge, and lack the organic integration of expert knowledge and data analysis, making it difficult for fault diagnosis systems to effectively learn and accumulate expert experience and cope with new or complex fault situations.

[0006] Existing fault diagnosis systems generally lack adaptive update mechanisms, cannot automatically optimize diagnostic rules according to fault development trends, and the system's diagnostic capabilities cannot be continuously improved with data accumulation, making it difficult to guarantee long-term operational effectiveness. Summary of the Invention

[0007] This invention provides a method for fault analysis of natural gas pipeline compressor units based on matching degree calculation, which can solve the problems in the prior art.

[0008] A first aspect of the present invention provides a method for fault analysis of natural gas pipeline compressor units based on matching degree calculation, comprising:

[0009] Acquire real-time operating data of the natural gas pipeline compressor unit, and establish benchmark thresholds for compressor unit operating parameters based on the real-time operating data;

[0010] A virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. Multiple sets of fault condition data are generated by setting different combinations of operating parameters. The experience and knowledge of on-site experts in fault diagnosis are collected, and fault feature templates are established based on the experience and knowledge.

[0011] The matching degree of fault condition data in the virtual fault scenario library and the fault feature template is calculated to generate fault diagnosis rules; an expert knowledge base is constructed based on the fault diagnosis rules; the fault type is classified and warned according to the fault feature similarity calculated based on the expert knowledge base; and the fault diagnosis rules are automatically updated according to the fault development trend.

[0012] The expert knowledge base is used to perform online fault diagnosis on the real-time operating data of the natural gas pipeline compressor unit, and fault diagnosis results and processing suggestions are generated based on the fault feature similarity and the fault diagnosis rules.

[0013] The fault diagnosis results and the processing suggestions are stored in the expert knowledge base for continuous optimization of the fault diagnosis rules and the fault feature templates.

[0014] A virtual fault scenario library is constructed based on the aforementioned benchmark thresholds for operating parameters. Multiple sets of fault condition data are generated by setting different combinations of operating parameters. Experience and knowledge of on-site experts in fault diagnosis are collected, and fault feature templates are established based on this experience and knowledge, including:

[0015] A virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. For each operating parameter in the virtual fault scenario library, the parameter change trend and parameter importance are calculated.

[0016] The virtual fault scenario library is updated based on the parameter change trend and the parameter importance. The fault characteristics of the current parameter combination are evaluated using the virtual fault scenario library. The parameter combination relationship is optimized by dynamically adjusting the parameter importance. The stable state of the parameter combination is determined by iteratively analyzing the parameter change trend. The optimal threshold of the operating parameter is obtained.

[0017] The optimal threshold is used as a benchmark value. Fault deviation value and random disturbance value are superimposed on the benchmark value to generate parameter time series change data. The virtual fault scenario library is updated based on the parameter time series change data.

[0018] The updated virtual fault scenario library is used to analyze the time-series change data of the parameters to obtain the evolution characteristics of the parameter combinations; fault feature vectors are extracted based on the evolution characteristics; the correspondence between fault features and fault causes is calculated based on the fault feature vectors; and the virtual fault scenario library is improved based on the correspondence.

[0019] Based on the improved virtual fault scenario library, the optimal threshold, the parameter time-series change data, the parameter change trend, the fault feature vector, and the corresponding relationship are integrated to construct a fault feature template.

[0020] The matching degree of fault condition data in the virtual fault scenario library with the fault feature template is calculated to generate fault diagnosis rules, including:

[0021] The fault condition data in the virtual fault scenario library is paired with the feature standard data. The result of the feature pairing is processed using a Gaussian kernel. The matching degree score of the fault condition data relative to the feature standard data is calculated. Fault diagnosis rules are generated based on the matching degree score.

[0022] An expert knowledge base is constructed based on the aforementioned fault diagnosis rules. Fault types are classified and warned according to the similarity of fault features calculated using the expert knowledge base. The fault diagnosis rules are automatically updated based on the fault development trend, including:

[0023] For the fault to be diagnosed, fault features are extracted, and the similarity between the fault features and the standard features in the expert knowledge base is calculated based on the fault diagnosis rules in the expert knowledge base.

[0024] The similarity is compared with a preset graded warning threshold. When the similarity is greater than the first warning threshold, the fault type is determined to be a serious fault and an emergency warning is triggered. When the similarity is between the first warning threshold and the second warning threshold, it is determined to be a warning fault and a warning signal is issued. When the feature similarity is less than the second warning threshold, it is determined to be a normal state.

[0025] A rule evaluation index system is constructed, rule evaluation scores are calculated based on the rule evaluation index system, the diagnostic effect of the fault diagnosis rules is analyzed based on the rule evaluation scores, the fault diagnosis rules are screened based on the rule evaluation scores, fault diagnosis rules with rule evaluation scores higher than a preset scoring threshold are retained, and new fault diagnosis rules are generated based on the rule evaluation index system.

[0026] The new fault diagnosis rules are dynamically maintained. The similarity between rules is calculated based on the rule evaluation scores. When the similarity between rules exceeds a preset merging threshold, the similar rules are merged.

[0027] Based on historical fault data analysis, the fault development trend is analyzed, and the evaluation weights in the rule evaluation index system are dynamically adjusted according to the fault development trend. The fault diagnosis rule is then updated according to the adjusted rule evaluation score.

[0028] The new fault diagnosis rules are dynamically maintained, and the similarity between rules is calculated based on the rule evaluation scores, including:

[0029] Construct a time-sensitivity decay feature space, and extract the adaptive features of the fault diagnosis rule under different scenarios through the time-sensitivity decay feature space;

[0030] Based on the time-effect decay feature space, a scene impact evaluation function is established. The scene impact evaluation function is combined with the original evaluation score of the fault diagnosis rule using nonlinear features to generate the feature space evaluation score of the fault diagnosis rule.

[0031] The fault diagnosis rule is feature-mapped in the time-sensitivity decay feature space. The feature decay trajectory in the time-sensitivity decay feature space is determined according to the time interval of the fault diagnosis rule that has not been updated. The feature decay trajectory is used to dynamically modulate the feature space evaluation score to generate the final evaluation score of the fault diagnosis rule.

[0032] In the time-sensitivity decay feature space, the output of the scene impact assessment function is projected onto a feature. A rule update strategy is established based on the result of the feature projection. The rule update strategy formulates a dynamic maintenance scheme based on the feature space assessment score, the final assessment score, and the scene impact assessment function, thereby realizing the intelligent dynamic maintenance of the fault diagnosis rules.

[0033] Online fault diagnosis is performed on the real-time operating data of the natural gas pipeline compressor unit using the expert knowledge base. Based on the fault feature similarity and the fault diagnosis rules, fault diagnosis results and processing suggestions are generated, including:

[0034] A fault state feature vector is formed based on real-time operating data. The fault state feature vector and the fault diagnosis rules in the expert knowledge base are used as input parameters of a nonlinear state transition function. The fault state feature vector and the fault diagnosis rules are processed by the nonlinear state transition function to generate the fault state feature vector of the natural gas pipeline compressor unit at the next moment. A trajectory prediction model is established based on the fault state feature vector at the next moment.

[0035] The fault state feature vector at the next moment is input into the trajectory prediction model, and the trajectory prediction model is used to predict the fault evolution trajectory of the natural gas pipeline compressor unit. The fault evolution trajectory is then matched with the fault diagnosis rules in the expert knowledge base.

[0036] The fault diagnosis rules in the expert knowledge base are updated based on the matching results of the trajectory prediction model. The updated fault diagnosis rules are then compared with the standard fault feature patterns in the expert knowledge base. Based on the comparison results of the standard fault feature patterns and the fault evolution trajectory predicted by the trajectory prediction model, fault diagnosis results and handling suggestions for the natural gas pipeline compressor unit are generated.

[0037] The trajectory prediction model is used to predict the fault evolution trajectory of the natural gas pipeline compressor unit, and the fault evolution trajectory is matched with the fault diagnosis rules in the expert knowledge base, including:

[0038] The historical state sequence of the natural gas pipeline compressor unit is obtained, and the historical state sequence is input into the trajectory prediction model, which includes a nonlinear prediction mapping function and trajectory prediction parameters.

[0039] Based on the nonlinear prediction mapping function, the historical state sequence is processed, and the trajectory prediction parameters are combined with the output of the nonlinear prediction mapping function to generate the fault evolution trajectory vector of the natural gas pipeline compressor unit.

[0040] The fault evolution trajectory vector is input into the nonlinear prediction mapping function for secondary prediction. The predicted value in the fault evolution trajectory vector is corrected based on the result of the secondary prediction to obtain the corrected fault evolution trajectory vector.

[0041] The fault diagnosis rules in the expert knowledge base are input into the nonlinear prediction mapping function for feature transformation to obtain the rule feature vector. The trajectory rule matching degree is calculated by using the corrected fault evolution trajectory vector and the rule feature vector.

[0042] A second aspect of the present invention provides an electronic device, comprising:

[0043] processor;

[0044] Memory used to store processor-executable instructions;

[0045] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0046] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0047] The beneficial effects of this application are as follows:

[0048] The natural gas pipeline compressor unit fault analysis method based on matching degree calculation provided by this invention establishes a complete fault diagnosis system by constructing a virtual fault scenario library and fault feature templates, combined with expert experience and knowledge. It can accurately identify a variety of complex fault types and effectively improve the accuracy and reliability of fault diagnosis.

[0049] This method uses fault feature similarity calculation to realize a graded early warning mechanism for faults and has the ability to automatically update fault diagnosis rules. This enables the system to continuously optimize itself based on actual operating conditions, significantly improving the foresight of fault prediction and the adaptability of the system, and reducing economic losses caused by unexpected equipment downtime.

[0050] The expert knowledge base established by the method of this invention can continuously accumulate and optimize fault diagnosis experience, forming a closed-loop feedback mechanism. This enables the system to continuously improve its diagnostic accuracy as the usage time increases, providing strong technical support for the safe and stable operation of natural gas pipeline compressor units, extending equipment service life, and reducing maintenance costs. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating the natural gas pipeline compressor unit fault analysis method based on matching degree calculation according to an embodiment of the present invention.

[0052] Figure 2 This is a flowchart illustrating the dynamic maintenance and hierarchical early warning process for fault diagnosis rules based on an expert knowledge base, as described in this embodiment of the invention.

[0053] Figure 3 This is a flowchart of the fault evolution trajectory prediction and diagnosis based on an expert knowledge base, as described in an embodiment of the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0056] Figure 1 This is a flowchart illustrating the natural gas pipeline compressor unit fault analysis method based on matching degree calculation according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0057] Acquire real-time operating data of the natural gas pipeline compressor unit, and establish benchmark thresholds for compressor unit operating parameters based on the real-time operating data;

[0058] A virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. Multiple sets of fault condition data are generated by setting different combinations of operating parameters. The experience and knowledge of on-site experts in fault diagnosis are collected, and fault feature templates are established based on the experience and knowledge.

[0059] The matching degree of fault condition data in the virtual fault scenario library and the fault feature template is calculated to generate fault diagnosis rules; an expert knowledge base is constructed based on the fault diagnosis rules; the fault type is classified and warned according to the fault feature similarity calculated based on the expert knowledge base; and the fault diagnosis rules are automatically updated according to the fault development trend.

[0060] The expert knowledge base is used to perform online fault diagnosis on the real-time operating data of the natural gas pipeline compressor unit, and fault diagnosis results and processing suggestions are generated based on the fault feature similarity and the fault diagnosis rules.

[0061] The fault diagnosis results and the processing suggestions are stored in the expert knowledge base for continuous optimization of the fault diagnosis rules and the fault feature templates.

[0062] In one optional implementation, a virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. Multiple sets of fault condition data are generated by setting different combinations of operating parameters. The experience and knowledge of on-site experts in fault diagnosis are collected, and fault feature templates are established based on this experience and knowledge, including:

[0063] A virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. For each operating parameter in the virtual fault scenario library, the parameter change trend and parameter importance are calculated.

[0064] The virtual fault scenario library is updated based on the parameter change trend and the parameter importance. The fault characteristics of the current parameter combination are evaluated using the virtual fault scenario library. The parameter combination relationship is optimized by dynamically adjusting the parameter importance. The stable state of the parameter combination is determined by iteratively analyzing the parameter change trend. The optimal threshold of the operating parameter is obtained.

[0065] The optimal threshold is used as a benchmark value. Fault deviation value and random disturbance value are superimposed on the benchmark value to generate parameter time series change data. The virtual fault scenario library is updated based on the parameter time series change data.

[0066] The updated virtual fault scenario library is used to analyze the time-series change data of the parameters to obtain the evolution characteristics of the parameter combinations; fault feature vectors are extracted based on the evolution characteristics; the correspondence between fault features and fault causes is calculated based on the fault feature vectors; and the virtual fault scenario library is improved based on the correspondence.

[0067] Based on the improved virtual fault scenario library, the optimal threshold, the parameter time-series change data, the parameter change trend, the fault feature vector, and the corresponding relationship are integrated to construct a fault feature template.

[0068] Fault diagnosis is achieved by constructing a virtual fault scenario library based on benchmark thresholds for operating parameters. The operating parameters of natural gas pipeline compressor units include various parameters such as inlet pressure, exhaust pressure, inlet temperature, exhaust temperature, bearing temperature, vibration value, shaft displacement, motor current, cylinder temperature, oil temperature, oil pressure, cooling water temperature, cooling water pressure, and lubricating oil flow rate. Based on normal operating experience with natural gas pipeline compressor units, each parameter has a corresponding normal operating range and benchmark threshold. For example, the normal operating range for the exhaust temperature of a certain model of compressor unit is 5560 degrees Celsius, with a benchmark threshold of 50 degrees Celsius; the normal range for vibration value is 0–3 mm / s, with a benchmark threshold of 2 mm / s. When constructing the virtual fault scenario library, historical operating data of the compressor unit under different operating conditions is first collected, including normal operating data and data during various fault occurrences. This data is collected in real time by field sensors at a sampling frequency of once per second, and after data cleaning and processing, it is stored in the database.

[0069] For each operating parameter in the virtual fault scenario library, the parameter change trend and parameter importance are calculated. The parameter change trend is obtained through time series analysis, calculating the short-term (within 1 hour), medium-term (within 24 hours), and long-term (within 7 days) change rates for each parameter's historical data. The change rate is calculated by dividing the difference between the current value and the historical value by the time interval. For example, if the exhaust temperature rises from 63 degrees Celsius to 67 degrees Celsius in the last hour, its short-term change rate is 4 degrees Celsius / hour.

[0070] The trend of change is determined by the sign and magnitude of the rate of change; positive values ​​indicate an upward trend, negative values ​​indicate a downward trend, and larger absolute values ​​indicate faster changes. Parameter importance reflects the degree of influence of a parameter on fault diagnosis. Initial importance is determined in two ways: based on expert experience and based on correlation analysis of historical data. Based on expert experience, different types of faults correspond to different key parameters. For example, for bearing faults, bearing temperature and vibration values ​​have high importance, at 0.4 and 0.35 respectively; while for valve faults, exhaust temperature and compression ratio have high importance, at 0.35 and 0.3 respectively.

[0071] The virtual fault scenario library is updated based on parameter change trends and parameter importance. The parameter combination is optimized by dynamically adjusting these two factors. A fault index is calculated based on the deviation between the currently monitored actual parameter values ​​and the baseline threshold, combined with the parameter importance. Parameters with larger deviations and higher importance contribute more to the fault. For example, if the monitored bearing temperature is 68 degrees Celsius, exceeding the baseline threshold by 50 degrees Celsius, the deviation is 18 degrees Celsius, with a deviation rate of 36%; and the vibration value is 4.2 mm / s, exceeding the baseline threshold by 2 mm / s, the deviation is 2.2 mm / s, with a deviation rate of 110%.

[0072] Considering the importance of bearing temperature and vibration values ​​are 0.4 and 0.35 respectively, the system calculates the current fault index as (0.4 × 36% + 0.35 × 110% + ...) × 100 = 67.5. When the fault index exceeds the preset threshold of 50, the system determines that the current operating condition is abnormal and requires further analysis. Dynamically adjusting parameter importance is key to optimizing parameter combinations. The system continuously adjusts the importance of each parameter based on the correlation between parameter change trends and the time of fault occurrence. When the change trend of a parameter is highly correlated with the occurrence of faults, the importance of that parameter is increased; conversely, it is decreased.

[0073] The system determines the steady state of parameter combinations by iteratively analyzing parameter change trends and obtaining optimal thresholds for operating parameters. Based on historical data, different parameter threshold combinations are simulated to evaluate the accuracy of each combination in fault prediction. During the iteration process, the system adjusts the thresholds of each parameter sequentially, adjusting one parameter at a time while keeping other parameters constant, and calculating the fault prediction accuracy. When the accuracy no longer significantly improves, the current parameter combination is considered a steady state, and the corresponding threshold is determined as the optimal threshold.

[0074] For example, for bearing failure prediction, the system uses iterative analysis to determine that the optimal threshold for bearing temperature is 58 degrees Celsius (instead of the initial 50 degrees Celsius), and the optimal threshold for vibration is 2.8 mm / s (instead of the initial 2 mm / s). These optimal thresholds can more accurately predict failure occurrence. During the iteration process, the system tries dozens of different threshold combinations, such as trying bearing temperatures ranging from 45 degrees Celsius to 65 degrees Celsius at 1-degree Celsius intervals, and trying vibration values ​​ranging from 1.5 mm / s to 3.5 mm / s at 0.1 mm / s intervals. The accuracy of each combination is verified using historical data, and the combination with the highest failure prediction accuracy is ultimately selected as the optimal threshold.

[0075] Using the optimal threshold as a baseline, fault deviation values ​​and random disturbance values ​​are superimposed on this baseline to generate time-series parameter variation data. The fault deviation value reflects the degree of influence of different fault types on the parameters and is derived from historical fault case analysis. For example, bearing failure typically leads to a bearing temperature increase of 154 mm / s; valve failure typically leads to an exhaust temperature increase of 10–20 degrees Celsius and a decrease in compression ratio of 10%–20%. The random disturbance value is used to simulate the influence of random factors in actual operating conditions and is generally set to ±5% of the baseline value. By superimposing fault deviation values ​​and random disturbance values, the system generates time-series parameter variation data under various fault scenarios.

[0076] For example, for bearing failure, the following time-series data is generated: the bearing temperature starts from the normal 58 degrees Celsius, increases at a rate of 2 degrees Celsius per hour, and reaches 106 degrees Celsius after 24 hours; the vibration value starts from the normal 2.8 mm / s, increases at a rate of 0.3 mm / s per hour, and reaches 10 mm / s after 24 hours. The virtual fault scenario library is updated based on the parameter time-series change data, continuously enriching and improving the library. The updated virtual fault scenario library contains parameter time-series change patterns for various fault types, with each fault type corresponding to multiple parameter combinations, covering different fault severity and development stages.

[0077] By analyzing the time-series variation data of parameters using an updated virtual fault scenario library, the evolutionary characteristics of parameter combinations are obtained. These evolutionary characteristics describe the pattern of parameter changes over time, including the rate of change, acceleration of change, periodicity of change, and the cooperative relationship between parameters. For example, the typical evolutionary characteristics of bearing faults are: the bearing temperature shows an accelerating upward trend, with a slow increase in the initial stage (1 degree Celsius per hour), a medium-speed increase in the middle stage (2 degrees Celsius per hour), and a rapid increase in the later stage (more than 3 degrees Celsius per hour); the vibration value also shows an accelerating upward trend and is highly positively correlated with the bearing temperature; at the same time, the shaft displacement gradually increases, and the lubricating oil pressure decreases slightly.

[0078] Exhaust temperature exhibits a linear upward trend, while the compression ratio decreases in a stepwise manner, stabilizing briefly after each decrease before decreasing again. Simultaneously, exhaust pressure fluctuations increase, leading to increased power consumption. The system identifies fault types by comparing the currently monitored parameter time-series changes with the evolution characteristics of various fault types in a virtual fault scenario library, calculating similarity.

[0079] Fault feature vectors are extracted based on evolutionary characteristics. These vectors are numerical representations of the fault features and are used for subsequent similarity calculations and fault diagnosis. Fault feature vectors typically consist of two parts: static features and dynamic features. Static features reflect the degree of deviation between the current value and the baseline value of a parameter, while dynamic features reflect the trend and rate of parameter change. For example, for bearing faults, the feature vector might include multiple dimensions such as bearing temperature deviation rate, vibration value deviation rate, bearing temperature change rate, vibration value change rate, and the correlation coefficient between bearing temperature and vibration values.

[0080] For a specific bearing failure case, the feature vector is: [36%, 110%, 2℃ / h, 0.3mm / s / h, 0.92], representing a bearing temperature deviation rate of 36%, a vibration value deviation rate of 110%, a bearing temperature change rate of 2 degrees Celsius per hour, a vibration value change rate of 0.3 mm / s per hour, and a correlation coefficient of 0.92. The system calculates the correspondence between fault characteristics and fault causes based on the fault feature vector. Utilizing machine learning algorithms, the system analyzes the mapping relationship between feature vectors in historical failure cases and confirmed fault causes to establish a fault diagnosis model.

[0081] Based on the improved virtual fault scenario library, fault feature templates are constructed by integrating optimal thresholds, parameter time-series variation data, parameter variation trends, fault feature vectors, and corresponding relationships. Fault feature templates are the core component of fault diagnosis, providing standardized diagnostic criteria for each fault type. The structure of a fault feature template includes: fault type identifier, fault description, list of key parameters and their optimal thresholds, parameter time-series variation patterns, fault feature vector template, fault cause analysis, fault severity grading standards, and handling suggestions.

[0082] For example, the feature template for bearing failure includes: the fault type is identified as "F001", the fault description is "compressor bearing overheating fault", key parameters include bearing temperature (optimal threshold 58 degrees Celsius) and vibration value (optimal threshold 2.8 mm / s), the parameter time series variation pattern describes the typical variation curves of bearing temperature and vibration value, the fault feature vector template gives the typical feature value range, the fault cause analysis lists the causes (such as poor lubrication, bearing wear, improper installation, etc.), the fault severity is divided into three levels (minor, moderate, severe), and the handling suggestions provide corresponding handling solutions for different severity levels.

[0083] In a practical application, the monitoring system of a natural gas pipeline compressor unit detected a bearing temperature of 62 degrees Celsius and a vibration value of 3.5 mm / s, both exceeding the optimal thresholds (58 degrees Celsius and 2.8 mm / s, respectively). The system extracted the fault feature vector of the current state, calculating a bearing temperature deviation rate of 6.9%, a vibration value deviation rate of 25%, a 24-hour bearing temperature change rate of 0.5 degrees Celsius per hour, and a 24-hour vibration value change rate of 0.1 mm / s per hour. Matching these features with a fault feature template, the system determined that the current state matched the bearing fault feature template with a 78% match, indicating an early stage of bearing failure.

[0084] Based on the fault cause analysis in the fault characteristic template, the cause is inferred to be a decline in lubricating oil quality or an abnormality in the lubrication system. According to the fault severity grading standard, the system classifies the current fault as "minor" and provides the following handling suggestions: increase the frequency of equipment inspections, check the lubricating oil quality and the working status of the lubrication system, add or replace lubricating oil as needed, and continue to monitor the changing trends of bearing temperature and vibration values.

[0085] Maintenance personnel conducted an inspection following system recommendations and found that the lubricating oil was nearing its replacement cycle and its quality had slightly deteriorated. After replacing the lubricating oil, the bearing temperature dropped to 56 degrees Celsius within 24 hours, and the vibration level decreased to 2.5 mm / s, restoring normal operation. The system recorded this successful case, updated the virtual fault scenario library and fault characteristic templates, and further improved diagnostic accuracy.

[0086] In one optional implementation, the matching degree of fault condition data in the virtual fault scenario library with the fault feature template is calculated to generate fault diagnosis rules, including:

[0087] The fault condition data in the virtual fault scenario library is paired with the feature standard data. The result of the feature pairing is processed using a Gaussian kernel. The matching degree score of the fault condition data relative to the feature standard data is calculated. Fault diagnosis rules are generated based on the matching degree score.

[0088] A virtual fault scenario library is constructed, containing various preset fault condition data. This data is obtained through simulation of actual equipment operation and analysis of historical fault data. For example, for an industrial pump, the virtual fault scenario library can include different types of fault condition data such as bearing failure, impeller damage, cavitation, and seal leakage. Each fault condition data includes multi-dimensional feature data such as vibration signals, temperature changes, pressure fluctuations, and current waveforms.

[0089] A fault feature template library is established, which stores standard feature descriptions of various faults, i.e., feature standard data. Taking bearing faults as an example, its feature standard data includes: vibration amplitude in the range of 5-10 mm / s, obvious peaks in the spectrum in a specific frequency band (such as 500-1000 Hz), and temperature rise rate exceeding 1.5 times the normal value, etc.

[0090] A set of fault condition data was extracted from the virtual fault scenario library. Taking the bearing inner ring fault as an example, the extracted fault condition data included: vibration amplitude of 8.2 mm / s, main frequency component around 700 Hz, temperature rise rate of 1.8 times the normal value, and current fluctuation amplitude of 12% of the rated value.

[0091] Obtain the corresponding feature standard data from the feature template library. For bearing inner ring faults, the feature standard data are: vibration amplitude range 7-9 mm / s, main frequency component range 650-750 Hz, temperature rise rate range 1.6-2.0 times the normal value, current fluctuation amplitude range 10%-15% of the rated value, etc.

[0092] Feature pairing is performed between fault condition data and characteristic standard data. During the pairing process, each feature dimension is compared one-to-one. For example, the vibration amplitude of 8.2 mm / s in the fault condition is paired with the vibration amplitude range of 7-9 mm / s in the standard data; the dominant frequency component of 700 Hz in the fault condition is paired with the dominant frequency component range of 650-750 Hz in the standard data, and so on.

[0093] Gaussian kernel processing is applied to the feature pairing results. Gaussian kernel processing is a method that converts difference values ​​into similarity values ​​using a Gaussian function. Specifically, for each pair of paired features, the difference between the fault condition feature value and the feature standard data center value is calculated, and then this difference is converted into a similarity value between 0 and 1 using a Gaussian function.

[0094] Taking vibration amplitude as an example, the center value of the standard range of 7-9 mm / s is 8 mm / s, and the value under fault conditions is 8.2 mm / s, with a difference of 0.2 mm / s. Setting the width parameter of the Gaussian kernel to 0.5, the similarity calculation result for this feature is approximately 0.92, indicating a high degree of similarity between the two feature values.

[0095] For the main frequency component, the center value of the standard range of 650-750Hz is 700Hz, and the fault condition value is also 700Hz, with a difference of 0Hz. After Gaussian kernel processing, the similarity of this feature is 1.0, indicating a perfect match.

[0096] The overall matching score is obtained by weighted averaging of the similarity of all features. In this example, assuming the weights of vibration amplitude, dominant frequency component, temperature rise rate and current fluctuation amplitude are 0.4, 0.3, 0.2 and 0.1 respectively, the overall matching score is calculated as: 0.92×0.4+1.0×0.3+0.95×0.2+0.88×0.1=0.947.

[0097] Based on the calculated matching score, the system generates fault diagnosis rules and sets a matching threshold, such as 0.85. When the matching score between a certain fault condition data and a certain feature standard data exceeds the threshold, the fault condition is considered to conform to the fault type described by the feature standard.

[0098] In the example above, since the matching score of 0.947 exceeds the threshold of 0.85, the system generates the following diagnostic rule: "When the equipment vibration amplitude is close to 8 mm / s, the main frequency component is around 700 Hz, the temperature rise rate is about 1.8 times the normal value, and the current fluctuation amplitude is about 12% of the rated value, it is judged to be a bearing inner ring failure."

[0099] The confidence level of diagnostic rules is set according to different matching scores. For example, the confidence level of a diagnostic rule with a matching score between 0.85 and 0.90 is "probable"; the confidence level between 0.90 and 0.95 is "very likely"; and the confidence level above 0.95 is "extremely likely". In the example above, since the matching score is 0.947, the confidence level of the diagnostic rule is "very likely".

[0100] To improve the accuracy of diagnostic rules, the system validates the generated rules by applying them to historical fault data and calculating their precision, recall, and F1 score. Only rules that meet preset performance metrics are ultimately adopted. For example, the requirements are a precision of at least 90%, a recall of at least 85%, and an F1 score of at least 87%.

[0101] Using the above methods, the system can automatically extract fault features from the virtual fault scenario library, calculate the matching degree with the feature standard data, and generate a series of reliable fault diagnosis rules, providing effective technical support for equipment fault diagnosis.

[0102] In one optional implementation, an expert knowledge base is constructed based on the fault diagnosis rules. The fault types are then classified and warned according to the similarity of fault features calculated using the expert knowledge base. The fault diagnosis rules are then automatically updated based on the fault development trend, including:

[0103] For the fault to be diagnosed, fault features are extracted, and the similarity between the fault features and the standard features in the expert knowledge base is calculated based on the fault diagnosis rules in the expert knowledge base.

[0104] The similarity is compared with a preset graded warning threshold. When the similarity is greater than the first warning threshold, the fault type is determined to be a serious fault and an emergency warning is triggered. When the similarity is between the first warning threshold and the second warning threshold, it is determined to be a warning fault and a warning signal is issued. When the feature similarity is less than the second warning threshold, it is determined to be a normal state.

[0105] A rule evaluation index system is constructed, rule evaluation scores are calculated based on the rule evaluation index system, the diagnostic effect of the fault diagnosis rules is analyzed based on the rule evaluation scores, the fault diagnosis rules are screened based on the rule evaluation scores, fault diagnosis rules with rule evaluation scores higher than a preset scoring threshold are retained, and new fault diagnosis rules are generated based on the rule evaluation index system.

[0106] The new fault diagnosis rules are dynamically maintained. The similarity between rules is calculated based on the rule evaluation scores. When the similarity between rules exceeds a preset merging threshold, the similar rules are merged.

[0107] Based on historical fault data analysis, the fault development trend is analyzed, and the evaluation weights in the rule evaluation index system are dynamically adjusted according to the fault development trend. The fault diagnosis rule is then updated according to the adjusted rule evaluation score.

[0108] like Figure 2 As shown, the method includes:

[0109] Fault feature extraction is achieved through real-time monitoring of various operating parameters of the natural gas pipeline compressor unit. These parameters include pressure parameters (inlet pressure, exhaust pressure, interstage pressure), temperature parameters (inlet temperature, exhaust temperature, bearing temperature, cylinder temperature), vibration parameters (axial vibration, radial vibration, bearing vibration), performance parameters (compression ratio, power consumption, efficiency), and other relevant parameters (lubricating oil temperature, lubricating oil pressure, cooling water temperature, cooling water flow rate). In practical applications, the sensor acquisition frequency is set to 5 times per second to ensure the capture of rapidly changing fault features. The acquired raw data undergoes preprocessing steps, including filtering, denoising, and normalization. Filtering uses a bandpass filter to remove noise signals with frequencies below 0.1Hz and above 100Hz; denoising uses wavelet transform to retain the main features of the signal while removing random noise; normalization maps each parameter value to the range of 0 to 1, eliminating dimensional differences between different parameters.

[0110] After preprocessing, feature vectors are extracted from these parameters. These feature vectors contain two types of information: static features and dynamic features. Static features reflect the current state of the parameters, such as current temperature, pressure, and vibration amplitude; dynamic features reflect the changing trends of the parameters, such as the rate of temperature increase, pressure fluctuation amplitude, and vibration spectrum characteristics. For example, for bearing faults, the system will focus on extracting features such as bearing temperature, bearing vibration spectrum, and rate of change of vibration amplitude; for valve faults, it will focus on extracting features such as cylinder pressure fluctuation, exhaust temperature, and compression ratio changes. The extracted feature vectors typically contain 50 to 100 dimensions, comprehensively characterizing the equipment's operating status and potential fault features.

[0111] The system calculates the similarity between fault features and standard features in an expert knowledge base based on fault diagnosis rules. This knowledge base stores standard feature patterns for various typical faults, derived by domain experts from theoretical analysis and historical case studies. Each fault type corresponds to a standard feature vector, which shares the same dimensional structure as the extracted fault feature vector. When calculating similarity, the system uses a weighted cosine similarity method, which calculates the weighted inner product of the two vectors divided by the product of their respective weighted norms. Weight allocation is based on feature importance, assigning higher weights to features more critical to fault diagnosis.

[0112] For example, for bearing faults, bearing temperature and vibration characteristics in a specific frequency band have relatively high weights, at 0.3 and 0.25 respectively; while for valve faults, cylinder pressure fluctuations and exhaust temperature have relatively high weights, at 0.35 and 0.3 respectively. The weight allocation is determined through a combination of expert experience and machine learning, and is dynamically adjusted based on feedback during system operation. Similarity calculation results are values ​​between 0 and 1; the closer the value is to 1, the more similar the feature to be diagnosed is to the standard fault features, indicating a higher degree of faultiness. In practical applications, the system simultaneously calculates the similarity between the feature to be diagnosed and multiple fault types, forming a similarity vector for subsequent fault judgment and graded early warning.

[0113] The similarity score is compared with preset tiered warning thresholds. Two key thresholds are preset: a first warning threshold and a second warning threshold. The first warning threshold, set to 0.85, is used to determine severe faults; the second warning threshold, set to 0.7, is used to distinguish between warning and normal states. The initial values ​​of these thresholds are determined based on historical data analysis and expert experience, and can be fine-tuned through the system's self-learning process. When the calculated similarity score is greater than the first warning threshold (0.85), the system classifies the fault as a severe fault and triggers the emergency warning mechanism.

[0114] Emergency warnings include sending high-priority alarms to the control center, automatically recording detailed fault data, activating backup equipment, and advising operators to take emergency measures. For example, when the bearing fault similarity reaches 0.88, the system will issue an emergency warning: "Serious bearing fault warning for compressor unit No. 1, immediate shutdown and maintenance recommended." When the similarity is between the first and second warning thresholds (0.7 to 0.85), the system determines it as a warning fault and issues a warning signal.

[0115] Warning signals include sending medium-priority alarms to the control center, increasing monitoring frequency, and suggesting that maintenance personnel pay attention to equipment status. For example, when the similarity of the gas valve fault is 0.78, the system will issue a warning signal of "Gas valve abnormality warning for compressor unit No. 2, it is recommended to arrange routine inspection". When the feature similarity is less than the second warning threshold (0.7), the system determines that the equipment is in normal condition and continues routine monitoring without triggering a warning.

[0116] A rule evaluation index system is constructed to assess the effectiveness and applicability of fault diagnosis rules. This system includes four categories of indicators: accuracy, stability, timeliness, and adaptability. Accuracy indicators measure the degree of agreement between the rule-diagnosed results and actual faults, including precision (the proportion of correctly diagnosed faults out of the total number of diagnoses), recall (the proportion of correctly diagnosed faults out of the total number of actual faults), and the F1 score (the harmonic mean of precision and recall). Stability indicators measure the stability of the rule's performance under different conditions, including the consistency of diagnostic results and its resistance to interference factors.

[0117] Timeliness metrics measure the time sensitivity of rules, including rule creation time, update time, and number of effective applications. Adaptability metrics measure the adaptability of rules to different devices and environments, including the range of applicable device types and operating conditions. Each category of metrics has multiple specific measures, forming approximately 20 evaluation dimensions in total. The weight of each metric is allocated according to actual application needs. For example, in scenarios requiring high reliability, the accuracy metric has a weight as high as 0.5, while the other three categories of metrics each account for approximately 0.167.

[0118] The system calculates rule evaluation scores based on a rule evaluation index system. For each fault diagnosis rule, the system calculates its score across each evaluation dimension based on historical application data. For example, a bearing fault diagnosis rule might score 0.92 in accuracy (meaning 92% correct diagnosis), 0.85 in recall (meaning it captures 85% of actual faults), and 0.75 in rule update timeliness (indicating the rule is relatively new). The scores for each dimension are multiplied by their respective weights and then summed to obtain the rule's overall evaluation score. The evaluation score ranges from 0 to 100, with higher scores indicating better rule quality.

[0119] For example, a certain bearing fault diagnosis rule has the following weighted scores across dimensions: accuracy 46 (out of 50), stability 15 (out of 20), timeliness 15 (out of 15), and adaptability 12 (out of 15), with a comprehensive evaluation score of 88, indicating that the rule is of high overall quality. The system periodically (e.g., monthly) evaluates all rules and generates evaluation reports, providing a basis for rule optimization and updates.

[0120] The diagnostic effectiveness of fault diagnosis rules is analyzed based on rule evaluation scores. A backtesting analysis of the historical application results of each rule is performed, statistically analyzing the success rate and failure rate of the rules in different scenarios. The success rate refers to the proportion of faults correctly diagnosed by the rule, and the failure rate refers to the proportion of faults diagnosed incorrectly by the rule. The analysis also includes the coverage of the rules, i.e., the number of fault types and subtypes that the rules can cover.

[0121] By combining these statistical data with rule evaluation scores, the diagnostic effectiveness of the rules can be comprehensively evaluated. For example, a certain valve fault diagnosis rule scored 75 points. Analysis showed that its success rate was 92% in high-temperature environments, but only 68% in low-temperature environments, covering 3 out of 4 valve fault subtypes. This indicates that the rule performs well in high-temperature environments but lacks adaptability to low temperatures and has insufficient coverage of certain fault subtypes, requiring targeted improvements.

[0122] Fault diagnosis rules are filtered based on rule evaluation scores. Rules with evaluation scores above a preset threshold of 70 are retained. Rules with evaluation scores below 70 are marked as "to be optimized" or "to be eliminated." The "to be optimized" status applies to rules with evaluation scores between 60 and 70; these rules have some value but significant shortcomings, and the system will attempt optimization through automatic learning or expert intervention. The "to be eliminated" status applies to rules with evaluation scores below 60; these rules have poor diagnostic performance, and the system plans to remove them from the active rule base.

[0123] For example, the knowledge base contains 50 fault diagnosis rules. After evaluation, 35 rules score above 70 points, 10 rules score between 60 and 70 points, and 5 rules score below 60 points. The system retains the 35 high-scoring rules, optimizes the 10 medium-scoring rules, and plans to eliminate the 5 low-scoring rules. This periodic screening mechanism ensures that the rules in the knowledge base remain of high quality, improving the overall diagnostic accuracy of the system.

[0124] New fault diagnosis rules are generated based on a rule-based evaluation index system through two approaches: data-driven generation and rule mutation generation. Data-driven generation utilizes historical fault data and monitoring data, employing machine learning algorithms to discover new fault characteristic patterns and diagnostic rules. Specifically, the system collects and labels historical fault cases, each containing a sequence of monitoring data prior to the fault and the confirmed fault type. Decision tree or random forest algorithms are used to analyze this data, automatically extracting fault features and diagnostic conditions to form new rule candidates. Rule mutation generation, on the other hand, generates rule variants based on existing high-quality rules through parameter adjustments, condition combinations, or feature replacements.

[0125] For example, for a bearing fault diagnosis rule with a score of 88, 3 to 5 rule variants can be generated by adjusting its vibration threshold, adding a temperature change rate condition, or replacing certain feature parameters. The newly generated rule candidates must undergo a validation phase, including historical data validation and expert review. Historical data validation uses a reserved test dataset to evaluate the rule's accuracy; expert review involves domain experts evaluating the rule's reasonableness and interpretability. Newly validated rules are added to the knowledge base with an initial evaluation score of 75, and the score is continuously updated in practical applications.

[0126] New fault diagnosis rules are dynamically maintained. Rule similarity is calculated based on rule evaluation scores. Rule similarity measures the degree of similarity between different rules and is used to identify redundant or complementary rules. The calculation method represents each rule as a feature vector, with dimensions including the rule's conditional parameters, conditional thresholds, and applicable fault types. Cosine similarity is used to calculate the similarity between rule vectors, with scores ranging from 0 to 1; higher scores indicate greater similarity between rules.

[0127] For example, two valve fault diagnosis rules will have a high similarity score of 0.92 if they use similar parameters (such as exhaust pressure and exhaust temperature), similar threshold conditions, and similar diagnostic conclusions. The system periodically calculates the similarity matrix among all rules in the knowledge base, identifies high-similarity rule groups, and provides a basis for subsequent rule merging.

[0128] When the similarity between rules exceeds a preset merging threshold, similar rules are merged. The rule merging threshold is set at 0.85. When the similarity between two or more rules exceeds this threshold, the rule merging process is triggered. The merging process includes three steps: rule comparison, advantage extraction, and rule fusion. Rule comparison analysis assesses the evaluation score, scope of application, and diagnostic effectiveness of each rule to determine the dominant and auxiliary rules. For example, for two valve fault rules with a similarity of 0.92, if one scores 85 points and the other scores 78 points, the former is considered the dominant rule.

[0129] Advantage extraction identifies unique strengths from each rule; for example, the dominant rule might excel in accuracy, while auxiliary rules might have advantages in adaptability. Rule fusion uses the dominant rule as a foundation, integrating the strengths of auxiliary rules to generate a new merged rule. For instance, it might adopt the core diagnostic logic and parameter thresholds of the dominant rule but expand its applicable device range or add supplementary conditions from the auxiliary rules. The merged rule inherits the evaluation history of the dominant rule, with the initial evaluation score set as a weighted average of the two, the weights proportional to their respective original scores. This fusion process reduces rule redundancy in the knowledge base, improving system efficiency and consistency.

[0130] Based on historical fault data analysis, fault development trends are analyzed by collecting and storing historical fault data for natural gas pipeline compressor units, including fault type, fault occurrence time, fault evolution process, maintenance records, and other information. Time series analysis is then performed on this data to identify fault development patterns and trends. The analysis includes: fault frequency trends, observing changes in the frequency of various fault types; fault correlation, identifying causal or co-occurrence relationships between different faults; and fault evolution speed, quantifying the time interval from initial fault symptoms to complete failure.

[0131] The analysis method employs time series decomposition and trend extraction techniques to break down fault data into trend, periodic, and random components, with a focus on changes in the trend components. For example, the analysis revealed that the frequency of bearing failures increased by 25% in the past six months, and the average rate of evolution accelerated by 15%, indicating that the equipment's bearing system faces systemic problems. The fault trend analysis results are presented in the form of a trend report, including charts and predictions of the development trends of various fault types, providing a basis for adjusting the weights in the rule evaluation.

[0132] The evaluation weights in the rule evaluation index system are dynamically adjusted based on the fault development trend. The adjustment principles are as follows: for fault types with obvious development trends, increase the weights of the accuracy and timeliness indicators of the relevant rules; for newly emerging or rapidly evolving fault types, increase the weights of the adaptability indicators of the relevant rules; and for long-term stable fault types, increase the weights of the stability indicators of the relevant rules.

[0133] For example, if the frequency and pace of bearing failures increase, the weight of the accuracy indicator in the bearing failure diagnosis rules will be increased from 0.5 to 0.6, and the weight of the timeliness indicator will be increased from 0.15 to 0.2, while the weights of other indicators will be reduced accordingly. The weight adjustments will be implemented gradually, with each adjustment not exceeding 20% ​​of the original weight to ensure system stability. The adjusted weights will be used in the next round of rule evaluation to ensure that the evaluation results better reflect the current failure development trend.

[0134] The fault diagnosis rules are updated based on the adjusted rule evaluation scores. The evaluation scores of all rules are recalculated using the adjusted evaluation weights, and the rules are updated based on the new scores. The updates include rule parameter adjustments, rule structure optimization, and modifications to the rule applicability scope. Rule parameter adjustments involve fine-tuning the thresholds and weights in the rules to better reflect the current fault characteristics. For example, if the analysis reveals an accelerated rate of temperature rise in the bearing, the temperature change rate threshold in the bearing fault rules is adjusted from 2 degrees Celsius per hour to 2.5 degrees Celsius per hour.

[0135] Rule structure optimization involves improving the logical structure of rules, such as adding new conditional branches or simplifying redundant conditions. Rule scope modification adjusts the applicable equipment types or operating conditions, expanding or narrowing the rule's application scenarios. Updated rules undergo a verification process, including historical data backtesting and expert review. Once verified, the original rule replaces the current one and is put into use. For example, after updating a rule for a compressor valve failure, its diagnostic accuracy increased from 85% to 92%, and the early warning time increased from an average of 24 hours to 36 hours, significantly improving fault prevention effectiveness.

[0136] In a real-world application case, compressor unit No. 5 at a natural gas pipeline station exhibited abnormal vibration signals. The system extracted fault characteristics and found that the bearing vibration spectrum showed increased energy in a specific frequency band (bearing fault frequency), with a vibration amplitude of 3.5 mm / s and a bearing temperature of 68 degrees Celsius showing an upward trend. The system calculated the similarity between these characteristics and the standard fault characteristics in the expert knowledge base, obtaining a similarity of 0.87 to a bearing outer race fault. This exceeded the first warning threshold of 0.85, leading the system to classify it as a serious fault and trigger an emergency warning, recommending a shutdown for maintenance within 48 hours. Maintenance personnel followed the recommendations and confirmed severe wear on the bearing outer race. After replacement, the fault was resolved.

[0137] This successful diagnosis was recorded, and the evaluation score for the relevant rules was updated, increasing the score of the bearing fault diagnosis rules from 82 to 86. Simultaneously, the system analyzed fault data from the past six months, finding a 15% increase in bearing fault frequency and a 20% acceleration in fault development speed. Based on this, the weight of the accuracy index for the bearing fault diagnosis rules was adjusted from 0.5 to 0.55, and the weight of the timeliness index was adjusted from 0.15 to 0.18. Based on the adjusted weights and recent cases, the system optimized the bearing fault diagnosis rules, updating the bearing temperature change rate threshold and vibration amplitude threshold. The new rules demonstrated higher accuracy and earlier warning capabilities in subsequent applications.

[0138] In one optional implementation, the new fault diagnosis rules are dynamically maintained, and the similarity between rules is calculated based on the rule evaluation scores, including:

[0139] Construct a time-sensitivity decay feature space, and extract the adaptive features of the fault diagnosis rule under different scenarios through the time-sensitivity decay feature space;

[0140] Based on the time-effect decay feature space, a scene impact evaluation function is established. The scene impact evaluation function is combined with the original evaluation score of the fault diagnosis rule using nonlinear features to generate the feature space evaluation score of the fault diagnosis rule.

[0141] The fault diagnosis rule is feature-mapped in the time-sensitivity decay feature space. The feature decay trajectory in the time-sensitivity decay feature space is determined according to the time interval of the fault diagnosis rule that has not been updated. The feature decay trajectory is used to dynamically modulate the feature space evaluation score to generate the final evaluation score of the fault diagnosis rule.

[0142] In the time-sensitivity decay feature space, the output of the scene impact assessment function is projected onto a feature. A rule update strategy is established based on the result of the feature projection. The rule update strategy formulates a dynamic maintenance scheme based on the feature space assessment score, the final assessment score, and the scene impact assessment function, thereby realizing the intelligent dynamic maintenance of the fault diagnosis rules.

[0143] A time-sensitivity decay feature space is constructed to enable dynamic maintenance of fault diagnosis rules. This feature space is a multi-dimensional vector space used to represent the characteristics of fault diagnosis rules that change with time and application scenarios. This feature space consists of N dimensions, each corresponding to a feature attribute, such as the rule's accuracy, coverage, timeliness, applicable ambient temperature range, and applicable pressure range. In practical applications, the feature space typically has 50 to 100 dimensions to comprehensively express the various characteristics of the rules.

[0144] When constructing the time-dependent decay feature space, the first step is to determine the set of feature dimensions, including basic rule characteristics (such as rule type, applicable device type, and associated fault type), performance characteristics (such as historical accuracy, recall, and precision), time characteristics (such as creation time, last update time, and last application time), and environmental characteristics (such as applicable temperature range, pressure range, and flow range). For each feature dimension, its value range, metric, and decay function are defined. The decay function describes how the feature changes over time, typically using an exponential decay form, meaning the feature value decreases exponentially with time. For example, for the accuracy feature, if a rule initially has an accuracy of 95% and is set to decay by 5% every 30 days, then after 60 days, the accuracy feature value of that rule will drop to approximately 85.7%.

[0145] The adaptability features of fault diagnosis rules under different scenarios are extracted through the time-degradation feature space. A scenario is defined as a different combination of operating conditions for a natural gas pipeline compressor unit, including factors such as ambient temperature, pressure, flow rate, and load level. Twenty typical scenarios are predefined in the system, such as high-temperature and high-pressure scenarios, low-temperature and low-flow scenarios, and standard operating scenarios. Each scenario is represented by a scenario vector, which has the same dimension as the time-degradation feature space. For each fault diagnosis rule, its adaptability feature value is calculated under each predefined scenario. The adaptability feature value represents the applicability of the rule in a specific scenario, with a value range of 0 to 1; a larger value indicates better adaptability.

[0146] The similarity between the rule's representation vector in the feature space and the scene vector is calculated using the cosine similarity method. For example, a "bearing wear fault" diagnostic rule has an adaptive feature value of 0.85 in a "high temperature and high pressure" scenario and 0.62 in a "low temperature and low flow" scenario, indicating that this rule is more suitable for application in high temperature and high pressure environments. To enhance the expressive power of adaptive features, a feature enhancement mechanism is also introduced. When a rule is successfully applied in a scenario (i.e., accurately diagnoses the fault), the adaptive feature value of the corresponding scenario is enhanced; when a rule fails to be applied in a scenario, the corresponding adaptive feature value is reduced. The magnitude of enhancement and reduction is related to the frequency of rule application; the more times the rule is applied, the smaller the adjustment magnitude, to ensure system stability.

[0147] A scene impact evaluation function is established based on the time-dependent decay feature space. This function quantifies the degree of influence of different scenes on the effectiveness of fault diagnosis rules. The function receives two inputs: the current compressor unit's operating scene vector and the representation vector of the fault diagnosis rule in the feature space. The function outputs an impact score, ranging from 0 to 1, representing the degree of influence of the current scene on the rule's effectiveness; a larger value indicates a more significant influence. The scene impact evaluation function employs a multilayer perceptron structure, including an input layer, two hidden layers, and an output layer. The input layer has twice the dimension of the feature space and receives the concatenation of the rule vector and the scene vector.

[0148] The first hidden layer contains 128 neurons, and the second hidden layer contains 64 neurons, both using the ReLU activation function. The output layer contains one neuron, using the Sigmoid activation function, and outputs an influence score between 0 and 1. The scene influence evaluation function is trained using supervised learning. The training data consists of historical application results of the rule in different scenarios, including the rule vector, scene vector, and application result (success or failure). The training objective is to maximize the influence score in successful scenarios and minimize the influence score in failed scenarios. In practical applications, the scene influence evaluation function can accurately identify the applicable and inapplicable scenarios of the rule. For example, for the "bearing wear failure" diagnostic rule, the influence score is 0.92 in a scenario where the bearing temperature rises abnormally, while in a scenario where only the vibration value increases slightly, the influence score is 0.35.

[0149] The scene impact assessment function is combined with the original assessment score of the fault diagnosis rule using a nonlinear feature combination to generate the feature space assessment score of the fault diagnosis rule. The original assessment score is the initial score specified when the rule was created or last updated, and is usually determined by domain experts based on factors such as the importance and reliability of the rule. The score ranges from 0 to 100. The nonlinear feature combination uses a weighted product method, that is, the feature space assessment score is equal to the original assessment score multiplied by a power function of the output value of the scene impact assessment function. The exponent of the power function is determined by the scene relevance factor; the higher the relevance, the closer the exponent is to 1; the lower the relevance, the closer the exponent is to 0.

[0150] The scenario relevance factor is calculated using historical application data of the rule in the current scenario; the more times it is applied, the higher the relevance. For example, if a diagnostic rule for "abnormal compression ratio fault" has an original evaluation score of 85, an impact score of 0.75 in the current scenario, and a scenario relevance factor of 0.8, then the feature space evaluation score is 85 × (0.75^0.8) ≈ 85 × 0.8 ≈ 68. Through this non-linear combination method, the system can dynamically adjust the evaluation score of the rule according to its applicability in different scenarios, thereby improving diagnostic accuracy.

[0151] The fault diagnosis rules are feature-mapped within a time-degradation feature space. Feature mapping transforms the rules from their original representation into vector representations within the feature space. The original representation is typically an "if-then" structured text description, such as "If the exhaust temperature remains above the threshold and the vibration value is abnormal, then it is determined to be a bearing wear fault." Feature mapping first extracts key elements from the rules, including condition parameters (such as exhaust temperature and vibration value), condition types (such as greater than, less than, or within range), condition thresholds, and conclusions (fault types). These elements are then encoded into numerical vectors: condition parameters are represented using one-heat encoding, condition types are represented using enumerated values, condition thresholds are represented using normalized numerical values, and the conclusions are represented using the fault type encoding.

[0152] These codes are combined into a complete rule vector, the dimension of which is the same as the feature space. For complex rules containing multiple condition combinations, a condition combination encoding method is needed to preserve the logical relationship between the conditions. For example, for the aforementioned "bearing wear failure" rule, its feature-mapped vector has high values ​​in the dimensions corresponding to exhaust temperature and vibration value, and low or zero values ​​in other dimensions.

[0153] The feature decay trajectory in the timeliness decay feature space is determined based on the unupdated time interval of the fault diagnosis rules. The unupdated time interval refers to the number of days from the last rule update to the current time. The feature decay trajectory describes the decay path of each feature of the rule over time. For each feature dimension, its decay rate and decay form are defined. The decay rate represents the percentage decay of the feature per unit time (e.g., every 30 days). Different features have different decay rates; for example, the decay rate of the accuracy feature is 5% / 30 days, while the decay rate of the applicability feature is 3% / 30 days.

[0154] The decay form describes how a feature decays over time. Common forms include linear decay, exponential decay, and S-shaped decay. In this implementation, exponential decay is used, meaning the feature value decreases exponentially over time. For a rule with an unupdated interval of t days, its decay factor on feature dimension i is equal to the power of the base of the natural logarithm, multiplied by the negative decay rate, and divided by the base time (e.g., 30 days). The feature decay trajectory is a vector composed of the decay factors of each feature dimension. For example, for a rule with an unupdated interval of 90 days, the decay factor of its accuracy feature is approximately 0.857, meaning the feature retains 85.7% of its original value.

[0155] Dynamic feature modulation is performed on the feature space evaluation score using feature decay trajectories to generate the final evaluation score for fault diagnosis rules. Dynamic feature modulation is the process of applying the feature decay trajectories to the feature space evaluation score. The modulation method involves a weighted combination of the feature space evaluation score and each decay factor in the feature decay trajectories. The weighting method uses a geometric weighted average, which multiplies the feature space evaluation score by the weighted geometric mean of each decay factor. The weights are determined by the importance of each feature to the rule evaluation; features with higher importance have higher weights, and features with lower importance have lower weights. Importance is determined through historical data analysis, observing the correlation between each feature and the actual effectiveness of the rule.

[0156] The final evaluation score is calculated by considering the rule's original evaluation score, scenario adaptability, and time-related decay, comprehensively reflecting the rule's actual applicability in the current scenario. For example, if a "compression ratio anomaly fault" diagnostic rule has a feature space evaluation score of 68, has not been updated for 90 days, and the weighted geometric mean of the feature decay trajectory is 0.82, then the final evaluation score is 68 × 0.82 ≈ 56. The final evaluation score is used for rule selection and rule update decisions; rules with higher scores are applied first, and rules with lower scores are updated first.

[0157] In the time-decrease feature space, the output of the scene impact assessment function is projected onto the feature space. Feature projection is the process of mapping the output of the scene impact assessment function onto the feature space, with the aim of identifying which feature dimensions the current scene has the most significant impact on. The projection method calculates the inner product of the scene vector and each basis vector in the feature space to obtain the projection value of the scene on each feature dimension. The larger the projection value, the more significant the scene's impact on that feature dimension.

[0158] Basis vectors are orthonormal bases of the feature space, with each basis vector corresponding to a feature dimension. Through feature projection, the system can identify the most critical feature dimensions in the current scenario, providing guidance for rule updates. For example, in the "high temperature and high pressure" scenario, the projection results show that the projection values ​​of temperature adaptability and pressure adaptability features are 0.95 and 0.88, respectively, which are much higher than other feature dimensions. This indicates that temperature and pressure are the most critical factors in this scenario.

[0159] A rule update strategy is established based on the feature projection results. This strategy determines when and how to update the fault diagnosis rules. The strategy is based on three key indicators: the feature space evaluation score, the final evaluation score, and the output of the scene impact evaluation function. Update trigger conditions include: the final evaluation score is below a threshold (e.g., 60 points); the difference between the final evaluation score and the feature space evaluation score exceeds a threshold (e.g., 20 points), indicating the rule is severely outdated; and the rule fails to apply in high-impact scenarios (impact score greater than 0.8). When the update trigger conditions are met, the system determines the rule content that needs updating based on the feature projection results. The updated content includes condition parameters, condition thresholds, condition combination logic, or conclusions.

[0160] Automatic updates and manual updates are both available. Automatic updates are suitable when the projection results are clear and historical data is sufficient; the system automatically adjusts rule parameters based on historical successful cases. Manual updates are suitable for complex situations; the system provides update suggestions, which are then confirmed or modified by domain experts. For example, for the aforementioned "compression ratio abnormality fault" diagnostic rule, if its final evaluation score is 56, which is below the threshold of 60, and the feature projection shows that pressure adaptability is a key factor, the system will suggest adjusting the pressure-related condition thresholds in the rule to make it more suitable for the current scenario.

[0161] The rule update strategy is based on feature space evaluation scores, final evaluation scores, and scenario impact evaluation functions to formulate a dynamic maintenance plan, enabling intelligent dynamic maintenance of fault diagnosis rules. The dynamic maintenance plan includes four stages: rule evaluation, rule selection, rule update, and rule verification. The rule evaluation stage calculates the feature space evaluation score and final evaluation score for each rule and sorts the rules according to scenario impact. The rule selection stage selects a set of rules suitable for the current scenario based on the evaluation results, with the selection criteria being a final evaluation score exceeding a threshold and a scenario impact score higher than 0.7. The rule update stage updates rules with low evaluation scores or those that have failed to be applied, with the update content based on feature projection results. The rule verification stage verifies the effectiveness of the new rules using historical data after the update; once verification is successful, the new rules are added to the knowledge base. The entire dynamic maintenance process is a continuous loop, constantly optimizing the rule base as the system runs, improving the accuracy and adaptability of fault diagnosis.

[0162] In a real-world application, a natural gas pipeline compressor unit operates under high-temperature, high-flow-rate conditions. The system detects abnormal vibration signals. The knowledge base contains a diagnostic rule for "bearing wear failure," with an initial evaluation score of 90, created 150 days ago, and last updated 60 days ago. The system calculates the rule's impact score in the current scenario as 0.82, and its feature space evaluation score as 90 × (0.82^0.85) ≈ 76. Considering the 60-day period without rule updates, the system calculates the weighted geometric mean of the feature decay trajectory as 0.89, resulting in a final evaluation score of 76 × 0.89 ≈ 68. This score exceeds the 60-point threshold, indicating that the rule is still valid but has begun to age.

[0163] The rule was applied to diagnose bearing wear faults, but the predicted fault evolution rate did not match the actual rate. Feature projection results showed that flow adaptability was a key factor in the current scenario, and the rule performed poorly in this regard. The system triggered a rule update, and analysis of historical data revealed that under high flow conditions, the vibration characteristics of bearing wear changed faster, and the fault evolution rate was higher. The system automatically adjusted the parameters related to the vibration characteristic change rate in the rule, generating a new rule. After validation, the new rule was added to the knowledge base, with the initial evaluation score set to 95, and both the feature space evaluation score and the final evaluation score reset to 95. In subsequent applications, the new rule demonstrated higher accuracy, proving the effectiveness of the dynamic maintenance scheme.

[0164] In one optional implementation, the online fault diagnosis of the real-time operating data of the natural gas pipeline compressor unit is performed using the expert knowledge base, and fault diagnosis results and processing suggestions are generated based on the fault feature similarity and the fault diagnosis rules, including:

[0165] A fault state feature vector is formed based on real-time operating data. The fault state feature vector and the fault diagnosis rules in the expert knowledge base are used as input parameters of a nonlinear state transition function. The fault state feature vector and the fault diagnosis rules are processed by the nonlinear state transition function to generate the fault state feature vector of the natural gas pipeline compressor unit at the next moment. A trajectory prediction model is established based on the fault state feature vector at the next moment.

[0166] The fault state feature vector at the next moment is input into the trajectory prediction model, and the trajectory prediction model is used to predict the fault evolution trajectory of the natural gas pipeline compressor unit. The fault evolution trajectory is then matched with the fault diagnosis rules in the expert knowledge base.

[0167] The fault diagnosis rules in the expert knowledge base are updated based on the matching results of the trajectory prediction model. The updated fault diagnosis rules are then compared with the standard fault feature patterns in the expert knowledge base. Based on the comparison results of the standard fault feature patterns and the fault evolution trajectory predicted by the trajectory prediction model, fault diagnosis results and handling suggestions for the natural gas pipeline compressor unit are generated.

[0168] like Figure 3 As shown, the method includes:

[0169] Online fault diagnosis is performed by generating fault state feature vectors based on real-time operating data. The natural gas pipeline compressor unit is equipped with a comprehensive monitoring system, including various types of sensors such as pressure sensors, temperature sensors, vibration sensors, and flow sensors. These sensors collect the compressor unit's operating parameters in real time, at a frequency of once per second. The collected parameters include 20 key parameters such as intake pressure, exhaust pressure, intake temperature, exhaust temperature, bearing temperature, vibration value, shaft displacement, motor current, cylinder temperature, oil temperature, oil pressure, cooling water temperature, cooling water pressure, lubricating oil flow rate, gas flow rate, motor speed, compression ratio, power consumption, exhaust oil content, and ambient temperature. The collected real-time data undergoes preprocessing, including outlier handling, missing value imputation, and data smoothing.

[0170] Outlier handling employs the three-standard-deviation method, where data exceeding three standard deviations above and below the mean are considered outliers and replaced with the median of the preceding and following data. Missing value imputation uses linear interpolation, calculating interpolation values ​​based on valid data before and after the missing value. Data smoothing uses a moving average method with a 10-second window to reduce the impact of random noise. Preprocessed real-time data is aggregated every minute, calculating the mean, maximum, minimum, and standard deviation of each parameter within that minute, forming an 80-dimensional feature set. These features are then evaluated for importance, and the 50 most diagnostically valuable features are selected to form a fault state feature vector. For example, the fault state feature vector of a compressor unit at a certain moment might include 50 feature values ​​such as exhaust temperature 74 degrees Celsius, vibration value 3.8 mm / s, and bearing temperature 62 degrees Celsius.

[0171] Using the fault state feature vector and fault diagnosis rules from the expert knowledge base as input parameters for the nonlinear state transition function requires appropriate preprocessing. The fault state feature vector is first standardized to ensure consistent dimensions of each feature value. Standardization employs the Z-score method, which calculates the historical mean and standard deviation of each feature, then subtracts the mean from the original feature value and divides by the standard deviation. The fault diagnosis rules in the expert knowledge base contain feature descriptions and diagnostic conditions for various faults. These rules typically use an "if-then" structure, such as "If the exhaust temperature consistently exceeds 70 degrees Celsius and the vibration value consistently exceeds 3 mm / s, then a bearing wear fault exists."

[0172] These textual rules are converted into numerical representations, with each rule corresponding to a rule vector. The vector dimension is the same as the fault state feature vector, and the value of each dimension represents the importance of that feature in the rule. For example, in the "bearing wear fault" rule, exhaust temperature and vibration value have higher weights, while other features have lower weights or zero weights. The nonlinear state transition function uses a deep neural network structure, including an input layer, multiple hidden layers, and an output layer. The input layer receives the concatenation of the fault state feature vector and the rule vector, with an input dimension of 100 (50-dimensional features + 50-dimensional rules). The hidden layer uses a three-layer structure, with each layer containing 128 neurons, using the ReLU function as the activation function. The output layer has a dimension of 50, corresponding to the fault state feature vector at the next time step.

[0173] The fault state feature vector and fault diagnosis rules are processed through a nonlinear state transition function. The standardized fault state feature vector and rule vector are concatenated and then input into the nonlinear state transition function. In the input layer, each neuron receives an input feature value. These inputs are passed to the first hidden layer via a fully connected layer. Each hidden layer neuron calculates a weighted sum of the inputs, adds a bias term, and then processes it through the ReLU activation function. The ReLU function is characterized by output equal to input when the input is positive and output zero when the input is negative, which helps the model capture nonlinear relationships in the data. The output of the hidden layer continues to the next hidden layer, undergoing similar processing.

[0174] The output of the third hidden layer is passed to the output layer. Each neuron in the output layer calculates the weighted sum of the inputs and adds a bias term. Then, it is processed by a linear activation function (i.e., the identity function) to generate the fault state feature vector for the next time step. For example, after processing by a nonlinear state transition function, it is predicted that the exhaust temperature of the compressor unit will rise to 76 degrees Celsius and the vibration value will rise to 4.0 mm / s at the next time step (e.g., after 1 hour).

[0175] A trajectory prediction model is established based on the fault state feature vector at the next moment. This model employs a recurrent neural network structure to predict the changing trend of the compressor unit's state over a future period. First, historical data of the compressor unit under different fault states is collected, including the complete fault development process, from initial symptoms to full manifestation. This historical data is used to train the trajectory prediction model. The model's input is the current state (i.e., the fault state feature vector at the next moment output by the nonlinear state transition function) and a sequence of states over a past period. The model's output is the state prediction for each time point (e.g., each hour) within a future period (e.g., 7 days).

[0176] The trajectory prediction model's network structure consists of one input layer, two long short-term memory (LSM) layers, and one output layer. The input layer has a dimension of 50 and corresponds to the fault state feature vector. Each LSM layer contains 64 neurons and is used to capture long-term dependencies in the time-series data. The output layer has a dimension of 50×168 and corresponds to the 50-dimensional state prediction for each hour over the next 7 days. The model is trained using the backpropagation algorithm, with mean squared error as the loss function, an adaptive moment estimation (AMI) optimizer, a learning rate of 0.001, a batch size of 32, and 300 training epochs.

[0177] The fault state feature vector at the next time step is input into the trajectory prediction model. This model then predicts the fault evolution trajectory of the natural gas pipeline compressor unit. The fault state feature vector output from the nonlinear state transition function is standardized and input into the trajectory prediction model. Based on this vector and the internal state, the trajectory prediction model predicts the state changes over 168 time points (i.e., every hour over 7 days). The prediction results form a 50×168 matrix representing the fault evolution trajectory. For example, the trajectory prediction model predicts that the exhaust temperature will gradually rise from 76 degrees Celsius to 88 degrees Celsius over the next 7 days, and the vibration value will increase from 4.0 mm / s to 5.5 mm / s. These predictions reflect the evolution trend of potential faults and provide important basis for fault diagnosis.

[0178] The fault evolution trajectory is matched with fault diagnosis rules in the expert knowledge base. The predicted fault evolution trajectory is compared with each fault diagnosis rule in the expert knowledge base. For each rule, the similarity between the fault mode it describes and the predicted trajectory is calculated. The similarity calculation method is as follows: the fault mode described by the rule is also represented as a 50×168 matrix, where each row represents a feature and each column represents a time point.

[0179] Calculate the cosine similarity between this matrix and the predicted trajectory matrix, obtaining a similarity score between 0 and 1. A higher similarity score indicates that the predicted trajectory more closely matches the fault mode described by the rule. For example, the predicted trajectory of a compressor unit has a similarity of 0.92 with the "bearing wear fault" rule, 0.45 with the "valve leakage fault" rule, and similarities below 0.4 with all other rules. This indicates that the compressor unit has developed a bearing wear fault.

[0180] The system updates fault diagnosis rules in the expert knowledge base based on the matching results of the trajectory prediction model. When the matching degree between the predicted trajectory and a certain rule is higher than a threshold (e.g., 0.8) and subsequent actual operation data confirms the accuracy of the fault diagnosis, the system records detailed information about this successful diagnosis, including the initial fault state, the fault evolution trajectory, and the final fault confirmation. This information is used to optimize the corresponding fault diagnosis rules.

[0181] The weights of various features in the rules are adjusted, with increased weights for features that significantly indicate faults. The fault evolution models described by the rules are updated to better reflect actual observed fault development processes. The applicability conditions of the rules are refined to improve their accuracy. For example, if changes in bearing temperature are found to predict faults earlier than changes in vibration values ​​in multiple bearing wear failure cases, the weight of bearing temperature in the rules is increased. In this way, the rules in the expert knowledge base are continuously optimized, and the diagnostic accuracy is constantly improved.

[0182] The updated fault diagnosis rules are compared with standard fault feature patterns in the expert knowledge base. These standard fault feature patterns are standard descriptions of various typical faults defined by industry experts, including typical symptoms, development process, and severity classification. The updated fault diagnosis rules are then compared with these standard patterns, and the similarity between the rules and each standard pattern is calculated.

[0183] The similarity calculation uses the same cosine similarity method as described above. By comparing the results, the type, severity, and stage of the currently diagnosed fault can be determined. For example, if the updated "bearing wear fault" rule has a similarity of 0.95 with the standard "bearing wear - mid-term" pattern, 0.75 with the "bearing wear - early" pattern, and 0.60 with the "bearing wear - late" pattern, then the current fault is judged to be mid-term bearing wear.

[0184] Based on the comparison results of standard fault characteristic patterns and combined with the fault evolution trajectory predicted by the trajectory prediction model, fault diagnosis results and handling suggestions for natural gas pipeline compressor units are generated. Based on the fault type, severity, and predicted evolution trend, the system generates a detailed diagnostic report and handling suggestions. The diagnostic report includes: fault type description, current fault severity, abnormal conditions of key indicators, fault cause analysis, and fault development prediction. The handling suggestions include: recommended maintenance measures, maintenance priority, recommended maintenance time window, list of spare parts and tools required for maintenance, and guidance on maintenance operation procedures.

[0185] For example, for a compressor unit diagnosed with intermediate bearing wear and predicted to progress to late-stage wear within 3 days, the system generates the following handling recommendations: schedule a shutdown for maintenance within 48 hours; replace the bearing with the specified model; inspect and clean the lubrication system; adjust the lubricating oil flow; replace the lubricating oil filter; and conduct a 1-hour low-load operation test after maintenance to confirm that vibration and temperature have returned to normal. These specific recommendations help maintenance personnel efficiently schedule and execute maintenance work, minimizing the impact of the failure on system operation.

[0186] In a practical application case, real-time monitoring data for a natural gas pipeline compressor unit showed an exhaust temperature of 74 degrees Celsius, a vibration value of 3.8 mm / s, and a bearing temperature of 62 degrees Celsius. Based on this data, the system generated a fault state feature vector and predicted the next state (one hour later) using a nonlinear state transition function: exhaust temperature 76 degrees Celsius, vibration value 4.0 mm / s, and bearing temperature 64 degrees Celsius. Inputting this state into the trajectory prediction model, it predicted that within the next seven days, the exhaust temperature would rise to 88 degrees Celsius, the vibration value would rise to 5.5 mm / s, and the bearing temperature would rise to 75 degrees Celsius. This fault evolution trajectory showed a match of 0.92 with the "bearing wear fault" rule in the expert knowledge base, significantly higher than other rules.

[0187] The compressor unit was determined to be developing bearing wear failure, and by comparing it with standard fault characteristic patterns, it was identified as mid-stage bearing wear. Based on this diagnosis and predicted fault evolution trend, the system recommended scheduling a shutdown for maintenance within 48 hours to replace the bearing and inspect the lubrication system. Maintenance personnel followed the recommendations and confirmed that the bearing did indeed exhibit moderate wear; timely replacement prevented a serious failure.

[0188] In one optional implementation, the trajectory prediction model is used to predict the fault evolution trajectory of the natural gas pipeline compressor unit, and the fault evolution trajectory is matched with the fault diagnosis rules in the expert knowledge base, including:

[0189] The historical state sequence of the natural gas pipeline compressor unit is obtained, and the historical state sequence is input into the trajectory prediction model, which includes a nonlinear prediction mapping function and trajectory prediction parameters.

[0190] Based on the nonlinear prediction mapping function, the historical state sequence is processed, and the trajectory prediction parameters are combined with the output of the nonlinear prediction mapping function to generate the fault evolution trajectory vector of the natural gas pipeline compressor unit.

[0191] The fault evolution trajectory vector is input into the nonlinear prediction mapping function for secondary prediction. The predicted value in the fault evolution trajectory vector is corrected based on the result of the secondary prediction to obtain the corrected fault evolution trajectory vector.

[0192] The fault diagnosis rules in the expert knowledge base are input into the nonlinear prediction mapping function for feature transformation to obtain the rule feature vector. The trajectory rule matching degree is calculated by using the corrected fault evolution trajectory vector and the rule feature vector.

[0193] To predict fault evolution trajectories, historical state sequences of natural gas pipeline compressor units are acquired. These units are typically equipped with various sensors, including pressure sensors, temperature sensors, vibration sensors, and flow sensors. These sensors collect real-time operating data, forming historical state sequences. In practical applications, the historical state sequence is collected every hour, and the collected parameters include 20 key parameters such as intake pressure, exhaust pressure, intake temperature, exhaust temperature, bearing temperature, vibration value, shaft displacement, motor current, cylinder temperature, oil temperature, oil pressure, cooling water temperature, cooling water pressure, lubricating oil flow rate, gas flow rate, motor speed, compression ratio, power consumption, exhaust oil content, and ambient temperature.

[0194] For example, the historical state sequence of a compressor unit can be represented as a 720×20 data matrix, which consists of the collected values ​​of 20 parameters over the most recent 30 days (720 hours). This data is stored in the system database and undergoes data cleaning to eliminate the influence of outliers and missing values. Data cleaning employs a moving median filter to correct data points that exceed the normal range of parameters, and time series interpolation is used to fill in missing data.

[0195] Preprocessing of the historical state sequence ensures the accuracy of model predictions. Preprocessing includes two steps: data standardization and sequence segmentation. Data standardization uses the Z-score standardization method, which calculates the mean and standard deviation for each parameter, then subtracts the mean from the original data and divides by the standard deviation. For example, for the exhaust temperature parameter, the calculated mean over 30 days is 65 degrees Celsius, and the standard deviation is 5 degrees Celsius. Therefore, the original temperature data is subtracted from 65 and divided by 5 to obtain the standardized data. Sequence segmentation divides the standardized historical state sequence into sliding windows suitable for model input. In practical applications, a window length of 168 (7 days of data) and a sliding step size of 24 (1 day of data) are chosen, generating 23 training samples from 720 hours of historical data.

[0196] A trajectory prediction model was constructed, consisting of a nonlinear prediction mapping function and trajectory prediction parameters. The nonlinear prediction mapping function employs a three-layer structure: an input layer, a hidden layer, and an output layer. The input layer has a dimension of 168×20, corresponding to historical data within a sliding window. The hidden layer uses a bidirectional recurrent neural network structure, containing three sub-layers, each with 128 neurons, using the hyperbolic tangent function as the activation function. The output layer has a dimension of 168×20, corresponding to the predicted values ​​of 20 parameters for the next 7 days. The trajectory prediction parameters include the connection weights and bias terms between neurons in the hidden layer, totaling approximately 105,984 parameters. These parameters were obtained through training on historical data using the backpropagation algorithm, with the mean squared error loss function, an adaptive moment estimation algorithm as the optimizer, a learning rate of 0.001, a batch size of 32, and 500 training epochs.

[0197] The historical state sequence is processed using a nonlinear predictive mapping function. The preprocessed historical state sequence is input into the input layer of the nonlinear predictive mapping function in chronological order. The input layer passes the data to the first sub-layer of the hidden layer. Each neuron in the first sub-layer receives the weighted output of all input neurons, adds a bias term, and then processes it through a hyperbolic tangent activation function to generate the neuron's output. This process is performed sequentially in the three sub-layers of the hidden layer, with each sub-layer receiving the output of the previous layer as input and generating its own output. Due to the bidirectional structure, data is passed both forward and backward, thus capturing the bidirectional dependencies of the time series. For example, for the exhaust temperature parameter, the model considers not only the upward trend of temperature over time but also the interaction between temperature changes and other parameters such as vibration values ​​and power consumption. The last sub-layer of the hidden layer generates a 128-dimensional hidden state vector, which contains a compressed representation of the historical state sequence.

[0198] The fault evolution trajectory vector is generated by combining the trajectory prediction parameters with the output of the nonlinear prediction mapping function. The 128-dimensional hidden state vector generated by the last sublayer of the hidden layer is converted into the prediction output through the fully connected network of the output layer. The fully connected network of the output layer contains a weight matrix and a bias vector. The weight matrix has a dimension of 128×(168×20), and the bias vector has a dimension of 168×20. The hidden state vector is multiplied by the weight matrix, and then the bias vector is added to obtain the preliminary prediction result. This result is then processed by a linear activation function (i.e., the identity function) to obtain the predicted values ​​in the standardized space. These predicted values ​​are then de-standardized back to the original data space, that is, the standardized predicted values ​​are multiplied by the standard deviation of each parameter and the mean is added to obtain the predicted values ​​of 20 parameters for the next 7 days, forming a 168×20 fault evolution trajectory vector. For example, for the exhaust temperature parameter, if the predicted value in the standardized space is 1.2, then the de-standardized predicted value is 1.2×5+65=71 degrees Celsius.

[0199] The fault evolution trajectory vector is input into a nonlinear prediction mapping function for secondary prediction. The fault evolution trajectory vector generated in the previous step is then used as a new input sequence and input into the nonlinear prediction mapping function again. This process is the same as processing the historical state sequence; the only difference is that the input data changes from the historical state sequence to the predicted fault evolution trajectory vector. The nonlinear prediction mapping function processes the fault evolution trajectory vector to generate a secondary prediction result, forming a new 168×20 prediction matrix. This secondary prediction result is compared with the initial prediction result, and the prediction deviation of each parameter at each time point is calculated. For example, if the initial prediction value of the exhaust temperature at hour 72 is 75 degrees Celsius, and the secondary prediction value is 73 degrees Celsius, then the deviation is 2 degrees Celsius.

[0200] The predicted values ​​in the fault evolution trajectory vector are corrected based on the results of the secondary prediction. A prediction deviation threshold is set, such as 5% of the original parameter range. For each parameter at each time point, if the deviation between the secondary prediction and the initial prediction exceeds the threshold, a weighted average method is used to correct the predicted value. The weights of the weighted average method are determined by the magnitude of the deviation; the larger the deviation, the higher the weight of the secondary prediction. Specifically, the corrected predicted value is equal to the initial predicted value multiplied by (1-α) plus the secondary predicted value multiplied by α, where α is a weighting coefficient calculated based on the deviation, ranging from 0 to 0.5. For example, for the exhaust temperature parameter, if the deviation is 2 degrees Celsius, exceeding the threshold of 1 degree Celsius (i.e., 5% of the original range of 20 degrees Celsius), and the calculated weighting coefficient α is 0.3, then the corrected predicted value is 75×(1-0.3)+73×0.3=74.4 degrees Celsius. All predicted values ​​exceeding the threshold are corrected in this way to obtain the corrected fault evolution trajectory vector.

[0201] The fault diagnosis rules in the expert knowledge base are input into a nonlinear prediction mapping function for feature transformation. These rules contain descriptions of symptoms for various faults, which can be represented as patterns of parameter changes over time. For example, the rule for "bearing wear fault" is described as: "Exhaust temperature continuously increases, exceeding 15% within 7 days; vibration value continuously increases, exceeding 80% within 7 days; bearing temperature continuously increases, exceeding 20% ​​within 7 days." These rules are then converted into numerical representations in the same format as the fault evolution trajectory vector, i.e., the original rule vectors. For the "bearing wear fault" rule mentioned above, the exhaust temperature, vibration value, and bearing temperature parameters in its original rule vector will show corresponding growth trends, while other parameters remain within the normal range. The original rule vectors are input into the nonlinear prediction mapping function, but only executed up to the last sub-layer of the hidden layer, resulting in a 128-dimensional rule feature vector. This process is performed on each rule in the expert knowledge base, resulting in a series of rule feature vectors. In practical applications, the expert knowledge base contains 50 diagnostic rules for common faults, resulting in 50 rule feature vectors after transformation.

[0202] The trajectory rule matching degree is calculated using the corrected fault evolution trajectory vector and the rule feature vector. The corrected fault evolution trajectory vector is also input into the nonlinear prediction mapping function and executed to the last sub-layer of the hidden layer to obtain the trajectory feature vector. The cosine similarity between the trajectory feature vector and each rule feature vector is calculated as the trajectory rule matching degree. The formula for calculating the cosine similarity is the dot product of the two vectors divided by the product of their respective magnitudes. The result ranges from -1 to 1, with a value closer to 1 indicating a higher matching degree. For example, if the cosine similarity between the trajectory feature vector and the "bearing wear fault" rule feature vector is 0.92, and the cosine similarity with the "valve leakage fault" rule feature vector is 0.65, then the fault evolution trajectory of the current compressor unit is determined to be more consistent with the characteristics of "bearing wear fault".

[0203] In a real-world application case, the historical status sequence of a natural gas pipeline compressor unit showed that the average exhaust temperature over the past 30 days was 65 degrees Celsius, the average vibration was 2.5 mm / s, and the average bearing temperature was 55 degrees Celsius. A trajectory prediction model predicted that the exhaust temperature would gradually rise to 85 degrees Celsius, the vibration would increase to 4.8 mm / s, and the bearing temperature would rise to 70 degrees Celsius within the next 7 days. Matching this fault evolution trajectory with rules in the expert knowledge base yielded a match of 0.92 with the "bearing wear fault" rule, significantly higher than the match rates with other rules (maximum 0.70). The system therefore determined that the compressor unit would experience a bearing wear fault in the future and issued a warning to maintenance personnel. Based on this, maintenance personnel arranged for repairs and found that the bearings did indeed show early signs of wear. After replacing the bearings, the compressor unit returned to normal operation, avoiding an emergency shutdown due to the worsening of the fault.

[0204] In another application case, the historical status sequence of a compressor unit showed that the average discharge pressure over the past 30 days was 7.5 MPa, and the average cylinder temperature was 110 degrees Celsius. A trajectory prediction model predicted that the discharge pressure would gradually decrease to 6.2 MPa and the cylinder temperature would increase to 125 degrees Celsius over the next 7 days. Matching this fault evolution trajectory with rules in the expert knowledge base yielded a match score of 0.89 for the "valve leakage fault" rule, significantly higher than the match scores with other rules. The system therefore determined that the compressor unit had experienced a valve leakage fault. Maintenance personnel inspected the valves and found signs of aging in the valve seals. After replacing the seals, the compressor unit's discharge pressure returned to normal, preventing a decrease in delivery capacity due to insufficient pressure.

[0205] A second aspect of the present invention provides an electronic device, comprising:

[0206] processor;

[0207] Memory used to store processor-executable instructions;

[0208] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0209] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0210] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0211] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for fault analysis of natural gas pipeline compressor units based on matching degree calculation, characterized in that, include: Acquire real-time operating data of the natural gas pipeline compressor unit, and establish benchmark thresholds for compressor unit operating parameters based on the real-time operating data; A virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. Multiple sets of fault condition data are generated by setting different combinations of operating parameters. The experience and knowledge of on-site experts in fault diagnosis are collected, and fault feature templates are established based on the experience and knowledge. The matching degree of fault condition data in the virtual fault scenario library with the fault feature template is calculated to generate fault diagnosis rules; an expert knowledge base is constructed based on the fault diagnosis rules, and fault types are classified and warned according to the fault feature similarity calculated based on the expert knowledge base, and the fault diagnosis rules are automatically updated according to the fault development trend, including: For the fault to be diagnosed, fault features are extracted, and the similarity between the fault features and the standard features in the expert knowledge base is calculated based on the fault diagnosis rules in the expert knowledge base. The similarity is compared with a preset graded warning threshold. When the similarity is greater than the first warning threshold, the fault type is determined to be a serious fault and an emergency warning is triggered. When the similarity is between the first warning threshold and the second warning threshold, it is determined to be a warning fault and a warning signal is issued. When the feature similarity is less than the second warning threshold, it is determined to be a normal state. A rule evaluation index system is constructed, rule evaluation scores are calculated based on the rule evaluation index system, the diagnostic effect of the fault diagnosis rules is analyzed based on the rule evaluation scores, the fault diagnosis rules are screened based on the rule evaluation scores, fault diagnosis rules with rule evaluation scores higher than a preset scoring threshold are retained, and new fault diagnosis rules are generated based on the rule evaluation index system. The new fault diagnosis rules are dynamically maintained, and the similarity between rules is calculated based on the rule evaluation scores. In this process, a timeliness decay feature space is constructed, and the adaptability features of the fault diagnosis rules under different scenarios are extracted through the timeliness decay feature space. Based on the time-effect decay feature space, a scene impact evaluation function is established. The scene impact evaluation function is combined with the original evaluation score of the fault diagnosis rule using nonlinear features to generate the feature space evaluation score of the fault diagnosis rule. The fault diagnosis rule is feature-mapped in the time-sensitivity decay feature space. The feature decay trajectory in the time-sensitivity decay feature space is determined according to the time interval of the fault diagnosis rule that has not been updated. The feature decay trajectory is used to dynamically modulate the feature space evaluation score to generate the final evaluation score of the fault diagnosis rule. In the timeliness decay feature space, the output of the scene impact evaluation function is projected, and a rule update strategy is established based on the result of the feature projection. The rule update strategy formulates a dynamic maintenance scheme based on the feature space evaluation score, the final evaluation score and the scene impact evaluation function to realize the intelligent dynamic maintenance of the fault diagnosis rules. When the similarity between the rules exceeds the preset merging threshold, the similar rules are merged. Based on historical fault data analysis, the fault development trend is analyzed, and the evaluation weights in the rule evaluation index system are dynamically adjusted according to the fault development trend. The fault diagnosis rule is then updated according to the adjusted rule evaluation score. The expert knowledge base is used to perform online fault diagnosis on the real-time operating data of the natural gas pipeline compressor unit, and fault diagnosis results and processing suggestions are generated based on the fault feature similarity and the fault diagnosis rules. The fault diagnosis results and the processing suggestions are stored in the expert knowledge base for continuous optimization of the fault diagnosis rules and the fault feature templates.

2. The method according to claim 1, characterized in that, A virtual fault scenario library is constructed based on the aforementioned benchmark thresholds for operating parameters. Multiple sets of fault condition data are generated by setting different combinations of operating parameters. Experience and knowledge of on-site experts in fault diagnosis are collected, and fault feature templates are established based on this experience and knowledge, including: A virtual fault scenario library is constructed based on the benchmark threshold of the operating parameters. For each operating parameter in the virtual fault scenario library, the parameter change trend and parameter importance are calculated. The virtual fault scenario library is updated based on the parameter change trend and the parameter importance. The fault characteristics of the current parameter combination are evaluated using the virtual fault scenario library. The parameter combination relationship is optimized by dynamically adjusting the parameter importance. The stable state of the parameter combination is determined by iteratively analyzing the parameter change trend. The optimal threshold of the operating parameter is obtained. The optimal threshold is used as a benchmark value. Fault deviation value and random disturbance value are superimposed on the benchmark value to generate parameter time series change data. The virtual fault scenario library is updated based on the parameter time series change data. The updated virtual fault scenario library is used to analyze the time-series change data of the parameters to obtain the evolution characteristics of the parameter combinations; fault feature vectors are extracted based on the evolution characteristics; the correspondence between fault features and fault causes is calculated based on the fault feature vectors; and the virtual fault scenario library is improved based on the correspondence. Based on the improved virtual fault scenario library, the optimal threshold, the parameter time-series change data, the parameter change trend, the fault feature vector, and the corresponding relationship are integrated to construct a fault feature template.

3. The method according to claim 2, characterized in that, The matching degree of fault condition data in the virtual fault scenario library with the fault feature template is calculated to generate fault diagnosis rules, including: The fault condition data in the virtual fault scenario library is paired with the feature standard data. The result of the feature pairing is processed by a Gaussian kernel function. The matching degree score of the fault condition data relative to the feature standard data is calculated. Fault diagnosis rules are generated based on the matching degree score.

4. The method according to claim 1, characterized in that, Online fault diagnosis is performed on the real-time operating data of the natural gas pipeline compressor unit using the expert knowledge base. Based on the fault feature similarity and the fault diagnosis rules, fault diagnosis results and processing suggestions are generated, including: A fault state feature vector is formed based on real-time operating data. The fault state feature vector and the fault diagnosis rules in the expert knowledge base are used as input parameters of a nonlinear state transition function. The fault state feature vector and the fault diagnosis rules are processed by the nonlinear state transition function to generate the fault state feature vector of the natural gas pipeline compressor unit at the next moment. A trajectory prediction model is established based on the fault state feature vector at the next moment. The fault state feature vector at the next moment is input into the trajectory prediction model, and the trajectory prediction model is used to predict the fault evolution trajectory of the natural gas pipeline compressor unit. The fault evolution trajectory is then matched with the fault diagnosis rules in the expert knowledge base. The fault diagnosis rules in the expert knowledge base are updated based on the matching results of the trajectory prediction model. The updated fault diagnosis rules are then compared with the standard fault feature patterns in the expert knowledge base. Based on the comparison results of the standard fault feature patterns and the fault evolution trajectory predicted by the trajectory prediction model, fault diagnosis results and handling suggestions for the natural gas pipeline compressor unit are generated.

5. The method according to claim 4, characterized in that, The trajectory prediction model is used to predict the fault evolution trajectory of the natural gas pipeline compressor unit, and the fault evolution trajectory is matched with the fault diagnosis rules in the expert knowledge base, including: The historical state sequence of the natural gas pipeline compressor unit is obtained, and the historical state sequence is input into the trajectory prediction model, which includes a nonlinear prediction mapping function and trajectory prediction parameters. Based on the nonlinear prediction mapping function, the historical state sequence is processed, and the trajectory prediction parameters are combined with the output of the nonlinear prediction mapping function to generate the fault evolution trajectory vector of the natural gas pipeline compressor unit. The fault evolution trajectory vector is input into the nonlinear prediction mapping function for secondary prediction. The predicted value in the fault evolution trajectory vector is corrected based on the result of the secondary prediction to obtain the corrected fault evolution trajectory vector. The fault diagnosis rules in the expert knowledge base are input into the nonlinear prediction mapping function for feature transformation to obtain the rule feature vector. The trajectory rule matching degree is calculated by using the corrected fault evolution trajectory vector and the rule feature vector.

6. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 5.

7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intelligent fault diagnosis method and system for portal crane

    CN119441777A

  • Charging pile production test data collection and analysis method and system

    CN119760615A