A method for facilitating improved accuracy of natural gas metering

By extracting operating condition disturbance characteristics and component information, and combining component proxy quantities to determine the current operating condition, correction rules are constructed to correct natural gas metering data. This solves the metering inconsistency problem caused by processing component changes and flow pulsations separately, and improves the stability and accuracy of metering results.

CN122016017BActive Publication Date: 2026-06-19JIANGXI PROVINCIAL NATURAL GAS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGXI PROVINCIAL NATURAL GAS CO LTD
Filing Date
2026-04-16
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In dynamic settlement metering scenarios after pressure regulation of hydrogen-blended natural gas, existing technologies separate component changes from flow pulsation, resulting in inconsistent correction directions of the same metering instrument at different time periods. This lack of stable references and update constraints makes the instrument susceptible to short-term disturbances, leading to insufficient continuity and reliability of metering results.

Method used

By acquiring raw metering data, we extract operating condition disturbance features that characterize pressure regulation pulsation and flow fluctuations, determine component proxy quantities by combining component-related information, and determine the current operating condition based on the component characterization results and operating condition disturbance vectors. We then construct correction rules to correct the original metering sequence and form stable corrected metering results.

Benefits of technology

It improves the continuity, stability and accuracy of natural gas metering, reduces the probability of inconsistent correction directions in different time windows, and enhances metering adaptability and accuracy in dynamic settlement metering scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016017B_ABST
    Figure CN122016017B_ABST
Patent Text Reader

Abstract

This invention relates to the field of natural gas metering technology, and in particular to a method for improving the accuracy of natural gas metering. The method includes: acquiring raw metering data within the same metering period and forming a raw metering sequence; extracting operating condition disturbance features characterizing pressure regulation pulsations and flow fluctuations to obtain an operating condition disturbance vector; extracting component-related information and determining component proxy quantities, and mapping them to obtain component characterization results; determining the current operating condition based on the component characterization results and the operating condition disturbance vector, and correcting the raw metering sequence accordingly to obtain a first corrected metering result; further filtering anchor segments, performing bounded updates on the correction rules, and correcting subsequent raw metering data to obtain a second corrected metering result, thereby improving the continuity, stability, and accuracy of the corrected metering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural gas metering, and more particularly to a method for improving the accuracy of natural gas metering. Background Technology

[0002] In dynamic billing and metering scenarios where hydrogen-blended natural gas is delivered to industrial and commercial users after pressure regulation, especially in the ultrasonic metering branch at the industrial and commercial user front end, gas composition, sound velocity, density, viscosity, and flow stability change synchronously with the operation. Simultaneously, the user side experiences small flow fluctuations, frequent start-ups and shutdowns, and the superposition of short-term pulsations. This makes it easy for the original metering value of the metering instrument to deviate from the actual gas volume over time, potentially leading to the accumulation of short-term deviations. Therefore, how to identify, constrain, correct, and update such deviations online without relying on continuous online chromatography, and steadily improve the accuracy of natural gas metering, has become a pressing technical problem to be solved in this scenario.

[0003] Currently, existing technologies typically involve using the original measurement model for settlement based on the established operating conditions, after the measuring instrument has been calibrated and periodically re-inspected. When gas conditions change significantly, measurement reliability is restored through supplementary testing, re-inspection, or recalibration. In other words, the existing schemes generally rely on the existing calibration combined with post-correction processing, depending more on the existing model and subsequent calibration to maintain measurement results.

[0004] However, in the dynamic settlement and metering scenario after the pressure regulation of hydrogen-blended natural gas, the existing correction logic often treats component changes and flow pulsation separately, lacking a mechanism to model the two as a unified error source chain. Therefore, in the short-term fluctuation scenario after pressure regulation, the same metering instrument is prone to inconsistent correction directions at different time periods, making it difficult to continuously, stably and consistently correct the metering deviation under dynamic operating conditions. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies in dynamic settlement and metering scenarios after pressure regulation of hydrogen-blended natural gas. On the one hand, existing technologies separate component changes from flow pulsation, resulting in inconsistent correction directions of the same metering instrument at different time periods. On the other hand, the correction rules lack stable references and update constraints, making them susceptible to short-term disturbances and requiring frequent adjustments, leading to insufficient continuity and reliability of metering results. Therefore, this invention proposes a method to improve the accuracy of natural gas metering.

[0006] To achieve the above objectives, the technical solution adopted by this invention is: a method for improving the accuracy of natural gas metering, comprising:

[0007] The raw metering data of the data acquisition unit within the same metering period are acquired to form the raw metering sequence.

[0008] Based on the original metering sequence, operating condition disturbance features characterizing pressure regulation pulsation and flow fluctuation are extracted to obtain the operating condition disturbance vector;

[0009] Based on the original metrological sequence, component-related information is extracted, and component surrogate quantities are determined based on the component-related information. The component surrogate quantities are then mapped to obtain the corresponding component characterization results.

[0010] Based on the component characterization results and the operating condition disturbance vector, the current operating condition is determined, and the original measurement sequence is corrected according to the correction rule corresponding to the current operating condition to obtain the first corrected measurement result.

[0011] Based on the original measurement sequence, the current operating condition, the component characterization results, the operating condition disturbance vector, and the first corrected measurement results, anchor segments are selected according to the screening criteria.

[0012] The correction rule is boundedly updated based on the anchored segment, and the subsequent original measurement data is corrected according to the updated correction rule to obtain the second corrected measurement result.

[0013] Preferably, the specific steps for acquiring raw measurement data within the same measurement period by the acquisition unit to form the raw measurement sequence include:

[0014] The raw measurement data is acquired and cached and sorted according to data type and time sequence. The raw measurement data includes acquisition records and pressure fluctuation data.

[0015] The sequence time is determined based on the acquisition time corresponding to the acquisition record;

[0016] Based on pressure fluctuation data, pressure fluctuation segments are extracted within the time interval between adjacent sequence moments.

[0017] The collected records are merged with the corresponding pressure fluctuation segments to generate the original measurement sequence.

[0018] Preferably, the specific steps for extracting operating condition disturbance features characterizing pressure regulation pulsation and flow fluctuation based on the original metering sequence to obtain the operating condition disturbance vector include:

[0019] The original metrology sequence is segmented into time series to obtain multiple time windows;

[0020] Based on the collected records and pressure fluctuation data, the operating condition disturbance characteristics are extracted within each time window;

[0021] The operating condition disturbance features are processed with a unified dimension, and the results after the unified dimension processing are merged into the operating condition disturbance candidate vectors for the corresponding time window.

[0022] The candidate vector of operating condition disturbance in the current time window is compared with the operating condition disturbance vector output in the previous time window, and the operating condition disturbance vector of the current time window is determined based on the comparison result.

[0023] Preferably, the acquisition records include original forward and reverse propagation time difference parameters, original sound velocity parameters, instantaneous volumetric flow rate parameters, original pressure parameters, and original temperature parameters, wherein the original sound velocity parameters, original pressure parameters, and original temperature parameters are used to characterize component-related information.

[0024] Preferably, the specific steps of extracting component-related information based on the original metrological sequence, determining component surrogate quantities based on the component-related information, and mapping the component surrogate quantities to obtain the corresponding component characterization results include:

[0025] A standard gas sample library is pre-constructed, which includes reference samples corresponding to gas components and measurement data under different operating conditions;

[0026] Based on the original sound velocity parameters, original pressure parameters, and original temperature parameters within the current time window, the corresponding reference sample is retrieved from the standard gas sample library, and interpolation processing is performed to obtain the intermediate component values ​​corresponding to the current time window.

[0027] The intermediate component values ​​are merged to obtain the component proxy quantity corresponding to the current time window;

[0028] The component proxy quantity is divided into intervals to obtain the corresponding component interval number, and the component interval number is used as the component characterization result.

