Oil gas treatment process regulation and control method based on machine learning and intelligent optimization
By employing machine learning and intelligent optimization methods, a time series prediction model and a multi-objective optimization algorithm were constructed, which solved the problem of inaccurate parameter control in liquefied natural gas processing technology, and achieved stable and efficient operation of the process while reducing costs and increasing efficiency.
Patent Information
- Application Number
- CN202610159403.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, the parameter control of liquefied natural gas processing technology relies on human experience, which is inaccurate and costly. Furthermore, the mechanistic models have poor generalization ability, making it difficult to achieve stable and efficient process operation.
By employing machine learning and intelligent optimization methods, a time series prediction model is constructed through time lag correlation analysis and feature importance analysis. Combined with multi-objective optimization algorithms, a precise process control scheme is generated. Machine learning algorithms such as XGBoost and intelligent optimization algorithms such as multi-objective adaptive particle swarm optimization are used to automatically learn the complex correlations and lag effects between process variables.
It has achieved stable operation of the process flow and reduced costs and increased efficiency, improved the control accuracy and efficiency of oil and gas processing technology, and reduced energy and material consumption.
Smart Images

Figure CN121956897A_ABST
Abstract
Description
A method for controlling oil and gas processing based on machine learning and intelligent optimization Technical Field
[0001] This invention belongs to the field of oil and gas processing process parameter control in the petroleum industry, specifically involving a method for controlling oil and gas processing processes based on machine learning and intelligent optimization. Background Technology
[0002] In the oil and gas industry, the stability and optimization of process flows are crucial for ensuring safety, improving efficiency, and reducing energy consumption. Taking the ethane stripper, a key piece of equipment in liquefied natural gas (LNG) recovery processes, as an example, its operating status is determined by dozens of interdependent process parameters (such as temperature, pressure, flow rate, and liquid level). Currently, parameter control for such complex processes mainly relies on two methods: manual experience-based control: operators adjust adjustable variables (such as valve opening and reflux setpoints) based on their personal experience. Due to the large number of process parameters—up to dozens for a single piece of equipment—it is difficult to achieve precise and optimal control solely through the operator's technical skills, leading to unstable process operation, low product yield, and high energy and material consumption.
[0003] Mechanism-based control: This method establishes a rigorous mathematical model (i.e., a mechanism model) based on the physical and chemical principles of the equipment, and uses simulation calculations to find the optimal operating point. However, building a mechanism model requires in-depth process knowledge, and the model construction and maintenance costs are high (up to several million yuan for a single system). Furthermore, the model is customized for specific equipment, has poor generalization ability, and is difficult to extend to other devices. In addition, this method fails to fully utilize the value of the massive amounts of real-time data generated in the process. Summary of the Invention
[0004] This invention is proposed to address the problems of high cost, poor generalization, and inaccurate human experience in traditional mechanistic models in the prior art. Its purpose is to provide a method for controlling oil and gas processing technology based on machine learning and intelligent optimization.
[0005] This invention is achieved through the following technical solution: a method for controlling oil and gas processing technology based on machine learning and intelligent optimization, comprising the following steps: S1, acquiring historical operating data of the target oil and gas processing process; the target oil and gas processing process is a natural gas processing process, a crude oil processing process, or a production water processing process; the historical operating data includes adjustable variable data and observed variable data; the adjustable variables refer to variables that can be directly adjusted, including valve opening, parameter set value, etc.; the observed variables refer to variables that can only be indirectly adjusted through adjustable variables, including temperature, pressure, flow rate, etc.; S2, performing time lag correlation analysis and feature importance analysis on the historical operating data acquired in step S1 to determine the key adjustable variable set corresponding to each observed variable; step S2 specifically includes the following steps: S21, combining adjustable variables with observed variables one-to-one to construct multiple variable pairs, shifting the observed variables in each variable pair forward by different time steps, and calculating the Pearson correlation coefficient and the S-curve correlation coefficient. The Pearman correlation coefficient is used to determine the lag step with the greatest impact of the adjustable variable on the observed variable in each variable pair. The method for determining the lag step is to comprehensively determine the lag step with the greatest impact by statistically analyzing the average value and distribution of the Pearson correlation coefficient and the Spearman correlation coefficient under different lag steps. S22: Based on the lag step with the greatest impact determined in step S21, for each observed variable, a machine learning algorithm is used to perform feature importance analysis on all its corresponding adjustable variables, and adjustable variables with an importance greater than 0.1 are selected to form the key adjustable variable set for the observed variable. In step S22, the machine learning algorithm is a regression algorithm that supports multi-dimensional input and output, such as XGBoost. Using machine learning models (especially decision tree ensemble models) for feature importance analysis is a common technique in the fields of data science and machine learning. For example, the XGBoost algorithm and its built-in feature importance calculation method are public and mature technologies. The principle and implementation can be found in the original paper of the algorithm, which is the basic literature in this field. The specific documents are: Tianqi Chen and Carlos Guestrin. "XGBoost: A Scalable Tree BoostingSystem." In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD '16). ACM, 2016, pp. 785-794.
[0006] S3. Based on the analysis results of step S2, construct an independent time series prediction model for each observed variable. The time series prediction model is a regression model built based on a machine learning algorithm (e.g., XGBoost algorithm) that supports multi-dimensional input and output. The input features of the time series prediction model include historical series data of the observed variable (e.g., 30 time steps) and future set series data of its corresponding key adjustable variable set (e.g., 5 time steps). The output of the time series prediction model is the predicted future value of the observed variable (e.g., 5 time steps). Using R... 2 To evaluate the predictive performance of time series models, the number of variables in the adjustable variable set for each observed variable is optimized to obtain the adjustable variable set that best achieves the predictive performance. S4: Receive the control target range for at least one target observed variable. Using the allowable fluctuation range of the adjustable variables related to the target observed variable as constraints, and with the core optimization objective of driving the target observed variable into its control target range, construct a multi-objective optimization problem. The constructed multi-objective optimization problem also includes at least one auxiliary optimization constraint. The auxiliary optimization constraint includes keeping other observed variables affected by the regulation within a safe operating range and minimizing the overall adjustment amplitude of the adjustable variables. S5: Solve the multi-objective optimization problem constructed in step S4 using an intelligent optimization algorithm. During the solution process, call the time series prediction model for each observed variable constructed in step S3, evaluate the future state of the target observed variable under different adjustable variable combinations, and calculate the fitness value. The intelligent optimization algorithm includes, but is not limited to, a multi-objective adaptive particle swarm optimization algorithm. Using a multi-objective particle swarm optimization algorithm to handle optimization problems is a mature technology. Classic literature on the algorithm can be found at: Coello Coello, CA, Pulido, GT, & Lechuga, MS. (2004). Handling multiple objectives with particle swarm optimization. IEEE Transactions on Evolutionary Computation, 8(3), 256-279.
[0007] To prevent the algorithm from failing to converge due to too many variables, the intelligent optimization algorithm adopts a variable combination encoding method, encoding each particle position as a vector representing a set of future set values of adjustable variables. When calculating fitness, a particle splitting mechanism is used to calculate using models corresponding to different observed variables. S6: Output the optimal adjustable variable control scheme obtained in step S5. This scheme can be directly provided to the operator for execution or transmitted to the automatic control system.
[0008] The beneficial effects of this invention are: This invention provides a method for controlling oil and gas processing technology based on machine learning and intelligent optimization. Through a data-driven approach, it can automatically learn the complex correlations and lag effects between process variables and intelligently generate quantitative and precise control schemes, thereby achieving cost reduction, efficiency improvement, and stable operation of the process, and enhancing the control efficiency and accuracy of oil and gas processing technology. Attached Figure Description
[0009] Figure 1 is a flowchart of the method of the present invention; Figure 2 is an example diagram of simulation using changes in observed variables in Embodiment 1 of the present invention; Figure 3 is an example diagram of simulation using changes in adjustable variables in Embodiment 1 of the present invention.
[0010] For those skilled in the art, other related figures can be obtained from the above figures without any creative effort. Detailed Implementation
[0011] To enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0012] Example 1 takes the deethaner tower, a key piece of equipment in the liquefied natural gas recovery process, as an example. As shown in Figure 2, the target range of temperature TT_15021 is specified as [-45, -40], t=30 is the current time, and the target range is reached at t=71. As shown in Figure 3, the algorithm simulates and generates the relevant adjustable variable changes that make temperature TT_15021 reach the target range (the specified fluctuation range is no more than 5% each time).
[0013] The oil and gas processing technology control method based on machine learning and intelligent optimization includes the following steps: S1, acquiring historical operating data of the liquefied natural gas recovery process and preprocessing the historical operating data; specifically, extracting historical operating data of the deethaner from the real-time database for a period of time; the historical operating data includes adjustable variables (such as the set value of the deethaner top reflux flow rate, the opening degree of the inlet valve, etc.) and observed variables (such as the top temperature, the top pressure, the inlet flow rate, etc.); and performing preprocessing operations such as cleaning and normalization on the data.
[0014] S2. Perform time-lag correlation analysis and feature importance analysis on the historical operational data obtained in step S1 to determine the set of key adjustable variables corresponding to each observed variable. Step S2 specifically includes the following steps: S21. Time-lag correlation analysis: Taking the observed variable temperature TT_15021 as an example, perform time-lag correlation analysis between it and all adjustable variables. Shift the temperature TT_15021 data forward by 0, 1, 2, ..., N time steps (i.e., Lag values), and calculate the Pearson and Spearman correlation coefficients with each adjustable variable at each Lag value. It was found that the absolute value of the correlation coefficient was the largest when Lag=30, indicating that the impact of adjustable variables on temperature TT_15021 lagged by approximately 30 time steps. S22, Feature Importance Analysis: Using temperature TT_15021 as the target variable and all adjustable variables as features, the XGBoost algorithm was used to rank the features by importance, resulting in the eight most critical adjustable variables shown in Figure 3. These were then included in the set of critical adjustable variables for temperature TT_15021. S3, Based on the analysis results of step S2, an independent time series prediction model was constructed for each observed variable; an XGBoost model was constructed for temperature TT_15021. The Boost time series forecasting model is as follows: The input to the time series forecasting model consists of two types of features: historical data for 30 time steps of temperature TT_15021 (30 being the previously calculated lag number); and setpoint data for the next 5 time steps of its key adjustable variables (representing the control scheme to be attempted in this application; 5 is a freely set value). The output of the time series forecasting model is: the predicted value of temperature TT_15021 for the next 5 time steps (5 is a freely set value). The time series forecasting model is trained using historical data, and its prediction accuracy is evaluated using mean squared error (MSE) and coefficient of determination (R²) to ensure model reliability.
[0015] S4 & S5: Define the optimization problem and solve the objective: Increase the observed variable temperature TT_15021 to the target range [-45, -40]; Constraint: The adjustment range of the adjustable variable must not exceed 5% in each time step; Optimization solution: Initialize a multi-objective adaptive particle swarm optimization algorithm. Each particle is composed of the historical data of temperature TT_15021 over 30 time steps and the setpoint data of its key adjustable variables for the next 5 time steps. For each particle, call the prediction model built for temperature TT_15021 in step S3 to predict the value of temperature TT_15021 in the next 5 time steps; When calculating the fitness based on the prediction results, the algorithm iteratively optimizes in the direction of maximizing the satisfaction of the core objective and minimizing constraint violations; Finally, it searches for a set of optimal adjustment schemes.
[0016] S6. Output and Application: Output the optimal control scheme obtained in step S5. Figure 3 shows the optimal adjustment scheme for the 8 adjustable variables. Figure 2 shows the temperature TT_15021 change trend simulated by the algorithm under this adjustment scheme (after t=30). Operators can manually adjust according to this scheme, or send the scheme to the central control system for execution through the system interface.
[0017] The applicant declares that the above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention fall within the protection and disclosure scope of the present invention.
Claims
1. A method for controlling oil and gas processing technology based on machine learning and intelligent optimization, characterized in that... The process includes the following steps: S1. Obtain historical operating data of the target oil and gas processing flow; S2. Perform time lag correlation analysis and feature importance analysis on the historical operating data obtained in step S1 to determine the set of key adjustable variables corresponding to each observed variable; S3. Based on the analysis results of step S2, construct an independent time series prediction model for each observed variable; S4. Receive the control target range for at least one target observed variable; construct a multi-objective optimization problem with the allowable fluctuation range of adjustable variables related to the target observed variable as a constraint and driving the target observed variable into its control target range as the core optimization objective; S5. Solve the multi-objective optimization problem constructed in step S4 using an intelligent optimization algorithm; during the solution process, call the time series prediction model of each observed variable constructed in step S3 to evaluate the future state of the target observed variable under different adjustable variable combination schemes and calculate the fitness value; S6. Output the optimal adjustable variable control scheme obtained in step S5.
2. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 1, characterized in that... The target oil and gas processing process is a natural gas processing process, a crude oil processing process, or a production water processing process.
3. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 1, characterized in that... The historical operational data includes adjustable variable data and observed variable data; the adjustable variable refers to a variable that can be directly adjusted; the observed variable refers to a variable that can only be indirectly adjusted through the adjustable variable.
4. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 1, characterized in that... Step S2 specifically includes the following steps: S21, combining adjustable variables with observed variables one-to-one to construct multiple variable pairs, shifting the observed variables in each variable pair forward by different time steps, and calculating the Pearson correlation coefficient and Spearman correlation coefficient to determine the lag number in each variable pair that has the greatest impact on the observed variable; S22, based on the lag number with the greatest impact determined in step S21, for each observed variable, using a machine learning algorithm to perform feature importance analysis on all its corresponding adjustable variables, and selecting one or more adjustable variables with the highest importance to constitute the key adjustable variable set for that observed variable.
5. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 4, characterized in that... The method for determining the number of lag steps is as follows: by statistically analyzing the average value and distribution of Pearson correlation coefficient and Spearman correlation coefficient under different lag steps, the number of lag steps with the greatest impact is determined comprehensively.
6. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 1, characterized in that... The time series prediction model is a regression model built based on a machine learning algorithm that supports multi-dimensional input and output. The input features of the time series prediction model include historical series data of the observed variable and future set series data of its corresponding key adjustable variable set. The output of the time series prediction model is the predicted future value of the observed variable, R0. 2 To evaluate the predictive performance of time series models, the number of variables in the adjustable variable set for each observed variable is tuned to obtain the adjustable variable set that yields the best predictive performance.
7. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 1, characterized in that... The constructed multi-objective optimization problem also includes at least one auxiliary optimization constraint; the auxiliary optimization constraint includes keeping other observed variables affected by regulation within a safe operating range and minimizing the overall adjustment magnitude of the adjustable variables.
8. The oil and gas processing technology control method based on machine learning and intelligent optimization according to claim 1, characterized in that... The intelligent optimization algorithm in step S5 is a multi-objective adaptive particle swarm optimization algorithm. The intelligent optimization algorithm adopts a variable combination encoding method, which encodes each particle position as a vector representing a set of adjustable variables for future set values. When calculating fitness, a particle splitting mechanism is used to use the models corresponding to different observation variables for calculation.
