Natural gas metering flow regulation process based on composite intelligent algorithm

By using a composite intelligent algorithm and neural network model, the valve opening of the natural gas metering and calibration station is automatically adjusted, solving the problems of slow response of the regulating valve and reliance on manual operation in the existing technology, and realizing efficient and accurate flow regulation and calibration.

CN115344019BActive Publication Date: 2025-12-05PIPECHINA SOUTH CHINA CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211045835.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2025-12-05
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

The existing natural gas metering and calibration stations have complex process systems, long response times for regulating valve groups, and significant impacts from pressure differential at low flow points. Flow regulation requires manual experience, resulting in low efficiency in the calibration process.

Method used

A flow regulation process based on a composite intelligent algorithm is adopted. By using a 1:1 hydraulic simulation model, friction coefficient sensitivity coefficient method and state prediction control algorithm, combined with BP neural network, the valve opening is automatically adjusted to achieve precise flow control.

Benefits of technology

This improved the reliability and efficiency of the verification system, reduced manual intervention, and ensured the accuracy and safety of the verification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344019B_ABST
    Figure CN115344019B_ABST
Patent Text Reader

Abstract

The application discloses a natural gas metering flow regulation process based on a composite intelligent algorithm, relates to the field of natural gas pipeline flow meter calibration, and aims to solve the problems of large additional pipe capacity of the overall process pipeline, long response time of the flow control process of the regulating valve group, no pressure difference of the whole station at the small flow point, and obvious influence of the time lag of the flow change of the detected meter when compared with the working level, and the technical scheme is as follows: S1, setting the equipment to be calibrated and the supporting equipment to carry out calibration and calibration operation on the flow meter, S2, hydraulic simulation is carried out according to a hydraulic simulation model, S3, the actual situation of the pipeline in the station is simulated to obtain the working condition parameters and the calibration, the pipe which is relatively sensitive to the correction node pressure or flow is obtained by using the friction coefficient sensitivity coefficient method, S4, the valve characteristics are tested, and the corresponding characteristic curve is made, S5, a state prediction control algorithm is designed, S6, a simulation model and a controller are built, and S7, an intelligent calibration system is established. The effect of one-by-one detection and high accuracy is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural gas pipeline flow meter calibration technology, and in particular to a natural gas metering flow regulation process based on a composite intelligent algorithm. Background Technology

[0002] The process flow of natural gas metering and verification stations is relatively complex. Due to different technical requirements at different design stages, there are certain differences in the processes of each verification station. The most complex natural gas verification stations in China have verification pipeline systems and verification devices and systems with the longest flow stabilization times. Their process systems mainly include inlet and outlet pipelines, filtration and separation devices, pressure stabilization devices, flow regulation devices, various levels of metering standard devices, verification platforms, nitrogen replacement systems, ESD emergency shut-off systems, and venting and sewage discharge pipelines. The various process pipelines within the station are interconnected to form an integrated system. The verification process involves complex operations such as process flow switching and connection, inlet pressure equalization and regulation, connection of verification pipelines, target flow regulation, flow stabilization during the verification process, setting verification parameters, and judgment and processing of verification process results and certificate results.

[0003] The existing technical solutions mentioned above have the following defects: large additional pipe capacity in process pipelines, long response time of the regulating valve group in the flow control process, no pressure difference in the whole station at small flow points, and the flow change of the tested instrument has a significant impact on the working stage time delay, which are representative control problems. The calibration process, such as flow connection, standard device pipeline selection, and flow adjustment, all need to be completed manually step by step. In particular, pressure and flow adjustment require the calibrator to rely on many years of work experience to control the operation of the regulating valve and make precise adjustments. Summary of the Invention

[0004] The purpose of this invention is to provide a natural gas metering flow regulation process based on a composite intelligent algorithm, which improves the reliability of the calibration system, alleviates calibration pressure, and ensures safe production by using intelligent algorithms to control and adjust the calibration flow under different operating conditions.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A natural gas metering and flow regulation process based on a composite intelligent algorithm comprises the following steps:

[0007] S1: Set up the equipment to be verified and supporting equipment to carry out verification and calibration of the flow meter. Specifically, it consists of inlet and outlet pipelines, filter separation device, pressure regulating valve group, flow regulating valve group, back pressure valve group, compressor, analysis cabin, standard devices at all levels and verification station;

[0008] A1: In order to collect the on-site verification process and on-site verification data and realize communication with the on-site equipment, we first investigated all data points in the station control system, designed the key points for on-site data acquisition and control, and formed a table of key points for intelligent verification communication.

[0009] A2: Based on the process survey results, four calculation boundaries were determined. Combining the above static data and real-time data acquisition information, a 1:1 hydraulic simulation model corresponding to the actual equipment on site was constructed.

[0010] S2: Hydraulic simulation is performed based on the hydraulic simulation model. For different diameter flow meters, there are different calibration processes and flow points to be tested. The boundary conditions of constant pressure at both ends are set for simulation. The on-site calibration process is given. By adjusting the opening of the regulating valve and the opening and closing of the ball valve in the model, the working conditions after the flow reaches the flow point to be tested are simulated hydraulically. Thus, the calibration process, valve opening and hydraulic characteristics of the flow meter to be tested for different diameters are obtained.

[0011] S3: Simulate and verify the working parameters based on the actual conditions of the pipelines in the station. Use the friction coefficient sensitivity coefficient method to identify the pipelines that are more sensitive to the pressure or flow of the correction node. Adjust the friction coefficient of the sensitive pipelines and correct the pipeline friction coefficients in groups according to certain rules.

[0012] B1: For the pipelines within the station, after dividing the natural gas flow station into the inlet filter and pressure regulating area, standard meter area, calibration station area and flow regulating valve group area according to the natural gas flow station functional blocks, each area is equivalent to a different partition model for processing, forming a simplified model of the entire hydraulic simulation.

[0013] B2: To improve the speed of calculation in the simplified model, the pipes and valves in each area were merged, and the instruments in each part were also screened after the area processing to improve the accuracy of the simplified model. For the existing historical data on site, the process of existing standard instruments and calibration positions was recorded by the opening and closing status of key valves. The friction coefficient under different processes was calculated by the basic calculation formula of gas transmission pipeline. When the same working condition occurs again in the future, the friction coefficient corresponding to this working condition is directly called up for calculation, and the calculated flow rate is compared with the on-site flow rate in real time. If it exceeds a certain value or there is no such process before, the friction coefficient is directly calculated in real time and the value is stored to improve the accuracy of online simulation.

[0014] S4: Test the valve characteristics and create corresponding characteristic curves. Design an experimental scheme for the large and small flow regulating valve group on site. Obtain key parameters such as pressure, flow rate and valve opening through on-site valve characteristic experiments to fit and calculate the valve flow coefficient. The flow coefficient obtained here is used to verify the control algorithm.

[0015] S5: Design a state prediction control algorithm. Based on the nature of the natural gas flow meter calibration station, divide the natural gas flow meter calibration station into regions according to the functional characteristics and process combination of each part. Divide the standard table selection area and the calibration station selection area into one region and the regulating valve area into another region. Establish a state prediction model based on the region division.

