CO2 well driving oil casing pressure intelligent control and anti-freezing and anti-blocking system
By dynamically adjusting the oil casing pressure control system of CO2 well drive using an adaptive PID algorithm and gradient heating strategy, the problems of energy waste and untimely freezing prevention caused by traditional fixed parameters are solved. This achieves intelligent control and freezing protection for CO2 well drive, and improves the system's response speed and stability.
Patent Information
- Application Number
- CN202511362886.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-02-24
AI Technical Summary
Existing oil casing pressure control systems for CO2-driven wells have shortcomings in dynamic assessment and adaptive control of CO2 phase change risks, leading to energy waste and untimely prevention of freezing and blockage. In particular, when the gas injection volume fluctuates or the formation permeability changes, the fixed parameters of traditional PID controllers are difficult to adapt to complex operating conditions.
An adaptive PID algorithm is used to dynamically adjust the opening of the electric valve, and a gradient heating strategy is used to adjust the output power of the distributed heating element. The improved Span-Wagner equation and fuzzy logic algorithm are used to accurately calculate the risk level of CO2 phase change. An ultrasonic cleaning device and inert gas protection are integrated to achieve multi-level safety protection and remote monitoring.
It significantly improves the system's response speed and stability under complex working conditions, accurately controls wellhead pressure, effectively prevents CO2 phase change freezing and blockage, reduces energy waste, and enables remote optimization management through dual-mode communication.
Smart Images