[0029] Preferably, the specific steps for determining the current operating condition based on the component characterization results and the operating condition disturbance vector include:

[0030] A pre-built operating condition mapping table is used to store the correspondence between the component interval number, disturbance level number, and flow segment number and the current operating condition;

[0031] The current component interval number is determined based on the component characterization results, the current disturbance level is determined based on the operating condition disturbance vector, and the current flow segment is determined based on the instantaneous volumetric flow rate parameter within the current time window.

[0032] Based on a joint index of the current component interval number, the current disturbance level number, and the current flow segment number, the current operating condition is determined from the operating condition mapping table.

[0033] Preferably, the specific steps of correcting the original measurement sequence according to the correction rule corresponding to the current operating condition to obtain the first corrected measurement result include:

[0034] A platform calibration matrix is ​​pre-constructed, which is used to store the correction rules corresponding to each current working condition;

[0035] Based on the current operating condition, the corresponding correction rule is retrieved from the platform calibration matrix, and the correction rule is used as the basis for correcting the instantaneous volumetric flow rate within the current time window;

[0036] The instantaneous volumetric flow rate within the current time window is corrected based on the correction rule to obtain the corrected instantaneous volumetric flow rate value;

[0037] The cumulative gas volume corresponding to the current time window is determined based on the instantaneous volumetric flow rate correction value, and a first corrected metering result is generated based on the instantaneous volumetric flow rate correction value and the cumulative gas volume.

[0038] Preferred options also include:

[0039] Perform a condition boundary determination for the current time window;

[0040] When the determination result indicates that the current time window is at the working condition switching boundary, consistency processing is performed on the correction rules for the current time window.

[0041] Preferably, the specific steps for filtering anchor segments according to filtering criteria include:

[0042] Filter the continuous window group to determine the candidate anchoring windows that meet the continuity consistency condition and stability condition of the current working condition;

[0043] Candidate anchor windows that are consecutively adjacent in time and do not have any intermediate windows that do not meet the filtering criteria are merged to obtain anchor segments.

[0044] Preferably, the specific steps of performing a bounded update on the correction rule based on the anchored segment, and correcting the subsequent original measurement data according to the updated correction rule to obtain the second corrected measurement result include:

[0045] Based on the anchored segment, the adjacent component intervals are determined, and based on the platform calibration matrix, the correction rules corresponding to the adjacent component intervals under the same disturbance level and the same flow segment are retrieved to determine the candidate correction rules corresponding to the anchored segment.

[0046] The candidate correction rule and the original correction rule are subjected to amplitude limiting to obtain the corrected correction rule;

[0047] The updated uncertainty is determined based on the correction rule, and the effectiveness of the correction rule is determined based on the updated uncertainty.

[0048] When the correction rule takes effect, the instantaneous volumetric flow rate in the subsequent original metering data is corrected based on the correction rule to obtain the second corrected metering result.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] I. This invention uses the component characterization results and the operating condition disturbance vector together to determine the current operating condition, obtains a correction rule consistent with the current operating state, and corrects the original instantaneous volumetric flow rate based on the correction rule. It incorporates the property shift caused by component changes and the dynamic disturbance caused by flow pulsation into the same operating condition determination process, thereby reducing the probability of inconsistent correction directions in different time windows and improving the continuity, stability and accuracy of the corrected measurement results in dynamic settlement and metering scenarios.

[0051] Second, this invention obtains the first corrected measurement result by constructing the original measurement sequence, extracting the operating condition disturbance vector, determining the component characterization result, retrieving the current operating condition and calling the corresponding correction rule. This plays a role in unifying component changes and flow pulsation into the same judgment link, thereby improving the adaptability, continuity and measurement accuracy of dynamic settlement measurement after pressure regulation of hydrogen-blended natural gas. Attached Figure Description

[0052] Figure 1 This is a flowchart of the method of the present invention.

[0053] Figure 2 This is a comparison diagram of the effects of the present invention and the prior art. Detailed Implementation

[0054] To make the technical means, creative features, objectives, and effects of this invention easier to understand, the invention is further described below with reference to specific embodiments. However, the following embodiments are merely preferred embodiments of this invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments described herein without creative effort are all within the protection scope of this invention.

[0055] Example 1:

[0056] To achieve the above objectives, please refer to Figure 1 This invention provides a method for improving the accuracy of natural gas metering, comprising:

[0057] The raw metering data of the data acquisition unit within the same metering period are acquired to form the raw metering sequence.

[0058] Based on the original metering sequence, the operating condition disturbance features characterizing pressure regulation pulsation and flow fluctuation are extracted to obtain the operating condition disturbance vector;

[0059] Component-related information is extracted from the original metrological sequence, and component surrogate quantities are determined based on the component-related information. The component surrogate quantities are then mapped to obtain the corresponding component characterization results.

[0060] The current operating condition is determined by combining the component characterization results with the operating condition disturbance vector. The original measurement sequence is then corrected according to the correction rule corresponding to the current operating condition to obtain the first corrected measurement result.

[0061] It should be noted that in the dynamic settlement and metering scenario after pressure regulation of hydrogen-blended natural gas, existing correction logics mostly treat component changes and flow pulsation separately, lacking a mechanism to model the two as a unified error source chain. Component changes refer to changes in the proportion of each component gas in the transported gas, which in turn causes changes in physical properties such as sound velocity, density, and viscosity. Flow pulsation refers to the non-steady-state flow phenomenon in which the pressure and flow rate fluctuate over time due to pressure regulation, start-stop disturbances, and load fluctuations during the pressure regulation and transport process.

[0062] For determining compositional changes, the primary data sources used are sound velocity, metering point pressure, and temperature, which can also be indirectly verified by combining forward and reverse propagation time differences. This is because compositional changes inherently cause changes in gas properties, and sound velocity is most sensitive to gas composition. Metering point pressure and temperature also jointly affect the actual physical state corresponding to the sound velocity. Therefore, these three types of data are suitable for determining compositional parameters. Sound velocity is the core input for determining compositional changes because it varies significantly under different hydrogen doping ratios and natural gas compositions. Metering point pressure and temperature constrain the operating state corresponding to the sound velocity, preventing the effects of pressure and temperature changes from being misjudged as pure compositional changes. Forward and reverse propagation time differences are closer to the underlying ultrasonic measurements and are generally not directly used as the primary criterion for determining compositional changes, but they can be used to reverse-verify the stability of the sound velocity calculation results.

[0063] To determine flow pulsation, the primary methods used are the pressure fluctuation sequence before and after pressure regulation, and the instantaneous volumetric flow rate, supplemented by the drift of sound velocity relative to the previous window. This is because flow pulsation is essentially a non-steady-state fluctuation during flow, and its most direct external manifestation is the change in pressure and flow rate over time. The pressure fluctuation sequences before and after regulation reflect the pressure fluctuation state at the inlet and outlet sides of the regulator, and can further extract the peak-to-valley difference, pressure difference fluctuation amplitude, and the main pulsation frequency of the pressure fluctuation sequence before and after regulation—all typical characteristics of operating condition disturbances. The instantaneous volumetric flow rate reflects changes in user-side load and flow fluctuations, and can further extract the coefficient of variation of the instantaneous volumetric flow rate, which represents the stability of the flow within the current window. While the drift rate of sound velocity relative to the previous window is essentially related to physical properties, it can also serve as an auxiliary measure of the rate of change in operating conditions, because a rapid change in sound velocity in adjacent windows usually indicates that the current operating state is unstable.

[0064] In this invention, the processing terminal is communicatively connected to the acquisition unit and is used to cache, sort, match, merge, determine operating conditions, correct measurements, and output results for the raw measurement data output by the acquisition unit; the processing terminal includes at least one of a metering host, an industrial controller, and an edge computing device.

