Multi-phase flow metering automatic control method, equipment, medium and program product

By synchronizing and unifying the data of the multiphase flow metering system, extracting characteristic parameters and dynamically adjusting the valve opening, the problem of data inconsistency in the multiphase flow metering system is solved, and higher metering accuracy and stability are achieved.

CN120798259APending Publication Date: 2025-10-17SHANGHAI YINUO INSTR
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511178026.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The existing multiphase flow metering system lacks a unified automatic control method, resulting in inconsistent data collection and processing from multiple source instruments, making it impossible to achieve valve interlocking control, and affecting metering accuracy and stability.

Method used

By synchronizing and unifying the metering data of mass flow meters, gas flow meters, and liquid level meters, a standardized data set is generated, characteristic parameters representing the multiphase flow state are extracted, and a state parameter set is generated. When an anomaly is detected, a corrected liquid level value is generated, and the valve opening is dynamically adjusted to keep the liquid level within the preset range.

Benefits of technology

It improves the operational stability and data accuracy of the multiphase flow metering system, avoids empty pipe and liquid inclusion errors, and enhances the control adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120798259A_ABST
    Figure CN120798259A_ABST
Patent Text Reader

Abstract

The invention provides a multiphase flow metering automatic control method and device, a medium and a program product, and is applied to an automatic control system of a multiphase flow metering device.The method comprises the steps that metering data from a mass flow meter, a gas flow meter and a liquid level meter are obtained, time synchronization processing and unification processing are conducted on the metering data, and a standardized data set is generated; based on the standardized data set, characteristic parameters representing the multiphase flow state are extracted, and a state parameter set used for describing the current flow state is generated; when at least one index in the state parameter set meets an abnormal judgment condition, an abnormal flow state is judged, and a corrected liquid level value is generated; and based on the deviation value between the corrected liquid level value and the reference liquid level, a feedback control signal is calculated, and the opening degree of the valve is dynamically adjusted, so that the liquid level of the fluid in the outlet pipeline is automatically maintained within the preset height range. According to the automatic adjusting mechanism, the liquid level in the outlet pipeline can be automatically adjusted within the preset height range, and stable output of the liquid phase is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of flow measurement, in particular to a multi-phase flow metering automatic control method, device, medium and program product. BACKGROUND

[0002] In the process of oil and gas exploitation, the crude oil produced at the wellhead is usually in a multi-phase flow state, containing oil phase, gas phase and water phase and other components. In order to evaluate the production status of the oil well and optimize the subsequent development plan, it is necessary to accurately meter the multi-phase flow in real time.

[0003] In the prior art, the crude oil is often measured online by a multi-phase flow metering device, and relevant parameters including flow rate, pressure, temperature, density, water cut and other information are collected. However, the accuracy of the multi-phase flow metering result depends largely on the cooperative control ability of the control system on the field instruments.

[0004] However, in engineering applications, the existing control system lacks a unified automatic control method for the whole device, so as to uniformly collect, process and count the multi-source data under complex and changing well site conditions, and to implement reliable interlocking control on the outlet valve according to the liquid level signal. Due to the lack of automation cooperation at the control terminal level, abnormal conditions such as empty pipe and liquid blockage may occur in the metering process, thereby affecting the metering accuracy and stability. SUMMARY

[0005] In view of the deficiencies in the prior art, the present application provides a multi-phase flow metering automatic control method, device, medium and program product, at least to solve the problem that the prior art lacks unified collection and processing ability of multi-source instrument data in the multi-phase flow metering process, and cannot realize interlocking control of the valve based on the liquid level signal.

[0006] To achieve the above-mentioned purpose and other advantages, some embodiments of the present application provide the following aspects:

[0007] In a first aspect, some embodiments of the present application provide a multi-phase flow metering automatic control method applied to an automatic control system of a multi-phase flow metering device, wherein the automatic control system includes a mass flow meter, a gas flow meter, a liquid level meter and a valve in an outlet pipeline for adjusting the flow rate of the fluid, and the method comprises:

[0008] Obtaining metering data from the mass flow meter, the gas flow meter and the liquid level meter, performing time synchronization processing and unified processing on the metering data, and generating a standardized data set;

[0009] Based on the standardized data set, extracting feature parameters representing the multi-phase flow state, and generating a state parameter set for describing the current flow state;

[0010] When at least one indicator in the state parameter set meets a preset abnormality determination condition, it is determined that the flow state is abnormal, and a corrected liquid level value is generated;

[0011] Based on the deviation between the corrected liquid level value and the reference liquid level, a feedback control signal is calculated and the opening of the valve is dynamically adjusted to keep the liquid level in the outlet pipeline automatically maintained within a preset height range.

[0012] In a second aspect, some embodiments of the present application also provide an electronic device, which comprises:

[0013] One or more processors; and a memory storing computer program instructions which, when executed, cause the processor to perform the multiphase flow metering automatic control method according to any one of the above.

[0014] In a third aspect, some embodiments of the present application also provide a computer-readable storage medium having stored thereon computer programs and / or instructions which, when executed by a processor, implement the multiphase flow metering automatic control method according to any one of the above.

[0015] In a fourth aspect, some embodiments of the present application also provide a computer program product comprising computer programs and / or instructions which, when executed by a processor, implement the multiphase flow metering automatic control method according to any one of the above.

[0016] Compared with the related art, in the scheme provided by the embodiments of the present application, the metering data of the mass flow meter, the gas flow meter and the liquid level meter are time-synchronized and uniformly processed to construct a standardized data set, thereby providing a unified and reliable data basis for state recognition and control adjustment. On this basis, feature parameters with flow behavior sensitivity and physical representativeness are further extracted, and a state parameter set reflecting the flow state is generated to realize accurate characterization and dynamic modeling of the multiphase flow state. When the system detects abnormal changes in the state parameter set, it can determine that the current flow state is abnormal in time, and generate a corrected liquid level value for control compensation. The deviation between the corrected liquid level value and the target reference liquid level will drive the control system to generate a feedback signal to dynamically adjust the opening of the outlet pipeline valve, so that the outlet liquid level automatically tends to the preset stable range. This scheme not only avoids the problem of empty pipe operation of the mass flow meter due to too low liquid level, but also prevents the gas flow meter from being misaligned due to too high liquid level, thereby significantly improving the operation stability, data accuracy and control adaptive ability of the multiphase flow metering system of the crude oil well. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other embodiments can be obtained from these drawings without creative labor.

