Methanol-to-olefin production safety anomaly detection method based on LSTM (Long Short Term Memory) algorithm

The multi-layer network model constructed using the LSTM algorithm solves the problem of handling dynamic temporal characteristics and multi-parameter coupling relationships in methanol-to-olefins production, achieving high-precision, real-time anomaly detection in the methanol-to-olefins production process and improving production safety and efficiency.

CN121459966APending Publication Date: 2026-02-03中煤陕西能源化工集团有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511345309.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle dynamic time-series characteristics and multi-parameter coupling relationships in methanol-to-olefins production, resulting in insufficient timeliness and accuracy in anomaly detection and an inability to identify potential risks in a timely manner.

Method used

A safety anomaly detection method based on the LSTM algorithm is adopted. By collecting and preprocessing real-time process parameters and control command data of methanol-to-olefins, a multi-layer LSTM network model is constructed to perform reconstruction error calculation and multi-level anomaly response mechanism, so as to achieve high-precision and real-time anomaly detection of process parameters and control commands.

Benefits of technology

It enables efficient detection of process parameters and control commands in the methanol-to-olefins production process, accurately identifies complex anomalies, and improves production safety and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121459966A_ABST
    Figure CN121459966A_ABST
Patent Text Reader

Abstract

The invention discloses a methanol-to-olefin production safety anomaly detection method based on an LSTM algorithm. The method comprises the following steps: acquiring methanol-to-olefin real-time process parameters and control instruction data; preprocessing the process parameters and the control instruction data to obtain a training set and a test set; constructing a reconstruction model based on the multilayer LSTM network, and carrying out training learning on the reconstruction model by adopting the training set to obtain a joint normal model; inputting the test set into the joint normal model, and calculating and outputting a reconstruction error of the test set and the test set in real time; and establishing a multi-stage abnormal response mechanism. According to the method, by analyzing the joint change mode of the multi-dimensional time sequence data, the complex abnormal condition can be accurately identified, the high-efficiency detection of the potential safety hazard in the olefin production process is realized, and the defect that the traditional method is difficult to fuse the multi-dimensional information and accurately identify the complex abnormal condition is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of coal chemical methanol to olefins production safety, and relates to a methanol to olefins production safety anomaly detection method based on an LSTM algorithm. BACKGROUND

[0002] Methanol to olefins (MTO) process is an important core technology in modern coal chemical industry to convert methanol into ethylene, propylene and other low-carbon olefins, which is of key significance to guarantee the stable supply of low-carbon olefins and promote the upgrading of coal chemical industry. The process mainly includes two core reaction stages: the first stage is the dehydration of methanol to generate dimethyl ether (DME), and the chemical reaction equation is 2CH3OH→CH3OCH3+H2O; the second stage is the further conversion of methanol / dimethyl ether into olefins, in which the reaction to generate the target product ethylene can be represented as (CH3)2O→C2H4+H2O or 2CH3OH→C2H4+2H2O, and the reaction to generate propylene can be represented as 3(CH3)2O→2C3H6+3H2O or 3CH3OH→C3H6+3H2O. In the MTO reaction process, in addition to the above main reactions, there are also a variety of side reactions that need to be strictly inhibited, mainly including the polymerization of olefins to generate butene, pentene and other C 4+ hydrocarbons, which reduces the selectivity of target products; hydrogen transfer reactions generate ethane, propane and other alkanes, affecting product purity; and coking reactions caused by deep dehydrogenation or polymerization of olefins, which generate coke and carbon deposition on the surface of the catalyst, directly leading to a decrease in catalyst activity. In order to maintain catalyst activity, regeneration by combustion is required, so the coking rate and regeneration efficiency of the catalyst directly affect the continuity and economy of production.

[0003] The stability of the MTO reaction process depends on the precise control of key process parameters, in which the reaction temperature usually needs to be maintained in the range of 400-500℃, the operating pressure is controlled in the range of 0.1-0.3MPa, and the catalyst space velocity is 1-5h -1Meanwhile, the operation instructions such as the catalyst regeneration cycle and the spray amount of the quench tower also need to be accurately adjusted. Abnormal fluctuations of the above process parameters and operation instructions may cause the coking rate to accelerate and the catalyst activity to rapidly decline, which not only affects the yield and quality of the product, but also may induce equipment failure or even serious safety accidents, so it is crucial to perform real-time and high-precision anomaly detection on the MTO process. However, the current mainstream anomaly detection techniques have significant limitations in the MTO production scene and are difficult to meet the stringent requirements of safety monitoring, mainly manifested in that the traditional threshold detection method relies on fixed thresholds for anomaly determination and cannot adapt to the complex scene of multi-parameter coupling and dynamic changes in working conditions in the MTO process, which is prone to false positives or false negatives; the detection method based on artificial experience lacks a standardized evaluation system, and the detection results are significantly affected by subjective factors of the operator, and the stability and reliability are insufficient; the existing techniques do not fully exploit the time series characteristics of the process parameter changes and the potential correlation between parameters, which makes it difficult to guarantee the timeliness and accuracy of anomaly detection and cannot identify potential risks in time.