[0065] The acquisition unit is used to acquire at least one of the following raw measurement data: forward and reverse propagation time difference, sound velocity, instantaneous volumetric flow rate, pressure, and temperature; the acquisition unit includes at least one of the following: ultrasonic metering instrument, external pressure sensor, temperature sensor, and flow acquisition module.

[0066] As an optional implementation, the processing terminal is specifically a metering host, and the acquisition unit includes a four-channel ultrasonic metering instrument arranged in the ultrasonic metering branch at the front end of the industrial and commercial user, a pressure sensor before pressure regulation arranged on the inlet side of the pressure regulator, and a pressure sensor after pressure regulation arranged on the outlet side of the pressure regulator.

[0067] At the end of each low-frequency sampling cycle, the acquisition unit encapsulates the forward and reverse propagation time difference, sound velocity, instantaneous volumetric flow rate, pressure and temperature collected during the sampling cycle into an acquisition record, and assigns a unique acquisition timestamp to the acquisition record. The acquisition timestamp is taken as the end time of the low-frequency sampling cycle, and the low-frequency sampling cycle can be 1 second.

[0068] The acquisition unit simultaneously and continuously outputs pressure fluctuation data to the processing terminal. The pressure fluctuation data includes the pressure fluctuation sequence before pressure regulation and the pressure fluctuation sequence after pressure regulation. Each pressure sampling point in the pressure fluctuation sequence before and after pressure regulation has a corresponding sampling timestamp.

[0069] It should be noted that the pressure in the collected records is used to characterize the pressure status of the metering location within the current sampling period and belongs to low-frequency pressure parameters; the pressure fluctuation sequence before and after pressure regulation represents the data sequence formed by multiple pressure sampling values ​​obtained in the continuous sampling process at the inlet and outlet sides of the regulator, respectively, and belongs to high-frequency pressure fluctuation data, used to characterize the fluctuation characteristics of pressure changes over time before and after pressure regulation.

[0070] Furthermore, the collected data and pressure fluctuation data together constitute the raw measurement data.

[0071] After receiving the raw measurement data, the processing terminal first writes them into the corresponding buffer according to the data organization format. Specifically, the collected records are written into the first buffer, and the pressure fluctuation sequence before and after the pressure regulation is written into the second buffer. The buffering time of both the first and second buffers is set to 300 seconds to ensure that at least 10 consecutive processing windows of data are retained during the subsequent sliding window calculation.

[0072] After writing is completed, the processing terminal first sorts the multiple collection records in the first buffer in ascending order according to the collection timestamp. At the same time, the processing terminal sorts the pressure fluctuation sequence before and after pressure regulation in the second buffer in ascending order according to the sampling timestamp corresponding to the pressure sampling point.

[0073] After sorting, the processing terminal uses the collection records arranged continuously by collection timestamp in the first buffer as the basis, takes the collection timestamp corresponding to each collection record as a sequence time, and takes the left-closed and right-open time interval between the current sequence time and the next sequence time as the segment extraction interval. Within the segment extraction interval, it extracts the pressure fluctuation segment before pressure regulation and the pressure fluctuation segment after pressure regulation from the second buffer, and then merges the collection record with the corresponding pressure fluctuation segment before pressure regulation and pressure fluctuation segment after pressure regulation to generate an original measurement sequence unit.

[0074] As an optional implementation, after obtaining the original measurement sequence, the original measurement sequence is processed by time-series segmentation with a sliding window of 30 seconds and a sliding step of 5 seconds to form multiple time windows. Each time window is a continuous time period data extracted from the original measurement sequence by means of a sliding window, and each sliding window corresponds to a time window.

[0075] Within each sliding window, the operating condition disturbance characteristics are calculated separately. These characteristics include the peak-to-valley difference of pressure fluctuations before and after pressure regulation, the amplitude of pressure difference fluctuations, the coefficient of variation of instantaneous volumetric flow rate, the drift rate of sound velocity relative to the previous window, and the main pulsation frequency of the pressure fluctuation sequence. These characteristics are used to characterize the degree of pressure disturbance, the degree of flow fluctuation, the degree of change in physical properties, and the pulsation rhythm characteristics within the current window.

[0076] The peak-to-valley difference of the pressure fluctuation before pressure regulation is the difference between the maximum and minimum pressure values ​​of the pressure fluctuation segment before pressure regulation within the current sliding window; the peak-to-valley difference of the pressure fluctuation after pressure regulation is the difference between the maximum and minimum pressure values ​​of the pressure fluctuation segment after pressure regulation within the current sliding window; the main pulsation frequency of the pressure fluctuation sequence is obtained by performing spectral analysis on the pressure difference sequence within the current sliding window, and the frequency corresponding to the maximum spectral peak after removing the zero-frequency component is taken as the main pulsation frequency; the pressure difference fluctuation amplitude... Coefficient of variation of instantaneous volumetric flow rate The drift rate of the speed of sound relative to the previous window The calculation formulas are as follows:

[0077] ;

[0078] ;

[0079] ;

[0080] Where n represents the number of the current sliding window; The nth sliding window represents the time interval corresponding to the nth sliding window; t represents any sampling time within the time interval of the nth sliding window. This represents the pressure value before pressure regulation collected at time t; This represents the pressure value after pressure regulation collected at time t; This represents the pressure difference before and after time t; This indicates that the maximum value of the corresponding quantity is taken within the nth sliding window; This indicates that the minimum value of the corresponding quantity is taken within the nth sliding window; This represents the amplitude of the pressure difference fluctuation within the nth sliding window. This represents the coefficient of variation of the instantaneous volumetric flow rate within the nth sliding window. This represents the instantaneous volumetric flow rate corresponding to the i-th sampling point within the n-th sliding window; i represents the sequence number of the instantaneous volumetric flow rate sampling point within the n-th sliding window; M represents the total number of instantaneous volumetric flow rate sampling points within the n-th sliding window. This represents the average instantaneous volumetric flow rate within the nth sliding window; This represents the drift rate of the speed of sound relative to the previous window within the nth sliding window; express, express.

[0081] After obtaining the disturbance characteristics of each operating condition, the amplitude of pressure difference fluctuation, main pulsation frequency, coefficient of variation of instantaneous volumetric flow rate, and drift rate of sound velocity relative to the previous window are processed to a unified dimension. The results after unified dimension processing are then merged into the candidate vector of operating condition disturbance corresponding to the current sliding window. The peak-to-valley difference of pressure fluctuation before and after pressure regulation are used to assist in verifying whether there is unilateral abnormal pulsation in the current sliding window. The calculation formula is:

[0082] , , , ;

[0083] ;

[0084] in, This represents the candidate vector of the operating condition disturbance corresponding to the nth sliding window; These represent the vector components of the pressure difference fluctuation amplitude, main pulsation frequency, coefficient of variation of instantaneous volumetric flow rate, and drift rate of sound velocity relative to the previous window, respectively, after being processed with unified dimensions. This represents the main pulsation frequency within the nth sliding window; This represents the coefficient of variation of the instantaneous volumetric flow rate within the nth sliding window; This represents the drift rate of the sound velocity relative to the previous window within the nth sliding window; 2.0 kPa, 1.5 Hz, 0.20 and 0.05 represent the coefficient of variation of the pressure difference fluctuation amplitude, the main pulsation frequency, the instantaneous volumetric flow rate, and the normalized upper limit of the drift rate of the sound velocity relative to the previous sliding window, respectively. The normalized upper limit is obtained by statistically analyzing the 95th percentile of stable samples for 7 consecutive days before commissioning, with no less than 8 hours per day.

[0085] After the candidate vectors for operating condition disturbances are generated, the processing terminal compares the candidate vectors for operating condition disturbances corresponding to the current sliding window with the previous valid output operating condition disturbance vector stored in the state cache, and determines the output operating condition disturbance vector corresponding to the current sliding window based on the comparison result. The state cache stores the output operating condition disturbance vectors that actually participate in subsequent disturbance level classification after state hysteresis processing. The formula for calculating the vector difference is:

[0086] ;

[0087] in, This represents the vector difference between the operating condition disturbance vector corresponding to the nth sliding window and the operating condition disturbance vector corresponding to the previous sliding window. This represents the operating condition disturbance vector corresponding to the (n-1)th sliding window; represents the L2 norm, used to calculate the Euclidean distance between two operating condition disturbance vectors; j represents the index of each component in the operating condition disturbance vector; It represents the squared change of the j-th vector component between two adjacent sliding windows.

[0088] when When it is determined that the disturbance change corresponding to the current sliding window has not met the update condition, the previous valid output condition disturbance vector in the state cache is continued to be used as the output condition disturbance vector corresponding to the current sliding window; when When the disturbance change corresponding to the current sliding window reaches the update condition, the candidate vector of the operating condition disturbance corresponding to the current sliding window is determined as the output operating condition disturbance vector corresponding to the current sliding window, and the output operating condition disturbance vector is written into the state cache for difference comparison in the next sliding window. Subsequent disturbance level classification and determination of the current operating condition are all based on the output operating condition disturbance vector to suppress frequent switching caused by slight fluctuations at the window boundary.

[0089] By unifying the dimensions of the operating condition disturbance characteristics and forming an output operating condition disturbance vector, a comprehensive result is obtained that can represent the pressure disturbance, flow fluctuation, physical property change and pulsation rhythm within the current sliding window. This provides a stable input for subsequent disturbance level classification and determination of the current operating condition, thereby reducing frequent switching caused by slight fluctuations near the window boundary.

[0090] As an optional implementation, a standard gas sample library is pre-established during the equipment factory calibration stage or before on-site commissioning. Specifically, under controlled test conditions, a standard gas with a known hydrogen integral is introduced into the acquisition unit. Under different pressure and temperature combinations consisting of multiple preset pressure levels and multiple preset temperature levels, the corresponding pressure and temperature are kept stable, and the sound velocity value corresponding to the stable operating state is collected. The hydrogen integral, pressure, temperature, and sound velocity are then written into the standard gas sample library as a set of sample data. In this embodiment, 12 sets of standard gas samples are used as an example. The 12 sets of standard gas samples are arranged according to 3 pressure levels, 2 temperature levels, and 2 hydrogen integral level levels, so that each pressure level and each temperature level combination corresponds to 2 sets of sample data with different hydrogen integrals. Each set of samples is continuously collected for 60 seconds under the corresponding operating conditions, and the average sound velocity within those 60 seconds is taken as the standard sound velocity value of that set of samples. The standard gas sample library covers a range of hydrogen gas integral fractions from 0 to 20%, pressures from 20 to 400 kPa, temperatures from 0 to 40 degrees Celsius, and sound speeds from 300 to 500 meters per second. These ranges are determined based on the common operating ranges of hydrogen-blended natural gas transported to industrial and commercial users after pressure regulation.

[0091] The pressure level refers to multiple discrete pressure points pre-set along the pressure dimension when establishing the standard gas sample library, and the temperature level refers to multiple discrete temperature points pre-set along the temperature dimension. The pressure level and temperature level are used together to form the sample grid points in the standard gas sample library, so that adjacent levels can be retrieved and interpolated based on the average pressure and average temperature of the measurement points in the current sliding window during online operation.

[0092] During the online operation phase, the processing terminal first extracts component-related information based on the original measurement sequence. This component-related information includes sound velocity parameters, pressure parameters, and temperature parameters from the collected records. Then, it determines the component proxy quantity based on the component-related information within the same sliding window. Specifically, the processing terminal first calculates the average sound velocity, average pressure, and average temperature within the current sliding window. Then, it calls a pre-established standard gas sample library to determine two pressure levels adjacent to the average pressure of the current sliding window measurement point and two temperature levels adjacent to the average temperature of the current sliding window, thus obtaining four pressure-temperature combination points to be interpolated.

[0093] For example, a combination point formed by a first pressure point and a first temperature point, a combination point formed by a first pressure point and a second temperature point, a combination point formed by a second pressure point and a first temperature point, and a combination point formed by a second pressure point and a second temperature point;

[0094] Subsequently, two sets of hydrogen gas integral samples corresponding to the pressure-temperature combination point were selected respectively. The pressure and temperature conditions of the two sets of samples were the same as the pressure level and temperature level corresponding to the pressure-temperature combination point, but the hydrogen gas integrals were different. Then, using the positional relationship between the current sliding window sound velocity average value and the standard sound velocity corresponding to the two sets of samples, linear interpolation was performed along the hydrogen gas integral dimension to obtain four intermediate component values.

[0095] Then, based on the positional relationship between the average pressure value of the current sliding window metering point and the positional relationship between the average temperature value and the two adjacent pressure levels, a bilinear weighted merging is performed on the four intermediate component values ​​to obtain the component proxy quantity corresponding to the current sliding window.

[0096] As one implementation method, taking the pressure-temperature combination point corresponding to the a-th pressure level and the b-th temperature level as an example, the intermediate component value... The calculation formula is:

[0097] ;

[0098] in, This represents the intermediate component value at the pressure-temperature combination point corresponding to the a-th pressure level and the b-th temperature level; The value represents the average sound speed, 'a' represents the pressure level number, and 'b' represents the temperature level number. This represents the average speed of sound within the current sliding window; This represents the standard velocity of sound for samples at the lower hydrogen gas integral level, corresponding to the a-th pressure level and the b-th temperature level. This represents the standard velocity of sound for samples at the higher hydrogen gas integral level, corresponding to the a-th pressure level and the b-th temperature level. This represents the hydrogen gas integral value of the sample corresponding to the lower hydrogen gas integral level at the a-th pressure level and the b-th temperature level. This represents the hydrogen gas integral value of the sample corresponding to the higher hydrogen gas integral value level at the a-th pressure level and the b-th temperature level.

[0099] when Falling and When the interval is between, perform linear interpolation according to the above formula; when equal and In this case, the integral value of hydrogen gas in the corresponding sample is directly taken as the value of the intermediate component.

[0100] After obtaining the four intermediate component values, a bilinear weighted merging is performed on the four intermediate component values ​​based on the positional relationship between the current sliding window average pressure and the two adjacent pressure levels, and the positional relationship between the current sliding window average temperature and the two adjacent temperature levels, to obtain the component proxy quantity G corresponding to the current sliding window. The formula for calculating the component proxy quantity is as follows:

[0101] ;

[0102] Where G is the component proxy quantity corresponding to the current sliding window; , , , These represent the intermediate component values ​​corresponding to the four pressure-temperature combination points; This represents the position coefficient of the current sliding window pressure average value between two adjacent pressure levels. This represents the position coefficient of the current sliding window temperature average between two adjacent temperature levels, and and The calculation formulas are as follows:

[0103] , ;

[0104] in, This represents the average pressure of the metering points within the current sliding window; This represents the average temperature within the current sliding window; and Respectively represent and Adjacent lower pressure level values ​​and higher pressure level values; and Respectively represent and The position coefficient is set to 0 when the average pressure at the current sliding window measurement point equals the lower pressure level value and 1 when it equals the higher pressure level value. The same applies to the temperature position coefficient. Through the above bilinear weighted merging, the component surrogate quantity simultaneously reflects the comprehensive positional relationship of the current sliding window in the pressure, temperature, and sound velocity dimensions.

[0105] In this embodiment, the processing terminal first determines four pressure-temperature combination points to be interpolated in the pressure and temperature dimensions, then performs linear interpolation based on the speed of sound along the hydrogen gas integral dimension at each pressure-temperature combination point, and finally performs bilinear weighted merging along the pressure and temperature dimensions.