[0018] Figure 1 is a flow diagram of a multi-phase flow metering automatic control method provided by an embodiment of the present application;

[0019] Figure 2 is a well switching control flow diagram of a multi-phase flow metering automatic control system provided by an embodiment of the present application;

[0020] Figure 3 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0022] First Embodiment

[0023] The first embodiment of the present application relates to a multi-phase flow metering automatic control method, applied to an automatic control system of a multi-phase flow metering device. The automatic control system includes a mass flow meter, a gas flow meter, a liquid level meter arranged in an outlet pipeline, and a valve for adjusting the flow rate of fluid in the outlet pipeline. The multi-phase flow produced by an oil well is collected into the outlet pipeline through a wellhead, and metering and control are both completed on the outlet pipeline. The multi-phase flow metering automatic control system includes a plurality of key component modules, which are respectively used to realize high-precision real-time monitoring and closed-loop regulation and control of the multi-phase flow of crude oil from the oil well, and specifically include:

[0024] A data acquisition module is used to acquire signals from various sensors and meters in the field, and supports the following two types of input methods:

[0025] Digital communication acquisition (Modbus protocol, RS-485 interface): the control system acts as a Modbus master station, establishes a communication connection with the lower meter through an RS-485 bus, and acquires metering data in the mass flow meter and the gas flow meter. For example, the flow rate, temperature, density, cumulative amount, water cut and other related data of the mass flow meter, and the flow rate, temperature, pressure, cumulative amount, sound velocity and other related data of the gas flow meter.

[0026] Analog signal acquisition (4-20mA): The control system is equipped with an analog input interface for receiving the standard 4-20mA current signal from the liquid level meter. The liquid level meter is installed on the oil well outlet pipeline, and by reading its current signal and performing range conversion, the liquid level height of the liquid phase in the outlet pipeline can be obtained in real time, which is used to continuously monitor the liquid accumulation state during the oil well delivery process.

[0027] Communication management module: The automatic control system acts as a Modbus master station, supporting polling communication to lower devices through RS-485 bus, including multiple rounds of data reading of mass flowmeter, gas flowmeter and liquid level meter. The communication process supports setting baud rate, check mode and response timeout time to adapt to the stable data transmission requirements in the field industrial environment.

[0028] Control execution module: An electric valve for adjusting the fluid discharge rate of the outlet pipeline, whose opening degree is calculated by the control system based on the deviation between the current liquid level measured by the liquid level meter and the reference liquid level. The system issues control instructions through analog or digital output to realize closed-loop regulation of the fluid level, preventing excessive liquid accumulation or flowmeter empty pipe operation.

[0029] Abnormal monitoring module: With built-in abnormal state recognition mechanism, it can judge whether abnormal conditions such as gas overpressure, sound speed out of limits or liquid level exceeding occur based on the parameters of pressure, sound speed and instantaneous flow provided by the mass flowmeter and gas flowmeter, and the height change signal of the liquid level meter, and through the I / O channel linkage alarm system or execute safety shutdown operation, to improve the system operation stability and safety guarantee ability.

[0030] The multi-phase flow metering automatic control method according to the embodiment can refer to Figure 1 The method can include the following steps:

[0031] Step S1: Obtain metering data from mass flowmeter, gas flowmeter and liquid level meter, and perform time synchronization and unification processing on the metering data to generate a standardized data set.

[0032] For step S1, specifically, after the automatic control system is powered on, the device initialization process is first executed, including the following operation steps:

[0033] Clear historical flag: Read the historical flag of density and water cut in the mass flowmeter and perform clearing operation to ensure that each status bit is cleared and the initial metering conditions are re-established.

[0034] Enable interrupt mechanism: Enable the interrupt service program to respond to sudden changes or abnormal events of field signals in real time, such as liquid level mutation, communication failure, etc., to ensure that the acquisition and control process has fast response capability.

[0035] State clear: all internal alarm state flag bits are cleared, and the current metering state is initialized to set the "non-metering" state to prevent false triggering or residual state from affecting the current metering process.

[0036] Subsequently, the system enters the normal data acquisition process, reads the real-time data of the mass flowmeter and the gas flowmeter through the Modbus communication interface (including flow, temperature, density, sound speed, pressure, etc.), and reads the 4-20mA signal of the liquid level meter through the analog quantity acquisition interface, and obtains the liquid level height in the outlet pipeline through linear conversion.

[0037] In a multiphase flow metering system, multiple physical quantities such as flow, density, temperature, pressure, and liquid level are usually obtained from different types of sensors or instruments. These data come from different sources, and their formats, units, and sampling time points may not be consistent, so they cannot be directly used for unified analysis or control decision-making. The metering data of the mass flowmeter, gas flowmeter, and liquid level meter need to be time-synchronized and unified. Specifically, it includes: establishing a unified time reference, aligning the original data collected by various sensors to a unified time axis according to their time stamps; for data streams with different sampling periods, use interpolation algorithm for data reconstruction to fill in missing samples in the time series; normalize or standardize the reconstructed multi-source data to eliminate dimension differences and form a standardized data set with consistent structure and aligned sampling period, so as to unify the original data from different instruments in time stamp, format, and structure, and construct a standardized data set.

[0038] Step S2: Based on the standardized data set, extract feature parameters representing the state of multiphase flow, and generate a state parameter set to describe the current flow state.

[0039] For step S2, specifically, the system extracts parameters with physical representativeness and change sensitivity from the standardized data set, such as liquid instantaneous flow, water instantaneous flow, water cut, gas instantaneous flow, liquid level height, sound speed, pressure, temperature, density, etc. Key parameters are used as feature parameters of multiphase flow state to enhance the sensitivity and recognition ability of flow state change.

[0040] On this basis, the state parameter set is constructed from the following dimensions to enhance the response ability to complex flow state changes, including but not limited to:

[0041] Liquid phase state characteristics: liquid level height change rate, liquid level fluctuation amplitude, liquid level drop trend, etc.

[0042] Gas phase state characteristics: short-term change rate of gas pressure, deviation ratio between gas flow rate and sound speed, etc.

[0043] Temperature and density coupling characteristics: deviation of real-time correspondence between liquid temperature and density;

[0044] Moisture content variation characteristics: moisture content trend and fluctuation interval of multiple metering periods;

[0045] Cross-period cumulative characteristics: flow difference between periods, cumulative amount offset, and total liquid level change;