Figure CN121556828A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas field development engineering technology, and in particular to a CO2 well drive system for intelligent control of casing pressure and antifreeze system. Background Technology
[0002] In the field of CO2 enhanced oil recovery (EOR) technology, wellhead pressure control and anti-freezing systems are key equipment for ensuring the safe and efficient development of oil and gas fields. Currently, the industry's commonly used casing pressure control systems are mainly based on traditional PID control algorithms. These systems monitor the casing pressure difference in real time using pressure sensors and adjust the throttle valve opening using a PID controller with fixed parameters to achieve stable pressure control. For anti-freezing, existing technologies mostly employ a single temperature threshold-triggered electric heating method. When the temperature sensor detects that the pipeline temperature is below a preset threshold, a constant-power electric heater is activated for heating. These systems are typically equipped with a basic RS485 communication interface, enabling local data acquisition and simple remote monitoring. Existing technologies have, to some extent, addressed the basic needs of CO2 EOR well pressure control and anti-freezing, providing fundamental technical support for oil and gas field development.
[0003] Although existing technologies have achieved basic pressure control and freezing prevention functions, there is still room for optimization in the dynamic assessment and adaptive control of CO2 phase change risk. Existing systems do not adequately consider the dynamic characteristics of CO2 physical parameters changing with pressure. Using a fixed temperature threshold to trigger heating is difficult to accurately match the actual CO2 phase change critical point, which may lead to two adverse situations: first, premature heating causes energy waste; second, delayed heating cannot effectively prevent freezing. The fixed parameter settings of traditional PID controllers are difficult to adapt to the complex operating conditions of CO2 well driving, especially when there are fluctuations in gas injection or changes in formation permeability. The control response speed and stability need to be improved. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an intelligent control and anti-freezing system for CO2-driven well casing pressure, which solves the problems of energy waste and untimely prevention of freezing caused by fixed parameter control in the prior art.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] This invention provides an intelligent control and anti-freezing system for CO2 well casing pressure, which includes a controller initialization module, which starts a self-test program, loads preset target pressure values, temperature warning thresholds and ice blockage critical temperature parameters, completes initialization configuration, and performs zero-point calibration and accuracy verification on the front-end pressure sensor, the back-end pressure sensor and the temperature sensor.
[0008] The data acquisition module collects front-end pressure data, back-end pressure data, and temperature data, and performs data filtering and outlier removal. Based on real-time temperature data and CO2 physical property parameters, it calculates the current phase change risk level and outputs the phase change status indicator.
[0009] The risk assessment module uses an adaptive PID algorithm to dynamically adjust the opening position of the electric valve based on front-end and back-end pressure data, and dynamically adjusts the output power of the distributed heating element according to the phase change state indicator and temperature change trend, following a gradient heating strategy.
[0010] The safety protection module automatically activates the ultrasonic cleaning device and spiral flow channel disturbance function when abnormal pressure fluctuations or sudden temperature drops are detected, and monitors the sealing performance of the explosion-proof cavity and the inert gas pressure in real time, triggering a multi-level safety protection mechanism.
[0011] The remote management module uploads system operation data to the cloud platform via dual-mode communication and receives optimized control parameters.
[0012] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the controller initiates a self-test program, loads preset target pressure values, temperature warning thresholds, and ice blockage critical temperature parameters, and completes the initialization configuration, including the following steps.
[0013] After the controller is powered on, it automatically executes a hardware diagnostic program to detect the connection status of all sensors and actuators and generate a hardware status report. Based on the hardware status report, the controller tests the connection quality of the RS485 and communication module, performs three round-trip data packet tests, and checks the remaining power of the supercapacitor bank according to the communication quality report. If the power is ≥80%, it is marked as ready. When the energy storage status is 0, the preset target pressure value, temperature warning threshold, and ice blockage critical temperature parameters are loaded from the non-volatile memory.
[0014] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the following steps are included in the zero-point calibration and accuracy verification of the front-end pressure sensor, the back-end pressure sensor, and the temperature sensor:
[0015] A reference pressure is applied to both the front-end and rear-end pressure sensors simultaneously to obtain raw zero-point data. Based on the raw zero-point data, the average values are obtained to obtain the front-end and rear-end data. A standard pressure is applied to the front-end sensor using a hydraulic standard to obtain the full-scale raw data. The front-end gain error is then obtained using the full-scale raw data.
[0016] Based on the ambient temperature, the gain error is corrected to obtain the temperature-compensated error. The temperature sensor is placed in a standard temperature bath at 80.0±0.1℃ to obtain the raw data for low temperature. The temperature sensor is placed in a standard temperature bath at 0℃ to obtain the raw data for medium temperature. The temperature sensor is placed in a standard temperature bath at 50℃ to obtain the raw data for high temperature.
[0017] Zero-point calibration and accuracy verification were performed on the raw data for low temperature, medium temperature, and high temperature.
[0018] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the system includes the following steps: collecting front-end pressure data, back-end pressure data, and temperature data, and performing data filtering and outlier removal processing.
[0019] The FPGA generates a synchronous pulse signal, and simultaneously acquires the raw analog signals from the front-end pressure, back-end pressure, and temperature sensors on the rising edge. The raw analog signals acquired by each channel are converted into digital quantities by a 16-bit ADC and calibrated with a reference voltage. The five consecutive sampling points of each channel are weighted and averaged and filtered according to their weights.
[0020] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the system calculates the current phase change risk level and outputs a phase change status flag based on real-time temperature data and CO2 physical property parameters, including the following steps:
[0021] Examine the temperature data and temperature change rate, eliminate abnormal data, and obtain the theoretical phase transition temperature at the current pressure using the improved Span-Wagner equation based on the current pressure and CO2 property parameter table.
[0022] Calculate the difference between the current temperature and the critical point of phase transition to obtain the temperature safety margin;
[0023] A risk index is obtained by using a fuzzy logic algorithm, combining temperature safety margin, effective dataset, and theoretical phase transition temperature;
[0024] The state level is classified according to the risk index value, and the phase transition state flag is output.
[0025] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the following steps are included: dynamically adjusting the opening position of the electric valve based on front-end pressure data and back-end pressure data using an adaptive PID algorithm.
[0026] The difference between the measured front-end pressure and the target pressure is calculated, and the rate of change of the error is obtained to obtain the control error. Based on the absolute value of the error, the proportional coefficient is obtained. Based on the error characteristics, the integral coefficient is obtained. Based on the rate of change of the error, the derivative coefficient is obtained, and the opening adjustment amount is calculated.
[0027] Limit the valve opening adjustment amount to obtain the compensated opening, correct the valve flow characteristics, and obtain the corrected flow rate.
[0028] The compensated opening is replaced with the duty cycle to obtain the PWM duty cycle.
[0029] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the following steps are included: dynamically adjusting the output power of the distributed heating elements according to a gradient heating strategy based on phase change state indicators and temperature change trends.
[0030] Based on the input phase change state flag and temperature change rate, the state flag is corrected. Based on the corrected state and the current temperature, the power of the safe state is calculated, and the warning state is calculated to obtain the full power heating in the emergency state.
[0031] The temperature of each zone in the pipeline is collected to obtain the temperature deviation weight, and the low-temperature key areas are identified and allocated to each heating element to adjust the output power of the distributed heating elements.
[0032] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the system automatically activates the ultrasonic cleaning device and the spiral flow channel disturbance function when abnormal pressure fluctuations or a sudden drop in temperature are detected, including the following steps:
[0033] Real-time monitoring of pressure and temperature change rates; when the pressure change rate is ≥2MPa / s for 3 seconds or the temperature change rate is ≤-5℃ / min for 2 minutes, a cleaning signal is triggered. Based on the current pressure and temperature, the ultrasonic frequency is obtained, and the cleaning intensity is calculated.
[0034] A sinusoidal drive signal with a frequency equal to the cleaning intensity is generated to start the piezoelectric ceramic transducer. At the same time, the operating current is monitored to obtain the rotation speed of the spiral flow channel. The stepper motor is controlled to run in both forward and reverse directions alternately to coordinate the operation sequence of the ultrasonic wave and the spiral flow channel and avoid resonance interference.
[0035] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the system includes the following steps: real-time monitoring of the sealing performance of the explosion-proof cavity and the inert gas pressure, triggering a multi-level safety protection mechanism.
[0036] The sensor data of pressure, oxygen concentration and humidity in the explosion-proof cavity are read in real time, and AD conversion and filtering are performed. The attenuation rate is obtained based on the pressure data within 30 minutes to form a sealing score. The nitrogen valve opening is calculated using a PID algorithm.
[0037] Based on the opening degree of the nitrogen valve, a multi-level safety protection mechanism is triggered.
[0038] As a preferred embodiment of the CO2-driven well casing pressure intelligent control and anti-freezing system of the present invention, the system operation data is uploaded to the cloud platform via dual-mode communication, and optimized control parameters are received, including the following steps:
[0039] The running data is encapsulated in JSON format, and timestamps and device information are added. The network signal strength is detected. When the 4G signal is >-85dBm, 4G is used first. Otherwise, it is switched to RS485 wired transmission to obtain the communication mode.
[0040] When communication mode = 0, the DataPacket is published to the cloud via the MQTT protocol. When communication mode = 1, it is encapsulated according to the Modbus-RTU protocol to obtain the RS485 transmission status.
[0041] If the RS485 transmission status fails three times consecutively, local storage will be triggered, an alarm will be set, and optimized control parameters will be received.
[0042] The beneficial effects of this invention are as follows: the controller initialization module realizes hardware self-testing and precise sensor calibration; the data acquisition module completes synchronous acquisition and filtering of multi-source data; the dynamic risk assessment module based on the improved Span-Wagner equation and fuzzy logic algorithm can accurately calculate the CO2 phase transition critical point and output a quantitative risk index, solving the problems of energy waste and untimely prevention of freezing caused by the traditional fixed threshold method; the adaptive PID control and gradient heating collaborative regulation mechanism dynamically adjusts the control parameters and heating power distribution according to the changes in working conditions, significantly improving the system response speed and stability under complex working conditions; the system also integrates multiple safety measures such as ultrasonic cleaning and inert gas protection, and realizes remote monitoring through dual-mode communication, ultimately forming a set of intelligent control solutions that can adapt to the special working conditions of CO2 well driving, effectively preventing the risk of CO2 phase transition freezing while ensuring precise control of wellhead pressure. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A schematic diagram of an intelligent control and antifreeze system for CO2-driven well casing pressure.
[0045] Figure 2 This is a schematic diagram of the system control principle.
[0046] Figure 3 This is a diagram illustrating the naming rules. Detailed Implementation
[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0048] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0049] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0050] Reference Figures 1-3 This is the first embodiment of the present invention, which provides a CO2-driven well casing pressure intelligent control and anti-freezing system, including the following steps:
[0051] The controller initialization module starts the self-test program, loads the preset target pressure value, temperature warning threshold and ice blockage critical temperature parameters, completes the initialization configuration, and performs zero-point calibration and accuracy verification on the front-end pressure sensor, back-end pressure sensor and temperature sensor.
[0052] The controller initiates a self-test program, loads preset target pressure values, temperature warning thresholds, and ice blockage critical temperature parameters, and completes the initial configuration.
[0053] After the controller is powered on, it automatically executes a hardware diagnostic program to detect the connection status of all sensors and actuators and generate a hardware status report. Based on the hardware status report, the controller tests the connection quality of the RS485 and communication module, performs three round-trip data packet tests, and checks the remaining power of the supercapacitor bank according to the communication quality report. If the power is ≥80%, it is marked as ready. When the energy storage status is 0, the preset target pressure value, temperature warning threshold, and ice blockage critical temperature parameters are loaded from the non-volatile memory.
[0054] Furthermore, upon power-up, the controller first executes a comprehensive hardware diagnostic program. A dedicated detection circuit scans and detects the connection status of all sensors (including front-end / back-end pressure and temperature sensors) and actuators (such as electric valves and heating elements), generating a detailed hardware status report. Subsequently, based on this report, the system performs a three-pass round-trip data packet test on the RS485 communication module to evaluate the communication link quality and generate a communication quality report. Regarding power management, the system accurately detects the remaining charge status of the supercapacitor bank. When the charge is ≥80%, it is marked as ready. If the energy storage status is 0, the system safely loads preset target pressure values, temperature warning thresholds, and ice blockage critical temperature parameters from non-volatile memory, ensuring the accuracy and reliability of the system startup parameters.
[0055] Zero-point calibration and accuracy verification are performed on the front-end pressure sensor, the back-end pressure sensor, and the temperature sensor.
[0056] A reference pressure is applied to both the front-end and rear-end pressure sensors simultaneously to obtain raw zero-point data. Based on the raw zero-point data, the average values are calculated to obtain the front-end and rear-end data. A standard pressure is applied to the front-end sensor using a hydraulic standard to obtain the full-scale raw data. The front-end gain error is then calculated using the full-scale raw data.
[0057] Furthermore, a staged calibration method is employed to precisely calibrate the front-end and back-end pressure sensors: First, certified reference pressures are applied simultaneously to both pressure sensors, raw zero-point data is collected, and random errors are eliminated by averaging multiple measurements; then, a series of standard pressures from low to high are applied to the front-end sensor using a high-precision hydraulic standard to obtain raw data curves within the full-scale range. Based on these data, the system automatically calculates the gain error characteristic curve of the front-end sensor, establishing a precise mathematical model of pressure-signal output, providing a high-precision reference for subsequent real-time pressure measurements.
[0058] The gain error is corrected based on the ambient temperature to obtain the temperature-compensated error. The temperature sensor is placed in a standard temperature bath at 80.0±0.1℃ to obtain the raw data for low temperature. The temperature sensor is placed in a standard temperature bath at 0℃ to obtain the raw data for medium temperature. The temperature sensor is placed in a standard temperature bath at 50℃ to obtain the raw data for high temperature.
[0059] Furthermore, temperature calibration employs a three-zone calibration method: first, the temperature sensor is placed in a high-precision standard temperature bath at 80.0±0.1℃, and raw data for the low-temperature range is collected after stabilization; then, reference data for the medium-temperature range is obtained in a 0℃ standard temperature bath; finally, calibration for the high-temperature range is completed in a 50℃ temperature bath. Sufficient stabilization time is maintained in each temperature zone to ensure the sensor reaches thermal equilibrium. The system automatically records the sensor's response characteristics in each temperature zone, including key parameters such as response time, stability, and linearity, providing full-range accuracy assurance for temperature measurement.
[0060] Zero-point calibration and accuracy verification were performed on the raw data for low temperature, medium temperature, and high temperature.
[0061] Furthermore, the collected raw data from multiple temperature zones undergoes comprehensive processing: first, zero-point drift in each temperature zone is compensated; then, based on ambient temperature sensor data, the gain error is compensated for using a temperature coefficient, generating a temperature-compensated error correction curve. During the verification phase, a cross-validation method is employed, placing the sensor in a verification temperature bath and comparing the deviations of measured values with standard values to ensure that the measurement accuracy across the entire range meets the 0.5-grade requirement. All calibration parameters and compensation coefficients are stored in non-volatile memory to prevent loss upon power failure.
[0062] The data acquisition module collects front-end pressure data, back-end pressure data, and temperature data, and performs data filtering and outlier removal. Based on real-time temperature data and CO2 physical property parameters, it calculates the current phase change risk level and outputs the phase change status indicator.
[0063] Collect front-end pressure data, back-end pressure data, and temperature data, and perform data filtering and outlier removal.
[0064] The FPGA generates a synchronous pulse signal, and simultaneously acquires the raw analog signals from the front-end pressure, back-end pressure, and temperature sensors on the rising edge. The raw analog signals acquired by each channel are converted into digital quantities by a 16-bit ADC and calibrated with a reference voltage. The five consecutive sampling points of each channel are weighted and averaged and filtered according to their weights.
[0065] Furthermore, an FPGA chip is used to generate high-precision synchronization pulse signals, simultaneously triggering signal acquisition from the front-end pressure sensor, the back-end pressure sensor, and the temperature sensor on the rising edge of the pulse, ensuring strict time synchronization of multi-source data. The raw analog signals from each sensor channel are filtered for anti-aliasing and then converted to digital by a 16-bit high-precision ADC. During the conversion process, the reference voltage fluctuation is monitored in real time and dynamically compensated for. To improve data quality, the system uses a weighted average filtering method with a weight allocation of [0.1, 0.15, 0.5, 0.15, 0.1] for the five consecutive sampling points acquired from each channel, effectively suppressing random noise while preserving signal abrupt changes. Compared to traditional moving average filtering, this method improves signal fidelity by approximately 40% while maintaining the same computational complexity.
[0066] Based on real-time temperature data and CO2 physical properties, calculate the current phase change risk level and output the phase change status indicator.
[0067] Examine the temperature data and temperature change rate, eliminate outliers, and use the improved Span-Wagner equation to obtain the theoretical phase transition temperature at the current pressure based on the current pressure and CO2 property parameter table.
[0068] Furthermore, outlier detection is first performed on the real-time temperature data, using a method based on median absolute deviation (MAD) to remove transient interference data, while simultaneously calculating the effective value of the temperature change rate. Based on the current measured pressure, the system queries the built-in CO2 property parameter table and uses the improved Span-Wagner equation of state to calculate the theoretical phase transition temperature. This equation, by introducing a pressure compensation coefficient, improves the accuracy of the phase transition temperature calculation to ±0.3℃. The risk level calculation module integrates the temperature safety margin, temperature change rate, and pressure compensation coefficient to output a normalized risk index in the [0-1] interval, and classifies it into three levels of status: safe (0-0.3), warning (0.3-0.6), and emergency (0.6-1).
[0069] Calculate the difference between the current temperature and the critical point of phase transition to obtain the temperature safety margin.
[0070] Specifically, the expression is,
[0071] T c ritical;
[0072] Where, ΔT s afe represents the temperature safety margin, T v alid is the effective temperature value, T c "Critical" refers to the critical temperature for phase transition.
[0073] A risk index is obtained by using a fuzzy logic algorithm, combining temperature safety margin, effective dataset, and theoretical phase transition temperature.
[0074] Specifically, the expression is,
[0075]
[0076] Where R is the risk index, P comp Let dT be the effective temperature change rate, and d be the effective temperature.
[0077] The state level is classified according to the risk index value, and the phase transition state flag is output.
[0078] Furthermore, the system employs a three-level status classification mechanism to precisely categorize the calculated risk index R: when R ∈ [0, 0.3), the system determines it as a "safe state," outputting a green status flag, and only maintaining basic monitoring functions; when R ∈ [0.3, 0.6), the system determines it as a "warning state," outputting a yellow status flag and automatically activating preventative heating strategies; when R ≥ 0.6, the system determines it as an "emergency state," outputting a red status flag and immediately initiating the highest level of protective measures. The status flag uses a 32-bit encoding format, including the status level (2 bits), timestamp (16 bits), risk index (10 bits), and checksum (4 bits), ensuring the integrity and reliability of data transmission. The system also records the duration and trend of the status, providing operators with a more comprehensive basis for decision-making.
[0079] The risk assessment module uses an adaptive PID algorithm to dynamically adjust the opening position of the electric valve based on front-end and back-end pressure data, and dynamically adjusts the output power of the distributed heating element according to the phase change state indicator and temperature change trend, following a gradient heating strategy.
[0080] Based on front-end and back-end pressure data, an adaptive PID algorithm is used to dynamically adjust the opening position of the electric valve.
[0081] The difference between the measured front-end pressure and the target pressure is calculated, and the rate of change of the error is determined to obtain the control error.
[0082] Based on the absolute value of the error, the proportional coefficient is obtained; based on the error characteristics, the integral coefficient is obtained; based on the rate of change of the error, the differential coefficient is obtained; and the opening adjustment amount is calculated.
[0083] Specifically, the expression is,
[0084] Δu(t)=K p ×[e(t)-e(t-1)]+K i ×e(t)+K d ×[e(t)-2e(t-1)+e(t-2)]
[0085] Where Δu(t) is the opening adjustment amount, K p K is the proportional coefficient, e(t) is the current control error, and K is the proportional coefficient. i K is the integral coefficient. d is the differential coefficient.
[0086] Limit the opening adjustment amount to obtain the compensated opening, correct the valve flow characteristics, and obtain the corrected flow rate.
[0087] Furthermore, different limiting thresholds are set according to the current valve opening position and direction of movement: an upper limit of +5% for forward adjustment and a lower limit of -5% for reverse adjustment. Then, combining the valve's historical action curves, a flow characteristic correction algorithm based on B-spline curves is used to map the theoretical opening to the actual opening command. This correction process considers the compressibility of the CO2 medium and the pipe flow resistance characteristics, correcting the nonlinear relationship between flow and opening in real time using a lookup table method to ensure linear flow regulation characteristics under different operating conditions. The compensated opening command after limiting is sent to the valve actuator after CRC verification.
[0088] The compensated opening is replaced with the duty cycle to obtain the PWM duty cycle.
[0089] Furthermore, the compensated opening command is converted into a PWM control signal: a 12-bit precision PWM generator maps the 0-100% opening range to a count value of 0-4095, and a dead-time compensation algorithm is introduced during the conversion process to prevent boundary oscillations. The generated PWM signal drives the power MOSFET after opto-isolation, while the output current waveform is monitored in real time. The dead time and rise / fall slope are adjusted through closed-loop feedback to ensure matching with the impedance characteristics of the valve motor. The system also establishes a three-dimensional relationship model of PWM duty cycle, valve position, and medium flow rate, providing more accurate actuator characteristic data for intelligent control.
[0090] Based on the phase transition state indicators and temperature change trends, the output power of the distributed heating elements is dynamically adjusted according to a gradient heating strategy.
[0091] Based on the input phase change state flag and temperature change rate, the state flag is corrected. Based on the corrected state and the current temperature, the power for the safe state is calculated, and the power for the warning state is calculated to obtain the full power heating for the emergency state.
[0092] Specifically, the expression is,
[0093]
[0094] Where P is the actual heating power, P max The maximum design power is T, and the current actual temperature is T.
[0095] The temperature of each zone in the pipeline is collected to obtain the temperature deviation weight, and the low-temperature key areas are identified and allocated to each heating element to adjust the output power of the distributed heating elements.
[0096] Furthermore, by using an array of eight high-precision PT100 temperature sensors installed at key sections of the pipeline, temperature data of each zone is collected synchronously at a frequency of 10Hz. A temperature field analysis module based on the K-means clustering algorithm is used to divide the pipeline into 3-5 characteristic temperature zones, calculate the temperature deviation coefficient of each zone, and automatically generate a temperature distribution heat map, providing a visual basis for heating power allocation.
[0097] The safety protection module automatically activates the ultrasonic cleaning device and spiral flow channel disturbance function when abnormal pressure fluctuations or sudden temperature drops are detected. It also monitors the sealing performance of the explosion-proof cavity and the inert gas pressure in real time, triggering a multi-level safety protection mechanism.
[0098] When abnormal pressure fluctuations or sudden temperature drops are detected, the ultrasonic cleaning device and spiral flow channel disturbance function are automatically activated.
[0099] The system monitors the pressure and temperature change rates in real time. When the pressure change rate is ≥2MPa / s for 3 seconds or the temperature change rate is ≤-5℃ / min for 2 minutes, a cleaning signal is triggered. Based on the current pressure and temperature, the ultrasonic frequency is obtained, and the cleaning intensity is calculated.
[0100] Furthermore, a high-frequency data acquisition module (sampling rate 100Hz) monitors the pipeline pressure and temperature change rates in real time, employing a sliding time window algorithm to calculate the average pressure change over 3 seconds and the temperature change trend over 2 minutes. When a pressure change rate ≥ 2 MPa / s is detected for 3 seconds or a temperature change rate ≤ -5℃ / min for 2 minutes, the intelligent diagnostic module generates a cleaning trigger signal containing the event level, location, and timestamp. Based on the current actual pressure and temperature values, the system dynamically determines the optimal ultrasonic frequency by looking up a preset cleaning parameter matrix table and automatically classifies the cleaning intensity into levels 1-5, corresponding to different output powers and working cycles.
[0101] A sinusoidal drive signal with a frequency equal to the cleaning intensity is generated to start the piezoelectric ceramic transducer. At the same time, the operating current is monitored to obtain the rotation speed of the spiral flow channel. The stepper motor is controlled to run in both forward and reverse directions alternately to coordinate the operation sequence of the ultrasonic wave and the spiral flow channel and avoid resonance interference.
[0102] Furthermore, after the cleaning signal is triggered, the system generates a precisely adjustable sinusoidal drive signal using DDS (Direct Digital Synthesis) technology, which drives the piezoelectric ceramic transducer array via a power amplifier. Simultaneously, the transducer operating current I is monitored in real time, and the actual resonant state is deduced from the If characteristic curve, dynamically fine-tuning the output frequency to ensure optimal transduction efficiency. Based on the current cleaning intensity level, the system controls the spiral flow channel stepper motor to operate at a speed of n = 100 × S (S being the cleaning intensity level) rpm, employing an alternating operating mode of 10 seconds forward rotation, 2 seconds pause, and 10 seconds reverse rotation. A precise time sequence controller coordinates the phase relationship between the ultrasonic pulses and the spiral flow channel rotation, ensuring that their working cycles are offset by 1 / 4 phase, effectively avoiding mechanical resonance and acoustic interference.
[0103] Real-time monitoring of the sealing performance and inert gas pressure of the explosion-proof cavity triggers a multi-level safety protection mechanism.
[0104] The sensor data of pressure, oxygen concentration and humidity in the explosion-proof cavity are read in real time, and AD conversion and filtering are performed. The attenuation rate is obtained based on the pressure data within 30 minutes to form a sealing score. The nitrogen valve opening degree is calculated using a PID algorithm.
[0105] Specifically, the expression is,
[0106]
[0107] Where D is the nitrogen valve opening adjustment amount, P c This represents the current pressure of the cavity.
[0108] Based on the opening degree of the nitrogen valve, a multi-level safety protection mechanism is triggered.
[0109] Furthermore, based on the real-time calculated nitrogen valve opening value, a four-level safety protection response is implemented: when the nitrogen valve opening value is ∈ [0%, 30%), the system maintains basic monitoring status; when the nitrogen valve opening value is ∈ [30%, 60%), Level 1 protection is activated, automatically increasing the sampling frequency to 2Hz and starting the backup nitrogen source; when the nitrogen valve opening value is ∈ [60%, 90%), Level 2 protection is triggered, shutting down unnecessary loads and issuing an audible and visual alarm; when the nitrogen valve opening value is ≥90%, Level 3 emergency protection is executed, immediately cutting off the main power supply and initiating the emergency pressure relief procedure. Each level of protection is equipped with an independent hardware trigger circuit to ensure that basic safety functions can still be performed in the event of a control system failure.
[0110] The remote management module uploads system operation data to the cloud platform via dual-mode communication and receives optimized control parameters.
[0111] The system uploads operational data to the cloud platform via dual-mode communication and receives optimized control parameters.
[0112] The running data is encapsulated in JSON format, and timestamps and device information are added. The network signal strength is detected. When the 4G signal is >-85dBm, 4G is used first; otherwise, it is switched to RS485 wired transmission to obtain the communication mode.
[0113] Furthermore, operational data (including pressure, temperature, valve status, etc.) is encapsulated in standard JSON Schema format, using ISO 8601 timestamp format accurate to milliseconds, and appended with a unique device identifier (MAC address). The network management module monitors 4G signal strength in real time (sampling frequency 1Hz). When a signal strength > -85dBm is detected five consecutive times, the 4G channel quality is considered good, and the communication mode flag is set to 0; otherwise, it automatically switches to RS485 wired transmission mode (flag set to 1). The mode switching process uses a 50ms smooth transition algorithm to ensure uninterrupted data transmission, and simultaneously records the switching event and the network parameters at that time for subsequent communication quality analysis.
[0114] When communication mode = 0, the DataPacket is published to the cloud via the MQTT protocol. When communication mode = 1, it is encapsulated according to the Modbus-RTU protocol to obtain the RS485 transmission status.
[0115] Furthermore, data packets are published via the MQTT 3.1.1 protocol, using QoS 1 to guarantee at least one delivery. The subject path is / CO2Well / [Device ID] / telemetry, and an MD5 checksum is appended to the data packets. In Mode 1 (RS485), the system converts the data to Modbus-RTU frame format, sets the slave address to 0x01, the function code to 03 (read holding register), uses big-endian encoding for the data area, and employs a 0xA001 polynomial for CRC checksum. After each transmission, the system waits for a 200ms acknowledgment window. If no response is received within this timeout, the transmission is marked as failed, and the failure counter is incremented by 1.
[0116] If the RS485 transmission status fails three times consecutively, local storage will be triggered, an alarm will be set, and optimized control parameters will be received.
[0117] Furthermore, when RS485 transmissions fail three times consecutively, the system automatically triggers a three-level fault response: first, the data is transferred to local FRAM storage (capable of storing 30 days of data); then, an audible and visual alarm is activated via hardware alarm circuitry (85dB buzzer + flashing red LED); simultaneously, a simplified alarm message is sent via an independent 4G heartbeat channel. The system maintains an RS485 self-recovery test every 5 minutes, while continuously monitoring optimization parameters (including PID coefficients, temperature thresholds, etc.) sent from the cloud. Parameter updates employ a dual-verification mechanism: they are first written to a temporary storage area, and after being confirmed by CRC32 and semantic checks, they are migrated to the runtime configuration area to ensure the security of system parameters. All communication events are recorded in an SD card log, which supports export and analysis in FAT32 format.
[0118] In summary, this invention achieves hardware self-testing and precise sensor calibration through the controller initialization module, completes synchronous acquisition and filtering of multi-source data through the data acquisition module, and utilizes a dynamic risk assessment module based on the improved Span-Wagner equation and fuzzy logic algorithm to accurately calculate the CO2 phase transition critical point and output a quantitative risk index. This solves the problems of energy waste and untimely freezing prevention caused by traditional fixed threshold methods. The adaptive PID control and gradient heating collaborative regulation mechanism dynamically adjusts control parameters and heating power distribution according to changes in operating conditions, significantly improving the system response speed and stability under complex operating conditions. The system also integrates multiple safety measures such as ultrasonic cleaning and inert gas protection, and achieves remote monitoring through dual-mode communication. Ultimately, it forms an intelligent control solution that can adapt to the special operating conditions of CO2 well driving, effectively preventing the risk of CO2 phase transition freezing while ensuring precise wellhead pressure control.
[0119] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A CO2-driven well casing pressure intelligent control and anti-freezing system, characterized in that: include, The controller initialization module starts the self-test program, loads the preset target pressure value, temperature warning threshold and ice blockage critical temperature parameters, completes the initialization configuration, and performs zero-point calibration and accuracy verification on the front-end pressure sensor, back-end pressure sensor and temperature sensor. The data acquisition module collects front-end pressure data, back-end pressure data, and temperature data, and performs data filtering and outlier removal. Based on real-time temperature data and CO2 physical property parameters, it calculates the current phase change risk level and outputs the phase change status indicator. The risk assessment module uses an adaptive PID algorithm to dynamically adjust the opening position of the electric valve based on front-end and back-end pressure data, and dynamically adjusts the output power of the distributed heating element according to the phase change state indicator and temperature change trend, following a gradient heating strategy. The safety protection module automatically activates the ultrasonic cleaning device and spiral flow channel disturbance function when abnormal pressure fluctuations or sudden temperature drops are detected, and monitors the sealing performance of the explosion-proof cavity and the inert gas pressure in real time, triggering a multi-level safety protection mechanism. The remote management module uploads system operation data to the cloud platform via dual-mode communication and receives optimized control parameters.
2. The intelligent control and anti-freezing system for CO2-driven well casing pressure as described in claim 1, characterized in that: The controller initiates a self-test program, loads preset target pressure values, temperature warning thresholds, and ice blockage critical temperature parameters, and completes the initialization configuration, including the following steps. After the controller is powered on, it automatically executes a hardware diagnostic program to detect the connection status of all sensors and actuators and generate a hardware status report. Based on the hardware status report, the controller tests the connection quality of the RS485 and communication module, performs three round-trip data packet tests, and checks the remaining power of the supercapacitor bank according to the communication quality report. If the power is ≥80%, it is marked as ready. When the energy storage status is 0, the preset target pressure value, temperature warning threshold, and ice blockage critical temperature parameters are loaded from the non-volatile memory.
3. The intelligent control and anti-freezing system for CO2-driven well casing pressure as described in claim 2, characterized in that: Zero-point calibration and accuracy verification of the front-end pressure sensor, back-end pressure sensor, and temperature sensor include the following steps: A reference pressure is applied to both the front-end and rear-end pressure sensors simultaneously to obtain raw zero-point data. Based on the raw zero-point data, the average values are obtained to obtain the front-end and rear-end data. A standard pressure is applied to the front-end sensor using a hydraulic standard to obtain the full-scale raw data. The front-end gain error is then obtained using the full-scale raw data. Based on the ambient temperature, the gain error is corrected to obtain the temperature-compensated error. The temperature sensor is placed in a standard temperature bath at 80.0±0.1℃ to obtain the low-temperature raw data. The temperature sensor is placed in a standard temperature bath at 0℃ to obtain the medium-temperature raw data. The temperature sensor is placed in a standard temperature bath at 50℃ to obtain the high-temperature raw data. Zero-point calibration and accuracy verification were performed on the raw data for low temperature, medium temperature, and high temperature.
4. The intelligent control and anti-freezing system for CO2-driven well casing pressure as described in claim 3, characterized in that: The process involves collecting front-end pressure data, back-end pressure data, and temperature data, and then performing data filtering and outlier removal, including the following steps: The FPGA generates a synchronous pulse signal, and simultaneously acquires the raw analog signals from the front-end pressure, back-end pressure, and temperature sensors on the rising edge. The raw analog signals acquired by each channel are converted into digital quantities by a 16-bit ADC and calibrated with a reference voltage. The five consecutive sampling points of each channel are weighted and averaged and filtered according to their weights.
5. The intelligent control and anti-freezing system for CO2-driven well casing pressure as described in claim 4, characterized in that: Based on real-time temperature data and CO2 physical properties, the current phase transition risk level is calculated and the phase transition state indicator is output. Includes the following steps, Examine the temperature data and temperature change rate, eliminate abnormal data, and obtain the theoretical phase transition temperature at the current pressure using the improved Span-Wagner equation based on the current pressure and CO2 property parameter table. Calculate the difference between the current temperature and the critical point of phase transition to obtain the temperature safety margin; A risk index is obtained by using a fuzzy logic algorithm, combining temperature safety margin, effective dataset, and theoretical phase transition temperature; The state level is classified according to the risk index value, and the phase transition state flag is output.
6. The intelligent control and anti-freezing system for CO2-driven well casing pressure as described in claim 5, characterized in that: Based on front-end and back-end pressure data, an adaptive PID algorithm is used to dynamically adjust the opening position of the electric valve. Includes the following steps, The difference between the measured front-end pressure and the target pressure is calculated, and the rate of change of the error is obtained to obtain the control error. Based on the absolute value of the error, the proportional coefficient is obtained. Based on the error characteristics, the integral coefficient is obtained. Based on the rate of change of the error, the derivative coefficient is obtained, and the opening adjustment amount is calculated. Limit the valve opening adjustment amount to obtain the compensated opening, correct the valve flow characteristics, and obtain the corrected flow rate. The compensated opening is replaced with the duty cycle to obtain the PWM duty cycle.
7. The intelligent control and anti-freezing system for CO2-driven well casing pressure as described in claim 6, characterized in that: Based on the phase transition state indicators and temperature change trends, the output power of the distributed heating elements is dynamically adjusted according to a gradient heating strategy. Includes the following steps, Based on the input phase change state flag and temperature change rate, the state flag is corrected. Based on the corrected state and the current temperature, the power of the safe state is calculated, and the warning state is calculated to obtain the full power heating in the emergency state. The temperature of each zone in the pipeline is collected to obtain the temperature deviation weight, and the low-temperature key areas are identified and allocated to each heating element to adjust the output power of the distributed heating elements.
8. The intelligent control and antifreeze system for CO2-driven well casing pressure as described in claim 7, characterized in that: When abnormal pressure fluctuations or sudden temperature drops are detected, the ultrasonic cleaning device and spiral flow channel disturbance function are automatically activated, including the following steps. Real-time monitoring of pressure and temperature change rates; when the pressure change rate is ≥2MPa / s for 3 seconds or the temperature change rate is ≤-5℃ / min for 2 minutes, a cleaning signal is triggered. Based on the current pressure and temperature, the ultrasonic frequency is obtained, and the cleaning intensity is calculated. A sinusoidal drive signal with a frequency equal to the cleaning intensity is generated to start the piezoelectric ceramic transducer. At the same time, the operating current is monitored to obtain the rotation speed of the spiral flow channel. The stepper motor is controlled to run in both forward and reverse directions alternately to coordinate the operation sequence of the ultrasonic wave and the spiral flow channel and avoid resonance interference.
9. The intelligent control and antifreeze system for CO2-driven well casing pressure as described in claim 8, characterized in that: Real-time monitoring of the sealing performance and inert gas pressure of the explosion-proof cavity triggers a multi-level safety protection mechanism, including the following steps: The sensor data of pressure, oxygen concentration and humidity in the explosion-proof cavity are read in real time, and AD conversion and filtering are performed. The attenuation rate is obtained based on the pressure data within 30 minutes to form a sealing score. The nitrogen valve opening is calculated using a PID algorithm. Based on the opening degree of the nitrogen valve, a multi-level safety protection mechanism is triggered.
10. The intelligent control and antifreeze system for CO2-driven well casing pressure as described in claim 9, characterized in that: The system uploads operational data to the cloud platform via dual-mode communication and receives optimized control parameters, including the following steps: The running data is encapsulated in JSON format, and timestamps and device information are added. The network signal strength is detected. When the 4G signal is >-85dBm, 4G is used first. Otherwise, it is switched to RS485 wired transmission to obtain the communication mode. When communication mode = 0, the DataPacket is published to the cloud via the MQTT protocol. When communication mode = 1, it is encapsulated according to the Modbus-RTU protocol to obtain the RS485 transmission status. If the RS485 transmission status fails three times consecutively, local storage will be triggered, an alarm will be set, and optimized control parameters will be received.
Citation Information
Cited By
Phase change anti-freezing control method based on state equation constraint
CN121761694A