[0106] When the pressure exceeds the 20 to 400 kPa boundary, it automatically clamps to the nearest boundary layer and retains the boundary crossing mark. When the temperature exceeds the 0 to 40 degrees Celsius boundary, it automatically clamps to the nearest boundary layer and retains the boundary crossing mark. When the sound speed exceeds the 300 to 500 m / s boundary, the current window is directly marked as an abnormal window and the component proxy value is rolled back to the previous valid window. The reason is that sound speed exceeding the boundary usually corresponds to sensor abnormality, strong noise interference and meter mismatch. Continuing to interpolate will distort the component proxy value.

[0107] After obtaining the component proxy quantity, the component proxy quantity is divided into preset intervals to obtain the corresponding component interval number. The component interval number is used as the component characterization result to reduce the impact of small fluctuations in the component proxy quantity on the subsequent determination of the current operating condition. It also plays a role in characterizing the current gas component shift under the condition of discontinuous configuration of online chromatography.

[0108] For example, the component surrogate quantity is divided into four non-overlapping component intervals, and the corresponding component interval numbers are used as the component characterization results; where, when the component surrogate quantity satisfies When the component characterization result is 1, the component proxy quantity satisfies the following condition: When the component characterization result is 2, the component proxy quantity satisfies the following condition. When the component characterization result is 3, the component proxy quantity satisfies the following condition: When the component characterization result is recorded as 4.

[0109] This step determines the component proxy quantity based on sound velocity, metering point pressure, and temperature, and further maps it to obtain the component characterization result. This yields a discrete result that can characterize the current gas component shift, which helps to convert the continuously changing component state into a stable component interval number. This facilitates the subsequent retrieval conditions of the operating condition mapping table, together with the disturbance level and flow segment.

[0110] As an optional implementation, a working condition mapping table and platform calibration matrix are pre-established during the equipment factory calibration stage or before on-site commissioning. Specifically, the component proxy quantities are first divided into intervals to obtain component intervals; then, the disturbance level is determined based on the pressure difference fluctuation amplitude, the main pulsation frequency, and the coefficient of variation of the instantaneous volumetric flow rate. Specifically, when the pressure difference fluctuation amplitude is less than 0.5 kPa, the main pulsation frequency is less than 0.2 Hz, and the coefficient of variation of the instantaneous volumetric flow rate is less than 0.03, it is judged as a low disturbance level; when at least one of the following conditions is met: the pressure difference fluctuation amplitude is greater than or equal to 1.5 kPa, the main pulsation frequency is greater than or equal to 0.8 Hz, and the coefficient of variation of the instantaneous volumetric flow rate is greater than or equal to 0.10, it is judged as a high disturbance level; all other cases are judged as medium disturbance levels. Subsequently, flow segments are determined based on the ratio of the average instantaneous volumetric flow rate within the current window to the rated flow rate of the metering instrument. Specifically, a ratio less than 0.10 is assigned to the first flow segment; a ratio greater than or equal to 0.10 and less than 0.30 is assigned to the second flow segment; a ratio greater than or equal to 0.30 and less than 0.70 is assigned to the third flow segment; and a ratio greater than or equal to 0.70 is assigned to the fourth flow segment. Next, the group interval numbers, disturbance level numbers, and flow segment numbers are combined according to preset coding rules, and a unique current operating condition identifier is assigned to each combination, thereby establishing an operating condition mapping table.

[0111] In this embodiment, when the component interval is divided into 4 levels, the disturbance level is divided into 3 levels, and the flow segment is divided into 4 levels, the operating condition mapping table contains a total of 48 operating condition combinations, and each operating condition combination corresponds to a unique current operating condition identifier.

[0112] After establishing the operating condition mapping table, a platform calibration matrix is ​​then established. Specifically, within the bench calibration time period corresponding to each current operating condition, the original cumulative gas volume output by the metering instrument and the reference cumulative gas volume measured by the bench standard device are obtained. Here, the bench refers to a dedicated experimental platform used for operating condition simulation, performance testing, and parameter calibration of the metering instrument. The original cumulative gas volume is the cumulative gas volume directly output by the metering instrument within the bench calibration time period, or the cumulative gas volume obtained by accumulating the original instantaneous volumetric flow rate output by the metering instrument over time. The reference cumulative gas volume is the cumulative gas volume measured by the bench standard device within the same bench calibration time period. Based on the correspondence between the reference cumulative gas volume and the original cumulative gas volume, the metering correction parameter corresponding to the current operating condition is determined. Then, each current operating condition and its corresponding metering correction parameter are associated and stored to form a platform calibration matrix.

[0113] In this invention, the correction rule refers to the rule information used to correct the original instantaneous volumetric flow rate under the current operating condition. The metering correction parameters stored in the platform calibration matrix constitute the specific implementation content of the correction rule. In this embodiment, the correction rule is specifically manifested as the metering correction parameter that uniquely corresponds to the current operating condition.

[0114] The metering correction parameters in the platform calibration matrix are generated from the bench calibration results. Specifically, for each group interval, each disturbance level, and each flow segment combination, no fewer than R bench calibration results are collected. The ratio of the reference cumulative gas volume to the original cumulative gas volume from each calibration under that combination is averaged to obtain the metering correction parameters corresponding to that combination. It is determined by the following formula:

[0115] ;

[0116] in, This indicates the metering correction parameter corresponding to the combination of component interval number g, disturbance level number d, and flow segment number f; This represents the reference cumulative gas volume measured by the test bench during the r-th calibration. This represents the original cumulative gas volume output by the metering instrument during the r-th calibration. Through the above processing, each matrix unit in the platform calibration matrix corresponds to a directly callable metering correction parameter.

[0117] During online operation, the processing terminal uses the component characterization results, operating condition disturbance vector, and current flow segment as inputs for operating condition determination. The component characterization results represent the current component interval number; the pressure difference fluctuation amplitude, main pulsation frequency, and coefficient of variation of instantaneous volumetric flow rate in the operating condition disturbance vector are used to determine the current disturbance level; the ratio of the average instantaneous volumetric flow rate within the current window to the meter's rated flow rate is used to determine the current flow segment. Subsequently, the processing terminal uses the current component interval number, current disturbance level number, and current flow segment number as a joint index to retrieve the current operating condition from the operating condition mapping table. After obtaining the current operating condition, the processing terminal further retrieves the metering correction parameter uniquely corresponding to the current operating condition from the platform calibration matrix, thus incorporating component changes and flow pulsations into the same operating condition determination process.

[0118] A combined index refers to using the component interval number, disturbance level number, and flow segment number together as the lookup key, so that the processing terminal can retrieve the corresponding current operating condition identifier based on the combination of the three.

[0119] The current disturbance level is determined as follows: when the pressure difference fluctuation amplitude, the main pulsation frequency, and the coefficient of variation of instantaneous volumetric flow rate are all less than the corresponding first threshold, it is judged as a low disturbance level; when at least one of the three is not less than the corresponding second threshold, it is judged as a high disturbance level; and all other cases are judged as medium disturbance levels. The first and second thresholds for pressure difference fluctuation amplitude are 0.5 kPa and 1.5 kPa, respectively; the first and second thresholds for main pulsation frequency are 0.2 Hz and 0.8 Hz, respectively; and the first and second thresholds for the coefficient of variation of instantaneous volumetric flow rate are 0.03 and 0.10, respectively. These thresholds are determined based on the quantile statistical results of the three types of operating conditions—low disturbance, medium disturbance, and high disturbance—in the calibration data before commissioning.

[0120] The current traffic segment is determined as follows: when the ratio is less than 0.10, it is assigned to the first traffic segment; when the ratio is greater than or equal to 0.10 and less than 0.30, it is assigned to the second traffic segment; when the ratio is greater than or equal to 0.30 and less than 0.70, it is assigned to the third traffic segment; and when the ratio is greater than or equal to 0.70, it is assigned to the fourth traffic segment.