[0004] Therefore, it is of great significance to develop a high-precision and real-time anomaly detection technique for process parameters and operation instructions in the methanol-to-olefins process to ensure production safety and improve production efficiency. SUMMARY

[0005] The purpose of the present application is to provide a methanol-to-olefins production safety anomaly detection method based on an LSTM algorithm, which solves the problem of processing dynamic time sequence characteristics and multi-parameter coupling relationships in the core reaction of methanol-to-olefins in the prior art.

[0006] The technical solution adopted by the present application is a methanol-to-olefins production safety anomaly detection method based on an LSTM algorithm, comprising the following steps: Step 1, collecting real-time process parameters and control instruction data of methanol-to-olefins; Step 2, preprocessing the process parameter and control instruction data to obtain a training set and a test set; Step 3, constructing a reconstruction model based on a multi-layer LSTM network, training the reconstruction model using the training set, and obtaining a joint normal model; Step 4, inputting the test set into the joint normal model, calculating and outputting the reconstruction error of the training set and the test set in real time, and distinguishing between normal fluctuations and abnormal deviations of the process parameter and control instruction data based on a dynamic threshold; Step 5, establishing a multi-level anomaly response mechanism and executing corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0007] The present application also has the following characteristics: In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command.

[0008] The preprocessing is as follows: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

[0009] Mapping value of normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production. max is the maximum allowable value of the process under normal operating conditions; min is the minimum allowable value of the process under normal operating conditions.

[0010] The reconstruction model is constructed based on a multi-layer LSTM network, specifically including the following steps: Step 301: Design the input layer, input the normalized process parameters into the network in a time series to form a continuous time series input; Step 302: Construct a multi-layer LSTM layer. Each LSTM unit learns the dynamic relationships between data in the memory time series through memory cells and gating mechanisms. Step 303: Construct the output layer, which includes binary classification tasks and multi-class classification tasks. The binary classification task uses one neuron and a sigmoid activation function. The multi-class classification task has the same number of neurons as the number of classes and uses a softmax activation function to output the probability distribution of each class. Step 304, Network Connection and Parameter Settings: Train and optimize the network.

[0011] LSTM layers include forget gates: (2) In the formula, Let σ be the output vector of the forget gate at time t; σ is the sigmoid function. This represents the hidden state at time t-1; The process parameters at time t; Here is the weight matrix for the forget gate; for and The concatenated vector; The bias term of the forget gate.

[0012] The LSTM layer also includes input gates: (3) (4) In the formula, The output of the input gate; It is the hyperbolic tangent function; Candidate cell state; This is the weight matrix of the input gate; This is the weight matrix for the candidate cell states; This is the bias term for the input gate; This is a bias term for the candidate cell state; The update of candidate cell state can be represented as: (5) in The cell state at time t-1; This indicates element-wise multiplication.

[0013] The LSTM layer also includes output gates: (6) (7) In the formula, This is the output of the output gate; Let be the hidden state at time t; This is the weight matrix of the output gate; This is the bias term for the output gate.

[0014] The reconstruction error specifically includes the following steps: Step 401: Using a sliding window dynamic threshold mechanism, the threshold is updated every 5 minutes. The mean and standard deviation of the reconstruction error of the most recent 500 normal samples are calculated to determine the warning threshold at a 99% confidence level. Step 402: The real-time collected data is preprocessed to generate the current data window, which is then input into the trained LSTM model to generate and calculate the reconstruction error. If the reconstruction error exceeds the set warning threshold, an abnormal response alarm is triggered. Step 403: Verify the control command, establish a command execution feedback mechanism, compare the actual sensor data with the expected value of the command to see if there is a deviation. If the deviation is greater than 10% and lasts for 2 minutes, it is determined to be an "invalid command execution" anomaly, and an independent alarm is triggered.