[0016] C1: When calibrating a flow meter, the physical quantity of interest is the flow rate through the working standard meter and the meter under test. By analyzing existing historical data from the site, the calibration process of standard meters of different diameters is identified, which serves as the basis for classifying the working conditions for subsequent simulation of the site data. Through algorithms combined with the station process flow, the corresponding process data is further extracted and merged to form a record of the calibration process involved in the meter under test of different diameters. A portion of the data from the site is extracted, and the results are identified according to the combination of valve positions.

[0017] C2: Based on the identification results, calculate the friction coefficients corresponding to various processes, and take the average friction coefficient of each process as the initial friction coefficient value for that process. The system collects the pressure before and after the control valve, the total flow rate through the control valve, the valve inlet temperature, compressibility factor and relative density to obtain the flow coefficient of the control valve. For different flow points under test, a set of flow coefficients is fitted to the control valve according to different flow rates to simulate and obtain the simulation diagram.

[0018] C3: Since the physical parameters of the pipeline will change slowly with the pipeline's operating time and state, if they are regarded as fixed values ​​or merely functions of position, it will affect the accuracy of the simulation. Therefore, a memory factor is introduced to gradually reduce the influence of past data and estimates in a weighted manner, and the ratio of the simulated flow rate value of the previous value to the actual flow rate value is used to correct the simulated flow rate at the next time point to obtain the most accurate state prediction model.

[0019] C4: Based on the established state prediction model and its principles, a mechanism model for the valve control algorithm is established. The opening of the large valve is calculated using the valve formula by adjusting the pressure before and after the valve, the target flow rate, and the valve's flow coefficient. The calculated opening is then rounded. For the flow rate that cannot be adjusted, the valve formula is used to calculate the opening of the small valve, and so on, until the minimum valve opening is calculated. The calibration flow point of each instrument under test is calculated one by one.

[0020] S6: Simulation model and controller construction. Based on the current parameters of each point in the station, find the relationship between the verification flow and the control opening of the regulating valve. Use a BP neural network to perform the error function gradient descent strategy in the weight vector space through the alternation of forward propagation and backward propagation. Dynamically iterate a set of weight vectors to make the network error function reach the minimum value, thereby completing the information extraction and memory process.

[0021] D1: The function of the natural gas flow meter calibration controller is to provide the opening degree of four regulating valves based on the current operating conditions and target flow. The valve combination and inlet pressure are used as operating condition judgment parameters, and the calibration flow (target flow) is used as the input of the BP neural network. The opening degree of the four valves is used as the output to build a control neural network model, and the controller is used to verify it. The scheme provided by the controller is basically consistent with the actual scheme.

[0022] S7: The intelligent verification system is established. After the controller is started, it works in the command verification state. In this state, the intelligent controller listens and waits for the verification client to send a verification task. When the verification client sends all the information of a verification task (including the information of the table being tested, the verification task information, and the flow point, etc.) to the intelligent controller, the intelligent controller performs a process check. The process check checks the valve position status and initial state to ensure that the pipeline combination is safe and reasonable when connecting the control. On the other hand, it selects different sets of operating parameters to participate in model prediction and hydraulic simulation.

[0023] E1: After the valve position is qualified, the historical operating condition reproduction algorithm is entered to generate valve position combinations and use historical database data for correction, completing the first multi-valve joint commissioning. When the historical operating condition control effect is not good or the valve position scheme of the controller based on the BP neural network is obviously ineffective, the flow prediction results are used for the second multi-valve joint commissioning.

[0024] E2: After two multi-valve joint adjustments, the remaining control range uses a more conservative single-valve control algorithm for real-time flow control, rapid throttling control or single-valve pressure drop distribution incremental scheme to reduce or increase the flow. After the flow adjustment is completed, a start verification flag is sent, and the verification client performs flow meter verification and continues to perform the next verification.

[0025] Furthermore, the inlet and outlet pipelines, filtration and separation devices, pressure regulating valve groups, flow regulating valve groups, back pressure valve groups, compressors, analysis cabins, various standard devices, and calibration stations in S1 meet the process requirements for each standard device to perform calibration and verification operations on sonic nozzles, ultrasonic flowmeters, turbine flowmeters, etc.

[0026] Furthermore, the 1:1 hydraulic simulation model in A2 is modeled using hydraulic simulation software.

[0027] Furthermore, the partitioning model in B1 specifically unifies the inlet filter pressure regulation area, standard meter area, and calibration station area into one partition, which serves as a process switching area. The area of ​​the regulating valve is treated as another sub-partition, which serves to regulate the flow rate through the calibration station. The parallel connection of these two partitions constitutes a simplified model of the entire hydraulic simulation.

[0028] In summary, the beneficial technical effects of the present invention are as follows:

[0029] 1. A neural network model was used for prediction. The station's status under normal operating conditions was simulated and predicted. The station's status under special operating conditions was simulated and predicted. When the control effect under historical operating conditions was not good or the controller valve position scheme based on BP neural network was obviously ineffective, the 40% maximum effective control valve scheme was used for control. The state prediction control algorithm was used as the first multi-valve joint commissioning to generate multi-case prediction to ensure accuracy.

[0030] 2. A database of all process frictions was used as backup. The friction of the standard gauge and the calibration station was selected according to the calibration process of the target flow. The friction of the standard gauge and the calibration station was selected. The gas pipeline calculation formula was used to calculate the opening of the main valve by using the pressure before and after the regulating valve, the target flow, and the valve flow coefficient. The calculated opening was rounded. For the bypass flow, the bypass flow was obtained by subtracting the target flow from the total flow. The opening of the main valve was calculated by the valve formula and rounded. Then, the small valve was used for the next adjustment. The above steps were repeated to calculate the calibration flow point of each gauge under test one by one, resulting in the effect of testing one by one.

[0031] 3. A state predictive control algorithm is adopted, which mainly uses valve characteristic test results and hydraulic model calculation methods to carry out rapid throttling control or single valve pressure drop distribution increment scheme to reduce or increase flow, thereby producing the effect of rapid throttling control. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the high-flow-rate regulating valve of the present invention;

[0033] Figure 2 This is a schematic diagram of the small flow rate regulating valve of the present invention;

[0034] Figure 3 This is a schematic diagram of the computational logic of the control system of the present invention;

[0035] Figure 4 This is a schematic diagram of the outbound pressure prediction network data of the present invention;

[0036] Figure 5 This is a schematic diagram of the trunk line total flow prediction network data of the present invention;

[0037] Figure 6 This is a schematic diagram of the working level control logic of the present invention. Detailed Implementation

[0038] Example 1

[0039] The method of the present invention will be further described in detail below with reference to the accompanying drawings.

[0040] A natural gas metering and flow regulation process based on a composite intelligent algorithm comprises the following steps:

[0041] S1: The equipment to be verified and the supporting equipment are set up to carry out verification and calibration of the flow meters. Specifically, it consists of inlet and outlet pipelines, filter separation devices, pressure regulating valve groups, flow regulating valve groups, back pressure valve groups, compressors, analysis cabins, standard devices at all levels and verification stations. It meets the process requirements of each standard device to carry out verification and calibration of flow meters such as sonic nozzles, ultrasonic, and turbine. The working level standard devices include 246 ball valves, 24 regulating valves and 116 sections of high-pressure natural gas pipelines. The equipment ledger information was analyzed and a pipeline simulation model was established using static data.

[0042] A1: In order to collect the on-site verification process and on-site verification data and realize communication with the on-site equipment, we first investigated all data points in the station control system, designed the key points for on-site data acquisition and control, and formed a table of key points for intelligent verification communication.

