A method for detecting faults in a natural gas purification and dehydration process
By constructing a causal graph using the maximum mean difference of a sliding window and the propagation entropy, the problem of root cause localization of multi-causal cross-propagation faults in the natural gas purification and dehydration process is solved, enabling rapid and accurate fault detection and localization, which is suitable for practical engineering applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-19
AI Technical Summary
In the existing natural gas purification and dehydration process, fault detection methods rely on single-point alarms or single-variable trends, which makes it difficult to accurately locate the root cause. Furthermore, in scenarios with multiple causal cross-propagation, the causal graph is redundant, making it difficult to locate the root cause. Existing methods require precise mechanisms or a large number of fault samples, making them difficult to apply effectively in practical engineering.
The fault variable set is screened by sliding window maximum mean difference (SW-MMD), and a causal graph is constructed by combining variable attention weights and transit entropy (TE). The root cause is determined by net outflow information flow and process constraints, and spurious causes are eliminated to achieve reliable localization of faults that cross-propagate multiple causes.
It can quickly screen fault variables without the need for precise mechanisms and a large number of fault samples, improves the sensitivity to short-term disturbances and interleaved faults, provides clear root causes and propagation paths, guides operation and maintenance troubleshooting and handling, and has cross-site and cross-device portability.
Smart Images