[0121] After retrieving the current operating condition, the processing terminal corrects the original metering sequence according to the correction rules corresponding to the current operating condition. The correction rules are as follows: the metering correction parameter uniquely corresponding to the current operating condition is called from the platform calibration matrix, and the original instantaneous volumetric flow rate within the current window is corrected point by point to determine the instantaneous volumetric flow rate correction value.

[0122] Specifically, the processing terminal matches the original instantaneous volumetric flow rate corresponding to the i-th sampling point of the n-th window within the current window with the metering correction parameter corresponding to the current operating condition according to the timestamp, to obtain the instantaneous volumetric flow rate correction value, and further calculates the cumulative gas volume of the window, specifically determined by the following formula:

[0123] ;

[0124] ;

[0125] in, This represents the instantaneous volumetric flow rate correction value corresponding to the i-th sampling point within the n-th window; This refers to the original instantaneous volumetric flow rate corresponding to the i-th sampling point within the n-th window mentioned above; This indicates the current component interval number corresponding to the nth window. Current disturbance level number Current traffic segment number The only corresponding measurement correction parameter; This represents the cumulative gas volume of the window corresponding to the nth window; This indicates the number of sampling points within the nth window; This represents the time interval between adjacent sampling points; in this embodiment, it is taken as 1 second. After completing the point-by-point correction, the processing terminal outputs the first corrected metering result, which includes a timestamp, the current operating condition, the metering correction parameters, the instantaneous volumetric flow rate correction value, and the cumulative gas volume within the window.

[0126] This step involves calling the unique corresponding metering correction parameter based on the current operating condition to perform point-by-point correction on the original instantaneous volumetric flow rate, obtaining the first corrected metering result. This ensures that the correction action corresponds one-to-one with the current operating condition, thereby reducing the deviation between the original metering value and the actual gas delivery volume under the superposition of component changes and flow pulsation.

[0127] When the current window is near the boundary of the disturbance level, a boundary consistency judgment is performed. Specifically, the current window is near the boundary of the disturbance level when at least one of the following is true: the amplitude of pressure difference fluctuation, the frequency of main pulsation, and the coefficient of variation of instantaneous volumetric flow rate falls within 5 percentage points above or below the adjacent level threshold used to determine the current disturbance level.

[0128] When the current operating condition obtained from the current window is consistent with the current operating condition obtained from the previous window, the metering correction parameter corresponding to the current operating condition remains unchanged, and the first correction metering result of the current window is updated.

[0129] When the current operating condition obtained from the current window is inconsistent with the current operating condition obtained from the previous window, the current window is marked as a boundary window to be confirmed, and the measurement correction parameters corresponding to the previous window are temporarily used to correct the current window.

[0130] After the next window arrives, if the current working condition retrieved in the next window is consistent with the current working condition retrieved in the current window, the metering correction parameters corresponding to the consistent current working condition will be used to recalculate the first corrected metering results of the current window and the next window.

[0131] If the current operating condition retrieved in the next window is still inconsistent with the current operating condition retrieved in the current window, the measurement correction parameter corresponding to the previous window will continue to be used for one sliding step. When the subsequent window arrives, if the operating condition determination is still inconsistent, the measurement correction parameter will be re-determined based on the current operating condition corresponding to the subsequent window. This helps to suppress frequent switching and correction direction reversal caused by boundary jitter, thereby improving the smoothness and continuity of the measurement correction results of adjacent windows.

[0132] Example 2:

[0133] This embodiment 2 further provides an improved solution based on embodiment 1. Embodiment 1 solved the problem of incorporating component changes and flow pulsations into the same operating condition determination process and determining the current operating condition, so that the original metering sequence could be corrected according to the correction rules corresponding to the current operating condition. However, in actual application scenarios, such as continuous changes in hydrogen doping ratio, frequent fluctuations in user-side load, and long-term superposition of pressure regulation pulsations, if the correction rules are directly called based solely on the current window determination result, problems such as short-term fluctuations triggering frequent adjustments, uncontrolled update amplitude, and lack of traceable stable reference segments may still occur. This results in subsequent original metering data being corrected too aggressively, too slowly, or with insufficient correction reliability, affecting the continuity and verifiability of dynamic settlement metering results. This embodiment further introduces anchored segment screening and bounded update mechanisms based on embodiment 1 to achieve a closed-loop optimization effect from operating condition determination to correction rule update and then to subsequent metering correction. It further solves the defects of insufficient continuity and traceability of metering results caused by uncontrolled correction rule updates under the lack of constraints. The specific implementation method is as follows:

[0134] Based on the original metrological sequence, the current operating condition, the component characterization results, the operating condition disturbance vector, and the first corrected metrological results, anchor segments are selected according to the screening criteria.

[0135] The correction rules are boundedly updated based on the anchored segments, and the subsequent original measurement data are corrected according to the updated correction rules.

[0136] As an optional implementation, the platform calibration matrix stores not only the metering correction parameters corresponding to each current operating condition, but also the metering correction parameters corresponding to adjacent component intervals under the same disturbance level and the same flow segment, in order to support bounded updates driven by anchor segments.

[0137] Based on this, the processing terminal reads the timestamp, instantaneous volumetric flow rate, metering point pressure, temperature, sound velocity, pressure difference fluctuation amplitude, main pulsation frequency, and coefficient of variation of instantaneous volumetric flow rate corresponding to each window in the original metering sequence in chronological order. Then, based on the current operating condition, component characterization results, operating condition disturbance vector, and first corrected metering results, it filters the continuous window group corresponding to the original metering sequence and uses each window in the continuous window group that meets the filtering conditions as a candidate anchoring window.

[0138] Specifically, if the current operating conditions of six consecutive windows remain consistent, the continuous consistency condition of the current operating condition is deemed to be met; if the average pressure change rate of adjacent window metering points is not higher than 2%, the average instantaneous volumetric flow rate change rate of adjacent windows is not higher than 5%, the drift rate of sound velocity relative to the previous sliding window is not higher than 1%, the pressure difference fluctuation amplitude is not higher than 0.3 kPa, the main pulsation frequency is not higher than 0.15 Hz, the coefficient of variation of instantaneous volumetric flow rate is not higher than 0.025, and the anomaly marker is empty, the continuous window group is deemed to meet the stability condition; when both the continuous consistency condition and the stability condition of the current operating condition are met, the screening condition is deemed to be met.

[0139] Among them, six consecutive windows correspond to five sliding steps. With a window length of 30 seconds and a sliding step of 5 seconds, it can cover 55 seconds of continuous data. This length can filter out short-term disturbances of less than 30 seconds, while avoiding the anchoring segment from being too long and obscuring slow drift. The aforementioned constraint thresholds are obtained from the 90th percentile of the statistics of stable samples for 7 consecutive days and no less than 8 hours each day before commissioning, so as to ensure that the anchoring segment comes first from stable operating conditions rather than instantaneous and occasional operating conditions.

[0140] The processing terminal merges temporally adjacent candidate anchoring windows in chronological order to obtain anchoring segments. "Temporally adjacent" means that there are no windows between two adjacent candidate anchoring windows that do not meet the screening criteria, and the start time of the subsequent candidate anchoring window is continuously connected to the end time of the previous candidate anchoring window within a preset sliding step size. When there are windows between two adjacent candidate anchoring windows that do not meet the screening criteria, the merging of the current anchoring segment is terminated, and the subsequently reappearing candidate anchoring window is used as the starting window of the new anchoring segment. After merging, the starting timestamp, ending timestamp, corresponding current operating condition, average component proxy quantity of the anchoring segment, original cumulative gas volume of the anchoring segment, and corrected cumulative gas volume of the anchoring segment are obtained and recorded as input information for subsequent bounded updates of metering correction parameters.