[0046] Abnormal index characteristics: early warning factors such as sudden change in sound velocity, instantaneous surge in liquid level, and pressure jitter.

[0047] Based on the above-mentioned multiple dimensions, a flow state parameter set is constructed, which not only contains instantaneous values, but also includes statistical indicators (such as mean, variance, trend coefficient, etc.) within a certain time window, for comprehensive judgment of whether there is non-steady state behavior, gas-liquid ratio imbalance, or instrument signal anomaly, etc.

[0048] Step S3: When at least one index in the state parameter set meets the preset abnormal judgment condition, it is determined to be an abnormal flow state, and a corrected liquid level value is generated.

[0049] For step S3, based on the multiphase flow behavior characteristics reflected in the state parameter set, the current state is comprehensively judged based on multiple preset abnormal judgment conditions. The abnormal judgment conditions can include but are not limited to: gas-liquid ratio change exceeding a set threshold, state deviation index higher than a preset threshold, flow stability evaluation index lower than a stable threshold, liquid level fluctuation coefficient exceeding a set limit, moisture content trend coefficient deviating from a set range, and abnormal flag being triggered.

[0050] When at least one index in the state parameter set meets any of the above abnormal judgment conditions, the system determines that the current flow state is abnormal, and further triggers the liquid level correction process to generate a corrected liquid level value, ensuring the accuracy of the subsequent control process.

[0051] Step S4: Based on the deviation between the corrected liquid level value and the reference liquid level, a feedback control signal is calculated and the opening of the valve is dynamically adjusted to maintain the liquid level in the outlet pipeline within the preset height range.

[0052] For step S4, the corrected liquid level value is compared with the set reference liquid level to calculate the deviation. According to the size and trend of the deviation, the control function preset in the control execution module is called to calculate the feedback control signal to be executed. The signal can be an analog quantity (such as valve opening control voltage) or a digital quantity (such as valve opening and closing position instruction), which is used to drive the electric valve on the outlet pipeline to adjust the opening. The flow rate of multiphase flow from the oil well into the metering device is balanced with the flow rate of liquid discharged from the outlet pipeline, so that the liquid level of the liquid phase is automatically maintained within the controllable height range.

[0053] The control strategy for adjusting the valve opening degree based on the feedback control signal adopts a multi-level liquid level interval control strategy to realize closed-loop accurate adjustment of the outlet pipeline liquid level in a continuous, smooth and automatic liquid discharge control process. The system presets a plurality of liquid level control thresholds, i.e., a first liquid level threshold, a second liquid level threshold, a third liquid level threshold and a fourth liquid level threshold, which are sequentially increased in value and correspond to different response levels of the system to liquid level control. Based on the liquid level height fed back by the current liquid level meter, the multi-level liquid level interval control strategy specifically includes:

[0054] When the current liquid level is lower than the first liquid level threshold, the system controls the valve to be completely closed to prevent excessive liquid discharge from causing the mass flowmeter to be in an empty pipe state;

[0055] When the liquid level is between the first liquid level threshold and the second liquid level threshold, the system controls the valve to be opened at a first set opening degree (such as 20%) to discharge liquid;

[0056] When the liquid level is between the second liquid level threshold and the third liquid level threshold, the system controls the valve to be opened at a second set opening degree (such as 40%) to discharge liquid;

[0057] When the liquid level is between the third liquid level threshold and the fourth liquid level threshold, the system controls the valve to be opened at a third set opening degree (such as 60%) to discharge liquid;

[0058] When the liquid level is higher than the fourth liquid level threshold, the system controls the valve to be opened at a maximum set opening degree (such as 100%) to quickly discharge liquid to avoid liquid accumulation in the outlet section.

[0059] Compared with related technologies, in the scheme provided in the embodiments of the present application, the measurement data of the mass flowmeter, the gas flowmeter and the liquid level meter are time-synchronized and uniformly processed to construct a standardized data set, thereby providing a unified and reliable data basis for state recognition and control adjustment. On this basis, feature parameters with flow behavior sensitivity and physical representativeness are further extracted, and a state parameter set reflecting the flow state is generated to realize accurate characterization and dynamic modeling of the multiphase flow state. When the system detects abnormal changes in the state parameter set, it can determine that the current flow state is abnormal in a timely manner, and generate a corrected liquid level value for control compensation. The deviation between the corrected liquid level value and the target reference liquid level will drive the control system to generate a feedback signal to dynamically adjust the opening degree of the outlet pipeline valve, so that the outlet liquid level automatically tends to the preset stable range. This scheme not only avoids the problem of empty pipe operation of the mass flowmeter caused by excessively low liquid level, but also prevents the gas flowmeter from being misjudged due to excessively high liquid level, thereby significantly improving the operation stability, data accuracy and control adaptive ability of the crude oil well multiphase flow metering system.

[0060] Second embodiment

[0061] The second embodiment of the present application relates to a kind of multiphase flow metering automatic control method.The second embodiment is improved on the basis of the first embodiment, and the specific improvement is that in step S1, in the process of obtaining metering data, Modbus master station communication initialization and register batch reading mechanism are added, i.e., initialization Modbus master station communication configuration is set, baud rate, check mode and timeout time are set, and the multiple rounds of data reading process of mass flow meter and gas flow meter is sequentially completed by Modbus communication protocol, and the reading process includes:

[0062] read the continuous several floating point data in the starting address of instantaneous flow value in mass flow meter, and store to corresponding first data register;

[0063] pure oil density, pure water density and corresponding water cut data under standard temperature are extracted using alternate reading mode, and are stored to corresponding second data register;

[0064] read the cumulative flow data of pure oil and pure water, and store to corresponding third data register;

[0065] read the related data of gas flow meter, and the related data includes instantaneous flow, gas temperature, gas pressure, cumulative flow and sound velocity parameter, and store to corresponding fourth data register;

[0066] the metering data stored in the first data register, the second data register, the third data register and the fourth data register are written into the data cache area of automatic control system.

[0067] Specifically, before the communication of control system as Modbus master station is started, parameter configuration is needed, such as baud rate setting is 9600;Verification mode is set to no check;Response timeout time is set to 250 milliseconds;After configuration is completed, RS-485 connection with mass flow meter, gas flow meter and other lower devices is established.

[0068] After communication parameter configuration is completed, the system executes the following four rounds of data reading operation in sequence through RS-48 bus:

[0069] First round: read instantaneous flow related data.Because the register mapping table under the Modbus protocol of mass flow meter usually arranges multiple key parameters (such as instantaneous flow, medium temperature, fluid density, water cut, time stamp, state identifier) in continuous address section with continuous floating point format, only one starting address needs to be set, and six key floating point data can be read at one time, and the reading result is sequentially written into the first data register.

[0070] The second round: alternately read the density and moisture content data under standard temperature conditions. In order to improve the reading accuracy and update frequency of specific parameters, the system adopts an alternating polling strategy, focusing on batch extraction of pure oil density, pure water density and corresponding moisture content data under standard temperature (such as 20°C). The batch data is not completely continuous in the internal register of the mass flow meter, so it is necessary to set multiple scattered reading addresses to access the register where each data is located, and write the corresponding field in the second data register after each reading.

[0071] The third round: read the cumulative flow data of pure oil and pure water. The data is located in independent registers at different addresses in the mass flow meter, and the control system will read the two cumulative flow fields in sequence and write them into the third data register. The cumulative value records the volume distribution and relative proportion of the crude oil liquid phase during long-term operation, providing historical cumulative basis for system output evaluation and working condition analysis.

[0072] The fourth round: read the relevant parameters of the gas flow meter. The system accesses multiple data registers in the gas flow meter through the Modbus master polling mechanism to obtain key parameters including instantaneous gas flow, gas temperature, gas pressure, cumulative flow, and current sound velocity, and writes them into the corresponding address segment of the fourth data register in sequence. Among them, the sound velocity parameter can be used to reflect the physical changes of the gas medium, and assist in judging the stability of the wellhead flow state.

[0073] The data stored in the first data register to the fourth data register is written into the data cache area of the automatic control system, and the liquid level signal provided by the liquid level meter is combined to form a standardized data set.

[0074] Further, in order to improve the accuracy of the multi-phase flow characteristic parameters, the embodiment also includes processing the cumulative data read by the mass flow meter, specifically including:

[0075] In each measurement period, it is judged whether the current measurement state is in an effective measurement state;

[0076] If it is in an effective measurement state, the instantaneous flow increment data collected in the measurement period is accumulated from zero, and the liquid cumulative amount and water cumulative amount are obtained respectively;

[0077] Based on the liquid cumulative amount and water cumulative amount, the average moisture content parameter of the current measurement period is generated by weighted calculation according to the increment and its corresponding time window in each measurement period, as one of the characteristic parameters representing the multi-phase flow state.

[0078] Specifically, in each metering cycle of the automatic control system, the system first determines whether the current is in a valid metering state, i.e., the system is running normally, each sensor is working stably, and there is no abnormal situation such as alarm or communication interruption. If it is in a valid metering state, the system starts to integrate the instantaneous flow increment data in the cycle. In this process, the system takes the starting point of the current cycle as the zero point, and performs time integration processing on the instantaneous flow value to obtain the liquid cumulative amount (i.e., the total flow of crude oil + water) and the water cumulative amount (estimated by the water cut and the total instantaneous flow) in the current metering cycle, respectively.

[0079] On the basis of obtaining the cumulative amount, combined with the length of the time window experienced in the cycle, weighted processing is performed, specifically, the water cumulative amount is divided by the liquid cumulative amount to obtain the original average water cut value in the current cycle; the original average water cut values in a plurality of consecutive cycles are slidingly weighted and averaged to filter out local mutation interference, and a more representative cycle average water cut parameter is generated. The average water cut can more stably reflect the dynamic change of the composition of the liquid component, improve the real-time and reliability of the water cut data, and provide data support for accurately characterizing the state of the crude oil multiphase flow.

[0080] It is not difficult to find that in the embodiments of the present application, the mechanism based on Modbus master station communication configuration and register batch reading is introduced, and combined with multi-round data acquisition, register structured storage and feature parameter dynamic calculation strategy, efficient and stable reading and processing of mass flowmeter and gas flowmeter data are realized.

[0081] Third embodiment

[0082] The third embodiment of the present application relates to a multiphase flow metering automatic control method. The third embodiment is an improvement based on the first embodiment, and the specific improvement is that in the third embodiment of the present application, a feature value normalization and principal component analysis processing mechanism is provided, that is, step S2 can further include the following steps:

[0083] Step S201: extracting feature values for describing the current flow state of the fluid from the standardized data set;

[0084] Step S202: applying normalization processing to the feature values, and performing dimension reduction processing on the normalized feature values based on the principal component analysis method to construct a low-dimensional flow state representation vector;

[0085] Step S203: comparing the low-dimensional flow state representation vector with a preset normal operation state reference model to generate a state parameter set for characterizing the current flow state.

[0086] Specifically, the system extracts feature values with physical representativeness and flow state sensitivity from the standardized data set, which includes but is not limited to liquid instantaneous flow, water instantaneous flow, gas flow, liquid level height, sound speed, pressure, temperature, water content, density and other parameters. For the extracted original feature values, first, a normalization processing method (such as Min-Max normalization, Z-Score standardization, etc.) is used to map the numerical values to a unified dimension space to eliminate the scale influence between different physical quantities; then the principal component analysis (PCA) method is applied to reduce the dimension of the normalized high-dimensional features, extract the main statistical change direction, and finally construct a low-dimensional flow state representation vector. The representation vector can compress redundant information and retain the main dynamic change characteristics of the system. The state representation vector after dimension reduction is set as:

[0087] X state =[x1,x2,...,x k ]

[0088] Where x i represents the score of the i-th principal component, k < n and is less than the original feature dimension n.

[0089] The state representation vector obtained in step S202 is compared with a preset normal operation state reference model (such as generated based on K-means clustering center, historical sample mean or using linear discriminant analysis, etc.) for similarity or deviation degree measurement, which can use one or a combination of Euclidean distance, cosine similarity, etc. Combined with the characteristic weight of each principal component, the state deviation degree D, the flow stability index St, the gas-liquid ratio fluctuation index R {g / l} , the liquid level fluctuation coefficient K h , the water content trend coefficient K w , the abnormal identifier Flag {abn} and a set of state parameters for quantitatively describing the current flow state are calculated. The state parameter set can include instantaneous values, or statistical indicators such as mean, variance, trend coefficient, etc. obtained within a sliding time window, for comprehensive judgment of whether there is non-steady state behavior, gas-liquid ratio imbalance or instrument signal anomaly.