[0015] The multi-level anomaly response mechanism is divided into a first-level warning and a second-level warning. The first-level warning is yellow, indicating that the process parameters in the olefin production process are abnormal. The second-level warning is red, indicating that both the process parameters and control commands are abnormal at the same time.

[0016] The beneficial effects of this invention are: This invention presents a safety anomaly detection method for methanol-to-olefins (MTO) production based on the LSTM algorithm. Utilizing the temporal modeling capabilities of the LSTM algorithm, it jointly models the time-series data of process parameters (temperature, pressure, flow rate, and yield) for reactors, regenerators, and quench towers, along with control commands such as regenerator airflow adjustment commands, reactor outlet valve opening commands, and quench tower spray volume commands. This allows for the capture of dynamic correlations and time dependencies between data from different dimensions. By analyzing the joint change patterns of multi-dimensional time-series data, this method can accurately identify complex anomalies, achieving efficient detection of safety hazards in olefin production and overcoming the shortcomings of traditional methods in integrating multi-dimensional information and accurately identifying complex anomalies. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the safety anomaly detection method for methanol-to-olefins production based on the LSTM algorithm of this invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0019] like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0020] In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command, with a command accuracy of 1%.

[0021] The preprocessing is as follows: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

[0022] Mapping value of normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production. max is the maximum allowable value of the process under normal operating conditions; min is the minimum allowable value of the process under normal operating conditions.

[0023] The reconstruction model is constructed based on a multi-layer LSTM network, specifically including the following steps: Step 301: Design the input layer, input the normalized process parameters into the network in a time series to form a continuous time series input; Step 302: Construct a multi-layer LSTM layer. Each LSTM unit learns the dynamic relationships between data in the memory time series through memory cells and gating mechanisms. Step 303: Construct the output layer, which includes binary classification tasks and multi-class classification tasks. The binary classification task uses one neuron and a sigmoid activation function. The multi-class classification task has the same number of neurons as the number of classes and uses a softmax activation function to output the probability distribution of each class. Step 304, Network Connection and Parameter Settings: Train and optimize the network.

[0024] LSTM layers include forget gates: (2) In the formula, Let σ be the output vector of the forget gate at time t; σ is the sigmoid function. This represents the hidden state at time t-1; The process parameters at time t; Here is the weight matrix for the forget gate; for and The concatenated vector; The bias term of the forget gate.

[0025] The LSTM layer also includes input gates: (3) (4) In the formula, The output of the input gate; It is the hyperbolic tangent function; Candidate cell state; This is the weight matrix of the input gate; This is the weight matrix for the candidate cell states; This is the bias term for the input gate; This is a bias term for the candidate cell state; The update of candidate cell state can be represented as: (5) in The cell state at time t-1; This indicates element-wise multiplication.

[0026] The LSTM layer also includes output gates: (6) (7) In the formula, This is the output of the output gate; Let be the hidden state at time t; This is the weight matrix of the output gate; This is the bias term for the output gate.

[0027] The reconstruction error specifically includes the following steps: Step 401: Using a sliding window dynamic threshold mechanism, the threshold is updated every 5 minutes. The mean and standard deviation of the reconstruction error of the most recent 500 normal samples are calculated to determine the warning threshold at a 99% confidence level. Step 402: The real-time collected data is preprocessed to generate the current data window, which is then input into the trained LSTM model to generate and calculate the reconstruction error. If the reconstruction error exceeds the set warning threshold, an abnormal response alarm is triggered. Step 403: Verify the control command, establish a command execution feedback mechanism, compare the actual sensor data with the expected value of the command to see if there is a deviation. If the deviation is greater than 10% and lasts for 2 minutes, it is determined to be an "invalid command execution" anomaly, and an independent alarm is triggered.

[0028] The multi-level anomaly response mechanism is divided into a first-level warning and a second-level warning. The first-level warning is yellow, indicating that the process parameters in the olefin production process are abnormal. The second-level warning is red, indicating that both the process parameters and control commands are abnormal at the same time.

[0029] Example 1 like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0030] Example 2 like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0031] In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command, with a command accuracy of 1%.

[0032] Example 3 like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0033] In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command, with a command accuracy of 1%.

[0034] The preprocessing is as follows: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

[0035] Mapping value of normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production. max is the maximum allowable value of the process under normal operating conditions; min is the minimum allowable value of the process under normal operating conditions.