[0141] The original cumulative gas volume of the anchor segment is obtained by accumulating the original instantaneous volumetric flow rate within the coverage area of ​​the anchor segment at sampling intervals, and the corrected cumulative gas volume of the anchor segment is obtained by accumulating the corrected instantaneous volumetric flow rate within the coverage area of ​​the anchor segment at sampling intervals.

[0142] This step obtains a stable reference data base for subsequent rule updates by retaining only the anchored segments that are continuous and consistent under the current operating condition and meet the stability conditions. This distinguishes between short-term disturbance windows and reliable update windows, thereby avoiding the misuse of instantaneous abnormal fluctuations as the basis for online updates.

[0143] As an optional implementation, the processing terminal determines the current component interval it is in based on the average component proxy quantity of the anchored segment, and reads the center value of the current component interval; then, based on the positional relationship between the center values ​​of the average component proxy quantity of the anchored segment and the center values ​​of adjacent component intervals, it reads the corresponding metering correction parameters of the previous component interval and the corresponding metering correction parameters of the next component interval that are adjacent to the average component proxy quantity of the anchored segment under the same disturbance level and the same flow segment from the platform calibration matrix, and obtains the candidate metering correction parameters corresponding to the anchored segment, i.e., the candidate correction rules;

[0144] Specifically, based on the above four component intervals, with center values ​​corresponding to 0.125, 0.375, 0.625, and 0.875 respectively, the calculation formulas for the candidate metrological correction parameter and the corrected metrological correction parameter are as follows:

[0145] ;

[0146] ;

[0147] in, This represents the candidate measurement correction parameter corresponding to the a-th anchoring segment. This represents the bounded updated calibration correction parameters corresponding to the a-th anchor segment, used to represent the calibration correction rule. This indicates the metering correction parameters corresponding to the current operating condition before the update. This represents the average component proxy amount of the a-th anchored segment. Indicates and The adjacent preceding group is numbered in intervals. Indicates and The adjacent next group is numbered in intervals. and Let these represent the center values ​​of the previous and next group intervals, respectively. This represents the current disturbance level number corresponding to the a-th anchor segment. This represents the current traffic segment number corresponding to the a-th anchor segment. and These represent the metrological correction parameters in the platform calibration matrix corresponding to the previous and next component intervals, respectively. This represents the upper limit of the bounded update range, which is 0.015 in this embodiment. This value is determined by multiplying the maximum daily metrological correction range of 0.03 obtained from offline calibration by 50%, and is used to ensure that the online update does not exceed half of the offline reliable calibration range. `clip` represents the clipping function, used to limit the update amount to negative values. Zhizheng Within the interval; by estimating candidate metrological correction parameters only on anchor segments that satisfy stability constraints, and then performing amplitude-limited updates on the candidate metrological correction parameters, the updated metrological correction parameters are obtained, which serves to distinguish short-term jitter from true drift.

[0148] After obtaining the bounded updated calibration parameters, the processing terminal further calculates the uncertainty corresponding to the update process and uses the uncertainty as the release condition for the update. The formula for calculating the uncertainty is as follows:

[0149] ;

[0150] in, This represents the update uncertainty corresponding to the a-th anchor segment. This represents the baseline uncertainty corresponding to the current operating condition in the platform calibration matrix. In this embodiment, it is taken as 0.3% and is given by the offline bench calibration report. This represents the uncertainty corresponding to the dispersion of the corrected instantaneous volumetric flow rate within the anchor segment. It is obtained by the ratio of the standard deviation of the corrected instantaneous volumetric flow rate within the anchor segment to its mean. This represents the uncertainty corresponding to a single update step size, expressed through... and The ratio is obtained;

[0151] when When the percentage is not higher than 0.8%, the processing terminal will Write the metering correction parameter cache corresponding to the current operating condition, and use the updated corrected metering correction parameter in the subsequent raw metering data to correct the raw instantaneous volumetric flow rate;

[0152] when When the percentage is above 0.8%, pause the current bounded update and maintain... The threshold remains unchanged, and a verification trigger flag is generated. This is because the 0.8% threshold can cover the upper bound of the allowable uncertainty when the ultrasonic measurement branch of the front end of industrial and commercial users is updated online, while avoiding high uncertainty updates from directly destroying the continuity of the first correction measurement result.

[0153] After the metering correction parameters are successfully updated, the processing terminal performs correction on the subsequent raw metering data according to the correction process consistent with the current operating condition in Example 1. That is, it matches the updated correction metering parameters point by point on the raw instantaneous volumetric flow rate in the subsequent raw metering data, generates the subsequent instantaneous volumetric flow rate correction value and the subsequent window cumulative gas volume, and outputs a result including timestamp, current operating condition, update status, instantaneous volumetric flow rate correction value, window cumulative gas volume, update uncertainty, and second correction metering result.

[0154] This embodiment, through the joint implementation of anchored segment screening and bounded update, obtains metrological correction parameter update results that are triggered only on stable segments, effective within a limited range, and constrained by uncertainty. This is beneficial for improving the traceability of online updates and suppressing repeated switching of correction directions.

[0155] Furthermore, by using update uncertainty as the release condition for bounded updates, the update results of the correction rules are obtained under credibility constraints, avoiding the direct effect of high-uncertainty updates, thereby improving the verifiability of the online update process and the credibility of the correction results.

[0156] Figure 2 In the figure, black bars represent the present invention, and gray bars represent the prior art. The comparison indicators include consistency of correction direction, continuity of correction results, stability of correction results, dynamic measurement accuracy, and online update traceability. As shown in the figure, the present invention uses the component characterization results and the operating condition disturbance vector together to determine the current operating condition, and corrects the original instantaneous volumetric flow rate based on the correction rules corresponding to the current operating condition. At the same time, by combining anchor segment screening and bounded update mechanisms, the present invention outperforms the prior art in terms of consistency of correction direction, continuity of correction results, stability of correction results, dynamic measurement accuracy, and online update traceability.

[0157] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A method for improving the accuracy of natural gas metering, characterized in that, include: The raw metering data of the data acquisition unit within the same metering period are acquired to form the raw metering sequence. Based on the original metering sequence, operating condition disturbance features characterizing pressure regulation pulsation and flow fluctuation are extracted to obtain the operating condition disturbance vector; Based on the original metrological sequence, component-related information is extracted, and component surrogate quantities are determined based on the component-related information. The component surrogate quantities are then mapped to obtain the corresponding component characterization results. Based on the component characterization results and the operating condition disturbance vector, the current operating condition is determined, and the original measurement sequence is corrected according to the correction rule corresponding to the current operating condition to obtain the first corrected measurement result. Based on the original measurement sequence, the current operating condition, the component characterization results, the operating condition disturbance vector, and the first corrected measurement results, anchor segments are selected according to the screening criteria. The correction rule is boundedly updated based on the anchored segment, and the subsequent original measurement data is corrected according to the updated correction rule to obtain the second corrected measurement result. The steps for determining the component proxy quantity include: performing time-series segmentation on the original measurement sequence to obtain multiple time windows; pre-constructing a standard gas sample library, which includes reference samples corresponding to gas components and measurement data under different operating conditions; retrieving the corresponding reference samples from the standard gas sample library based on the original sound velocity parameters, original pressure parameters, and original temperature parameters within the current time window, and performing interpolation processing to obtain the intermediate component values ​​corresponding to the current time window; and merging the intermediate component values ​​to obtain the component proxy quantity corresponding to the current time window. The specific steps for filtering anchor segments according to the filtering conditions include: filtering the continuous time window group to determine the candidate anchor windows that meet the continuity consistency condition and stability condition of the current working condition; merging the candidate anchor windows that are consecutively adjacent in time and do not have any intermediate ones that do not meet the filtering conditions to obtain the anchor segments. The specific steps of the bounded update include: pre-constructing a platform calibration matrix, which is used to store the correction rules corresponding to each current operating condition; determining the adjacent component intervals based on the anchor segment, and retrieving the correction rules corresponding to the adjacent component intervals under the same disturbance level and the same flow segment based on the platform calibration matrix to determine the candidate correction rules corresponding to the anchor segment; and performing amplitude limiting processing on the candidate correction rules and the correction rules before the update to obtain the corrected correction rules.