[0090] When the state deviation degree D exceeds the preset threshold, or the flow stability index St is lower than the preset threshold, or the abnormal identifier Flag {abn} is set, the system determines that the current flow state is abnormal, and outputs the state parameter set to the subsequent step for liquid level correction.

[0091] Further, in the process of generating the state parameter set, abnormal state detection is also included, which comprises:

[0092] When the gas flow meter detects that the gas pressure parameter exceeds the preset pressure threshold, the corresponding metering data is recorded and marked as a gas overpressure anomaly;

[0093] In response to the gas flow meter detecting that the sound velocity parameter is higher or lower than the set sound velocity normal range, the corresponding metering data is recorded and marked as a sound velocity anomaly;

[0094] In response to the liquid level meter detecting that the liquid level height parameter exceeds the set upper liquid level threshold, the corresponding metering data is recorded and marked as a liquid level overheight anomaly.

[0095] Specifically, when the gas flow meter detects that the gas pressure parameter exceeds the preset upper pressure threshold (such as the wellhead allowable pressure value), the current metering data is marked as gas overpressure anomaly data, and the corresponding abnormal flag bit in the state parameter set is set to an active state. When the sound velocity parameter detected by the gas flow meter exceeds the set sound velocity normal range (i.e., higher than the maximum sound velocity threshold or lower than the minimum sound velocity threshold), which is usually related to gas composition, pressure and temperature, there may be abnormal situations such as gas phase component mutation, equipment misreading or two-phase interference, the system will mark this period data as sound velocity anomaly data, and set the abnormal flag bit in the state parameter set. When the liquid level height detected by the liquid level meter exceeds the set upper liquid level threshold, the system will trigger the liquid level overheight alarm logic, and the metering data is marked as liquid level overheight anomaly data, and the abnormal flag bit is set synchronously. The above abnormal states trigger the subsequent liquid level compensation and control response processes in priority.

[0096] It is not difficult to find that in the embodiments of the present application, by introducing the principal component analysis and reference model comparison mechanism, the collected multi-dimensional characteristic values are normalized and reduced in dimension, which not only effectively compresses the redundant information of the original high-dimensional data and improves the data processing efficiency; and combined with the reference state model trained by the historical running data, the deviation degree between the current flow state and the normal running state is quantitatively analyzed by the similarity measurement method, and then the state parameter set reflecting the multi-phase flow state change trend, the gas-liquid imbalance degree and the early abnormal characteristics is generated. The parameter set integrates dynamic characteristics in multiple dimensions, has good sensitivity and generalization ability, and significantly improves the recognition ability and response efficiency of the automatic control system to the complex multi-phase flow running state.

[0097] It should be noted that the third embodiment of the present application can also be an improvement based on any one or more of the first embodiment to the second embodiment.

[0098] Fourth embodiment

[0099] The fourth embodiment of the present application relates to a kind of multiphase flow metering automatic control method.The fourth embodiment is improved on the basis of the first embodiment, specific improvement is in that: in the fourth embodiment of the present application, a kind of liquid level measurement compensation mechanism under abnormal flow state is provided, i.e., step S3 can further include the following steps:

[0100] Step S301: by analyzing a plurality of characteristic indicators in the state parameter set, it is judged whether there is abnormal state, and the characteristic indicators include at least one of gas-liquid ratio change indicator, state deviation degree indicator, flow stability indicator liquid level fluctuation coefficient, water content trend coefficient and abnormal identification flag bit;

[0101] Step S302: after determining the abnormal state, the liquid level height and fluid temperature at the corresponding time are extracted, and the liquid level change data in adjacent multiple metering periods are used as joint input parameters to construct a multi-dimensional input vector for correction;

[0102] Step S303: the multi-dimensional input vector is input into the nonlinear liquid level compensation model trained based on historical working condition data to obtain a preliminary liquid level correction value;

[0103] Step S304: according to the temperature change rate and the liquid level change gradient, a weight factor is calculated, and the preliminary liquid level correction value is weighted and corrected using the weight factor to obtain a final corrected liquid level value.

[0104] Specifically, the preset abnormality determination condition is used to identify whether the current multiphase flow state deviates from the normal operating condition, including but not limited to: gas-liquid ratio change exceeds the set threshold, deviation degree between state parameter and reference state is greater than the allowed range, flow stability index is lower than the stability threshold, liquid level fluctuation coefficient is abnormal, water content trend coefficient is abnormal, or abnormal flag bit has been set. The system compares the state parameter set based on the abnormality determination condition, and when at least one index meets the abnormal condition, it is automatically determined that the current state is an abnormal flow state.

[0105] After confirming the abnormal state, the system enters the liquid level correction process. First, the liquid level height and fluid temperature at the time of abnormality occurrence are extracted as current observation values, and are combined with the liquid level change history data (including instantaneous liquid level, change rate, fluctuation amplitude, etc.) in multiple adjacent metering periods to construct a multi-dimensional input vector for correction. The input vector retains the flow trend in time dimension and fuses temperature change, liquid level dynamic response and other physical quantity information in feature dimension, ensuring that the subsequent compensation model has time continuity and parameter diversity, thereby enhancing the response ability and correction accuracy of the model to complex working condition disturbance.

[0106] The multi-dimensional input vector constructed in step S302 is input into a nonlinear liquid level compensation model trained in advance based on historical working condition data. The compensation model can be constructed using machine learning methods such as support vector regression, multilayer perceptron, gradient boosting tree, and outputs a preliminary liquid level correction value to eliminate measurement errors caused by factors such as stratification, entrainment, and temperature disturbance.

[0107] To further improve the accuracy of the correction result, the system calculates a dynamic weight factor based on the current liquid temperature change rate and the liquid level change gradient, and uses the factor to weight and correct the preliminary liquid level correction value to obtain the final corrected liquid level value. This correction mechanism can adaptively adjust the correction amplitude in different abnormal scenarios, thereby achieving fine compensation of the liquid level measurement result in abnormal states.