[0036] In the safe production process of olefins, for process parameters such as reactor temperature, the normal range is 400-500℃, then max=500, min=400. When the reactor temperature is 450℃... o At time C =-1; when the reactor temperature is 500 o At time C =1, achieving a linear mapping of overheating risk. For control commands, such as regenerator airflow adjustment commands, the normal opening range is 30%-70%, then max=70, min=30. When the regenerator airflow adjustment command is 50%, ... =-1; When the regenerator airflow adjustment command suddenly increases to 70%, =1, highlighting the abnormal characteristics of extreme values ​​in control commands.

[0037] This normalization method unifies process parameters or control commands of different dimensions into the range of [-1,1], which not only preserves the relative trend of data change, but also strengthens the physical meaning of safety threshold through process boundary values ​​max / min, making it easier for the LSTM model to learn abnormal patterns close to the safety boundary.

[0038] Example 4 like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0039] In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command, with a command accuracy of 1%.

[0040] The preprocessing is as follows: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

[0041] Mapping value of normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production. max is the maximum allowable value of the process under normal operating conditions; min is the minimum allowable value of the process under normal operating conditions.

[0042] The reconstruction model is constructed based on a multi-layer LSTM network, specifically including the following steps: Step 301: Design the input layer, input the normalized process parameters into the network in a time series to form a continuous time series input; Step 302: Construct a multi-layer LSTM layer. Each LSTM unit learns the dynamic relationships between data in the memory time series through memory cells and gating mechanisms. Step 303: Construct the output layer, which includes binary classification tasks and multi-class classification tasks. The binary classification task uses one neuron and a sigmoid activation function. The multi-class classification task has the same number of neurons as the number of classes and uses a softmax activation function to output the probability distribution of each class. Step 304, Network Connection and Parameter Settings: Train and optimize the network.

[0043] The binary classification task uses a single neuron and a sigmoid activation function. The output value is between 0 and 1, representing the probability of an anomaly occurring. The formula for the binary classification task is:

[0044] In the formula, This is the output value of the sigmoid function, which maps the input variable z to the interval (0,1). The value is the natural constant e raised to the power of -z, and is a core component of the sigmoid function calculation formula, determining the shape and output value of the function.

[0045] The number of neurons in a multi-class classification task is the same as the number of classes. The softmax activation function is used. The formula for the multi-class classification task is:

[0046] In the formula, It is the input of the i-th neuron. This is the input to any neuron from the 1st to the Kth neuron; It is the total number of categories. This represents the probability of the i-th category, which is used to determine whether the current production status is abnormal and the type of abnormality.

[0047] Example 5 like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0048] In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command, with a command accuracy of 1%.

[0049] The preprocessing is as follows: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

[0050] Mapping value of normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production. max is the maximum allowable value of the process under normal operating conditions; min is the minimum allowable value of the process under normal operating conditions.

[0051] The reconstruction model is constructed based on a multi-layer LSTM network, specifically including the following steps: Step 301: Design the input layer, input the normalized process parameters into the network in a time series to form a continuous time series input; Step 302: Construct a multi-layer LSTM layer. Each LSTM unit learns the dynamic relationships between data in the memory time series through memory cells and gating mechanisms. Step 303: Construct the output layer, which includes binary classification tasks and multi-class classification tasks. The binary classification task uses one neuron and a sigmoid activation function. The multi-class classification task has the same number of neurons as the number of classes and uses a softmax activation function to output the probability distribution of each class. Step 304, Network Connection and Parameter Settings: Train and optimize the network.

[0052] LSTM layers include forget gates: (2) In the formula, Let σ be the output vector of the forget gate at time t; σ is the sigmoid function. This represents the hidden state at time t-1; The process parameters at time t; Here is the weight matrix for the forget gate; for and The concatenated vector; The bias term of the forget gate.

[0053] The LSTM layer also includes input gates: (3) (4) In the formula, The output of the input gate; It is the hyperbolic tangent function; Candidate cell state; This is the weight matrix of the input gate; This is the weight matrix for the candidate cell states; This is the bias term for the input gate; This is a bias term for the candidate cell state; The update of candidate cell state can be represented as: (5) in The cell state at time t-1; This indicates element-wise multiplication.

[0054] The LSTM layer also includes output gates: (6) (7) In the formula, This is the output of the output gate; Let be the hidden state at time t; This is the weight matrix of the output gate; This is the bias term for the output gate.

[0055] Example 6 like Figure 1 As shown, the method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

[0056] In step 1, the process parameters are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command, with a command accuracy of 1%.

[0057] The preprocessing is as follows: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

[0058] Mapping value of normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production. max is the maximum allowable value of the process under normal operating conditions; min is the minimum allowable value of the process under normal operating conditions.