[0043] A2: Based on the process survey results, four calculation boundaries were determined. Combining the above static data and real-time data acquisition information, a 1:1 hydraulic simulation model corresponding to the actual equipment on site was constructed, and hydraulic simulation software was used for modeling.

[0044] S2: Based on the hydraulic simulation model, hydraulic simulation is performed. For flowmeters of different diameters, there are different calibration processes and flow points to be tested. Boundary conditions with constant pressure at both ends are set for simulation. Given the on-site calibration process, the operating conditions after the flow reaches the flow point are simulated by adjusting the opening of the regulating valve and the opening / closing of the ball valve in the model. This allows for the acquisition of the calibration process, valve opening, and hydraulic characteristics of the flow point for flowmeters of different diameters. Through the simulation of hydraulic operating conditions, the calibration process and valve opening of flowmeters of different diameters are understood. The valve opening and hydraulic characteristics of the flow point under test were studied. By gradually adjusting the pipe physical parameters and slowly varying parameters of each section and part in the hydraulic model, the simulation results of the model were made as consistent as possible with the field. This provides the necessary simulation environment for the formulation of intelligent controller schemes and effectiveness testing. Through the establishment of the simulation model, the required accuracy of the process hydraulic simulation of the calibration station was achieved. The minimum relative error was about 0.41%, and the maximum was about 1.16%, which met the requirements of simulation accuracy. This mechanism model can be used as the basis for intelligent control research and as a simulation digital model to assist in the realization of intelligent control.

[0045] S3: Simulate and verify operating parameters based on the actual conditions of the pipelines within the station. Utilize the friction coefficient sensitivity coefficient method to identify pipelines highly sensitive to pressure or flow at calibration nodes. Adjust the friction coefficient of these sensitive pipelines and group them according to certain rules for correction. Record existing historical data from the site, including the opening and closing status of key valves, to track the flow of existing standard tables and calibration stations. Calculate the friction coefficient for each different flow using basic gas pipeline calculation formulas. For future occurrences of the same operating condition, directly retrieve the corresponding friction coefficient calculation and compare the calculated flow rate with the actual flow rate in real time. If the flow rate exceeds a certain value or if the flow was not previously encountered, calculate the friction coefficient in real time and store the value to improve the accuracy of the online simulation. The theoretical basis for this section is as follows: Based on the mass conservation equation, momentum conservation equation, and energy conservation equation, establish the relationships between velocity, density, temperature, pressure, and elevation to describe the flow of natural gas in the pipelines of the calibration station. The basic formulas are as follows:

[0046]

[0047]

[0048]

[0049] To facilitate the establishment of a model for calculating the equivalent pipeline friction coefficient, the following assumptions are made: ① The points collected by the SCADA system are selected as steady-state points, where the flow rate changes minimally over a period of time under the premise that the field equipment is not operating. At this point, the natural gas flows stably in the pipeline within the calibration station, and the flow rate and pressure in the pipeline are only functions of position, not changing over time; ② Since natural gas calibration stations are generally small in area and have related shading structures, it is assumed that the flow of natural gas in the pipeline is isothermal, and therefore the influence of the energy equation is not considered; ③ The pipeline is horizontal with minimal undulation, i.e., ds = 0. In practical work, for the convenience of metering and handover, the volumetric flow rate under engineering standard conditions is used. Considering local resistance, the gas state equation P = ρZRT is substituted into the above equation set, which can then be simplified to the following formula for back-calculating the friction coefficient of this part:

[0050]

[0051] In the formula, Q represents the standard engineering condition (pressure p0 = 1.01325 × 10⁻⁶). 5 Volumetric flow rate (m³) at Pa, temperature T0 = 293 K. 3 / s;P Q Due to import pressure, P a ;P ZDue to export pressure, P a D is the pipe inner diameter, in meters; λ is the hydraulic friction coefficient; Z is the compressibility factor under natural gas pipeline transportation conditions (average pressure and average temperature); Δ * Here, T represents the relative density of natural gas; T is the gas transmission temperature, T = 273 + t. pj , where is the average temperature of the gas pipeline, in °C; L is the length of the pipeline section, in meters.

[0052] When applying equivalent conditions to various areas of a natural gas flow meter calibration station, the following derivation method is used: The Vemus formula and the basic flow calculation formula for horizontal gas pipelines are employed.

[0053]

[0054] For example, if two parallel pipelines of 1 meter each are replaced by a new pipeline, if p Q ,p Z If Q and L are the same, then the equivalent diameter of a single pipe is:

[0055]

[0056]

[0057] In the formula, λ is the hydraulic friction coefficient, and D is the pipe diameter in meters. e For the equivalent pipe diameter, in meters (m),

[0058] The valve flow coefficient is an indicator of the flow capacity of a control valve. It is often used to select the valve's diameter, study its internal structure, and determine factors affecting valve stability. Compared to the internal flow state of the valve, pipeline flow simulation focuses more on the changes in flow parameters before and after the valve. It controls the pressure and flow rate within the station by varying the valve opening. To create a model that matches the actual operating conditions, the valve flow coefficient is a key parameter in valve process simulation. For flow control pipelines containing control valves, the control valve can be treated as a local resistance element during simulation. Therefore, identifying the control valve flow coefficient is transformed into identifying the local friction at this location, thereby improving the accuracy of the simulation.

[0059] The flow coefficient is a crucial indicator of a valve's flow capacity. Classical calculation methods require parameters such as flow rate for each valve, pressure before and after the valve, density, and temperature. However, for parallel control valves, only the total flow rate is available, making it impossible to calculate the flow coefficient for field applications using traditional methods. Therefore, this section starts with the valve's flow coefficient and uses least-squares fitting to determine the relationship between the total flow rate and the opening degree of each parallel valve in a multi-valve parallel configuration. From this, the flow coefficient of each control valve is identified. Then, the identified flow coefficients are input into the hydraulic simulation software SPS to verify their accuracy. The results show that the flow rate calculated using the identified flow coefficients in SPS is essentially consistent with the actual flow rate in the field.

[0060] (1) Calculation of the flow coefficient of a single valve

[0061] Starting from the basic principle of deriving the flow coefficient of a valve, the throttling mode of a control valve is transformed into a simple throttling mode. Bernoulli's equation for incompressible fluids is as follows:

[0062]

[0063] Where: v1 and v2 are the fluid velocities before and after the valve, in m / s; P1 and P2 are the pressures before and after the valve, in Pa (absolute); γ1 and γ2 are the specific gravity of the fluid before and after the valve, in N / m³. 3 g is the acceleration due to gravity, g = 9.81 m / s² 2 ; v is the constriction velocity, m / s, and ε is the drag coefficient.

[0064] From the continuity equation, we can obtain:

[0065] v1 = v2

[0066] γ1=γ2

[0067]

[0068] Where: Q is the volumetric flow rate, m 3 / s, A is the cross-sectional area of ​​the pipe in meters. 2 ,

[0069] make The formula for the flux coefficient when fully open is:

[0070]

[0071] For gases, due to their compressibility, different calculation formulas exist depending on the perspective considered. Consulting the SPS help documentation, when dealing with non-blocked flow... The formula for calculating the gas control valve in SPS is:

[0072]