[0108] As can be seen, in the embodiments of the present application, by introducing a liquid level measurement compensation mechanism in abnormal states, the adaptability and measurement accuracy of the system in complex working conditions are significantly enhanced. Specifically, by jointly judging multiple feature indicators in the state parameter set, a multi-dimensional and multi-condition abnormality recognition mechanism is constructed, which can accurately identify the flow abnormal state and avoid misjudgment and missed judgment that may be caused by single indicator judgment. After identifying the abnormal state, a multi-dimensional input vector that integrates liquid level, temperature and historical change trend is further constructed and input into a nonlinear compensation model trained based on historical working conditions to achieve preliminary correction of the liquid level error. Then, the dynamic weight is calculated based on the temperature change rate and the liquid level change gradient to weight and correct the preliminary correction result, thereby obtaining a more accurate liquid level compensation value. The above multi-stage and multi-parameter correction process improves the robustness of liquid level measurement and the adaptability of compensation.

[0109] It should be noted that the fourth embodiment of the present application can also be an improvement based on any one or more of the first to third embodiments.

[0110] Fifth Embodiment

[0111] The fifth embodiment of the present application relates to a multiphase flow metering automatic control method. The fifth embodiment is an improvement based on the first embodiment, and the specific improvement is that in the fifth embodiment of the present application, a closed-loop liquid level control mechanism with dynamic adaptive capability is provided, that is, step S4 can further include the following steps:

[0112] Step S401: Construct a closed-loop control structure, set the reference liquid level as the system expected output, obtain the corrected liquid level value as the current state of the system, and calculate the deviation value between the two as the control error signal;

[0113] Step S402: based on the control error signal, a preset proportional-integral-derivative control model is called to calculate a proportional response amount, an integral response amount and a differential prediction amount respectively, and a first feedback control signal is obtained by weighted synthesis;

[0114] Step S403: the first feedback control signal is input to a parameter adaptive module, and gain coefficients of the proportional-integral-derivative control model are dynamically adjusted according to the current liquid level change rate, the gas-liquid flow type category and the historical error change trend, and an adjusted second feedback control signal is output;

[0115] Step S404: if it is detected that the control error fluctuation range exceeds a preset tolerance interval in a continuous measurement period, an anti-integral saturation mechanism and a variable step adjustment strategy are called to dynamically correct the second feedback control signal;

[0116] Step S405: the corrected second feedback control signal is input to a valve driving actuator as an execution control amount, a valve opening adjustment instruction is generated, and the liquid level of the fluid in the outlet pipeline is accurately controlled to be stably maintained in a preset height range.

[0117] Specifically, first, a closed-loop feedback control framework is established, a target liquid level value is set as a reference input (set value) of the control system, and a corrected liquid level value after abnormal state compensation is obtained in real time as the current output (feedback amount) of the system. By comparing the two, a deviation amount (error signal) is calculated:

[0118] e(t) = H ref -H corr (t)

[0119] Wherein, H ref is the reference liquid level, H corr is the corrected liquid level value at the current time, and e(t) is the error signal.

[0120] To achieve dynamic response adjustment of the error, the system introduces a PID controller, and three sub-parameters are calculated based on the current error: a proportional response term P = Kx x e(t), an integral response term: a differential prediction term: Wherein, K p is the proportional gain, K i is the integral gain, and K d is the differential gain.

[0121] The three terms are synthesized into a first feedback control signal u1(t):

[0122] u1(t) = P + I + D

[0123] Due to the instability of the multiphase flow state, a parameter adaptive module is introduced to dynamically adjust the gain coefficients K p , Ki , K d Dynamic adjustment is made. The module comprehensively considers the current liquid level change rate, gas-liquid flow type (such as bubble flow, slug flow, etc., which is identified based on flow and pressure information), error trend (such as continuous error increase or oscillation), and updates the PID gain in real time through an empirical rule or an adaptive optimization algorithm (such as fuzzy logic or recursive least square method), and outputs the optimized second feedback control signal u2(t).

[0124] If it is detected that the control error e(t) continues to fluctuate and exceeds the set tolerance range (such as ±3%) in multiple measurement periods (such as 5 consecutive periods), it indicates that the controller has a response delay or "integral saturation" problem. The anti-integral saturation mechanism is started to suppress excessive or long integral accumulation, and a variable step adjustment strategy is introduced to amplify the control signal at the initial stage to quickly approach the target, and to reduce the response strength at the later stage to avoid over-regulation. The modified feedback control signal is denoted as u3(t), which is input to the valve control actuator as the execution control quantity, and is converted into a specific valve opening command according to the signal amplitude to control the liquid level in the outlet pipeline to be maintained within the preset height range.

[0125] It can be found that in the embodiments of the present application, a closed-loop liquid level control mechanism with dynamic adaptive capability is proposed, which realizes adaptive dynamic adjustment of the outlet valve opening by constructing a closed-loop control structure with corrected liquid level as feedback input and reference liquid level as expected target, combining PID control and parameter adaptive adjustment, so that the liquid level in the multiphase flow system is maintained within the set range, thereby effectively preventing abnormal conditions such as gas entrainment caused by high liquid level or empty pipe of the mass flowmeter caused by low liquid level, and significantly improving the control stability, anti-disturbance capability and measurement accuracy of the crude oil wellhead multiphase flow measurement system.

[0126] It should be noted that the fifth embodiment of the present application can also be an improvement based on any one or more of the first to fourth embodiments.

[0127] Sixth Embodiment

[0128] Referring to Figure 2 , the present embodiment provides a well switching control process of a multiphase flow measurement automatic control system, which further includes sequence management module, well switching control module and other functional units for the automatic switching and measurement process of the oil wellhead, supports automatic polling, manual intervention and abnormal response of the system to multiple wellheads in different control modes, and realizes dynamic switching and high-reliability operation between the wellhead and the multiphase flow measurement device.

[0129] The sequence management module is used for managing the metering sequence and enabling state of the wellhead, and specifically includes the following functions: storing a user-set well number sequence list for sequentially selecting each wellhead in automatic well switching mode; maintaining an enabling flag (enable / shield) of each three-way valve, and when the shield flag is true, the corresponding well number is skipped in the automatic well switching process; providing configuration parameters such as well number list, shield state, metering time length, and continuous metering control; updating the metering queue and shield state table in response to a setting request from the upper computer or the human-machine interface; and providing the current well number to be switched and shield judgment logic to the well switching control module.

