A root cause diagnosis method for process industry anomalies based on causal loop elimination
By using dynamic time warping and sliding window technology in the process industry to construct a variable time delay matrix, combining the Mann-Kendall trend test to decompose the causal network loop, and improving the Bayesian network model, the inaccuracy of abnormal root cause diagnosis caused by causal loops is solved and the diagnostic accuracy is improved.
Patent Information
- Application Number
- CN202411781769.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Existing technologies in process industries fail to effectively address the inaccuracy in abnormal root cause diagnosis caused by causal loops, especially ignoring the variability of time delays, resulting in low diagnostic accuracy.
Dynamic time warping is combined with sliding window technology to construct a variable time delay matrix. The Mann-Kendall trend test is used to decompose the loops in the causal network. The Bayesian network model is improved to handle variable time delays, thereby accurately locating the root cause of the anomaly.
It improves the accuracy of root cause diagnosis of process industry anomalies, can handle dynamic time delay changes in complex processes, eliminates loops in causal networks, and improves the diagnostic capabilities of Bayesian network models.
Smart Images

Figure CN119828634B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fault diagnosis, and in particular to a method for diagnosing root causes of abnormalities in process industries based on the elimination of causal loops. Background Art
[0002] The process industry is a vital component of the manufacturing sector, and its safe and efficient operation is crucial to economic development. Driven by continuous technological advancement, today's process industries are characterized by ever-expanding production scale and increasing complexity. Within these systems, anomalies can trigger cascading effects across various process units, posing significant challenges for maintenance teams. To mitigate or prevent the adverse consequences of such anomalies, it is essential to identify the most likely anomaly propagation paths, diagnose the root cause, and implement appropriate corrective measures to restore normal operations as quickly as possible.
[0003] In process industries, causal loops are ubiquitous and unavoidable due to the existence of feedback control mechanisms. Causal loops (or loops for short) are circular causal relationships within a causal network, arising from factors such as variable coupling, cyclical flows, and the integration of material and thermal processes. The presence of these loops, whether arising from the physical structure of the system or the time-delay characteristics of the production process, complicates the causal network and, if left unaddressed, increases the uncertainty of anomaly diagnosis. Therefore, effectively addressing these loops is crucial for accurate abnormal root cause diagnosis (Abnormal Root Cause Diagnosis), a technique used to identify and trace the causes of anomalies in the production process. It is crucial for ensuring process stability and improving product quality and safety.
[0004] To address these challenges, anomaly root cause diagnosis technology has emerged. The concept of anomaly root cause diagnosis dates back to the 1990s, when researchers primarily relied on anomaly diagnosis or process mechanism knowledge to infer anomaly root causes. However, due to the high cost of knowledge collection and the complexity of logical operations, anomaly root cause diagnosis technology at the time failed to gain widespread adoption in complex process industries. In recent years, with the development and application of machine learning and causal analysis, data-driven anomaly root cause diagnosis methods have provided new solutions for intelligent diagnosis of complex processes and have also promoted the development of related research.
[0005] Generally speaking, anomaly root cause diagnosis methods can be categorized as knowledge-based or data-based. Knowledge-based methods typically rely on connectivity or correlations and utilize piping and instrumentation diagrams, expert knowledge, and algebraic equations to construct process topology. These methods primarily include symbolic directed graphs, adjacency matrices, and fault trees, and are often used in smaller chemical industrial processes with simpler operating mechanisms. These methods rely heavily on prior knowledge and fail to consider the statistical information of real-time data. Consequently, they are unable to explore causal relationships between variables and struggle to adapt to dynamic changes in process industries. With the accumulation and storage of large amounts of process data, data-based anomaly root cause diagnosis methods have rapidly developed.
[0006] Data-driven methods are gaining popularity over traditional knowledge-based approaches. This preference stems from their superior ability to analyze time series data, which is essential for revealing often-obscured temporal dynamics. Data-driven methods can be categorized into deterministic and probabilistic approaches. Deterministic data-driven methods excel at extracting features from process datasets, such as principal component analysis, independent component analysis, and canonical variate analysis. They identify patterns that deviate from normal operating conditions to determine whether an anomaly has occurred and then infer its location. However, such methods often require the prior screening of candidate sets of anomaly variables to accurately identify the root cause of anomalies. Consequently, such methods face numerous challenges in complex process industries, such as the mutual propagation of influences between anomaly variables, leading to smearing effects. Specifically, during the screening process for candidate sets of anomaly variables, the presence of some variables may mask the true causal relationship between other variables and the anomaly. To address this issue, probabilistic methods, led by Bayesian networks (BNs), have become the mainstream approach to anomaly root cause diagnosis.
[0007] Unlike deterministic methods, probabilistic methods are better able to handle uncertainty and complexity, thereby improving diagnostic accuracy and reliability. BNs can capture the dynamic relationships between variables by modeling probabilistic relationships between them, allowing for more accurate identification of potential root causes of anomalies. However, BNs are inherently acyclic, whereas process industries often have various feedback mechanisms that can lead to the emergence of loops. These loops complicate anomaly root cause diagnosis and propagation path identification because they can cause changes in the probability distribution within the model, affecting the accuracy of diagnostic results. Therefore, it is necessary to address loops in causal networks to more accurately diagnose the root causes of anomalies.
[0008] To address the ubiquitous loops in process industries, methods such as virtual nodes, supernodes, and hierarchical diagnosis can be used to break loops. Alternatively, variables directly leading to loops or bidirectional edges can be omitted from causal graphs to eliminate loops. While these methods have demonstrated effectiveness, they are limited to analyzing superficial causal relationships and ignore the underlying temporal priorities within fault information. Furthermore, the assumption of fixed and unchanging time delays between causal relationships is too rigid for most process industries. In reality, time delays dynamically change as the system operates, violating the fundamental assumptions of causal analysis models. Ignoring the variability of time delays can lead to inaccurate causal reasoning, posing a significant obstacle to effective anomaly root cause diagnosis. Therefore, how to fully exploit and utilize the deep-level information in process industry operational data, improve existing causal analysis models, and achieve anomaly root cause diagnosis and propagation path identification has become a pressing scientific issue for both industry and academia. Summary of the Invention
[0009] To address the technical problem of low accuracy in diagnosing the root causes of process industry anomalies due to prior art ignoring the variability of time delays, the present invention provides a method for diagnosing the root causes of process industry anomalies based on eliminating causal loops. The technical solution is as follows:
[0010] In one aspect, a method for diagnosing the root cause of anomalies in a process industry based on the elimination of causal loops is provided. The method is implemented by a device for diagnosing the root cause of anomalies in a process industry, and the method comprises:
[0011] Offline Modeling:
[0012] Step S1, for process variable data generated under normal conditions in a process industry production process, a method combining dynamic time warping and sliding window technology is used to calculate variable time delays in real time, and a variable time delay matrix under normal conditions is constructed;
[0013] Step S2, performing trend analysis on the variable time delay under normal conditions, decomposing the loops in the causal network into temporal causal relationships, and eliminating the loops in the causal network;
[0014] Step S3, establishing a Bayesian network based on variable time delay to determine a conditional probability table under normal conditions;
[0015] Online diagnosis:
[0016] Step S4, for process variable data generated under abnormal conditions in the process industry production process, a method combining dynamic time warping and sliding window technology is used to calculate the variable time delay in real time, and a variable time delay matrix under abnormal conditions is constructed;
[0017] Step S5, based on the constructed variable time delay matrix under abnormal state, update the Bayesian network, determine the conditional probability table under abnormal state, compare the conditional probability tables under normal and abnormal states to locate abnormal variables and infer the root cause and propagation path.
[0018] On the other hand, a device for diagnosing the root cause of anomalies in a process industry is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned methods for diagnosing the root cause of anomalies in a process industry based on the resolution of causal loops is implemented.
[0019] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement any of the above-mentioned process industry abnormality root cause diagnosis methods based on causal loop resolution.
[0020] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0021] 1) To address the dynamic changes in time delays in complex process industries, a method combining dynamic time warping and sliding window technology is used to achieve real-time calculation of variable time delays and construct a variable time delay matrix to reveal the dynamic changes in time information.
[0022] 2) To address the cyclical causal loops caused by variable coupling, cyclical flows, and the integration of materials and thermal processes, a strategy for decomposing cyclical loops in causal networks was designed by deeply mining the temporal information between process variables and combining it with the Mann-Kendall trend test. By analyzing the changing trends of variable time delays, the inherent causal loops were decomposed into temporal causal relationships, thereby eliminating the cyclical loops in the causal network.
[0023] 3) Based on the constructed variable time delay matrix, the traditional Bayesian network model is improved, and the limitation of the Bayesian network model on the fixed time delay assumption is lifted, so that it can handle the variable time delay between abnormal variables and improve the accuracy of abnormal root cause diagnosis in dynamic process industries. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1This is a flow chart of a method for diagnosing the root cause of anomalies in a process industry based on the elimination of causal loops, provided by an embodiment of the present invention;
[0026] Figure 2 The present invention provides a schematic structural diagram of an abnormality root cause diagnosis device for a process industry. DETAILED DESCRIPTION
[0027] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0028] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.
[0029] In the embodiments of the present invention, the terms "image" and "picture" may be used interchangeably. It should be noted that, when the distinction between them is not emphasized, their intended meanings are the same. The terms "of," "corresponding," and "corresponding" may be used interchangeably. It should be noted that, when the distinction between them is not emphasized, their intended meanings are the same.
[0030] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0031] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0032] In order to solve the problem of abnormal root cause diagnosis and propagation path identification in complex process industries, the embodiment of the present invention provides a method for abnormal root cause diagnosis in process industries based on the elimination of causal loops. The method can be implemented by a device for abnormal root cause diagnosis in process industries, which can be a terminal or a server. Figure 1 The flowchart of a process industry anomaly root cause diagnosis method based on causal loop elimination is shown. The method includes three functional modules: Functional module 1 is a variable time delay matrix construction module, Functional module 2 is a causal loop elimination module, and Functional module 3 is an anomaly root cause diagnosis module. The processing flow of this method may include the following steps:
[0033] Offline Modeling:
[0034] Step S1, for process variable data generated under normal conditions in a process industry production process (referred to as normal data), a method combining dynamic time warping and sliding window technology is used to calculate variable time delays in real time, and a variable time delay matrix under normal conditions is constructed;
[0035] In this embodiment, variable time lag (Variable Time Lag): Since process variables include various types, the temporal causal relationship exhibits different time lags in different states and changes over time.
[0036] Step S2, performing trend analysis on the variable time delay under normal conditions, decomposing the loops in the causal network into temporal causal relationships, and eliminating the loops in the causal network;
[0037] Step S3, establishing a Bayesian network based on variable time delay to determine a conditional probability table under normal conditions;
[0038] Online diagnosis:
[0039] Step S4, for process variable data generated under abnormal conditions in the process industry production process (abnormal data for short), a method combining dynamic time warping and sliding window technology is used to calculate variable time delays in real time, and a variable time delay matrix under abnormal conditions is constructed;
[0040] In step S5, based on the constructed variable time delay matrix under abnormal conditions, the log-likelihood value is calculated to update the Bayesian network, the conditional probability table under abnormal conditions is determined, and the conditional probability tables under normal and abnormal conditions are compared to locate the abnormal process variables and infer the root cause and propagation path.
[0041] In this embodiment, steps S1 and S4 are implemented by a variable time delay matrix construction module, step S2 is implemented by a causal loop release module, and steps S3 and S5 are implemented by an abnormality root cause diagnosis module.
[0042] In this embodiment, the specific technical solutions of the three functional modules are as follows:
[0043] In this embodiment, the functional module 1: variable time delay matrix construction module, the specific implementation steps are:
[0044] Step 1: Collect, transmit and store process variable data such as temperature, pressure, flow, etc. generated during the process industry production process through industrial sensors and data storage devices;
[0045] Step 2: Standardize the acquired process variables and adjust the data of different scales or distributions to a unified scale;
[0046] In this embodiment, Z-score standardization is used to process variable data, and the specific form is as follows:
[0047]
[0048] Where x' is the original data point, μ is the mean, and σ is the standard deviation.
[0049] Step 3: Determine the time delay between process variables using the Dynamic Time Warping (DTW) method. This may include the following steps:
[0050] Step 3.1: Construct the DTW distance between process variables:
[0051] First, assume that the multivariate process variable data is:
[0052]
[0053] Among them, X is the process variable data; m is the number of measured process variables; n is the sampling time, which also represents the number of samples; X m (n) is the data collected at the nth sampling moment of the mth process variable.
[0054] The DTW distance between process variables is constructed according to the following formula:
[0055]
[0056] Where D represents the DTW distance between two process variables, d i,j Represents the data x collected at the i-th sampling moment corresponding to the first process variable i The data y collected at the jth sampling time corresponding to the second process variable j The Euclidean distance between i and y j is any process variable data;
[0057] Step 3.2: Find the best DTW path to determine the time delay:
[0058] Then, the optimal path is determined by the matrix D to minimize the cumulative DTW distance. The difference between the two process variables is the time delay, which is specifically based on the following principles:
[0059] Within the matrix grid described by the two process variables, the DTW algorithm searches for the best trajectory from the starting point to the end point, which is constrained to be monotonic.
[0060] Using the continuity principle in dynamic programming, the state transition equation of the algorithm for determining the shortest path from the starting point to the end point is formulated as follows:
[0061]
[0062] Where D(i,j) is the shortest DTW distance accumulated at positions i and j.
[0063] Step 4: Update DTW in real time using the sliding window technology to calculate the optimal time delay. This may include the following steps:
[0064] Assume that the initial window of the i-th paired process variable is W i,h , h is the number of windows, l is the window length, which determines the update speed. The initial window can be expressed as:
[0065] W i,h =[w i,t ,w i,t+1 ,…w i,t+l-1 ] (1.5)
[0066] Among them, every two process variables can be called a pair of process variables, w i,t Represents the data corresponding to the i-th paired process variable at time t, window W i,h Contains all process variable data from time t to time t+l-1. The transition window can be obtained by deleting k process variable data:
[0067] W i, ' h =[w i,t+k ,w i,t+k+1 ,…w i,t+l-1 ] (1.6)
[0068] By adding k new process variable data, a new window is obtained:
[0069] W i,h+1 =[w i,t+k ,w i,t+k+1 ,…w i,t+k+l-1 ] (1.7)
[0070] Through the sliding window technology, the DTW distances corresponding to different windows can be obtained. As the window continues to move forward, the DTW distances of all windows are recorded, realizing real-time updates of the DTW distances to achieve the calculation of variable time delays.
[0071] Step 5: Save the optimal time delay corresponding to each window and construct a variable time delay matrix.
[0072] In this embodiment, the variable time delay matrix is expressed as:
[0073] T'=[t1,t2,…,t k ,…,t p ] (1.8)
[0074]
[0075] Where T' represents the variable time delay matrix; t p Indicates the variable time delay corresponding to the p-th window, specifically: t p is a matrix containing all the time delays between each two process variables in the pth window; t k The subscript k∈(1,p), p is the number of windows; represents the DTW distance between the m-th variable and the m'-th variable in the W-th window, and f(·) represents the time delay corresponding to the shortest DTW distance.
[0076] In this embodiment, during offline modeling, functional module 1 processes the process variable data generated under normal conditions in the process industry production process according to the technical solutions described in steps 1 to 5, and constructs a variable time delay matrix under normal conditions; during online diagnosis, functional module 1 processes the process variable data generated under abnormal conditions in the process industry production process according to the technical solutions described in steps 1 to 5, and constructs a variable time delay matrix under abnormal conditions.
[0077] In this embodiment, the second functional module is a causal loop removal module, and the specific implementation steps are as follows:
[0078] Step 1: Develop a causal network for the process industry and construct an initial BN model; where BN stands for Bayesian network;
[0079] Step 2: Identify the loops in the causal network. This may include the following steps:
[0080] Step 2.1. Convert the causal network into a causal adjacency matrix, where the horizontal quantity in the causal adjacency matrix represents the cause variable, the vertical quantity represents the result variable, 0 represents the absence of a causal relationship, and 1 represents the existence of a causal relationship.
[0081] Step 2: Use a depth-first search algorithm to identify all paths and determine the loops in the causal network. Specifically, the following steps may be included:
[0082] Step 221: Initialization:
[0083] Create a visit mark array to mark whether each node has been visited. The number of nodes is consistent with the dimension of the causal adjacency matrix, that is, each node corresponds to the horizontal and vertical coordinates of the causal adjacency matrix.
[0084] Create a recursive stack array to mark whether each node is on the current recursive path;
[0085] Create an empty list to store all the found cyclic loops;
[0086] Step Two Two Two, Depth-First Search:
[0087] Start from the current node, mark it as visited, and push the node onto the recursive stack;
[0088] Traverse all the adjacent nodes of the current node. If an adjacent node is not visited, recursively call the depth-first search. If an adjacent node is in the recursive stack, it means a cyclic loop is found, and add it to the cyclic loop list.
[0089] Step Two Two Three, Backtracking:
[0090] When returning from the recursion, pop the current node from the recursive stack.
[0091] Step Three, Determine all the cyclic loops in the causal network.
[0092] Step Three, Conduct variable time-delay trend analysis on the paired process variables involved in the cyclic loops;
[0098]
[0099] In a two-sided trend test, if Z is given at the confidence level α, the null hypothesis is unacceptable, meaning that at the confidence level α, the time delay series data exhibits a clear upward or downward trend. For the statistical variable Z, when it is greater than 0, the trend of the time delay between process variables is increasing. When it is less than 0, the trend of the time delay between process variables is decreasing. If it is equal to 0, the trend of the time delay between process variables is considered unchanged.
[0100] Step 4: By analyzing the changing trend of time delay, the causal relationship of the increasing hysteresis trend inherent in the loop is transformed into a temporal causal relationship, thus eliminating the loop in the causal network.
[0101] In this embodiment, the basis for converting the loop into the time relationship used for abnormality root cause diagnosis is:
[0102] If the time delay is small, the effect of the cause variable on the outcome variable is immediate; conversely, if the time delay is large, the outcome variable takes longer to manifest. Therefore, causal loops can be decomposed by determining the dynamic changes in the time delay of the process variable. This embodiment of the present invention proposes a logical rule for verifying temporal causal relationships, which verifies the direction of causality by analyzing the trend of time delays. The specific rules are as follows:
[0103] If the trend of the time delay between process variables is unchanged or decreasing, that is, the impact of the cause variable on the result variable will not change over time, which means that the time it takes for the impact to appear will not increase. At this time, the causal relationship can be considered to remain unchanged.
[0104] If the changing trend of the time delay between process variables is increasing, that is, the influence of the cause variable on the result variable will weaken over time, indicating that the time for the influence to appear is getting longer and longer, then the causal relationship needs to be converted into a time relationship.
[0105] It is important to note that when there are multiple upward trends within a loop, the process variable with the most obvious upward trend should be selected for decomposition. This selection is crucial to ensure the most complete network structure.
[0106] In this embodiment, the functional module three: abnormality root cause diagnosis module, the specific implementation steps are as follows:
[0107] Offline Modeling:
[0108] Step 1: Use process variable data generated under normal conditions in the process industry production process (i.e., normal data) to establish a hidden Markov model; specifically, the following steps are included:
[0109] Assume a set Q containing all potential hidden states:
[0110] Q=(q1,q2,…,q N ) (1.13)
[0111] In this embodiment, the normal and abnormal (referring to: fault) states are hidden states that cannot be observed;
[0112] V is the set of all possible observable states:
[0113] V=(v1,v2,…,v M ) (1.14)
[0114] Here, the temperature, pressure, and so on displayed by each process variable are the possible observable states; N is the number of possible hidden states, and M is the number of possible observed states. It is worth noting that N and M are not necessarily equal.
[0115] For a time series of length T, where I corresponds to the hidden state sequence and O corresponds to the observed state:
[0116] I=(i1,i2,…i t …,i T ) (1.15)
[0117] O=(o1,o2,…o t …,o T ) (1.16)
[0118] Among them, any hidden state is i t ∈Q, any observed state is o t ∈V.
[0119] The hidden Markov model is defined by the initial probability distribution of the hidden state π, the state transition probability matrix A, and the observed state probability matrix B; where π and A determine the progression of the hidden state, and B specifies the order of observation; the state transition probability matrix A is:
[0120] A=(a ij ) (1.17)
[0121] Among them, a ij =P(i t+1 =q j |i t =q i ), i=1,2,…,N, j=1,2,…,N, a ij Indicates that it is in the hidden state q at time t i Under the condition of , it switches to the hidden state q at time t+1 jThe probability of the observed state is:
[0122] B=(b j (k))(1.18)
[0123] Among them, b j (k)=P(o t =v k |i t =q i ), k=1,2,…,M, j=1,2,…,N, b j (k) represents the hidden state q at time t i Generate observation state v k The probability of the hidden state is:
[0124] Π=(π(i)) (1.19)
[0125] Where π(i)=P(i1=q i ), i=1,2,…,N. π(i) represents the hidden state q at time t+1 i probability.
[0126] Therefore, the hidden Markov model λ can be represented by a triple model:
[0127] λ=(A,B,Π)(1.20)
[0128] Step 2: Based on the established hidden Markov model, the log-likelihood value under normal conditions is calculated using normal data with variable time delays. This specifically includes the following steps:
[0129] After establishing the hidden Markov model, the log-likelihood value is calculated based on the observation sequence (referring to: all process variables), assuming that the probability density function P(X) of the Gaussian distribution of the process variable X is:
[0130]
[0131] where τ is the time delay, e is a constant, μ(τ) and σ(τ) represent the mean and variance of the observed data after considering the variable time delay, respectively.
[0132] When the observed variables (i.e., all process variables) follow a mixed Gaussian model and the observation sequence is considered to be a mixture of multiple Gaussian distributions, the joint probability density function is equal to the product of the individual probability densities:
[0133]
[0134] Among them, μ m (τ), σ m(τ) represents the mean and variance of the mth variable respectively;
[0135] P(X) can be simplified to:
[0136]
[0137] Where Σ is the summation and T is the matrix transpose;
[0138] According to the joint probability density function, the likelihood function can be obtained as:
[0139]
[0140] Among them, L(μ(τ),σ(τ)) is the likelihood function, n is the number of samples, σ is the variance; ζ i is the i-th observation value;
[0141] Since the likelihood value is too small, multiplication is not suitable, and the logarithm is usually taken. The log likelihood value is calculated as follows:
[0142]
[0143] Wherein, ln[L(μ(τ),σ(τ))] represents the log-likelihood value.
[0144] Step 3: Determine the prior probability and conditional probability based on the normal data and the calculated log-likelihood value under the normal state; specifically, the following steps are included:
[0145] First, the training data (i.e., normal data) is divided into two regions, namely "safe" and "abnormal". The lower and upper limits of the safe zone are calculated as follows:
[0146] a iL =μ i (τ)+(min i -μ i (τ)) / r (1.26)
[0147] a iH =μ i (τ)+(max i -μ i (τ)) / r (1.27)
[0148] Among them, a iL and a iH are the lower and upper limits of the i-th process variable, μ i (τ) represents the mean value of the i-th process variable after considering the time delay τ. min i and max iare the minimum and maximum values of the ith process variable, respectively. The value of r is chosen so that the data has an appropriate distribution in the safe and dangerous areas.
[0149] Since the process variable is not a probability value, it can be normalized according to the following mathematical procedure and generate the conditional probability, defined as:
[0150]
[0151] Among them, α i is the conditional probability, which represents the probability of the normal state and fault state of the i-th process variable. Here, it is equivalent to converting numbers into probabilities; b is a constant, ε is the set accuracy, ρ is the number of possible states (in the embodiment of the present invention, there are only two possibilities: normal and fault), λ i =ln[L(μ(τ),σ(τ))] is the log-likelihood value, λ n =max(λ i ). Then, the conditional probability value is normalized:
[0152]
[0153] in, Ξ represents the sum of all α, N(α) represents its normalization, i,j = 1, 2, …, γ, γ is the number of log-likelihood values.
[0154] In this embodiment, Equations (1.28) and (1.29) use the log-likelihood value obtained by the hidden Markov model to calculate the probability of the initial node (i.e., the node without a parent node) in the Bayesian network model. This is not sufficient to construct the conditional probability table of all process variables. It is necessary to continue to execute step four to obtain the conditional probability of all process variables, thereby constructing the conditional probability table of all process variables.
[0155] Step 4: Based on the determined prior probability and conditional probability, establish an improved BN model; specifically, the following steps are included:
[0156] BN describes the logical relationships between variables using conditional probabilities. Its description typically includes three terms: prior probability, conditional probability, and posterior probability. "Prior" represents the initial information inherent in the variables. "Conditional" represents the mutual information shared between the variables. "Posterior" reflects the degree of confidence in the variables, determined by the evidence. Prior information can be updated based on collected information (also called evidence). Bayes' theorem is stated as follows:
[0157]
[0158] Here, θ represents the parameter or hypothesis that we want to infer, which is usually called an "unknown parameter" or "parameter to be estimated."
[0159] X represents observational data or evidence, which is the information we collect in real-world applications. This data can be used to update beliefs about θ. P(θ) is the prior probability, and P(X) is the probability of the observation or evidence. P(X|θ) is the conditional probability of X given θ, also known as the likelihood. P(θ|X) is the conditional probability of θ given X, also known as the posterior probability, because it includes the degree of belief that depends on the observation. The prior probability is the probability of normality and failure calculated from normal data, the evidence probability is the probability of normality and failure obtained using the Hidden Markov Model, and the conditional probability is the probability of the evidence / parameter occurring given the parameter / evidence.
[0160] For a fixed value of X, this can be written as:
[0161] P(θ|X)=P(X|θ)×P(θ) (1.31)
[0162] The normalization constant P(X) depends on the existing evidence for a particular piece of evidence for X, and is also known as the Bayesian update equation. In general, at a given node (referring to the process variable) X = (X1, X2, ... X m )In a directed acyclic graph, the joint probability function of BN is:
[0163]
[0164] Among them, X i-1 It's X i The parent node of P(X i |X i-1 ) means in X i-1 In the event of X i Probability of occurrence.
[0165] Step 5: Based on the improved BN model, construct the conditional probability table under normal conditions;
[0166] In this embodiment, by updating the probability formulas of Equations (1.30), (1.31) and (1.32), the fault state probabilities of all process variables can be obtained, thereby constructing a conditional probability table under normal conditions.
[0167] Online diagnosis:
[0168] Step 6: Update the hidden Markov model using process variable data generated during abnormal conditions in the process industry production process;
[0169] Step 7: Calculate the log-likelihood value under abnormal conditions;
[0170] Step 8: Use the log-likelihood value under abnormal conditions as evidence to update the improved BN model;
[0171] Step 9: Calculate the conditional probability table under abnormal conditions;
[0172] Step 10: Compare the conditional probability tables under normal and abnormal conditions to locate abnormal process variables and infer the root cause and propagation path.
[0173] In this embodiment, steps six to nine are online steps of steps one to five, with abnormal data as input. Step ten is to discover abnormal variables through changes in the conditional probability table and infer the root cause and propagation path of the abnormality.
[0174] The method for diagnosing the root causes of anomalies in process industries based on the resolution of causal loops provided by an embodiment of the present invention utilizes only process variable data collected in the process industry. Without relying on precise mathematical models and sufficient expert knowledge, it deeply mines time series information and explores the dynamic changes of time delays, effectively decomposing the loops in the causal network. At the same time, by relaxing the restrictions on the fixed time delay assumption, the Bayesian network model is improved to achieve anomaly root cause diagnosis and propagation path identification.
[0175] In summary, the process industry abnormality root cause diagnosis method based on causal loop elimination provided by the embodiment of the present invention has at least the following beneficial effects:
[0176] 1) To address the dynamic changes in time delays in complex process industries, a method combining dynamic time warping and sliding window technology is used to achieve real-time calculation of variable time delays and construct a variable time delay matrix to reveal the dynamic changes in time information.
[0177] 2) To address the cyclical causal loops caused by variable coupling, cyclical flows, and the integration of materials and thermal processes, a strategy for decomposing cyclical loops in causal networks was designed by deeply mining the temporal information between process variables and combining it with the Mann-Kendall trend test. By analyzing the changing trends of variable time delays, the inherent causal loops were decomposed into temporal causal relationships, thereby eliminating the cyclical loops in the causal network.
[0178] 3) Based on the constructed variable time delay matrix, the traditional Bayesian network model is improved, and the limitation of the Bayesian network model on the fixed time delay assumption is lifted, so that it can handle the variable time delay between abnormal variables and improve the accuracy of abnormal root cause diagnosis in dynamic process industries.
[0179] Figure 2 FIG. 1 is a schematic diagram of a device for diagnosing the root cause of abnormalities in a process industry according to an embodiment of the present invention. Figure 2 Optionally, the process industry abnormality root cause diagnosis device 210 may include a first processor 2001 .
[0180] Optionally, the process industry abnormality root cause diagnosis device 210 may further include a memory 2002 and a transceiver 2003 .
[0181] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0182] The following combination Figure 2 The components of the process industry abnormality root cause diagnosis device 210 are described in detail:
[0183] The first processor 2001 is the control center of the process industry abnormality root cause diagnosis device 210 and can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs) or one or more field programmable gate arrays (FPGAs).
[0184] Optionally, the first processor 2001 may execute various functions of the process industry abnormality root cause diagnosis device 210 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002 .
[0185] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 are shown in FIG.
[0186] In a specific implementation, as an embodiment, the process industry abnormality root cause diagnosis device 210 may also include multiple processors, such as Figure 2 1 and 2. The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0187] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled by the first processor 2001 for execution. The specific implementation method can refer to the above method embodiment and will not be repeated here.
[0188] Alternatively, the memory 2002 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001 or exist independently and accessed through the interface circuit ( Figure 2 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0189] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0190] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 2 (not shown separately in the figure). The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0191] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently and be connected to the process industry abnormality root cause diagnosis device 210 through the interface circuit ( Figure 2 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0192] It should be noted that Figure 2 The structure of the process industry abnormality root cause diagnosis device 210 shown in the figure does not constitute a limitation on the router. The actual knowledge structure identification device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0193] In addition, the technical effects of the process industry abnormality root cause diagnosis device 210 can refer to the technical effects of the process industry abnormality root cause diagnosis method based on causal loop removal described in the above method embodiment, and will not be repeated here.
[0194] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0195] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0196] The above embodiments can be implemented in whole or in part through software, hardware (such as circuits), firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired method (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0197] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.
[0198] In this disclosure, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0199] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0200] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0201] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.
[0202] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0203] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0204] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for diagnosing the root cause of abnormalities in process industries based on the elimination of causal loops, characterized in that: The method comprises: Offline Modeling: Step S1, for process variable data generated under normal conditions in a process industry production process, a method combining dynamic time warping and sliding window technology is used to calculate variable time delays in real time, and a variable time delay matrix under normal conditions is constructed; Step S2, performing trend analysis on the variable time delay under normal conditions, decomposing the loops in the causal network into temporal causal relationships, and eliminating the loops in the causal network; Step S3, establishing a Bayesian network based on variable time delay to determine a conditional probability table under normal conditions; Online Diagnosis: Step S4, for process variable data generated under abnormal conditions in the process industry production process, a method combining dynamic time warping and sliding window technology is used to calculate the variable time delay in real time, and a variable time delay matrix under abnormal conditions is constructed; Step S5: Based on the constructed variable time delay matrix under abnormal conditions, the log-likelihood value is calculated to update the Bayesian network, determine the conditional probability table under abnormal conditions, and compare the conditional probability tables under normal and abnormal conditions to locate the abnormal process variables and infer the root cause and propagation path; Wherein, the step S1 includes: Step S11, obtaining process variable data generated in a normal state during the process industry production process; Step S12, standardizing the acquired process variable data generated under the normal state; Step S13, determining the time delay between process variables using the DTW method; wherein DTW stands for Dynamic Time Warping; Step S14, updating DTW in real time by combining the sliding window technology to calculate the optimal time delay; Step S15, saving the optimal time delay corresponding to each window and constructing a variable time delay matrix under normal conditions; Wherein, the step S2 includes: Step S21, developing a causal network for the process industry and constructing an initial BN model; where BN stands for Bayesian network; Step S22, determining the loops existing in the causal network; Step S23, performing variable time delay trend analysis on the paired process variables involved in the loop; Step S24, by analyzing the changing trend of time delay, the causal relationship of the increasing hysteresis trend inherent in the loop is converted into a time causal relationship, thereby eliminating the loop in the causal network; Wherein, the step S3 includes: Step S31, using normal data in the process industry production process to establish a hidden Markov model; wherein the normal data is: process variable data generated in the process industry production process under normal conditions; Step S32, based on the established hidden Markov model, using normal data considering variable time delay, calculate the log-likelihood value under normal conditions; Step S33, determining the prior probability and conditional probability under normal state based on the normal data and the calculated log-likelihood value under normal state; Step S34: establishing an improved BN model based on the determined prior probability and conditional probability under the normal state; Step S35: construct a conditional probability table under normal conditions according to the improved BN model.
2. The process industry abnormality root cause diagnosis method based on causal loop elimination according to claim 1 is characterized in that: The step S13 includes: Step S131: construct the DTW distance between process variables; wherein the DTW distance is expressed as: Where D represents the DTW distance between two process variables, d i,j Represents the data x collected at the i-th sampling moment corresponding to the first process variable i The data y collected at the jth sampling time corresponding to the second process variable j The Euclidean distance between them; n is the sampling time, which also represents the number of samples; In step S132 , the optimal path is determined by using the matrix D so as to minimize the accumulated DTW distance. At this time, the difference between the two process variables is the time delay.
3. The process industry abnormality root cause diagnosis method based on causal loop elimination according to claim 1 is characterized in that: The step S14 includes: Assume that the initial window of the i-th paired process variable is W i,h , then the initial window W i,h Expressed as: IN i,h =[in i,t ,In i,t+1 ,…In i,t+l-1 ] Among them, h is the number of windows; l is the window length, which determines the update speed, and w i,t Represents the data corresponding to the i-th paired process variable at time t; Window W i,h Contains all process variable data from time t to time t+l-1, and the transition window is obtained by deleting k process variable data: IN' i,h =[in i,t+k ,In i,t+k+1 ,…In i,t+l-1 ] By adding k new process variable data, a new window is obtained: IN i,h+1 =[in i,t+k ,In i,t+k+1 ,…In i,t+k+l-1 ] Through the sliding window technology, the DTW distances corresponding to different windows are obtained. As the window moves forward, the DTW distances of all windows are recorded, realizing real-time update of the DTW distance to achieve the calculation of variable time delay.
4. The process industry abnormality root cause diagnosis method based on causal loop elimination according to claim 3 is characterized in that: The variable time delay matrix under normal conditions is expressed as: T'=[t1,t2,…,t k ,…,t p ] Where T' represents the variable time delay matrix; t p Indicates the variable time delay corresponding to the p-th window, specifically: t p is a matrix containing all the time delays between each two process variables in the pth window; t k The subscript k∈(1,p), p is the number of windows; ' represents the DTW distance between the m-th variable and the m'-th variable in the W-th window, and f(·) represents the time delay corresponding to the shortest DTW distance.
5. The process industry abnormality root cause diagnosis method based on causal loop elimination according to claim 1 is characterized in that: The step S22 includes: Step S221, converting the causal network into a causal adjacency matrix, wherein the horizontal quantity in the causal adjacency matrix represents the cause variable, the vertical quantity represents the result variable, 0 represents the absence of a causal relationship, and 1 represents the presence of a causal relationship; Step S222, using a depth-first search algorithm to identify all paths and determine loops in the causal network, includes: Step S2221, initialization: Create a visit mark array to mark whether each node has been visited. The number of nodes is consistent with the dimension of the causal adjacency matrix, that is, each node corresponds to the horizontal and vertical coordinates of the causal adjacency matrix. Create a recursive stack array to mark whether each node is on the current recursive path; Create an empty list to store all found loops; Step S2222, depth-first search: Starting from the current node, mark it as visited and push the node into the recursive stack; Traverse all adjacent nodes of the current node. If the adjacent node has not been visited, recursively call the depth-first search. If the adjacent node is in the recursive stack, it means a loop is found and it is added to the loop list. Step S2223, backtracking: When returning from recursion, pop the current node from the recursive stack; Step S223: determine all loops in the causal network.
6. The process industry abnormality root cause diagnosis method based on causal loop elimination according to claim 1 is characterized in that: The step S23 includes: Assume that the time delay sequence (τ1,τ2,…,τ p ) consists of p independent and identically distributed random variables, where τ p represents the time delay between each two process variables obtained in the pth window; the Mann-Kendall trend test method is used for testing. The alternative hypothesis H1 is a two-sided test. Assume that for all i, where j≤p and i≠j, the test statistic S is calculated as follows: where the value of p is determined by the number of windows; x i and x j are the observed values of the i-th and j-th time-delay sequences (τ1, τ2, …, τ p ), respectively, and i < j, and Sgn(·) is the sign function: Where S is a normal distribution with a mean of 0 and a variance of Var(S) = n(n-1)(2n+5) / 18. The formula for calculating the standardized test statistic Z is: For the statistic Z, when it is greater than 0, the changing trend of the time delay between process variables is an upward trend. When it is less than 0, the changing trend of the time delay between process variables is a downward trend. If it is equal to 0, the changing trend of the time delay between process variables is judged to be unchanged.
7. The process industry abnormality root cause diagnosis method based on causal loop elimination according to claim 1 is characterized in that: The step S24 includes: If the trend of the time delay between process variables is constant or decreasing, that is, the effect of the cause variable on the result variable does not change over time, which means that the time it takes for the effect to appear does not become longer, then the causal relationship is considered to remain unchanged; If the trend of the time delay between process variables is increasing, that is, the influence of the cause variable on the result variable will weaken over time, indicating that the time for the influence to appear is getting longer and longer, then the causal relationship needs to be converted into a time relationship; Among them, when there are multiple upward trends in the loop, the process variable with the most obvious upward trend is selected for decomposition.
Citation Information
Patent Citations
Fault diagnosis method, device and equipment and computer readable storage medium
CN114139589A
Unmanned factory anomaly detection method and device based on graph isomorphic network
CN117113266A