An ammonia process running state anomaly detection method based on an online near neighbor embedding index
Through the online nearest neighbor embedding indicator method, the nearest neighbor relationship of the ammonia synthesis process is analyzed in real time, which solves the problem of abnormal detection of the operating status of the ammonia synthesis process, realizes real-time abnormal detection of the ammonia synthesis process, and improves the accuracy and adaptability of detection.
Patent Information
- Application Number
- CN202210651303.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-04-30
AI Technical Summary
Existing technologies make it difficult to monitor abnormal operating conditions of the ammonia synthesis process in real time through data-driven methods, especially problems caused by reduced ammonia content or increased energy consumption due to flow or temperature changes, and lack effective anomaly detection methods.
An online neighbor embedding indicator method is adopted to analyze the neighbor relationship distribution characteristics of the ammonia synthesis process, calculate the online neighbor detection indicator in real time, and build a neighbor feature extraction mechanism to detect abnormal operating status of the ammonia synthesis process.
Real-time anomaly detection of the synthetic ammonia process is achieved, which improves the accuracy and adaptability of anomaly detection, enables timely detection of anomalies during operation, and ensures process stability.
Smart Images

Figure CN114841621B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to an industrial process anomaly detection method, in particular to an ammonia synthesis process running state anomaly detection method based on an online near neighbor embedding index. BACKGROUND
[0002] Ammonia is one of the important inorganic chemical products and occupies an important position in the national economy. In addition to liquid ammonia which can be directly used as agricultural fertilizer, nitrogen fertilizers used in agriculture, such as urea, ammonium nitrate, ammonium carbonate, ammonium chloride and various nitrogen-containing compound fertilizers, are all made of ammonia as raw material. The synthetic ammonia industry is the basis of China's chemical fertilizer industry and an important part of traditional coal chemical industry. The synthetic ammonia production process compresses raw materials such as coke, coal, coke oven gas, natural gas, naphtha, heavy oil and raw gas (semi-water coal gas) after purification and refining (main components are hydrogen and nitrogen) to a certain pressure, enters the ammonia synthesis tower, and generates ammonia and other by-products under the action of high temperature and catalyst. The main chemical reaction of ammonia synthesis is completed through the ammonia synthesis tower, and in addition, the entire process also includes the purification process before the ammonia synthesis tower and the separation process after the ammonia synthesis.
[0003] Due to the low conversion rate of ammonia synthesis, the energy consumption per unit product is large, and real-time guarantee of the stability of the synthetic ammonia process is an important technical means to ensure the ammonia content in the product. At present, many measuring instruments and instruments and distributed control systems (Distributed Control System, abbreviated as DCS) are installed in the domestic synthetic ammonia process, which can measure multiple variables such as temperature, pressure, flow rate and the like in real time, including the purification link, the ammonia synthesis tower link and the separation link and the like. However, there are many factors affecting the yield of ammonia product and the relationship is complex, and it is impossible to realize real-time monitoring of the running state of the synthetic ammonia process by establishing a mechanism model. The two aspects of reality cause good technical demand background and data basis for the implementation of data-driven synthetic ammonia process running state monitoring.
[0004] In recent years, through the data-driven way to monitor whether the chemical process running state is abnormal has been widely studied and concerned. However, the synthetic ammonia process is different from other chemical process objects, and the so-called running state anomaly is not a traditional sense of equipment anomaly such as pipeline leakage, but because of the change of flow or temperature, etc. leading to the problem of reducing ammonia content or increasing energy consumption. In addition, most of the time of the synthetic ammonia production process is running in the expected state, and there is almost no available abnormal state data for designers to refer to. Therefore, the pros and cons of the data-driven anomaly detection method mainly stay in the expert experience or trial stage. In order to monitor the continuous and stable running of the synthetic ammonia process in real time and discover the anomaly in the running in time, it is necessary to realize it through more effective data-driven technical means. SUMMARY
[0005] The main technical problem to be solved by the present application is how to analyze the distribution characteristics of the neighbor relationship of the sampling data of the synthetic ammonia process, and calculate the online neighbor detection index through different neighbor feature extraction mechanisms in real time, so as to solve the problem of abnormal detection of the running state of the synthetic ammonia process. Specifically, the method of the present application designs an online neighbor embedding detection index, analyzes the neighbor relationship characteristics of the latest sampling data searched in the normal working condition sampling data set in real time, constructs a real-time neighbor feature extraction mechanism, and detects whether the running state of the synthetic ammonia process is abnormal in real time through the corresponding online neighbor embedding index.
[0006] The technical scheme adopted by the method of the present application to solve the above problems is as follows: a synthetic ammonia process running state abnormality detection method based on an online neighbor embedding index, comprising the following steps:
[0007] Step (1): from the DCS database matched with the synthetic ammonia process, obtain N groups of sampling data x1, x2, …, x N under normal running state, and form a normal data matrix X = [x1, x2, …, x N ]; wherein x i ∈R 39×1 represents the i-th group of sampling data, the subscript i ∈ {1, 2, …, N}, each group of sampling data is composed of 21 temperature measurement data, 6 pressure measurement data and 12 flow measurement data, and R 39×1 represents a 39 × 1-dimensional real vector.
[0008] Step (2): according to , the row vectors of each row in X are subjected to standardization processing respectively, so as to obtain a reference data matrix , wherein zk∈R 1×N represents the row vector of the k-th row in the normal data matrix X, represents the row vector of the k-th row in , μ k and δ k respectively represent the average value and the standard deviation of all elements in the row vector z k , k ∈ {1, 2, …, 39}, and R 39×N represents a 39 × N-dimensional real matrix.
[0009] Step (3): the column vectors in the reference data matrix are subjected to neighbor relationship feature analysis, and a neighbor relationship matrix Y ∈ R 39×N is obtained, and the specific implementation process is shown in steps (3.1) to (3.4).
[0010] Step (3.1): according to the formula Calculate the square distance matrix D∈R N×N The element D(i, j) in row i and column j of and Represents the reference data matrix The column vectors of the i-th and j-th columns in , the superscript T represents the transpose of the matrix or vector, the subscript i∈{1, 2, …, N}, and the subscript j∈{1, 2, …, N}.
[0011] Step (3.2): When the index i is equal to 1, 2, ..., N, repeat steps (3.3) to (3.4) to obtain N nearest neighbor relationship vectors Then build the neighbor relationship matrix
[0012] Step (3.3): According to the i-th row vector D in the square distance matrix D i ∈R 1×N , determine D i The column where the smallest C elements except the i-th element are located, and the column label is recorded as The corresponding neighbor set φ i .
[0013] Step (3.4): According to the neighbor set φ i The C column labels in , calculate the reference data matrix The mean vector of the column vectors in the same column in y i Then, according to the formula Calculate the nearest neighbor relationship vector
[0014] Step (4): Sequentially As online data vectors x t , calculate the online neighbor embedding index according to steps (4.1) to (4.5) as shown below Then The maximum value in is recorded as
[0015] Step (4.1): After initializing i=1, set the online data vector and online neighbor relationship vector
[0016] Step (4.2): According to x t The C column labels in the corresponding neighbor set are used to form the reference neighbor matrix Y by assembling the column vectors of the same column in the neighbor relationship matrix Y. t ∈R 39×C .
[0017] Since we set Therefore xt The corresponding neighbor set is equivalent to The corresponding neighbor set.
[0018] Step (4.3): solving the generalized eigenvalue problem The eigenvector w corresponding to the largest eigenvalue λ in t Then, the formula Normalization is performed on it.
[0019] Step (4.4): according to the formula The online neighbor embedding indicator is calculated
[0020] Step (4.5): setting Then, it is determined whether i is less than N; if yes, i is set to i+1, and then and Then, step (4.2) is returned; if no, N online neighbor embedding indicators
[0021] It should be noted that the implementation process of solving the eigenvector by the above step (4.3) is actually an online neighbor relationship feature analysis algorithm designed by the method of the application, and the goal is to make the online data vector x t The local neighbor relationship difference between x t and its C neighbors in the reference data matrix is maximized, that is:
[0022]
[0023] In the above formula, c∈{1,2,…,C}, d∈{1,2,…,C}, z c represents the column vector in t that has a neighbor relationship with x c , and represents the column vector in that has a neighbor relationship with z Without loss of generality, the above formula ① can be equivalently transformed into the following optimization problem with constraints:
[0024]
[0025] The above formula ② can be solved by the classical Lagrange multiplier method, which needs to first construct the Lagrange function Then, the partial derivative of J with respect to w t is calculated, that is:
[0026]
[0027] When the above formula ③ equals 0, the objective function in the above formula ② takes an extreme value, and thus the following can be obtained: i.e. the generalized eigenvalue problem in the above step (4.3).
[0028] Since y t is a 39x1 dimensional real number vector, the rank thereof equals 1, and thus the generalized eigenvalue problem in the step (4.3) has only one non-zero real number eigenvalue λ, which is the largest eigenvalue. In addition, since L t = Y t Y t T Generally, the singular values of the matrix L t are singular, the matrix L t is symmetric but non-invertible, and has at most min{C, 39} non-zero singular values. Therefore, when solving the generalized eigenvalue, the following steps (A) to (C) are implemented.
[0029] Step (A): singular value decomposition is implemented on the matrix L t , and after retaining ξ = min{C, 39} non-zero singular values, the corresponding unitary matrix U ∈ R 39×ξ and the singular value diagonal matrix V ∈ R ξ×ξ are obtained; wherein min{C, 39} represents the minimum value of the two integers C and 39.
[0030] Step (B): the matrix G t is calculated according to the formula , and then the eigenvector g corresponding to the largest eigenvalue of G t is solved.
[0031] Step (C): the eigenvector w t is calculated through w -0.5 = UV t g.
[0032] Step (5): after obtaining the sampling data at the latest sampling time by using the DCS matched with the synthetic ammonia process , the average value μ k and the standard deviation δ k are used to implement standardization processing on each row element in the matrix X through the formula , and thus the online data vector x t is obtained; wherein x (k) and x t (k) represent the kth row element in the matrix X and the matrix x t , respectively.
[0033] Step (6): from the reference data matrix X , the matrix x tC column vectors exist in the neighborhood relationship, so as to calculate the online neighborhood relationship vector y t The specific implementation process is shown in steps (6.1) to (6.3).
[0034] Step (6.1): According to the formula The square distance vector D t ∈R 1×N is calculated t ; wherein D t (i) represents the ith element in D t .
[0035] Step (6.2): Determine the column where the smallest C elements in D t are located, and record the column label as x t .
[0036] Step (6.3): According to the C column labels in the neighborhood set φ t , the average value vector of the column vectors in the same column in D is calculated , and then the online neighborhood relationship vector y t is calculated through .
[0037] Step (7): According to the implementation process of steps (4.2) to (4.4), the online neighborhood embedding index is calculated , and then it is judged whether is greater than If not, the synthetic ammonia process is running normally, and the step (5) is returned to continue to implement anomaly detection using the sampling data at the latest sampling time; if yes, step (8) is executed to decide whether to trigger an abnormal alarm.
[0038] Step (8): Return to step (5) to continue to implement state monitoring using the sampling data at the latest sampling time, and if the online neighborhood embedding indexes at the continuous A sampling times are all greater than , an abnormal alarm is triggered; otherwise, the synthetic ammonia process is running normally.
[0039] Through the above described implementation steps, the advantages of the method of the present application are introduced as follows.
[0040] Firstly, the method of the present application involves a brand-new online near-neighbor relationship feature analysis method technology, which calculates the online sampling data near-neighbor embedding anomaly detection index by updating the acquired feature vector in real time, thereby ensuring the adaptive characteristics of the near-neighbor relationship feature extraction, rather than using a fixed feature extraction mechanism to analyze and extract the hidden feature components in the online data as in the traditional method; secondly, the method of the present application uses a local anomaly detection index considering the near-neighbor relationship, and compared with the traditional method directly using the square Mahalanobis distance and the square Euclidean distance, the anomaly detection index used in the method of the present application can fully consider the local distribution variation characteristics of the sampling data of the synthetic ammonia process. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 The figure is the implementation flowchart of the method of the present application.
[0042] Figure 2 The figure is the discrimination figure of the anomaly of the online near-neighbor embedding index. DETAILED DESCRIPTION
[0043] The present application will be described in detail below in combination with the drawings and specific embodiments.
[0044] The present application discloses a synthetic ammonia process running state anomaly detection method based on an online near-neighbor embedding index, which will be described below in combination with the implementation flowchart as shown in the figure and the sampling data of a domestic synthetic ammonia process. Figure 1
[0045] Step (1): from the DCS database matched with the synthetic ammonia process, 3000 groups of sampling data x1, x2, …, x 3000 under the normal running state are acquired, and they are composed into a normal data matrix X = [x1, x2, …, x 3000 ]; wherein each group of sampling data is specifically composed of 21 temperature measurement data, 6 pressure measurement data and 12 flow measurement data, and the arrangement order of each type of data in each group of sampling data is consistent.
[0046] Step (2): according to , the row vectors of each row in X are respectively subjected to standardization processing, thereby obtaining a reference data matrix
[0047] Step (3): the column vectors in the reference data matrix are subjected to near-neighbor relationship feature analysis, thereby obtaining a near-neighbor relationship matrix Y ∈ R 39×N , and the specific implementation process is shown in steps (3.1) to (3.4);
[0048] Step (4): in sequence, the column vectors respectively as online data vector x t According to the following steps (4.1) to (4.5), the online nearest neighbor embedding index is calculated The maximum value in is recorded as
[0049] Step (5): Obtain the sampling data at the latest sampling time by using the DCS of the synthetic ammonia process Then, the average value μ k and the standard deviation δ k are calculated by the formula Each row element in is normalized to obtain the online data vector x t .
[0050] Step (6): Find the C column vectors in the reference data matrix that have a nearest neighbor relationship with x t , and thus calculate the online nearest neighbor relationship vector y t . The specific implementation process is shown in steps (6.1) to (6.3).
[0051] Step (7): According to the implementation process of steps (4.2) to (4.4), the online nearest neighbor embedding index is calculated Then, it is determined whether is greater than If not, the synthetic ammonia process is running normally, and the process returns to step (5) to continue using the sampling data at the latest sampling time to implement anomaly detection; if yes, step (8) is executed to decide whether to trigger an abnormal alarm.
[0052] Step (8): The process returns to step (5) to continue using the sampling data at the latest sampling time to implement state monitoring. If the online nearest neighbor embedding index at the continuous A sampling times is greater than , an abnormal alarm is triggered; otherwise, the synthetic ammonia process is running normally.
[0053] According to the online nearest neighbor embedding index at each new sampling time, a graph is drawn in chronological order, and is also plotted in Figure 2 as the upper control limit. From the changes in in Figure 2 , if the curve of is above , it indicates an abnormality; otherwise, it indicates that the synthetic ammonia process is running normally.
Claims
1. A method for detecting abnormal operation status of ammonia synthesis process based on online nearest neighbor embedding index, characterized in that: The specific steps include the following: Step (1): Obtain N sets of sampling data x1, x2, ..., x1 under normal operation from the DCS database of the synthetic ammonia process. N , and form them into a normal data matrix X=[x1,x2,…,x N ]; where x i ∈R 39×1 Represents the i-th group of sampling data, with the subscript i∈{1, 2, …, N}. Each group of sampling data consists of 21 temperature measurement data, 6 pressure measurement data, and 12 flow measurement data. R 39×1 represents a 39×1 dimensional real vector; Step (2): According to Standardize the row vectors of each row in X to obtain the reference data matrix Among them, z k ∈R 1×N represents the row vector of the kth row in the normal data matrix X, express The row vector of the kth row in , μ k and δ k Represents the row vector z k The mean and standard deviation of all elements in R, k∈{1, 2, …, 39} 39×N Represents a 39×N-dimensional real matrix; Step (3): For the reference data matrix Column vector in Implement neighbor relationship feature analysis to obtain the neighbor relationship matrix Y∈R 39×N , the specific implementation process is shown in steps (3.1) to (3.4); Step (3.1): According to the formula Calculate the square distance matrix D∈R N×N The element D(i, j) in row i and column j of and Represents the reference data matrix The column vectors of the i-th and j-th columns in the matrix, the superscript T represents the transpose of the matrix or vector, the subscript i∈{1, 2, ..., N}, and the subscript j∈{1, 2, ..., N}; Step (3.2): When the index i is equal to 1, 2, ..., N, repeat steps (3.3) to (3.4) to obtain N nearest neighbor relationship vectors Then build the neighbor relationship matrix Step (3.3): According to the i-th row vector D in the square distance matrix D i ∈R 1×N , determine D i The column where the smallest C elements except the i-th element are located, and the column label is recorded as The corresponding neighbor set φ i ; Step (3.4): According to the neighbor set φ i The C column labels in , calculate the reference data matrix The mean vector of the column vectors in the same column in y i Then, according to the formula Calculate the nearest neighbor relationship vector Step (4): Sequentially As online data vectors x t , calculate the online neighbor embedding index according to steps (4.1) to (4.5) as shown below Then The maximum value in is recorded as Step (4.1): After initializing i=1, set the online data vector and online neighbor relationship vector Step (4.2): According to x t The C column labels in the corresponding neighbor set are used to form the reference neighbor matrix Y by combining the column vectors of the same column in the neighbor relationship matrix Y t ∈R 39×C ; Step (4.3): Solve the generalized eigenvalue problem The eigenvector w corresponding to the largest eigenvalue λ in t Then, use the formula Perform normalization on it; Step (4.4): According to the formula Calculate the online neighbor embedding index Step (4.5): Setup Then, determine whether i is less than N; if so, set i=i+1 and then set and Then return to step (4.2); if not, then get N online neighbor embedding indicators Step (5): Use the DCS of the synthetic ammonia process to obtain the sampling data of the latest sampling time Then, using the average value μ k and standard deviation δ k By formula right The elements of each row in the table are standardized to obtain the online data vector x t ;in, and x t (k) respectively represent and x t The element in row k of ; Step (6): From the reference data matrix Find the value that matches x t There are C column vectors with nearest neighbor relationships, so as to calculate the online nearest neighbor relationship vector y t , the specific implementation process is shown in steps (6.1) to (6.3); Step (6.1): According to the formula Calculate the square distance vector D t ∈R 1×N Among them, D t (i) indicates D t The i-th element in ; Step (6.2): Determine D t The column where the smallest C elements are located, and the column label is recorded as x t The corresponding neighbor set φ t ; Step (6.3): According to the neighbor set φ t The C column labels in , calculate The mean vector of the column vectors in the same column After that, pass Calculate the online neighbor relationship vector y t ; Step (7): According to the implementation process from step (4.2) to step (4.4), calculate the online neighbor embedding index Then judge Is it greater than If not, the ammonia synthesis process is running normally, and the process returns to step (5) to continue to perform abnormality detection using the sampling data at the latest sampling time; if so, step (8) is executed to determine whether to trigger an abnormality alarm; Step (8): Return to step (5) and continue to use the sampling data of the latest sampling time to implement status monitoring. If the online neighbor embedding index of A consecutive sampling times is greater than An abnormal alarm is triggered; otherwise, the ammonia synthesis process operates normally.
2. The method for detecting abnormal operation status of ammonia synthesis process based on online nearest neighbor embedding index according to claim 1, characterized in that: The specific process of solving the generalized eigenvalue problem in step (4.3) is as follows: Step (A): According to L t =Y t Y t T Calculate the matrix L t Then, L t After performing singular value decomposition and retaining ξ=min{C,39} non-zero singular values, the corresponding unitary matrix U∈R is obtained 39×ξ and the singular value diagonal matrix V∈R ξ×ξ ; Among them, min{C, 39} means taking the minimum value of the two integers C and 39; Step (B): According to the formula Calculate the matrix G t Then solve G t The eigenvector g corresponding to the maximum eigenvalue; Step (C): Through w t =UV -0.5 g calculates the eigenvector w t .
Citation Information
Patent Citations
Process monitoring visualization method based on dual-core t distribution random neighbor embedding
CN111796576A
Ethylene cracking furnace operation state monitoring method based on neighbor local abnormal factors
CN113190792A