[0130] The well switching control module is used for completing the on-off logic control of the wellhead according to the set working mode, and supports both manual well switching and automatic well switching. In the "manual well switching" mode, the user-specified well number is received, the three-way valve corresponding to the well is opened, and the other three-way valves are closed. In the "automatic well switching" mode, metering is sequentially performed according to the well number queue provided by the sequence management module, and a wellhead in the shield state is automatically skipped. Before each well switching, safety detection is performed to ensure that the last metering has been completed and the system is in a ready state. After the well switching action is completed, the current active wellhead identifier is generated, and the state is reported to the upper computer. In the continuous metering mode, multiple wells can be controlled to be measured continuously, and the metering is automatically switched to the next wellhead after each metering is completed.

[0131] The abnormality monitoring module further includes monitoring the execution state of the three-way valve, such as switch to position timeout, position feedback abnormality, non-response instruction, etc., to generate a valve control abnormality flag. The automatic well skipping logic is controlled to make the system skip the current wellhead and continue automatic metering before the abnormality is eliminated. The type of abnormality, the occurrence time, the current well number, and the action are recorded in a log, which is synchronously reported through the human-machine interface or the remote communication module.

[0132] The step division of the above various methods is only for the purpose of clear description, and when implemented, one step can be combined or some steps can be split and decomposed into multiple steps, as long as the same logical relationship is included, all of which are within the protection scope of the present application; adding irrelevant modifications or introducing irrelevant designs in the algorithm or process, but not changing the core design of the algorithm and process, are within the protection scope of the present application.

[0133] In addition, some embodiments of the present application also provide an electronic device. The electronic device can be various forms of digital computers, such as a laptop computer, a desktop computer, a workstation, a personal digital assistant, a server, a blade server, a mainframe computer, etc. The electronic device can also be various forms of mobile devices, such as a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices.

[0134] The electronic device includes one or more processors, and a memory storing computer program instructions that, when executed, cause the processors to perform a multiphase flow metering automatic control method as provided by any one or more embodiments described above. Figure 3 An exemplary structural diagram of the electronic device is disclosed. The electronic device includes one or more processors 1101, a memory 1102, and an interface for connecting components, including a high-speed interface and a low-speed interface. The components are connected to each other using different buses, and can be mounted on a common motherboard or otherwise mounted as desired. The processor can process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display a GUI on an external input / output device, such as a display device coupled to the interface. In some other embodiments, multiple processors and / or buses can be used with multiple memories and multiple memory, if desired. Also, multiple electronic devices can be connected, each device providing part of the necessary operations. Among them, the components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and / or claimed herein.

[0135] The electronic device can also include an input device 1103 and an output device 1104. The processor 1101, the memory 1102, the input device 1103 and the output device 1104 can be connected by bus or other means, Figure 3 The connection by bus is taken as an example in the middle.

[0136] The input device 1103 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device, such as touch screen, keypad, mouse, trackpad, touchpad, pointing stick, one or more mouse buttons, trackball, joystick, etc. The output device 1104 can include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device can include but is not limited to liquid crystal display, light emitting diode display and plasma display. In some embodiments, the display device can be a touch screen.

[0137] To provide for interaction with a user, the electronic device can be a computer. The computer has a display device (e.g., a cathode ray tube or LCD monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, etc.); and input from the user can be received in any form (e.g., acoustic input, speech input, tactile input, etc.).

[0138] In the embodiments of the present application, the computer program / instruction is stored on the computer readable medium, and the computer program / instruction is executed by the processor to implement the method provided by any one or more of the above embodiments. The computer readable medium can be included in the electronic device described in the above embodiments, or can exist separately and not be assembled into the device. The computer readable medium carries one or more computer readable instructions.

[0139] The memory 1102 can be used as a non-transitory computer readable storage medium to store non-transitory software programs, non-transitory computer executable programs and modules. The processor 1101 executes various functions and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 1102, so as to implement the program instructions / modules corresponding to the method provided by any one or more of the above embodiments in the embodiments of the present application.

[0140] The memory 1102 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required by a function. The data storage area can store data created according to the use of the electronic device. In addition, the memory 1102 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory 1102 can optionally include a memory disposed remotely from the processor 1101, and these remote memories can be connected to the electronic device through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0141] Note that the computer-readable medium described herein can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable medium can be, for example but not limited to, a system, a device, or a computer program product embodied in one or more computer readable media embodying computer readable instructions, data structures, program modules, or other data. Computer-readable storage media include, at least, volatile memory, non-volatile memory, removable or non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technology, compact disc read-only memory, digital versatile discs or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. In this context, a computer-readable storage medium can be any tangible medium that can contain or store program instructions for use by or in connection with an instruction execution system, apparatus, or device.

[0142] Computer-readable media includes permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technology, read-only optical disc, digital versatile disc or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0143] Computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including object-oriented, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as the C programming language or similar programming languages. Program code can be executed entirely on a user computer, partially on a user computer, as a standalone software package, partially on a user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network or a wide area network, or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0144] In the above-described embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. For example, application specific integrated circuits, general purpose computers or any other similar hardware devices can be used. In some embodiments, the software programs of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software programs of the present application (including related data structures) can be stored in a computer-readable recording medium, such as a RAM memory, a magnetic or optical drive or a soft disk and the like. In addition, some steps or functions of the present application can be implemented by hardware, such as a circuit cooperating with a processor to perform the respective steps or functions.

[0145] The computer program product provided by the embodiments of the present application includes one or more computer programs / instructions, which, when executed by a processor, generate all or part of the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk) and the like.

[0146] The flowchart or block diagram in the drawings illustrates the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a segment, or a portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently, or the blocks can sometimes be executed in reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, or combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by special-purpose hardware-based systems that perform the specified functions or operations, or combinations of special-purpose hardware and computer instructions.

[0147] The scope of this application is defined by the appended claims rather than the foregoing description and is therefore intended to encompass within this application all changes that come within the meaning and range of equivalents of the claims. Any reference signs in the claims should not be construed as limiting the claims to which they relate. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim may also be implemented by one unit or device through software or hardware. Words such as "first" and "second" are only used to distinguish the description and do not indicate any particular order, nor should they be understood as indicating or implying relative importance.

[0148] The above descriptions are merely specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art may easily propose variations or substitutions within the technical scope disclosed in the present application, and such variations or substitutions shall be encompassed within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims, and the above descriptions shall be regarded as exemplary and non-limiting.

Claims