[0073] Where: Q is the volumetric flow rate under standard conditions, m 3 / h; Z is the compressibility factor at upstream temperature and average pressure; G is the specific gravity of natural gas relative to air; T is the upstream temperature, K; Pu is the inlet pressure, Pd is the outlet pressure, Pa; Cf is the critical flow coefficient, with a value of 1; N is the unit conversion factor, with a value of 0.0346 in this unit; Cv is the flow coefficient when fully open. Therefore, for the calculation of the flow coefficient of a single valve, when the volumetric flow rate, compressibility factor, specific gravity of natural gas relative to air, upstream temperature, and inlet and outlet pressures are known, the flow coefficient when the valve is fully open can be calculated using the above formula.

[0074] (2) Identification of the flow coefficient of multiple valves in parallel

[0075] For a valve with equal percentage opening, the flow coefficient of the valve at different opening degrees is calculated using the following formula:

[0076]

[0077] The flow rate of gas through the valve is calculated using the following formula.

[0078]

[0079]

[0080]

[0081]

[0082]

[0083] Where: Q is the total volumetric flow rate through the parallel valves under standard conditions, in m³. 3 / h; Z is the compressibility coefficient at upstream temperature and average pressure; G is the specific gravity of natural gas relative to air; T is the upstream temperature, K; P1 is the inlet pressure, P2 is the outlet pressure, P a N is the unit conversion factor, which takes a value of 0.0346 in this unit. C v The flux coefficient when fully open

[0084] SPS (Spectrum Processing) is used to build a model to obtain the inlet and outlet valve pressures, flow rates under standard conditions, valve inlet temperature, compressibility factor, and relative density required for formula fitting. The obtained data is then fitted using the least squares method according to the above formulas to identify the flow coefficients of multiple control valves when fully open. The flow coefficients obtained from the fitting are then used to calculate the valve's physical properties in SPS.

[0085] The data extracted from SPS was directly fitted to the valve's flow coefficient using a formula. The calculated flow rate was basically consistent with that calculated by SPS. The error between the fitted flow coefficient and the actual set flow coefficient was about 1%, which met the simulation requirements.

[0086] The factors influencing the friction coefficient during pipeline operation are quite complex, often affected by pipe wall physical properties, fluid properties, and flow regime changes. Considering that parts of the pipeline were ignored during model simplification, the friction coefficient varies with different flow rates. Therefore, the overall friction coefficient of the simulation model differs for different flow rates. To improve simulation accuracy, the variations under different flow rates are reflected in the valve. By fitting field data at different flow rates, the flow coefficient of the valve when fully open is obtained through forward modeling. The fitted valve flow coefficient is then input into the control valve parameters of the SPS (Special Purpose System) for flow rate-based simulation. After piecewise fitting of the flow rate, the simulation is tailored to the specific field conditions. The data fitting degree is greatly increased, and the steady-state data obtained from the simulation are consistent with the field at most points. Therefore, this method replaces the traditional approach of using a set of parameters, which can greatly improve the simulation accuracy and achieve a more ideal effect in verifying the control scheme. The actual operating data collected by the field SCADA system is used as boundary conditions, with the pressure and temperature before and after the valve and the opening of the three regulating valves collected by the field as boundary conditions. The interval of the input points is consistent with the time interval of the data collected by the field SCADA system, and the data is input once every 0.2 seconds. The flow coefficient of the valve is updated according to different flow rates, so that the simulation model has a wider adaptability and more accurate accuracy.

[0087] Based on simulations with real-time updated boundary conditions, the transient point data obtained are consistent with the field data at most points. However, for abnormal operating conditions (8100m) occurring in the field... 3 At this location ( / h), an abnormal operating condition occurred due to issues with SCADA data acquisition. The results of the hydraulic simulation deviated significantly from the acquired data, thus playing a role in monitoring abnormal data. By establishing the relationship between the opening degree and flow rate of the regulating valve and other process parameters such as pressure and the flow coefficient of the regulating valve, a method for identifying the flow coefficient of parallel regulating valves was established. To achieve accurate modeling of the regulating valve, it is necessary to selectively compress boundary conditions under the condition of merging hydraulic units, and combine the dynamic adjustment of hydraulic components such as pipe sections and valves to achieve real-time simulation of the field conditions with a certain accuracy. Based on least squares fitting to identify flow parameters, SPS modeling uses the identified flow coefficient to simulate the flow rate, solving the problem of fine online simulation modeling of gas transmission stations that has not been addressed in traditional long-distance pipelines.

[0088] B1: For the pipelines within the station, after dividing the natural gas flow station into the inlet filtration and pressure regulation area, standard meter area, calibration station area, and flow regulating valve group area according to the natural gas flow station functional blocks, each area is equivalent to different partition models for processing, forming a simplified model of the entire hydraulic simulation. The partition model specifically unifies the inlet filtration and pressure regulation area, standard meter area, and calibration station area into one partition, which serves as the switching of the flow. The area of ​​regulating valves is treated as another sub-partition, which serves to regulate the flow through the calibration station. The parallel connection of these two partitions forms the simplified model of the entire hydraulic simulation.

[0089] B2: To improve the speed of calculation in the simplified model, the pipes and valves in each area were merged, and the instruments in each part were also screened after the area processing to improve the accuracy of the simplified model. For the existing historical data on site, the process of existing standard instruments and calibration positions was recorded by the opening and closing status of key valves. The friction coefficient under different processes was calculated by the basic calculation formula of gas transmission pipeline. When the same working condition occurs again in the future, the friction coefficient corresponding to this working condition is directly called up for calculation, and the calculated flow rate is compared with the on-site flow rate in real time. If it exceeds a certain value or there is no such process before, the friction coefficient is directly calculated in real time and the value is stored to improve the accuracy of online simulation.

[0090] S4: Test the valve characteristics and generate corresponding characteristic curves. Design an experimental scheme for large and small flow control valve groups in the field. Obtain key parameters such as pressure, flow rate, and valve opening through field valve characteristic experiments to fit and calculate the valve flow coefficient. The fitted flow coefficient is used for control algorithm verification. Figure 1 Process preparation: Use FV7242 as the bypass valve, and FV7212, FV7222, and FV7232 as the control valves. Select verification standard FE4102.

[0091] ① Set FV7242 to 100%, set FV7222 to 50%, wait 30 seconds, then set FV1005 to 0%. Once the flow rate stabilizes, record the current time, check the flow rate in the verification table, and record the pressure gauge data in the table.

[0092] ② Adjust the opening of FV7242 to achieve a flow rate of 400m³ / h. 3 / h, after the flow rate stabilizes, record the current time, FV7242 opening degree, and pressure gauge data in the table.

[0093] ③ Keep the opening of FV7242 constant, and gradually adjust the opening of FV7232 in increments of ten openings, waiting until the flow rate stabilizes after each adjustment. (If the flow rate is greater than 1500 m³ / s) 3After the flow rate stabilizes at the point where the rate of increase in section 2.3 stops ( / h), record the current time and check the flow rate and pressure gauge data in the table.

[0094] ④ Keep the opening of FV7242 constant, and gradually adjust the opening of FV7212 in increments of ten degrees. After each adjustment, wait until the flow rate stabilizes. Once the flow rate stabilizes, record the current time and check the flow rate and pressure gauge data in the table.

[0095] ⑤ Keep the opening of FV7242 constant, and gradually adjust the opening of FV7222 in increments of ten degrees. After each adjustment, wait until the flow rate stabilizes. Once the flow rate stabilizes, record the current time and check the flow rate and pressure gauge data in the table.