2. The method for improving the accuracy of natural gas metering according to claim 1, characterized in that, The specific steps for acquiring raw measurement data within the same measurement period by the data acquisition unit to form a raw measurement sequence include: The raw measurement data is acquired and cached and sorted according to data type and time sequence. The raw measurement data includes acquisition records and pressure fluctuation data. The sequence time is determined based on the acquisition time corresponding to the acquisition record; Based on pressure fluctuation data, pressure fluctuation segments are extracted within the time interval between adjacent sequence moments; The collected records are merged with the corresponding pressure fluctuation segments to generate the original measurement sequence.

3. The method for improving the accuracy of natural gas metering according to claim 1, characterized in that, The specific steps for extracting operating condition disturbance features characterizing pressure regulation pulsation and flow fluctuation based on the original metering sequence to obtain the operating condition disturbance vector include: Based on the collected records and pressure fluctuation data, the operating condition disturbance characteristics are extracted within each time window; The operating condition disturbance features are processed with a unified dimension, and the results after the unified dimension processing are merged into the operating condition disturbance candidate vectors for the corresponding time window. The candidate vector of the operating condition disturbance in the current time window is compared with the operating condition disturbance vector output in the previous time window, and the operating condition disturbance vector of the current time window is determined based on the comparison result. The formula for calculating the candidate vector of the operating condition disturbance is as follows: , , , ; ; in, This represents the candidate vector of operating condition disturbances corresponding to the nth time window. Let represent the vector components of the pressure difference fluctuation amplitude, main pulsation frequency, instantaneous volumetric flow rate coefficient of variation, and sound velocity drift rate relative to the previous window within the nth time window, respectively, after dimensionless processing. This represents the amplitude of pressure difference fluctuation. This represents the main pulsation frequency within the nth time window. This represents the coefficient of variation of the instantaneous volumetric flow rate within the nth time window. This represents the drift rate of the speed of sound relative to the previous window within the nth time window. 2.0 kPa, 1.5 Hz, 0.20 and 0.05 represent the coefficient of variation of the pressure difference fluctuation amplitude, the main pulsation frequency, the instantaneous volumetric flow rate, and the normalized upper limit of the drift rate of the speed of sound relative to the previous sliding window, respectively.

4. The method for improving the accuracy of natural gas metering according to claim 3, characterized in that, The collected data includes raw forward and reverse propagation time difference parameters, raw sound velocity parameters, instantaneous volumetric flow rate parameters, raw pressure parameters, and raw temperature parameters. The raw sound velocity parameters, raw pressure parameters, and raw temperature parameters are used to characterize component-related information.

5. The method for improving the accuracy of natural gas metering according to claim 4, characterized in that, The specific steps of extracting component-related information based on the original metrological sequence, determining component surrogate quantities based on the component-related information, and mapping the component surrogate quantities to obtain the corresponding component characterization results include: The component proxy quantity is divided into intervals to obtain the corresponding component interval number, and the component interval number is used as the component characterization result; The formula for calculating the value of the intermediate component is as follows: ; In the formula, This represents the intermediate component value at the pressure-temperature combination point corresponding to the a-th pressure level and the b-th temperature level. The value represents the average sound velocity, 'a' represents the pressure level number, and 'b' represents the temperature level number. This represents the average speed of sound within the current sliding window. This represents the standard velocity value for samples at the lower hydrogen gas integral number level, corresponding to the a-th pressure level and the b-th temperature level. This represents the standard velocity value for samples at the higher hydrogen gas integral number level, corresponding to the a-th pressure level and the b-th temperature level. This represents the hydrogen gas integral value of the sample corresponding to the lower hydrogen gas integral value level at the a-th pressure level and the b-th temperature level. This represents the hydrogen gas integral value of the sample corresponding to the higher hydrogen gas integral level at the a-th pressure level and the b-th temperature level. The formula for calculating the component proxy quantity is: ; In the formula, G is the component proxy quantity corresponding to the current sliding window. , , , These represent the intermediate component values ​​corresponding to the four pressure-temperature combination points. This represents the position coefficient of the current sliding window pressure average value between two adjacent pressure levels. This represents the position coefficient of the current sliding window temperature average value between two adjacent temperature levels.

6. The method for improving the accuracy of natural gas metering according to claim 4, characterized in that, The specific steps for determining the current operating condition based on the component characterization results and the operating condition disturbance vector include: A pre-built operating condition mapping table is used to store the correspondence between the component interval number, disturbance level number, and flow segment number and the current operating condition; The current component interval number is determined based on the component characterization results, the current disturbance level is determined based on the operating condition disturbance vector, and the current flow segment is determined based on the instantaneous volumetric flow rate parameter within the current time window. Based on a joint index of the current component interval number, the current disturbance level number, and the current flow segment number, the current operating condition is determined from the operating condition mapping table.

7. The method for improving the accuracy of natural gas metering according to claim 6, characterized in that, The specific steps for correcting the original measurement sequence according to the correction rule corresponding to the current operating condition to obtain the first corrected measurement result include: Based on the current operating condition, the corresponding correction rule is retrieved from the platform calibration matrix, and the correction rule is used as the basis for correcting the instantaneous volumetric flow rate within the current time window; The instantaneous volumetric flow rate within the current time window is corrected based on the correction rule to obtain the corrected instantaneous volumetric flow rate value; The cumulative gas volume corresponding to the current time window is determined based on the instantaneous volumetric flow rate correction value, and a first corrected metering result is generated based on the instantaneous volumetric flow rate correction value and the cumulative gas volume. The formulas for calculating the instantaneous volumetric flow rate correction value and the cumulative gas volume are as follows: , , In the formula, This represents the instantaneous volumetric flow rate correction value corresponding to the i-th sampling point within the n-th window. This refers to the original instantaneous volumetric flow rate corresponding to the i-th sampling point within the n-th window mentioned above. This indicates the current component interval number corresponding to the nth window. Current disturbance level number Current traffic segment number The only corresponding measurement correction parameter, This represents the cumulative gas volume corresponding to the nth window. This indicates the number of sampling points within the nth window. This indicates the time interval between adjacent sampling points.

8. The method for improving the accuracy of natural gas metering according to claim 7, characterized in that, Also includes: Perform a condition boundary determination for the current time window; When the determination result indicates that the current time window is at the working condition switching boundary, consistency processing is performed on the correction rules for the current time window.

9. The method for improving the accuracy of natural gas metering according to claim 8, characterized in that, The specific steps of performing a bounded update on the correction rule based on the anchored segment, and correcting subsequent original measurement data according to the updated correction rule to obtain the second corrected measurement result include: The updated uncertainty is determined based on the correction rule, and the effectiveness of the correction rule is determined based on the updated uncertainty. When the correction rule takes effect, the instantaneous volumetric flow rate in the subsequent original metering data is corrected based on the correction rule to obtain the second corrected metering result; The formula for calculating the uncertainty is as follows: ; In the formula, This represents the update uncertainty corresponding to the a-th anchor segment. This indicates the baseline uncertainty corresponding to the current operating condition in the platform calibration matrix. This represents the uncertainty corresponding to the dispersion of the instantaneous volumetric flow rate correction value within the anchor segment. This represents the uncertainty corresponding to a single update step size.