1. A multiphase flow metering automatic control method, characterized in that: An automatic control system for a multiphase flow metering device, comprising a mass flow meter, a gas flow meter, a liquid level meter, and a valve in an outlet pipeline for regulating the flow rate of the fluid, including: Acquire metering data from mass flow meters, gas flow meters, and liquid level meters, perform time synchronization and unification on the metering data, and generate a standardized data set; Extracting characteristic parameters characterizing the multiphase flow state based on the standardized data set, and generating a state parameter set for describing the current flow state; When at least one indicator in the state parameter set meets the preset abnormality determination condition, it is determined to be an abnormal flow state and a corrected liquid level value is generated; Based on the deviation between the corrected liquid level value and the reference liquid level, a feedback control signal is calculated and the valve opening is dynamically adjusted to keep the fluid level in the outlet pipeline automatically maintained within a preset height range.

2. The multiphase flow metering automatic control method according to claim 1, characterized in that: In the step of obtaining the measurement data, the Modbus master station communication configuration is initialized, the baud rate, verification mode and timeout period are set, and multiple rounds of data reading processes of the mass flow meter and the gas flow meter are completed in sequence through the Modbus communication protocol. The reading process includes: Read a plurality of consecutive floating-point data at the starting address of the instantaneous flow value in the mass flow meter and store them in the corresponding first data register; Using an alternating reading method, extracting the pure oil density, pure water density and corresponding water content data at the standard temperature from the first data register in batches and storing them in the corresponding second data register; Read the accumulated flow data of pure oil and pure water and store them in the corresponding third data register; Read relevant data from the gas flow meter, including instantaneous flow, gas temperature, gas pressure, cumulative flow, and sound velocity parameters, and store the data in a corresponding fourth data register; The metering data stored in the first data register, the second data register, the third data register and the fourth data register are uniformly written into a data buffer area of ​​the automatic control system.

3. The multiphase flow metering automatic control method according to claim 1 or 2, characterized in that: The step of obtaining the measurement data further includes processing the cumulative data read by the mass flow meter, specifically including: In each metering cycle, determine whether the current metering state is in a valid metering state; If it is in a valid metering state, the instantaneous flow rate increment data collected during the metering cycle will be accumulated from zero starting point to obtain the liquid accumulation and water accumulation respectively; Based on the liquid cumulative amount and the water cumulative amount, a weighted calculation is performed according to the increment in each metering cycle and its corresponding time window to generate an average water content parameter of the current metering cycle as one of the characteristic parameters characterizing the multiphase flow state.

4. The multiphase flow metering automatic control method according to claim 1, characterized in that: The step of extracting characteristic parameters characterizing the multiphase flow state based on the standardized data set and generating a state parameter set for describing the current flow state includes: Extracting characteristic values ​​for describing the current flow state of the fluid from the standardized data set; Applying normalization processing to the eigenvalues, and performing dimensionality reduction processing on the normalized eigenvalues ​​based on a principal component analysis method to construct a low-dimensional flow state representation vector; The low-dimensional flow state representation vector is compared with a preset normal operating state reference model to generate a state parameter set for describing the current flow state.

5. The multiphase flow metering automatic control method according to claim 1, characterized in that: The step of determining an abnormal flow state and generating a corrected liquid level value when the change in the gas-liquid ratio reflected by the state parameter set exceeds a preset threshold value includes: By analyzing multiple characteristic indicators in the state parameter set, determining whether there is an abnormal state, the characteristic indicators include at least one of a gas-liquid ratio change indicator, a state deviation indicator, a flow stability indicator, a liquid level fluctuation coefficient, a water content trend coefficient, and an abnormality identification flag; After determining that it is in an abnormal state, the liquid level height and fluid temperature at the corresponding moment are extracted and combined with the liquid level change data in multiple adjacent metering cycles as joint input parameters to construct a multi-dimensional input vector for correction; Inputting the multidimensional input vector into a nonlinear liquid level compensation model trained based on historical operating condition data to obtain a preliminary liquid level correction value; A weight factor is calculated according to the temperature change rate and the liquid level change gradient, and the preliminary liquid level correction value is weightedly corrected using the weight factor to obtain a final corrected liquid level value.

6. The multiphase flow metering automatic control method according to claim 1, characterized in that: The step of calculating a feedback control signal and dynamically adjusting the valve opening based on the deviation between the corrected liquid level value and the reference liquid level comprises: Construct a closed-loop control structure, set the reference liquid level as the system's desired output, obtain the corrected liquid level value as the system's current state, and calculate the deviation between the two as the control error signal; Based on the control error signal, a preset proportional-integral-differential control model is called to respectively calculate a proportional response amount, an integral response amount, and a differential prediction amount, and weightedly synthesize them to obtain a first feedback control signal; Inputting the first feedback control signal into a parameter adaptive module, dynamically adjusting the gain coefficient of the proportional-integral-differential control model according to the current liquid level change rate, the gas-liquid flow type, and the historical error change trend, and outputting the adjusted second feedback control signal; If it is detected that the control error fluctuates beyond a preset tolerance range within a continuous metering period, an anti-integral windup mechanism and a variable step size adjustment strategy are invoked to dynamically correct the second feedback control signal; The corrected second feedback control signal is used as the execution control quantity and input into the valve drive actuator to generate a valve opening adjustment instruction, thereby achieving precise control of the fluid level in the outlet pipeline and maintaining it stably within a preset height range.

7. The multiphase flow metering automatic control method according to claim 1, characterized in that: The process of generating the state parameter set further includes abnormal state detection, which includes: When the gas flow meter detects that the gas pressure parameter exceeds the preset pressure threshold, it records the corresponding measurement data and marks it as a gas overpressure anomaly; In response to the gas flow meter detecting that the sound velocity parameter is higher or lower than the set sound velocity normal range, the corresponding measurement data is recorded and marked as sound velocity abnormality; In response to the liquid level meter detecting that the liquid level height parameter exceeds the set liquid level upper limit threshold, the corresponding measurement data is recorded and marked as a liquid level over-high abnormality.

8. An electronic device, characterized in that: The electronic device comprises: One or more processors; and a memory storing computer program instructions, wherein when the computer program instructions are executed, the processor executes the multiphase flow metering automatic control method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program and / or instructions stored thereon, characterized in that: When the computer program and / or instructions are executed by a processor, the multiphase flow metering automatic control method according to any one of claims 1 to 7 is implemented.

10. A computer program product comprising a computer program and / or instructions, characterized in that When the computer program and / or instruction is executed by a processor, the multiphase flow metering automatic control method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Liquid level timing linkage dispensing system

    CN121386935A