[0096] ⑥ Keep the opening of FV7242 constant, and gradually adjust the opening of FV7212 in increments of ten degrees. After each adjustment, wait until the flow rate stabilizes. Once the flow rate stabilizes, record the current time and check the flow rate and pressure gauge data in the table.

[0097] ⑦ Keep the opening of FV7242 constant, and gradually adjust the opening of FV7222 in increments of 10 degrees. After each adjustment, wait until the flow rate stabilizes. Once the flow rate stabilizes, record the current time and check the flow rate and pressure gauge data in the table.

[0098] Process preparation: Switch the checklist to the verification standard FE4101 before proceeding with subsequent testing.

[0099] ⑧ After switching the checklist to checklist standard FE4101, keep the FV7242 opening unchanged, and gradually adjust the FV7232 opening in increments of ten openings. After each adjustment, wait until the flow rate stabilizes. Once the flow rate stabilizes, record the current time, the flow rate in the checklist, and the pressure gauge data in the checklist.

[0100] ⑨ Close FV7212 and FV7222 completely, and fully open FV7232 and FV7242. Then switch FV7232 as a bypass valve and FV7242 as a flow control valve. Gradually adjust the opening of FV7242 in increments of 10 degrees, and wait until the flow rate stabilizes after each adjustment. Once the flow rate stabilizes, record the current time and check the flow rate and pressure gauge data.

[0101] ⑩ Keep FV7242 fully on, turn off FV7232 and record data after stabilization;

[0102] Small flow regulating valve group valve characteristic test, refer to Figure 2Using FV7242 as the bypass valve and FV7112, FV7122, FV7132, and FV7142 as regulating valves, and selecting verification standard FE3101, flow tests were conducted according to the principle of 10 opening degrees for each valve. Note that the flow rate through the valves should be within the range of the ultrasonic flow meter. PT3003, PT5901, and PT7301 pressure transformers are all gauge pressure gauges; the pressure values ​​need to be increased to the local atmospheric pressure. Based on the average local atmospheric pressure of 0.104979 MPa measured by the PTDN pressure gauge from 10:00 to 11:08, the following adjustments were made. High-pressure natural gas was used in the pipeline for actual flow testing. The medium, whose components are tested in real time by a gas chromatograph, is analyzed by recording the operation time and data characteristics on site. The experimental data is then screened, and two typical steady-state conditions are taken for each test point for calculation to obtain the "Small Flow Regulating Valve Group Characteristic Test Data" and "Large Flow Regulating Valve Group Characteristic Test Data". By fitting the pressure and temperature before and after the parallel flow regulating valves (FV7212, FV7222 and FV7232) and the total flow through the parallel regulating valves with the opening of the three valves, the relationship between the valve opening, the pressure and temperature before and after the valve and the total flow through the parallel valves is obtained, and the flow coefficient of the three flow regulating valves is obtained.

[0103] The flow coefficients of valves FV7212, FV7222, and FV7232 identified by least squares parameters are 10.5754, 195.2593, and 791.8621, respectively. For bypass valve FV7242, direct fitting is performed on the pressure and flow coefficient before and after FV7242 to determine the CVO value of valve FV7242 flow coefficient fitting as 224.975612779881. Through the above fitting, the flow coefficients of four flow control valves (FV7112, FV7122, FV7132, and FV7142) are obtained as 0.9, 15.9, 30.08, and 143.4, respectively. An experimental scheme is designed for the large and small flow control valve groups in the field. Through field valve characteristic experiments, key parameters such as pressure, flow rate, and valve opening are obtained to calculate the valve flow coefficient. The flow coefficients obtained here are used for verification of the control algorithm.

[0104] S5: Design a state prediction control algorithm. Based on the nature of the natural gas flow meter calibration station, the station is divided into zones according to the functional characteristics and process combinations of each part. The selection of standard meters and calibration positions are divided into one zone, and the control valve zone is divided into another. A state prediction model is established based on the zone division. Data collected from the field shows that, due to the inherent uncertainty of the instruments, if the values ​​at different points are too close, the uncertainty of the instruments may lead to reverse flow in the calculation or large flow fluctuations, making model calibration difficult. Therefore, dividing the natural gas station into several zones avoids the impact of instrument fluctuations, thereby improving the accuracy of the simplified model. For on-site operation, the bypass control valve is often placed in a fixed position for flow bypass regulation. When calibrating the flow meter, attention should be paid to… The physical quantity is the flow rate through the standard gauge and the gauge under test. Therefore, the pipelines at the standard gauge and the calibration bench were processed using the equivalent pipe method. By analyzing the existing historical data on site, the calibration process of standard gauges of different diameters was identified, which served as the basis for subsequent simulation of the working conditions on site. By combining the algorithm with the station process flow, the key valve opening and closing data collected by the SCADA system were identified, and various calibration processes were determined. The corresponding process data was further extracted and merged to form a record of the calibration processes involved in gauges of different diameters. A portion of the data on site was extracted, and the calibration process was determined by the selection of the standard gauge and the calibration bench according to the combination of valve positions. Among the selected data, there were 19 operation processes. The friction coefficients corresponding to various processes were calculated. The friction coefficients under each process tended to a relatively stable value. Therefore, the average friction coefficient of each process was used as the initial friction coefficient value under that process.

[0105] For the processing of the control valve area, the pressure before and after the control valve, the total flow rate through the control valve, the valve inlet temperature, compressibility factor and relative density are collected by the SCADA system to obtain the flow coefficients of the three control valves. Since the friction resistance in the pipeline of the control valve area is different under different flow rates, a set of flow coefficients is fitted to each control valve according to different flow rates for different tested flow points to simulate and make the calculation results more accurate.

[0106] Because the physical parameters of a pipeline change slowly with its operating time and state, such as pipe diameter and inner wall roughness, treating them as fixed values ​​or merely functions of position would affect the accuracy of the simulation. Therefore, it is necessary to correct the slowly varying parameters of the established model. Correcting these parameters involves continuous observation and estimation over time; new, real-time data should be more important than older, more recent observations and estimates. Therefore, a memory factor is introduced, and a weighted approach is used to gradually reduce the influence of past data and estimates. Based on this, time windows are used to correct the friction coefficient under different processes. For correcting the friction coefficient of pipe sections using time windows, the memory factor method is used, employing an iterative correction method with three parameters, from oldest to newest.

[0107] To further improve the accuracy of the predicted flow, the simulation results are further processed by using the ratio of the simulated flow value to the actual flow value from the previous value to correct the simulated flow at the next time point.

[0108] C1: When calibrating a flow meter, the physical quantity of interest is the flow rate through the working standard meter and the meter under test. By analyzing existing historical data from the site, the calibration process of standard meters of different diameters is identified, which serves as the basis for classifying the working conditions for subsequent simulation of the site data. Through algorithms combined with the station process flow, the corresponding process data is further extracted and merged to form a record of the calibration process involved in the meter under test of different diameters. A portion of the data from the site is extracted, and the results are identified according to the combination of valve positions.

[0109] C2: Based on the identification results, calculate the friction coefficients corresponding to various processes, and take the average friction coefficient of each process as the initial friction coefficient value for that process. The system collects the pressure before and after the control valve, the total flow rate through the control valve, the valve inlet temperature, compressibility factor and relative density to obtain the flow coefficient of the control valve. For different flow points under test, a set of flow coefficients is fitted to the control valve according to different flow rates to simulate and obtain the simulation diagram.