Figure CN122242725A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault detection technology in natural gas production processes, and in particular to a fault detection method for natural gas purification and dehydration processes. Background Technology
[0002] Natural gas is typically in a water-saturated state during extraction, gathering, transportation, and processing. If dehydration is insufficient, hydrates can easily form and clog pipelines under low-temperature, high-pressure transportation conditions. Simultaneously, the coexistence of water with acidic components such as carbon dioxide and hydrogen sulfide accelerates equipment and pipeline corrosion, leading to substandard dew point and water content in exported gas, jeopardizing plant safety and economic efficiency. Triethylene glycol (TEG) absorption and dehydration is widely used due to its mature technology and strong applicability. Typical units include feed gas separators, absorption towers, flash tanks, lean and rich liquid heat exchangers, regeneration towers, reboilers, and TEG circulating pumps. This type of process involves gas-liquid two-phase mass and heat transfer, multi-loop coupling of pressure, level, and flow rate, and significant time delays. Multiple variables, such as temperature, pressure, flow rate, level, and water content in exported gas, exhibit nonlinear dynamic correlations and cross-sensitivities. When an anomaly occurs in a piece of equipment or control loop, fault information often propagates along multiple paths and converges at downstream variables, exhibiting multi-causal cross-propagation characteristics. Relying solely on single-point alarms or single-variable trends is insufficient to accurately pinpoint the root cause.
[0003] The process flow for dehydrating triethylene glycol (TEG) from natural gas is as follows: Figure 1 As shown.
[0004] Existing fault detection methods for dehydration units mainly include: threshold alarms, mechanistic model residual analysis, and data-driven methods based on historical samples. Threshold alarms rely on empirical settings, cannot utilize the correlation between variables, and are prone to missing gradual and cross-propagation faults. Mechanistic model methods require accurate thermodynamic and mass transfer parameters, resulting in high online maintenance costs when facing fluctuations in natural gas composition and changes in operating conditions. Supervised learning methods, such as neural networks and classifiers, typically require sufficient fault samples, but in actual engineering, fault samples are scarce and unknown faults are difficult to cover, leading to insufficient generalization and interpretability.
[0005] To characterize causal relationships between variables without requiring precise mechanisms or a large number of fault samples, transfer entropy (TE) is introduced to quantify the gain information of source variables on the future state of target variables. However, in strongly coupled processes, standard TE is prone to misclassifying indirect paths as direct causality, leading to an increase in redundant edges in the causal graph and affecting root cause localization. On the other hand, if only fixed time windows are used for statistics, the causal information during the fault period is easily diluted by a large number of normal samples. Furthermore, if the selection of fault variables depends on complete dimensionality reduction modeling steps such as contribution graphs, the online computational overhead and parameter tuning costs are high. In multi-causal cross-propagation scenarios, it may also bias towards selecting end-quality variables while ignoring upstream triggering variables. Summary of the Invention
[0006] This invention discloses a fault detection method for the natural gas purification and dehydration process, the specific method of which is as follows: m process variables from the natural gas dehydration unit were collected to form a multivariate time series, and then preprocessed. Fault variable set selection based on maximum mean difference of sliding window; For the selected set of fault variables, calculate the variable attention weights; Construct a candidate causal set based on variable attention weights and transit entropy; A causal graph is constructed by removing spurious causality based on direct propagation entropy. On the directed graph after removing spurious causality, calculate the net outflow of information for each variable. And count the in-degree With out ; Using net outflow information flow and statistical in-degree and out-degree as root cause criteria, combined with single root cause and multi-root cause determination rules, as well as main root cause decision rules in the case of multiple root causes, the root cause diagnosis is completed.
[0007] Furthermore, m process variables from the natural gas dehydration unit are collected to form a multivariate time series, and preprocessed as follows: Collect m process variables from the natural gas dehydration unit: ; In the formula, Let m represent the observed value of the j-th monitored variable at time t, where m is the total number of variables; Preprocessing is performed using the following formula: ; In the formula, denoted as the mean and standard deviation of the j-th variable in the training data under normal operating conditions.
[0008] Furthermore, the fault variable set is filtered based on the maximum mean difference of the sliding window, as follows: Using the normal baseline window B and the current detection window W as two sample segments, calculate the distribution drift statistic for each variable. The formula is: ; ; In the formula, This is a normal baseline window sample. This refers to the sample in the current detection window. For radial basis kernel functions, For kernel width; when This variable will then be included in the fault variable set F.
[0009] Furthermore, for the selected set of fault variables, the attention weights of the variables are calculated, as follows: Calculate variable attention for the selected set of fault variables F. The specific formula is as follows: ; In the formula, This is the amplification factor, used to adjust the sensitivity of attention to the degree of drift.
[0010] Furthermore, a candidate causal set is constructed based on variable attention weights and transit entropy, as follows: The test data is divided into multiple overlapping sliding windows. Calculate within each window And score based on window anomalies. Calculate window attention ,get This allows us to obtain a candidate causal set for the target variable Y. ; The calculation formula is as follows: ; In the formula, To predict the step size, and These are the target variables. and source variables The length of the historical embedding; This represents the mean squared error obtained by building a prediction model within window w; Window anomaly rating The calculation formula is as follows: ; Window attention The calculation formula is as follows: ; The calculation formula is as follows: ; In the formula, Rate window anomalies; For window attention; This is a temperature coefficient used to control the degree of attention allocation.
[0011] Furthermore, based on direct propagation entropy, spurious causality is removed, and a causal graph is constructed. The specific method is as follows: For each edge in the candidate set, the remaining candidate variables are used as the condition set Z to perform conditional DTE calculation, and indirect pseudo-causal edges with insignificant DTE are removed by scrambling test to form DTE matrix and construct fault propagation directed graph. Perform conditional DTE calculation, the specific formula is as follows: ; In the formula, For the condition set, it is usually taken as This is to eliminate spurious causality caused by indirect transmission through other variables.
[0012] Furthermore, calculate the net outflow of information for each variable: ; For the net outgoing information flow of node i, The larger the value and the smaller the in-degree, the more likely it is to be a candidate root cause of the failure.
[0013] Furthermore, the rules for determining whether a cause is a single root cause or a multiple root cause, and the rules for deciding the principal root cause in the case of multiple root causes, are as follows: If variable i satisfies And it was significantly observed after the scrambling test, at the same time If i is included in the candidate root cause set R, then variable i will be included in the root cause set R. When |R|=1, it is determined to be a single root cause; If |R|≥2 and there is no significant DTE unidirectional causal relationship between nodes in R (i.e., there is no unique chain where one root cause node directly points to the upstream of another root cause node through a significant edge), then it is determined to be a concurrent multi-root cause failure, and the root cause set R is output. Furthermore, when the condition is determined to be a multi-root cause, a ranking score is constructed based on the dependency Φ and graph structure features. ,according to The order of descending order indicates the priority of investigation, with the highest priority being the primary root cause. Sorting score The formula is as follows: ; In the formula, This represents the number of downstream nodes from variable i to the key quality variable, where ω1~ω4 are the weights. according to The order of descending order indicates the priority of investigation, with the highest priority being the primary root cause.
[0014] Due to the adoption of the above technical solutions, this application has the following beneficial effects: 1. This application proposes a variable distribution drift screening mechanism based on SW-MMD, which can quickly obtain the set of fault variables without building a complete dimensionality reduction model, and is suitable for online deployment; 2. This application proposes an attention sliding window transfer entropy ATE driven by window anomaly scoring, which gives higher weight to the fault window information flow and improves the sensitivity to short-term disturbances, interleaved faults and weak faults. 3. This application performs conditional DTE on the candidate causal set and combines it with scrambling test to achieve indirect pseudo-causal edge elimination, which can obtain a sparser and interpretable causal graph in the multi-causal cross-propagation scenario; 4. This application uses net outflow information flow. When combined with process constraints, the root cause can be determined, and clear root cause variables and propagation paths can be output, which can directly guide operation and maintenance troubleshooting and handling. 5. This application relies only on normal operating condition data and does not depend on the fault sample library, thus possessing cross-site and cross-device transferability and engineering promotion value.
[0015] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0016] The accompanying drawings of this invention are described below.
[0017] Figure 1 This is a schematic diagram of the natural gas triethylene glycol (TEG) dehydration process.
[0018] Figure 2 This is a schematic diagram of the overall process.
[0019] Figure 3 This is a fault propagation causal graph constructed based on DTE. Detailed Implementation
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0021] This embodiment selects six key monitoring variables: X1 feed gas inlet pressure, X2 separator liquid level, X3 TEG circulation flow rate, X4 flash tank pressure, X5 dry gas moisture content, and X6 reboiler temperature. A sample dataset of 6 variables × 20 time points is constructed to simulate multi-causal cross-propagation faults. Where t1-t... 12 Under normal operating conditions; from t 13 Initially, the separator liquid level rose significantly due to outlet valve blockage (fault source 1); from t 15Initially, the reboiler temperature dropped significantly due to insufficient heating (fault source 2). Under the combined effect and process coupling of the two fault sources, the TEG circulation flow rate and flash tank pressure subsequently deviated from the normal range, ultimately leading to a significant increase in the moisture content of the dry gas. This scenario forms at least four cross-propagation chains: X2→X3→X5, X2→X4→X5, X6→X3→X5, and X6→X4→X5.
[0022] The dataset of failure cases is shown in the table below: A fault detection method for natural gas purification and dehydration process introduces an attention sliding window that can highlight the information flow during abnormal periods, and combines it with a direct transfer entropy removal mechanism to achieve reliable location of faults caused by multiple causal cross-propagation.
[0023] like Figure 2 As shown, the specific steps are as follows: S1. Data Standardization and Window Division With t1-t 12 As the normal operating condition training segment, i.e., the baseline window B, t 13 -t 20 The fault detection window W is used as the detection window for the fault detection segment. First, the mean and standard deviation of the training segment are calculated, as shown in the table above (t1-t). 12 The vector of mean and standard deviation of each variable obtained from the data calculation is as follows: ; ; In t 13 At any given time, the separator liquid level Its standardized value is: ; It is 18 standard deviations higher than the normal mean, which shows that... In t 13 Significant abnormalities were observed; in t 15 The reboiler temperature at any given time is X6 = 173.6, and its standardized value is... The same can be judged as a significant abnormality.
[0024] S2, SW-MMD Fault Variable Set Filtering The following formula is used to calculate each variable separately in the reference window B and the detection window W. : ; The kernel width can be set empirically or heuristically using the median; in this embodiment, we take... .by For example, let's first calculate the sum of the three terms: ; ; ; ; To suppress misjudgments caused by random fluctuations, a scrambling test is performed on each variable: keeping B constant, the samples within W are randomly rearranged and the calculation is repeated. A total of R iterations are performed, and R=200 can be taken to obtain the disordered statistics sequence. Using its 95th percentile as the threshold: ; In this embodiment, the calculated SW-MMD statistics and threshold vectors for each variable are as follows: Based on this, the set of fault variables is obtained: ; S3. Calculation of the attention weight β Take the magnification factor , in the fault variable set F Substitute into the formula: ; get: ; S4, Window Attention α and ATE Candidate Causality Discovery Set the sliding window length L=10 and the step size s=5, and t1-t 20 Divided into three windows: W1(t1-t) 10 W2(t6-t) 15 W3(t) 11 -t 20 ). Calculate the anomaly score for each window according to formula (7). Get window attention This embodiment yields: ; ; It is evident that the fault mainly occurred during the time period corresponding to W3, therefore When the value is close to 1, the ATE will be primarily contributed by the information flow of the fault window.
[0025] S41, Inside the window Calculation Taking "X2→X3" in window W3 as an example, with h=1 and k=l=1, establish regression model A containing only the target history and regression model B containing the source history: ; ; The mean squared error is estimated within window W3: .
[0026] Substitute into the formula: ; achievable ; S42, ATE weighted summation The TE values for the same variable pair in the three windows are as follows: Multiply it by the attention weights and sum them: ; In this embodiment, based on the significance test of ATE, the principal candidate causal strength matrix is obtained, listing only the significant terms and setting the rest to 0: ; From the matrix It can be seen that X5 is strongly influenced by both X3 and X4, while X2 and X6 also have certain ATE values for X5. However, this influence may come from the indirect path through X3 and X4, and further DTE is needed to remove spurious causality.
[0027] S5, DTE verification of false causality and cross-causal propagation chain Taking the target variable X5 as an example, its candidate elements are X2, X3, and X... 4、 X6. If only ATE is used, indirect edges such as X2→X5 and X6→X5 may be retained. This invention introduces a condition set on the candidate set. The DTE is calculated using the following formula to eliminate indirect spurious causality: ; S51. Indirect spurious causal edge removal: X2→X5 First, calculate the unconditionalized TE: ; Then in the set of conditions Calculate DTE below: ; Performing a scrambling test on the X2 sequence yields a 95% threshold. ,because Therefore, X2→X5 is determined to be an indirect causal edge and is removed.
[0028] S52, Indirect spurious causal edge removal: X6→X5 ; ; Similarly, remove X6→X5.
[0029] S53, Preserved direct causal edges: ; ; By repeating the above process with each variable in the fault variable set F as the target variable, the DTE matrix is obtained: ; According to the matrix Fault propagation causality can be constructed Figure 3 The causal graph contains the following cross-propagation chains: ; ; ; ; It can be seen that the information flow at X5 is formed by the convergence of two branches, X3 and X4, while X2 and X6 are respectively connected through X... 3、 X4 forms a cross propagation. The conditional computation of DTE effectively eliminates indirect edges such as X2→X5 and X6→X5, making the multi-causal cross structure clearer.
[0030] S6. Root Cause Localization and Diagnostic Output The net outflow information flow is calculated from the DTE matrix using the following formula: ; get: ; Fault propagation cause-effect graph constructed based on DTE is as follows: Figure 3 As shown, X2 and X6 satisfy Since the value is positive and significantly larger, R = {X2, X6}, indicating the existence of two candidate root causes. X3, X4, and X5 have negative Φ and in-degrees greater than 0, belonging to downstream merging nodes in the propagation chain. Because |R| = 2, and there are no significantly dominant edges between root causes such as X2→X6 or X6→X2 in the DTE matrix, this is determined to be a concurrent multi-root cause failure. In the multi-root cause case, let ω1 = 0.7, ω2 = 0.1, ω3 = 0.1, and ω4 = 0.1, and calculate the root causes... Since the InDeg of X2 and X6 are both 0 and the OutDeg of X6 are both 2, and Since the value is 3, the sorting is mainly determined by Φ, resulting in S6>S2. Therefore, X6 can be investigated first as the primary root cause, and X2 can be investigated in parallel or subsequently as the secondary primary root cause.
[0031] Based on the process mechanism, it can be explained as follows: the decrease of X6 reflects insufficient heating of the reboiler, resulting in insufficient TEG regeneration, which in turn affects the circulation absorption capacity; the increase of X2 reflects blockage of the separator outlet valve or poor drainage, resulting in uncontrolled liquid level and changing the subsequent gas-liquid separation and rich liquid transportation status; the two cross-propagate by affecting the X3 circulation flow rate and X4 flash pressure, ultimately leading to an increase in the moisture content of the X5 external gas.
[0032] Based on the above diagnostic results, the following maintenance recommendations can be provided: Prioritize checking the reboiler combustion medium supply, heat exchange surface scaling, and temperature control circuit. In terms of the order of action, first restore the two root causes of liquid level and heating supply, and check whether the separator liquid level control circuit and outlet valve or drain line are blocked or stuck; at the same time, observe whether X3 and X4 return to normal, and finally confirm that X5 meets the standard, thereby achieving closed-loop verification.
[0033] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for fault detection in a natural gas purification and dehydration process, characterized in that, The specific method is as follows: m process variables from the natural gas dehydration unit were collected to form a multivariate time series, and then preprocessed. Fault variable set selection based on maximum mean difference of sliding window; For the selected set of fault variables, calculate the variable attention weights; Construct a candidate causal set based on variable attention weights and transit entropy; A causal graph is constructed by removing spurious causality based on direct propagation entropy. On the directed graph after removing spurious causality, calculate the net outflow of information for each variable. And count the in-degree With out ; Using net outflow information flow and statistical in-degree and out-degree as root cause criteria, combined with single root cause and multi-root cause determination rules, as well as main root cause decision rules in the case of multiple root causes, the root cause diagnosis is completed.
2. The fault detection method for the natural gas purification and dehydration process as described in claim 1, characterized in that, The process variables of the natural gas dehydration unit are collected to form a multivariate time series, and preprocessed as follows: Collect m process variables from the natural gas dehydration unit: ; In the formula, Let m represent the observed value of the j-th monitored variable at time t, where m is the total number of variables; Preprocessing is performed using the following formula: ; In the formula, denoted as the mean and standard deviation of the j-th variable in the training data under normal operating conditions.
3. The fault detection method for the natural gas purification and dehydration process as described in claim 1, characterized in that, The method for filtering the set of fault variables based on the maximum mean difference of a sliding window is as follows: Using the normal baseline window B and the current detection window W as two sample segments, calculate the distribution drift statistic for each variable. The formula is: ; ; In the formula, This is a normal baseline window sample. This refers to the sample in the current detection window. For radial basis kernel functions, For kernel width; when This variable will then be included in the fault variable set F.
4. The fault detection method for the natural gas purification and dehydration process as described in claim 1, characterized in that, For the selected set of fault variables, the attention weights of the variables are calculated using the following method: Calculate variable attention for the selected set of fault variables F. The specific formula is as follows: ; In the formula, This is the amplification factor, used to adjust the sensitivity of attention to the degree of drift.
5. The fault detection method for the natural gas purification and dehydration process as described in claim 1, characterized in that, The candidate causal set is constructed based on variable attention weights and transit entropy, as follows: The test data is divided into multiple overlapping sliding windows. Calculate within each window And score based on window anomalies. Calculate window attention ,get This allows us to obtain a candidate causal set for the target variable Y. ; The calculation formula is as follows: ; In the formula, To predict the step size, and The target variables are respectively and source variables The length of the historical embedding; This represents the mean squared error obtained by building a prediction model within window w; Window anomaly rating The calculation formula is as follows: ; Window attention The calculation formula is as follows: ; The calculation formula is as follows: ; In the formula, Rate window anomalies; For window attention; This is a temperature coefficient used to control the degree of attention allocation.
6. The fault detection method for the natural gas purification and dehydration process as described in claim 5, characterized in that, Based on direct propagation entropy, spurious causality is removed, and a causal graph is constructed. The specific method is as follows: For each edge in the candidate set, the remaining candidate variables are used as the condition set Z to perform conditional DTE calculation, and indirect pseudo-causal edges with insignificant DTE are removed by scrambling test to form DTE matrix and construct fault propagation directed graph. Perform conditional DTE calculation, the specific formula is as follows: ; In the formula, For the condition set, usually take This is to eliminate spurious causality caused by indirect transmission through other variables.
7. The fault detection method for the natural gas purification and dehydration process as described in claim 6, characterized in that, Calculate the net outgoing information flow for each variable: ; For the net outgoing information flow of node i, The larger the value and the smaller the in-degree, the more likely it is to be a candidate root cause of the failure.
8. The fault detection method for the natural gas purification and dehydration process as described in claim 7, characterized in that, The rules for determining whether a cause is single or multiple, and the rules for deciding the principal cause in the case of multiple causes, are as follows: If variable i satisfies And it was significantly observed after the scrambling test, at the same time If i is included in the candidate root cause set R, then variable i will be included in the root cause set R. When |R|=1, it is determined to be a single root cause; If |R|≥2 and there is no significant DTE unidirectional causal relationship between nodes in R, that is, there is no unique chain that directly points to the upstream of another root cause node through a significant edge, then it is determined to be a concurrent multi-root cause failure, and the root cause set R is output.
9. The fault detection method for the natural gas purification and dehydration process as described in claim 8, characterized in that, When determined to be a multi-root cause, construct the dependency Φ and the ranking score of the graph structure features. ,according to The order of descending order indicates the priority of investigation, with the highest priority being the primary root cause. Sorting score The formula is as follows: ; In the formula, This represents the number of downstream nodes from variable i to the key quality variable, where ω1~ω4 are the weights. according to The order of descending order indicates the priority of investigation, with the highest priority being the primary root cause.