[0059] The reconstruction model is constructed based on a multi-layer LSTM network, specifically including the following steps: Step 301: Design the input layer, input the normalized process parameters into the network in a time series to form a continuous time series input; Step 302: Construct a multi-layer LSTM layer. Each LSTM unit learns the dynamic relationships between data in the memory time series through memory cells and gating mechanisms. Step 303: Construct the output layer, which includes binary classification tasks and multi-class classification tasks. The binary classification task uses one neuron and a sigmoid activation function. The multi-class classification task has the same number of neurons as the number of classes and uses a softmax activation function to output the probability distribution of each class. Step 304, Network Connection and Parameter Settings: Train and optimize the network.

[0060] LSTM layers include forget gates: (2) In the formula, Let σ be the output vector of the forget gate at time t; σ is the sigmoid function. This represents the hidden state at time t-1; The process parameters at time t; Here is the weight matrix for the forget gate; for and The concatenated vector; The bias term of the forget gate.

[0061] The LSTM layer also includes input gates: (3) (4) In the formula, The output of the input gate; It is the hyperbolic tangent function; Candidate cell state; This is the weight matrix of the input gate; This is the weight matrix for the candidate cell states; This is the bias term for the input gate; This is a bias term for the candidate cell state; The update of candidate cell state can be represented as: (5) in The cell state at time t-1; This indicates element-wise multiplication.

[0062] The LSTM layer also includes output gates: (6) (7) In the formula, This is the output of the output gate; Let be the hidden state at time t; This is the weight matrix of the output gate; This is the bias term for the output gate.

[0063] The reconstruction error specifically includes the following steps: Step 401: Using a sliding window dynamic threshold mechanism, the threshold is updated every 5 minutes. The mean and standard deviation of the reconstruction error of the most recent 500 normal samples are calculated to determine the warning threshold at a 99% confidence level.

[0064] In the formula, The set warning threshold is the value at which the system will issue an abnormal warning when the reconstruction error of a sample exceeds this value; mean is the average value of the reconstruction error of 500 normal samples, reflecting the central tendency of the reconstruction error under normal operating conditions. The standard deviation of the reconstruction error of 500 normal samples is used to measure the dispersion of the reconstruction error data. Through dynamic updating, the threshold can better adapt to different working conditions. Step 402: The real-time collected data is preprocessed to generate the current data window, which is then input into the trained LSTM model to generate and calculate the reconstruction error. If the reconstruction error exceeds the set warning threshold, an abnormal response alarm is triggered. The real-time collected data is preprocessed to generate the current data window. Inputting the data into the trained LSTM model generates and calculates the reconstruction error. ,in For the LSTM model, input data The reconstructed data obtained after reconstruction, if the error Exceeding the set threshold This will trigger an abnormal response alarm; Step 403: Verify the control command, establish a command execution feedback mechanism, compare the actual sensor data with the expected value of the command to see if there is a deviation. If the deviation is greater than 10% and lasts for 2 minutes, it is determined to be an "invalid command execution" anomaly, and an independent alarm is triggered.

[0065] The multi-level anomaly response mechanism is divided into a primary warning and a secondary warning. The primary warning is indicated by a yellow color, signifying an anomaly in the process parameters during olefin production. The secondary warning is indicated by a red color, signifying an anomaly in both process parameters and control commands, such as a reactor temperature exceeding 510°C. o C. Simultaneously, the reconstruction error also exceeds the warning threshold. The DCS control system automatically records the abnormal situation and generates an abnormal alarm to notify the operator. The secondary warning occurs when both process parameters and control commands are abnormal, such as the regenerator temperature exceeding 750°C. o C. However, if the fan air volume does not increase according to the predetermined logic, the system will implement safety measures, automatically reduce the amount of raw material entering the reactor by 10%, force the regenerator air volume to switch to safety mode, and increase the spray volume of the quench tower to the maximum design value.

Claims

1. A method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm, characterized in that, Includes the following steps: Step 1: Collect real-time process parameters and control command data for methanol-to-olefins (MTO); Step 2: Preprocess the process parameters and control command data to obtain the training set and test set; Step 3: Construct a reconstruction model based on a multi-layer LSTM network, and train the reconstruction model using the training set to obtain a joint normal model; Step 4: Input the test set into the joint normal model, calculate and output the reconstruction error of the training set and the test set in real time, and distinguish between normal fluctuations and abnormal deviations of process parameters and control command data based on dynamic thresholds. Step 5: Establish a multi-level anomaly response mechanism and implement corresponding process alarms and safety measures according to the risk level of the abnormal event.

2. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 1, characterized in that, The process parameters mentioned in step 1 are the temperature, pressure, flow rate, and output of the reactor, regenerator, and quench tower equipment, respectively, and the acquisition frequency is once per second; the control commands include the regenerator air volume adjustment command, the reactor outlet valve opening command, and the quench tower spray volume command.

3. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 1, characterized in that, The preprocessing specifically includes: Step 201: Remove abnormal data from the process parameters and control instructions to obtain the process parameters and control instructions during normal production, and record them as normal data; Step 202: Normalize the normal data and map the normal data values ​​of different dimensions to the range of [-1, 1]; Step 203: Construct a time series window, set the time interval to 5 minutes as a basic time period, and set the time interval for each slide to 1 minute. Dynamically adjust the window length according to the real-time data change rate, and organize the data collected at each moment into a time series.

4. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 3, characterized in that, The mapping value of the normal data value The calculation formula is as follows: (1) In the formula, The values ​​are the current process parameters and control command data; It is the average value of process parameters and control command data during normal production, and max is the maximum allowable value of the process under normal operating conditions. min is the minimum allowable value for the process under normal operating conditions.

5. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 4, characterized in that, The reconstruction model based on a multi-layer LSTM network specifically includes the following steps: Step 301: Design the input layer, input the normalized process parameters into the network in a time series to form a continuous time series input; Step 302: Construct a multi-layer LSTM layer. Each LSTM unit learns the dynamic relationships between data in the memory time series through memory cells and gating mechanisms. Step 303: Construct the output layer, which includes a binary classification task and a multi-class classification task. The binary classification task uses one neuron and a sigmoid activation function. The multi-class classification task has the same number of neurons as the number of classes and uses a softmax activation function to output the probability distribution of each class. Step 304, Network Connection and Parameter Settings: Train and optimize the network.

6. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 5, characterized in that, The LSTM layer includes a forget gate: (2) In the formula, Let σ be the output vector of the forget gate at time t; σ is the sigmoid function. This represents the hidden state at time t-1; The process parameters at time t; Here is the weight matrix for the forget gate; for and The concatenated vector; The bias term of the forget gate.

7. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 5, characterized in that, The LSTM layer also includes an input gate: (3) (4) In the formula, The output of the input gate; It is the hyperbolic tangent function; Candidate cell state; Here is the weight matrix of the input gate; This is the weight matrix for the candidate cell states; This is the bias term for the input gate; This is a bias term for the candidate cell state; The candidate cell state update can be represented as: (5) in The cell state at time t-1; This indicates element-wise multiplication.

8. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 5, characterized in that, The LSTM layer also includes an output gate: (6) (7) In the formula, This is the output of the output gate; Let be the hidden state at time t; This is the weight matrix of the output gate; This is the bias term for the output gate.

9. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 1, characterized in that, The reconstruction error specifically includes the following steps: Step 401: Using a sliding window dynamic threshold mechanism, the threshold is updated every 5 minutes. The mean and standard deviation of the reconstruction error of the most recent 500 normal samples are calculated to determine the warning threshold at a 99% confidence level. Step 402: The real-time collected data is preprocessed to generate the current data window, which is then input into the trained LSTM model to generate and calculate the reconstruction error. If the reconstruction error exceeds the set warning threshold, an abnormal response alarm is triggered. Step 403: Verify the control command, establish a command execution feedback mechanism, compare the actual sensor data with the expected value of the command to see if there is a deviation. If the deviation is greater than 10% and lasts for 2 minutes, it is determined to be an "invalid command execution" anomaly, and an independent alarm is triggered.

10. The method for detecting safety anomalies in methanol-to-olefins production based on the LSTM algorithm according to claim 1, characterized in that, The multi-level anomaly response mechanism is divided into a first-level warning and a second-level warning. The first-level warning is yellow, indicating that the process parameters in the olefin production process are abnormal. The second-level warning is red, indicating that both the process parameters and control commands are abnormal.

Citation Information

Patent Citations

  • Water treatment time sequence data anomaly detection method based on LSTM

    CN112765896A

  • Verification method and device for executed process of control instruction

    CN114090629A

  • Power grid voltage data anomaly detection method, device and equipment based on VAE-Bi-LSTM-SAM and storage medium

    CN118897973A

  • Tunnel abnormal data early warning method based on LSTM model

    CN119435134A