[0110] C3: Since the physical parameters of the pipeline will change slowly with the pipeline's operating time and state, if they are regarded as fixed values ​​or merely functions of position, it will affect the accuracy of the simulation. Therefore, a memory factor is introduced to gradually reduce the influence of past data and estimates in a weighted manner, and the ratio of the simulated flow rate value of the previous value to the actual flow rate value is used to correct the simulated flow rate at the next time point to obtain the most accurate state prediction model.

[0111] C4: Based on the established state prediction model and its principles, a mechanism model for the valve control algorithm is established. By adjusting the pressure before and after the valve, the target flow rate, and the valve's flow coefficient, the valve's main valve opening is calculated using the valve's formula. This calculated opening is then rounded. For flow rates that cannot be adjusted, the valve's secondary valve opening is calculated using the same formula, and so on, until the minimum valve opening is calculated. The calibration flow rate point for each tested instrument is calculated individually.

[0112] (1) Derivation of the flow coefficient of the flow control valve

[0113] Inverse calculation of valve flow coefficient Q when there is total flow. 总(过站流量) =Q 总(Flow-total) +Q 总(旁通流量)

[0114] The flow rate of gas through the valve is calculated using the following formula.

[0115]

[0116]

[0117]

[0118]

[0119] For a valve with equal percentage opening, the flow coefficient of the valve at different opening degrees is calculated using the following formula:

[0120]

[0121] Substituting (5.38) into (5.39) yields the following equation:

[0122]

[0123] Where: Q is the total volumetric flow rate through the parallel valves under standard conditions, in m³. 3 / h; Z is the compressibility coefficient at upstream temperature and average pressure; G is the specific gravity of natural gas relative to air; T is the upstream temperature, K; P1 is the inlet pressure (pressure before the regulating valve), P2 is the outlet pressure (pressure after the regulating valve), P a N is the unit conversion factor, which takes a value of 0.0346 in this unit. C vo X is the flow coefficient when fully open, where X is the opening degree (0-1 scale).

[0124] The flow coefficients of the three flow control valves can be determined by fitting curves to steady-state data points.

[0125] (2) Derivation of the bypass valve flow coefficient

[0126] The flow rate of gas through the valve is calculated using the following formula.

[0127]

[0128]

[0129]

[0130] For a valve with equal percentage opening, the flow coefficient of the valve at different opening degrees is calculated using the following formula:

[0131]

[0132] For a linear valve (FV1814A), the flow coefficient of the valve at different opening degrees is calculated using the following formula:

[0133] C V (x)=C vo ×x

[0134] We obtain the following formula:

[0135]

[0136] Where: Q is the total volumetric flow rate through the parallel valves under standard conditions, in m³. 3 / h; Z is the compressibility coefficient at upstream temperature and average pressure; G is the specific gravity of natural gas relative to air; T is the upstream temperature, K; P1 is the inlet pressure (pressure before standard gauge), P2 is the outlet pressure (pressure after regulating valve), P a N is the unit conversion factor, which takes a value of 0.0346 in this unit. C vo X is the flow coefficient when fully open, where X is the opening degree (0-1 scale).

[0137] The flow coefficients of the two bypass valves can be determined by fitting curves to steady-state data points.

[0138] (3) Calculation of friction coefficient between standard table and calibration table

[0139] By using data-driven methods, the process is reflected in the friction resistance. By identifying the on / off status data of key valves collected by the SCADA system, various calibration processes can be uniquely determined, and the friction resistance under each process can be calculated using the following formula:

[0140]

[0141] In the formula, Q is the volumetric flow rate of the gas pipeline under standard engineering conditions, in m³ / s. 3 / s;P Q P is the starting pressure of the gas pipeline. a ;P ZLet be the end pressure of the calculated section of the gas pipeline; D be the inner diameter of the gas pipeline; λ be the hydraulic friction coefficient; Z be the compressibility factor of natural gas under pipeline transportation conditions (average pressure and average temperature); Δ * Here, T represents the relative density of natural gas; T is the gas transmission temperature, T = 273 + t. pj , where is the average temperature of the gas pipeline, °C; L is the length of the calculated section of the gas pipeline, m;

[0142] like Figure 3 As shown, ① when the pressure difference is small and the total flow rate is constant, it is assumed that the inlet and outlet pressures remain constant and the total flow rate remains constant, that is, P1, P2 and Q are constant values.

[0143] ② The CVO of valves FV7212, FV7222, FV7232, FV7242 and FV1005 were obtained by fitting the data from the valve characteristic experiment.

[0144] ③ Calculate the flow rate at the bypass by determining the current bypass opening degree, and then calculate the total flow rate Q by summing the current bypass flow rate and the regulating flow rate.

[0145] ④ Identify all processes and compile the standard tables and friction data of each calibration station under each process into a database for future use.

[0146] ⑤ Select the friction resistance of the standard gauge and calibration bench according to the calibration procedure for the target flow rate. Using the target flow rate, P1, and the friction resistance under this calibration procedure, calculate the pressure P3 before the regulating valve using the gas pipeline calculation formula.

[0147] ⑥ Based on the principle of opening the largest valve first, calculate the opening degree of the control valve using the valve formula by adjusting the pressure before and after the valve, the target flow rate, and the valve's flow coefficient. Round the calculated opening degree. For the flow rate that cannot be adjusted, continue to calculate the opening degree of the smaller valve using the valve formula, and so on, until the minimum valve opening degree is calculated.

[0148] ⑦ For bypass traffic, the bypass traffic is obtained by subtracting the target traffic from the total traffic.

[0149] ⑧ Similarly, following the principle of opening the large valve first, open only the large valve first, calculate the opening degree of the large valve using the valve formula, round it off, and then use the small valve for the next adjustment.

[0150] ⑨ Repeat ⑥~⑧ to calculate the calibration flow rate point for each table under test one by one;

[0151] S6: Simulation model and controller construction. Based on the current parameters at various points in the station, the relationship between the calibration flow rate and the control valve opening is sought. A BP neural network is used, employing alternating forward and backward propagation processes. An error function gradient descent strategy is executed in the weight vector space, dynamically iterating a set of weight vectors to minimize the network error function, thereby completing the information extraction and memorization process.

[0152] Backpropagation (BP) neural networks are multilayer feedforward networks trained using the backpropagation algorithm. They are one of the most widely used neural network models. Their basic principle is to continuously adjust the network weights and thresholds through training with sample data, so that the error function decreases along the negative gradient direction and approaches the expected value. BP neural networks can learn a large number of input-output pattern mapping relationships without having to reveal the mathematical equations describing these mapping relationships in advance.

[0153] The BP algorithm consists of two processes: forward propagation of the data stream and backward propagation of the error signal. During forward propagation, the direction of propagation is from the input layer to the hidden layer and then to the output layer. The state of each neuron only affects the next neuron. Let the BP neural network have n nodes in the input layer, l nodes in the hidden layer, and m nodes in the output layer. Let wik be the weight between the input and hidden layers, wkj be the weight between the hidden and output layers, f1 be the transfer function of the hidden layer, and f2 be the transfer function of the output layer. Then the output of the hidden layer nodes is:

[0154]

[0155] The output of the output layer node is:

[0156]

[0157] In this way, the BP neural network completes the approximate mapping of an n-dimensional vector to an m-dimensional vector. If the expected output is not obtained at the output layer, the process switches to backpropagation of the error signal. Let there be p training samples, denoted as X1, X2, ..., Xq, ..., Xp, where... Substituting the q-th sample Xq into the network yields a set of outputs Yq. Using a squared error function, we obtain the error Eq for the q-th sample:

[0158]

[0159] In the formula: For the desired output, the global error for p training samples is:

[0160]

[0161] The weights wkj are adjusted using the cumulative error backpropagation (BP) algorithm to reduce the global error E, i.e.:

[0162]

[0163] In the formula: η is the learning rate, and the error signal δ is defined. yj for:

[0164]

[0165]

[0166]

[0167] In the formula: Sj is the net input of node j,

[0168] From the above formula, the formula for adjusting the weight wkj is:

[0169]

[0170] The adjustment of weight wik is similar to that of wkj, and its adjustment formula is as follows:

[0171]

[0172] By alternating between forward and backward propagation, an error function gradient descent strategy is executed in the weight vector space to dynamically iterate a set of weight vectors, thereby minimizing the network error function and completing the information extraction and memorization process.

[0173] D1: The function of the natural gas flow meter calibration controller is to provide the opening degree of four regulating valves based on the current operating conditions and target flow rate. The valve combination and inlet pressure are used as operating condition judgment parameters, and the calibration flow rate (target flow rate) is used as the input of the BP neural network. The opening degree of the four valves is used as the output to construct a control neural network model, which is then verified using the controller. The controller's proposed solution is basically consistent with the actual solution. The BP neural network has good applicability to such complex nonlinear mapping relationships. At the same time, for calibration stations that have been operating for a long time, there is a large amount of historical calibration data that can be used for neural network training. In order to improve the accuracy of neural network prediction, it is first necessary to process invalid values, erroneous values, duplicate values, and noise in the data. Then, the cleaned data is used to train the neural network. The regulating valve status and station process parameters are used as inputs, and the calibration flow rate is used as the output to construct a neural network simulation model of the calibration station. 70% is selected as training data, 15% as validation data, and the remaining 15% as test data for BP neural network training.

[0174] The computer used has an AMD 3600 CPU, 16GB of RAM, and runs Windows. 10. Through numerous trials, the final neural network structure was determined to be a 5-layer network, with 60, 200, and 80 neurons in the three hidden layers, respectively. The training time was 4 minutes and 12 seconds. The correlation coefficient R was used as the evaluation index for the training effect of the BP neural network. The closer R is to 1, the better the training effect. The regression coefficient (R value) exceeded 0.99, indicating a good fitting effect. 3000 points were uniformly selected from the dataset for result verification. The simulated flow rate was basically consistent with the actual flow rate, proving the accuracy of the neural network simulation model. The simulation model established by the neural network basically matched the simulation of the flow rate. Data analysis showed that the average absolute error of the simulation for this data segment was 21.733 m3 / h, the maximum absolute error was 313.1358 m3 / h, and the minimum absolute error was 0.0041 m3 / h. The average relative error of the data segment was 0.09, the maximum relative error was 2.2, and the minimum relative error was 1.573 × 10-6.

[0175] The function of the natural gas flow meter calibration controller is to determine the opening degree of four regulating valves based on the current operating conditions and target flow rate. This controller model is the inverse model of the simulation model in Section 2.7.3. The valve combination and inlet pressure are used as operating condition judgment parameters, and the calibration flow rate (target flow rate) is used as the input of the BP neural network. The opening degree of the four valves is used as the output. After processing the samples, 70% is selected as training data, 15% as validation data, and the remaining 15% as test data for BP neural network training. Through a large number of trials, the neural network structure was finally determined to be a 7-layer network, with the number of neurons in the four hidden layers being 20, 50, 40, and 10, respectively. The training time was 6 minutes and 19 seconds. The R value of the neural network was 0.96117, indicating a good fitting effect. 3000 points were evenly selected from the dataset for result verification. The controller's proposed solution was basically consistent with the actual solution, proving the usability of the neural network controller.

[0176] Predicting the pressure before the control valve

[0177] In the control valve model, due to the inconsistency between the positions of the measuring instruments on site and the hydraulic model, there is a certain deviation in the numerical values. To reduce the model deviation and make the model output values ​​more accurate, so that it can be better applied to the field, a BP neural network is used to predict the pressure before the control valve. The neural network has high requirements for data, so the selection of the neural network's input and output is particularly important. Here, the selected inputs are the inlet pressure, the flow rate (one method is to select the standard gauge and the calibration station, which is determined by digital coding; another method is to characterize the flow rate through the friction coefficient), and the temperature. The model output is the pressure before the control valve. This method can predict the pressure before the control valve for any flow rate and any process. The above analysis shows that after determining the calibration process, the identification of the key parameter for calculating the control valve opening, the pressure before the control valve, has a high degree of fit, which can provide strong support for the calculation algorithm of the control valve opening at each calibration flow point.

[0178] Verification of flow prediction

[0179] Because the mechanistic model has different model equations under different conditions, neural network models are used to predict areas where the mechanistic model is inadequate. Thus, at a macroscopic scale, the established predictive model combines the "white-box" mechanistic model for simulating and predicting the station's state under normal operating conditions, and the "black-box" neural network model for simulating and predicting the station's state under special operating conditions. This "grey-box" approach achieves simulation prediction. Using a BP neural network, the model predicts and simulates all operating conditions under the DN250 process with all FV1005 components fully closed. The neural network model for all data under the DN250 process divides all data into a 7:3 ratio: 70%, 80%, and 20% are used for learning and validation, and 30% is used for extensional testing. Simulation learning is performed on 70% of the data, and prediction output is performed on the remaining 30%. The predictive accuracy of the BP neural network is relatively stable, but the update frequency and input-output variations must be considered. Therefore, the BP neural network model can supplement the mechanistic model for specific operating conditions.

[0180] The analysis was performed using an LSTM (Long Short-Term Memory) neural network. Similarly, 70%, 90%, and 10% were used for learning and learning verification, and 30% was used for extensional testing. LSTM neural networks have certain advantages in processing time series data. From the overall data perspective, the processing results are also better than those of BP neural networks. However, because its output is extremely dependent on recent data, the output fluctuation frequency is too high, making it unsuitable for field applications at the verification station.

[0181] Outbound pressure and total operating flow forecast

[0182] like Figure 4 As shown, in order to speed up the valve adjustment and solve the problem of unstable flow after reaching the target flow range, the opening degree of the large bypass valve 1005 is determined to make the entire valve adjustment system complete and closed-loop. In this process, the pressure value of PT8206 at the target point needs to be predicted so that FV1005 can be controlled.

[0183] like Figure 5 As shown, to accelerate valve control and address the issue of unstable flow after reaching the target flow range, the opening degree of the large bypass valve 1005 is determined to ensure the entire valve control system is complete and closed-loop. To facilitate the use of the neural network predicting the PT8206, these two neural networks address the difficulty of control prediction in systems with large time delays from a data perspective. As auxiliary data sources for the mechanistic model, they reduce control delays and improve prediction accuracy.

[0184] S7: The intelligent verification system is established. After the controller starts, it operates in the command verification state. In this state, the intelligent controller listens and waits for the verification client to send verification tasks. When the verification client sends all the information of a verification task (including the information of the table being verified, the verification task information, and the flow point, etc.) to the intelligent controller, the intelligent controller performs a process check. The process check checks the valve position status and initial state to ensure the safety and rationality of the pipeline combination when connecting the control line. On the other hand, it selects different sets of operating parameters to participate in model prediction and hydraulic simulation, such as... Figure 6 As shown, all algorithms of the working-level controller are integrated into the SmartCalibration2.0.8 intelligent controller software and deployed on the E1000 server. The MoubusTCP protocol is used to realize data interaction and command transmission between the station control and calibration clients.

[0185] E1: After the valve position is qualified, the historical operating condition reproduction algorithm is entered to generate valve position combinations and use historical database data for correction, completing the first multi-valve joint commissioning. When the historical operating condition control effect is not good or the valve position scheme of the controller based on the BP neural network is obviously ineffective, the flow prediction results are used for the second multi-valve joint commissioning.

[0186] E2: After two multi-valve joint adjustments, a more conservative single-valve control algorithm is used for real-time flow control in the remaining control range. Rapid throttling control or a single-valve pressure drop distribution incremental scheme is used to reduce or increase the flow rate. After the flow adjustment is completed, a start verification flag is sent. The verification client performs flow meter verification and continues with the next verification cycle.

[0187] The embodiments described herein are preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape, and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A natural gas metering and flow regulation process based on a composite intelligent algorithm, characterized in that: The steps are as follows: S1: Set up the equipment to be verified and the testing equipment to carry out verification and calibration operations on the flow meter, specifically consisting of inlet and outlet pipelines, filter separation device, pressure regulating valve group, flow regulating valve group, back pressure valve group, compressor, analysis cabin, standard devices at all levels and verification platform; A1: On-site data acquisition and control key points, forming a table of key points for intelligent verification communication; A2: Determine 4 calculation boundaries, and combine static data and real-time data acquisition information to construct a 1:1 hydraulic simulation model corresponding to the actual equipment on site; S2: Set the boundary conditions of constant pressure at both ends for simulation. By adjusting the opening of the regulating valve and the opening and closing of the ball valve in the model, the hydraulic simulation is carried out on the working condition after the flow reaches the flow point under test. The calibration process, valve opening and hydraulic characteristics of the flow meter under test of different diameters are obtained. S3: The friction coefficient sensitivity coefficient method is used to identify the pipes that are more sensitive to the pressure or flow rate at the correction node. By adjusting the friction coefficient of the sensitive pipes, the friction coefficient of the pipes is corrected in groups. B1: After dividing the natural gas flow station into the inlet filtration and pressure regulation area, standard meter area, calibration platform area, and flow regulating valve group area according to the functional blocks, each area is equivalent to a different partition model, forming a simplified model of the entire hydraulic simulation; B2: The pipelines and valves in each area are merged, and the instruments of each part after the area processing are screened. The friction coefficient under each different process is calculated by using the basic calculation formula of the gas transmission pipeline. The corresponding friction coefficient is directly called for calculation and compared with the on-site flow. If it exceeds a certain value or there is no process, the friction coefficient is calculated in real time and stored. S4: Test the valve characteristics, create corresponding characteristic curves, design experiments for large and small flow regulating valve groups in the field, and obtain the key parameters of pressure, flow and valve opening for fitting calculation of valve flow coefficient through field valve characteristic experiments. The obtained flow coefficient is used for control algorithm verification. S5: Based on the nature of the natural gas flow meter calibration station, the calibration station is divided into zones according to the functional characteristics and process combinations of each part. The selection of standard meters and the selection of calibration positions are divided into one zone, and the control valve zone is divided into another zone. A state prediction model is established based on the zone division. C1: When calibrating the flow meter, the calibration process of standard meters of different diameters is identified. The corresponding process data is extracted and merged in a unified manner through an algorithm combined with the station's process flow to form a record of the calibration process involved in different diameter meters. A portion of the field data is extracted, and the results are identified according to the combination of valve positions. C2: Based on the identification results, calculate the friction coefficients corresponding to various processes, and use the average friction coefficient of each process group as the initial friction coefficient value for that process. The system collects the pressure before and after the control valve, the total flow rate through the control valve, the valve inlet temperature, compressibility factor, and relative density to obtain the flow coefficient of the control valve. A set of flow coefficients is fitted to each control valve according to different flow rates for simulation, obtaining a simulation diagram. C3: The ratio of the simulated flow rate value to the actual flow rate value is used to correct the simulated flow rate at the next time point, obtaining an accurate state prediction model. C4: Using the pressure before and after the control valve, the target flow rate, and the valve's flow coefficient, the valve's formula is used to calculate the opening of the large valve of the control valve. The calculated opening is rounded. For flow rates that cannot be adjusted, the valve's formula is used to calculate the opening of the small valve, and so on, calculating the opening of the smallest valve in sequence. The calibration flow rate points for each tested instrument are calculated one by one. S6: Using a BP neural network, the network performs a gradient descent strategy on the error function through alternating forward and backward propagation, and the weight vector space is used to minimize the network error function. D1: The natural gas flow meter calibration controller provides the opening degree of four regulating valves, the valve combination and the inlet pressure as operating condition judgment parameters, and the calibration flow rate as the input of the BP neural network. The opening degree of the four valves is used as the output to construct a control neural network model, which is then verified using the controller. S7: The intelligent controller performs process checks. On the one hand, the process checks the valve position status and initial state. On the other hand, it selects different sets of operating parameters to participate in model prediction and hydraulic simulation. E1: After the valve position is qualified, it enters the historical operating condition reproduction algorithm to generate valve position combinations and use historical database data for correction, completing the first multi-valve joint commissioning. When the historical operating condition control effect is not good or the valve position scheme of the controller based on the BP neural network is obviously ineffective, the flow prediction results are used to perform the second multi-valve joint commissioning. E2: After two multi-valve joint adjustments, the remaining control range is used to reduce or increase the flow rate by using rapid throttling control or single-valve pressure drop distribution incremental scheme. After the flow rate adjustment is completed, a start verification flag is sent, and the verification client performs flow meter verification and continues to perform the next verification.

2. The natural gas metering and flow regulation process based on a composite intelligent algorithm according to claim 1, characterized in that: The inlet and outlet pipelines, filtration and separation devices, pressure regulating valve groups, flow regulating valve groups, back pressure valve groups, compressors, analysis cabins, various standard devices, and calibration stations in S1 meet the process requirements for each standard device to perform calibration and verification operations on sonic nozzles, ultrasonic flowmeters, and turbine flowmeters.

3. The natural gas metering and flow regulation process based on a composite intelligent algorithm according to claim 1, characterized in that: The 1:1 hydraulic simulation model in A2 was modeled using SPS hydraulic simulation software.

4. The natural gas metering and flow regulation process based on a composite intelligent algorithm according to claim 1, characterized in that: The partitioning model in B1 specifically unifies the inlet filter pressure regulation area, standard meter area, and calibration station area into one partition, which serves as a process switching area. The area of ​​the regulating valve is another sub-partition, which regulates the flow rate through the calibration station. The parallel connection of these two partitions forms a simplified model of the entire hydraulic simulation.

Citation Information

Patent Citations

  • Natural gas pipeline flow state prediction method

    CN114611418A

  • Natural gas flow meter intelligent verification process operation safety control method

    CN114877253A