An ultrasonic gas meter flow metering method and system with anti-interference function

By identifying and correcting airflow pulsations and temperature abrupt changes in ultrasonic gas meters, and utilizing anti-interference compensation algorithms and weighted fusion algorithms, the accuracy and stability of flow measurement in ultrasonic gas meters are improved, solving the measurement error problem under multiple interference scenarios.

CN121048705BActive Publication Date: 2026-03-24ZHEJIANG INSTITUTE OF QUALITY SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-04
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The flow measurement system of ultrasonic gas meters is susceptible to interference from airflow pulsation and temperature changes, which leads to reduced measurement accuracy. Existing technologies are unable to adapt to the nonlinear characteristics of both types of interference at the same time, and lack precise correction criteria.

Method used

By activating the interference detection subroutine, the types of interference such as airflow pulsation and temperature change are identified. The anti-interference compensation algorithm logic is used to make differential corrections to the transmission time difference and ultrasonic propagation speed. The final correction value is calculated by combining the experimental database and the weighted fusion algorithm.

Benefits of technology

It improves the accuracy of the metering system in correcting for airflow pulsation and temperature change disturbances, enhances the precision and stability of flow calculation, and adapts to the correction needs of multiple disturbance scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121048705B_ABST
    Figure CN121048705B_ABST
Patent Text Reader

Abstract

The application discloses a kind of ultrasonic gas meter flow measurement methods and systems with anti-interference function, and specifically relates to gas flow measurement technical field;The present application is designed for airflow pulsation, temperature mutation and combined interference respectively, and the difference correction logic is designed.The airflow pulsation corrects the transmission time difference, the temperature mutation corrects the propagation speed, and the combined interference corrects the double parameters synchronously.The experimental database containing multiple interference scenes is constructed, and the mapping rules derived based on physical laws are used to implement theoretical correction during correction.The sample correction coefficient is obtained by filtering similar experimental samples through Euclidean distance, and the final correction value is obtained by weighted fusion, which improves the accuracy of measurement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of gas flow metering, more particularly, to an ultrasonic gas meter flow metering method and system with anti-interference function. BACKGROUND

[0002] With the intelligent development of the gas industry, ultrasonic gas meters gradually replace traditional mechanical gas meters as the market mainstream due to their advantages such as no mechanical wear, high metering accuracy, and long service life. However, in actual application, the flow metering system of the ultrasonic gas meter is easily affected by various interference factors, resulting in reduced metering accuracy and failing to meet the demand for accurate metering.

[0003] However, in actual application scenarios, the ultrasonic gas meter flow metering method still has the following deficiencies:

[0004] On the one hand, when gas is transmitted in the pipeline, it is easily affected by factors such as frequent switching of user appliances, local blockage of the pipeline, or pressure fluctuations, and is prone to form airflow pulsation interference. This interference can cause turbulence and vortex in the gas flow field, not only causing scattering and reflection of ultrasonic waves during propagation, resulting in dramatic fluctuations in the signal amplitude at the receiving end, but also changing the local flow rate of the gas, causing random deviations in the measurement of the upstream and downstream transmission time difference of the ultrasonic waves, and directly affecting the accuracy of flow calculation.

[0005] On the other hand, temperature changes in the gas use environment can cause temperature mutation interference. According to physical principles, when the actual temperature exceeds the reference temperature range, the measurement value of the ultrasonic wave propagation speed will deviate significantly from the true value, which is then transmitted to the final metering result through the flow calculation formula, resulting in metering errors.

[0006] In addition, airflow pulsation and temperature mutation often exist simultaneously in actual scenarios, forming combined interference. Traditional metering methods mostly use single interference correction logic or ignore the coupling effects between interferences, making it difficult to adapt to the nonlinear characteristics of both interferences, and lacking precise correction basis based on experimental data, resulting in insufficient or excessive correction and further reducing metering accuracy.

[0007] Therefore, an ultrasonic gas meter flow metering method and system with anti-interference function are proposed. SUMMARY

[0008] In order to overcome the above-mentioned defects of the prior art, embodiments of the present application provide an ultrasonic gas meter flow metering method and system with anti-interference function.

[0009] To achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0010] An ultrasonic gas meter flow metering method with anti-interference function comprises:

[0011] S1: start the interference detection subroutine, judge whether there is interference by analyzing and evaluating the interference parameters, and identify the interference type if there is interference; wherein the interference type includes airflow pulsation interference and temperature mutation interference; the interference parameters include signal amplitude and temperature;

[0012] S2: if there is interference, correct the transmission time difference and the ultrasonic wave propagation speed based on the interference type combined with the database using the anti-interference compensation algorithm logic;

[0013] S3: collect X groups of transmission time difference and ultrasonic wave propagation speed corrected by S2, calculate the average time difference and the average propagation speed after the mean value calculation respectively;

[0014] S4: based on the average time difference , the inner diameter D of the gas pipeline, the average propagation speed h, and the straight line distance between the two ultrasonic wave transducers, update and output the real-time gas flow Q.

[0015] Specifically, the step S1 judges whether there is interference, specifically:

[0016] Extract the signal amplitude of the ultrasonic wave receiving end at each time point in the set time zone, calculate the coefficient of variation, that is, through the calculation of standard deviation and average value, if the coefficient of variation is higher than the set variation threshold coefficient, it is determined that there is airflow pulsation interference;

[0017] Extract the gas temperature at each time point in the set time zone, take the average value, and match with the reference temperature range, if the matching fails, it is determined that there is temperature mutation interference.

[0018] Specifically, in the step S2, the transmission time difference and the ultrasonic wave propagation speed are corrected based on the interference type combined with the database using the anti-interference compensation algorithm logic, and if it is airflow pulsation interference, the specific correction process is:

[0019] S2-1: if it is airflow pulsation interference, first mark the current transmission time difference as T1, retrieve the preset signal amplitude rated value, calculate the signal evaluation coefficient, and then through the mapping rule between the signal evaluation coefficient and the time correction coefficient, convert it into the time correction coefficient, multiply T1 by the time correction coefficient to get the time correction difference one;

[0020] Identify the experimental sample data belonging to airflow pulsation interference in the database, and extract the signal amplitude at each time point in the experimental process from each group of experimental sample data;

[0021] Calculate the signal similarity distance of each group of experimental sample data by using the Euclidean distance calculation logic between each group of signal amplitude of each group of experimental sample data and the signal amplitude at each time point;

[0022] Retain sample data less than the signal distance threshold as similar data, extract the time correction coefficient of each group of similar data;

[0023] Calculate and take the average value of the multiplication of T1 and the time correction coefficient of each group of similar data, to obtain time correction difference two; calculate the final correction time difference between time correction one and time correction difference two by using a weighted fusion algorithm.

[0024] Specifically, in step S2, the transmission time difference and the ultrasonic wave propagation speed are corrected based on the interference type and the database using the anti-interference compensation algorithm logic. If it is temperature mutation interference, the specific correction process is:

[0025] S2-2: If it is temperature mutation interference, first mark the current ultrasonic wave propagation speed as v1, retrieve the preset temperature reference value, calculate the temperature evaluation coefficient, and then convert it into a speed correction coefficient through the mapping rule between the temperature evaluation coefficient and the speed correction coefficient; multiply v1 by the speed correction coefficient to obtain the speed correction one value;

[0026] Identify experimental sample data belonging to temperature mutation interference in the database, and extract the gas temperature at each time point during the experiment from each group of experimental sample data;

[0027] Calculate the temperature similarity distance of each group of experimental sample data by using the Euclidean distance calculation logic between each group of gas temperatures of each group of experimental sample data and the current gas temperature at each time point;

[0028] Retain sample data less than the temperature distance threshold as similar data, extract the speed correction coefficient of each group of similar data;

[0029] Calculate and take the average value of the multiplication of v1 and the speed correction coefficient of each group of similar data to obtain the speed correction two value; calculate the final corrected propagation speed between the speed correction one value and the speed correction two value by using a weighted fusion algorithm.

[0030] Specifically, in step S2, the transmission time difference and the ultrasonic wave propagation speed are corrected based on the interference type and the database using the anti-interference compensation algorithm logic. If it is temperature mutation interference, the specific correction process is:

[0031] S2-3: If it is temperature mutation interference, calculate the time correction difference one and the speed correction one value through steps S2-1 and S2-2 respectively;

[0032] Identify experimental sample data belonging to the combined interference in the database, and extract the signal amplitude and the gas temperature at each time point during the experiment from each group of experimental sample data;

[0033] The sample data with a signal similarity distance and a temperature similarity distance lower than a corresponding distance threshold are reserved as similar data, and time correction coefficients and speed correction coefficients of each group of similar data are extracted;

[0034] T1 and v1 are multiplied by the time correction coefficients and the speed correction coefficients of each group of similar data respectively to calculate, the multiplication results of each group of time correction coefficients are averaged to obtain a time correction difference value, and the multiplication results of each group of speed correction coefficients are averaged to obtain a speed correction value;

[0035] The final correction time difference and the final correction propagation speed are calculated by using a weighted fusion algorithm respectively.

[0036] Specifically, the calculation logic of the signal evaluation coefficient and the temperature evaluation coefficient is:

[0037] The signal amplitude of the ultrasonic receiving end at each time point is obtained by decomposing the coefficient of variation, and the signal mean value is determined after average value calculation. The highest signal amplitude and the lowest signal amplitude in each time point are identified, and the signal evaluation coefficient is calculated by using a weighted calculation logic between the signal mean value and the signal amplitude rated value;

[0038] The highest gas temperature and the lowest gas temperature in each time point are identified, and the temperature evaluation coefficient is calculated by using a weighted calculation logic between the gas temperature average value and the temperature reference value.

[0039] Specifically, the mapping rule setting of steps S2-1 and S2-2 is as follows:

[0040] The mapping rule between the signal evaluation coefficient and the time correction coefficient is established, that is, each group of signal coefficient intervals corresponding to the signal evaluation coefficient is constructed, and each group of signal coefficient intervals corresponds to a group of time correction coefficients;

[0041] The mapping rule between the temperature evaluation coefficient and the speed correction coefficient is established, that is, each group of temperature coefficient intervals corresponding to the temperature evaluation coefficient is constructed, and each group of temperature coefficient intervals corresponds to a group of speed correction coefficients.

[0042] Specifically, the trend compensation of the temperature evaluation coefficient in step S2-2 is as follows:

[0043] Taking the gas temperature at each time point as a reference, the temperature difference of each continuous time point is calculated, and the temperature difference symbol is recorded. If a group of temperature difference is negative, it is recorded as negative temperature difference, and the symbol c1 is used to represent it, otherwise it is recorded as positive temperature difference, and the symbol c2 is used to represent it:

[0044] The proportion of the number of c1 in the total number of temperature differences is calculated, and is recorded as R1;

[0045] The proportion of the number of c2 in the total number of temperature differences is calculated, and is recorded as R2;

[0046] The temperature correction coefficient is calculated by the formula ;

[0047] After determining the temperature correction coefficient, the temperature evaluation coefficient is trend compensated based on the comparison result of R2 and R1: if R2>R1, the temperature evaluation coefficient is multiplied by (1+ ); if R2 ).

[0048] An ultrasonic gas meter flow metering system with anti-interference function, comprising:

[0049] The acquisition module sets the transmission frequency, power and sampling period of the ultrasonic transducer, and triggers the environmental parameter monitoring signaling to obtain the interference parameters; the interference parameters include signal amplitude and temperature;

[0050] The interference determination module analyzes and evaluates the interference parameters to determine whether there is interference at present, and identifies the interference type if there is interference; wherein the interference type includes airflow pulsation interference and temperature mutation interference;

[0051] The correction analysis module corrects the transmission time difference and ultrasonic propagation speed based on the interference type and the database using the anti-interference compensation algorithm logic if there is interference;

[0052] The result output module collects X sets of transmission time difference and ultrasonic propagation speed after correction processing, respectively calculates the mean value to determine the average time difference and average propagation speed, and calculates the real-time gas flow combined with the inner diameter of the gas pipeline and the straight line distance between the two ultrasonic transducers.

[0053] Technical effects and advantages of the present application:

[0054] (1) By designing different correction logic to correct the transmission time difference and the propagation speed for airflow pulsation, temperature mutation and combined interference, the combined interference is simultaneously corrected with double parameters and matched with double-dimensional similar samples, solving the poor adaptability problem of traditional single correction;

[0055] (2) By constructing an experimental database containing multiple interference scenes, the correction is realized by both theoretical correction based on the mapping rule derived from physical laws and sample correction coefficient obtained by filtering similar experimental samples through Euclidean distance, and the final correction value is obtained by weighted fusion, improving the accuracy of correction;

[0056] (3) By calculating the temperature correction coefficient by calculating the symbol proportion of temperature difference at consecutive time points, and trend compensating the temperature evaluation coefficient, the dynamic scene of temperature rising and falling can be accurately adapted. BRIEF DESCRIPTION OF DRAWINGS ​

[0057] Figure 1 A flow metering method flow chart of an ultrasonic gas meter with anti-interference function;

[0058] Figure 2 A flow metering method principle diagram of an ultrasonic gas meter with anti-interference function. DETAILED DESCRIPTION

[0059] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0060] Embodiment 1

[0061] As shown in the drawings, Figure 1 A flow metering method of an ultrasonic gas meter with anti-interference function comprises:

[0062] S1: initializing the hardware system of the ultrasonic gas meter, setting the transmission frequency, power and sampling period of the ultrasonic transducer, and triggering the environmental parameter monitoring signaling to obtain the interference parameters at the same time; the interference parameters include signal amplitude and temperature;

[0063] Collection position: second ultrasonic transducer receiving end;

[0064] Collection accuracy: resolution 0.1 mV, sampling number 10 times / cycle (taking the average value as a single sampling value), avoiding mis-collection caused by instantaneous noise;

[0065] Sensor installation: the temperature sensor is close to the inner wall of the gas pipeline (5-10 mm away from the transducer), avoiding the influence of environmental temperature (such as the temperature deviation between the outer wall of the pipeline and the internal gas temperature ≤1℃);

[0066] Collection accuracy: 16-bit AD conversion is adopted, the resolution is 0.0625℃, and filtering processing (such as sliding average filtering, window size 5 groups) is required after single sampling to eliminate sensor jitter error.

[0067] S2: adopting a double-channel alternate transmission mode, controlling the first ultrasonic transducer to transmit ultrasonic signals along the gas flow direction, and the second ultrasonic transducer to receive signals; after a preset time interval, switching the second ultrasonic transducer to transmit signals along the reverse direction of the gas flow, and the first ultrasonic transducer to receive signals, and recording the time difference of signal transmission twice;

[0068] The interval time of the downstream emission (first transducer to second transducer) and the upstream emission (second transducer to first transducer) is set to 10 ms, which needs to meet the condition that the interval time is greater than the transducer residual vibration time (usually 5-8 ms), so as to avoid the time difference superposition error caused by the residual of the previous signal.

[0069] S3: Start the interference detection subroutine, judge whether there is interference by analyzing and evaluating the interference parameters, and identify the interference type if there is interference; wherein the interference type includes airflow pulsation interference and temperature mutation interference;

[0070] Specifically:

[0071] Extract the signal amplitude of the ultrasonic receiving end at each time point in the set time zone, calculate the coefficient of variation, that is, through the calculation of standard deviation and average value, if the coefficient of variation is higher than the set variation threshold coefficient, it is determined that there is airflow pulsation interference;

[0072] Calculation steps:

[0073] Set the time zone: select "10 consecutive signal amplitude samples" as a judgment period;

[0074] Calculate the average value and standard deviation of 10 effective amplitudes, denoted as A and B, then the coefficient of variation is .

[0075] Extract the average value of the gas temperature at each time point in the set time zone, and match it with the reference temperature range, if the matching fails, it is determined that there is temperature mutation interference; the reference temperature range is based on the calibrated and stored temperature value under standard working conditions, and the range is established by allowing the upper and lower fluctuation values;

[0076] S4: If there is interference, based on the interference type, use the anti-interference compensation algorithm logic in the database to correct the transmission time difference and the ultrasonic wave propagation speed;

[0077] The database stores experimental data (obtained by simulating interference scenes in the laboratory), including interference type labels, interference characteristic parameters, etc.

[0078] Specifically:

[0079] S4-0: The database stores experimental data and correction results under different interference type scenarios;

[0080] S4-1: If it is airflow pulsation interference, first mark the current transmission time difference as T1, and call the preset signal amplitude rated value; which represents the signal amplitude reference under the no-interference working condition;

[0081] The signal amplitude of the ultrasonic receiving end at each time point is decomposed according to the coefficient of variation, the average value is calculated to determine the signal mean value, the highest signal amplitude and the lowest signal amplitude at each time point are identified, and the signal evaluation coefficient is calculated by using the weighted calculation logic between the signal mean value and the rated value of the signal amplitude;

[0082] Specifically,

[0083] The highest signal amplitude, the lowest signal amplitude and the signal mean value are respectively marked as , the signal amplitude reference value is marked as , and the signal evaluation coefficient P is calculated according to the formula ; wherein are preset weight coefficients, and the cumulative result of the three groups of values is equal to 1.

[0084] A mapping rule between the signal evaluation coefficient and the time correction coefficient is established, that is, each group of signal coefficient intervals corresponding to the signal evaluation coefficient is constructed, and each group of signal coefficient intervals corresponds to a group of time correction coefficients; T1 is multiplied by the time correction coefficient to obtain the time correction difference one.

[0085] The increase in amplitude means that the energy attenuation in the ultrasonic propagation process is reduced, and the essence is that the gas flow pulsation intensity is weakened at this time. When the gas flow pulsation is weakened, the fluctuation amplitude of the local flow velocity of the gas is reduced, and is closer to the true average flow velocity. According to the calculation logic of the transmission time difference, the flow rate is more stable, and the original measured value of the transmission time difference will be smaller;

[0086] Therefore, the establishment of the mapping rule is as follows: different gas flow pulsation intensity scenes are simulated in the laboratory, and the quantitative correlation between the signal evaluation coefficient and the time correction coefficient is obtained by linear fitting of the effective data;

[0087] For example,

[0088] Interval 1: 0.95 or above, corresponding to a time correction coefficient of 0.97;

[0089] Interval 2: 0.85-0.95, corresponding to a time correction coefficient of 1.03;

[0090] Interval 3: 0.75-0.85, corresponding to a time correction coefficient of 1.07;

[0091] Interval 4: 0.75 or below, corresponding to a time correction coefficient of 1.12;

[0092] The range of the time correction coefficient is limited to 0.91-1.15.

[0093] The experimental sample data belonging to the airflow pulsation interference is identified, and the signal amplitudes at each time point in the experimental process are extracted from each group of experimental sample data; the number of time points is consistent with the number of current time points;

[0094] The signal similarity distances of each group of experimental sample data are calculated by using the Euclidean distance calculation logic between each group of signal amplitudes of the experimental sample data and the signal amplitudes at the current time points, to obtain the signal similarity distances of each group of experimental sample data;

[0095] Specifically,

[0096] The Euclidean distance is used to quantify the "difference degree" of two vectors, and the smaller the distance is, the more similar the time series change trend of the two groups of amplitudes is, and the higher the correction reference value of the sample to the current working condition is. The calculation formula is: ; m is the number of time points, is the signal amplitude of the jth time point of the sample data, is the signal amplitude of the jth time point.

[0097] The signal similarity distances of each group of experimental sample data are compared with the preset signal distance threshold, and the sample data smaller than the signal distance threshold are retained as similar data, and the time correction coefficients of each group of similar data are extracted;

[0098] T1 is multiplied by the time correction coefficients of each group of similar data respectively, calculated and averaged to obtain time correction difference two;

[0099] The final correction time difference is calculated by using a weighted fusion algorithm between the time correction one and the time correction difference two;

[0100] That is, by setting the time theoretical confidence weight and the time sample confidence weight corresponding to the time correction one and the time correction difference two respectively, the time correction one and the time correction difference two are multiplied by the corresponding weights respectively, and then summed to obtain the final correction time difference; the sum of the time theoretical confidence weight and the time sample confidence weight is 1;

[0101] Time correction one (theoretical mapping path): based on the signal evaluation coefficient (highest / lowest / average amplitude weighted calculation) associated time correction coefficient, the core function is to capture the overall intensity characteristics of the airflow pulsation, and to ensure that the correction direction conforms to the physical law;

[0102] Time correction two (experimental sample path): similar experimental samples are matched by using the Euclidean distance, and sample correction coefficients are extracted, and the core advantage is to capture the time series details of the amplitude (such as the dynamic trend of "the amplitude of the 3rd time point drops sharply, and the amplitude of the 5th time point rises"), and to avoid the error of the theoretical model which only focuses on the overall characteristics and ignores the instantaneous pulsation.

[0103] S4-2: If it is temperature mutation interference, first mark the current ultrasonic wave propagation speed as v1, and call the preset temperature reference value; that is, the middle value of the reference temperature range;

[0104] The highest gas temperature and the lowest gas temperature in each time point are identified, and a temperature evaluation coefficient is calculated by combining the temperature reference value with the average gas temperature using weighted calculation logic;

[0105] Specifically:

[0106] The highest gas temperature, the lowest gas temperature, and the average gas temperature are respectively marked as , the temperature reference value is marked as , and the temperature evaluation coefficient N is calculated according to the formula ; wherein are all preset weight coefficients, and the cumulative result of the three groups of values is equal to 1.

[0107] A mapping rule between the temperature evaluation coefficient and the speed correction coefficient is established, that is, each group of temperature coefficient intervals corresponding to the temperature evaluation coefficient is constructed, and each group of temperature coefficient intervals corresponds to a group of speed correction coefficients; v1 is multiplied by the speed correction coefficient to obtain the speed correction one value.

[0108] Temperature directly affects the propagation speed of ultrasonic waves in gas, because the thermal motion speed of gas molecules increases with temperature, which will promote the propagation of ultrasonic waves, making the propagation speed larger;

[0109] The establishment of the mapping rule is based on: through laboratory simulation of different temperature change scenarios, the quantitative correlation between the temperature evaluation coefficient and the speed correction coefficient is obtained by linear fitting of effective data;

[0110] For example:

[0111] Interval 1: 1.1 or above, corresponding to a speed correction coefficient of 0.95;

[0112] Interval 2: 1.0-1.1, corresponding to a speed correction coefficient of 0.98;

[0113] Interval 3: 0.9-1.0, corresponding to a speed correction coefficient of 1.0;

[0114] Interval 4: 0.9 or below, corresponding to a speed correction coefficient of 1.06;

[0115] The speed correction coefficient range is limited to 0.9-1.15.

[0116] Identify experimental sample data belonging to temperature mutation interference in the database, and extract the gas temperature at each time point in the experimental process from each group of experimental sample data; the number of time points is consistent with the number of current time points;

[0117] The temperature similarity distance of each group of experimental sample data is calculated by using the Euclidean distance calculation logic between each group of gas temperature of the experimental sample data and the current gas temperature at each time point;

[0118] The temperature similarity distance of each group of experimental sample data is compared with the preset temperature distance threshold value, and the sample data smaller than the temperature distance threshold value is reserved as similar data, and the speed correction coefficient of each group of similar data is extracted;

[0119] The speed correction two value is obtained by multiplying v1 and the speed correction coefficient of each group of similar data respectively and taking the average value, and the final correction propagation speed is calculated by using the weighted fusion algorithm between the speed correction one value and the speed correction two value;

[0120] That is, by setting the speed theoretical confidence weight and the speed sample confidence weight corresponding to the speed correction one value and the speed correction two value respectively, multiplying the speed correction one value and the speed correction two value by the corresponding weight respectively, and then summing to obtain the final correction propagation speed; the sum of the speed theoretical confidence weight and the speed sample confidence weight is 1;

[0121] S4-3: If it is a combination of airflow pulsation and temperature mutation interference, the time correction difference one and the speed correction one value are calculated by steps S4-1 and S4-2 respectively:

[0122] The experimental sample data belonging to the combined interference is identified from the database, and the signal amplitude and the gas temperature at each time point in the experimental process are extracted from each group of experimental sample data;

[0123] After calculating the signal similarity distance and the temperature similarity distance of each group of experimental sample data, the sample data with both the signal similarity distance and the temperature similarity distance lower than the corresponding distance threshold value is reserved as similar data, and the time correction coefficient and the speed correction coefficient of each group of similar data are extracted;

[0124] T1 and v1 are multiplied by the time correction coefficient and the speed correction coefficient of each group of similar data respectively, the average value of the multiplication results of each group of time correction coefficients is taken to obtain the time correction difference two, and the average value of the multiplication results of each group of speed correction coefficients is taken to obtain the speed correction two value;

[0125] The final correction time difference and the final correction propagation speed are calculated by using the weighted fusion algorithm respectively;

[0126] S4-4: In step S4-2, the temperature evaluation coefficient is compensated, the temperature difference of each continuous time point is calculated based on the gas temperature at each time point, and the temperature difference sign is recorded, if a group of temperature difference is negative, it is recorded as negative temperature difference, and the symbol c1 is used, otherwise it is recorded as positive temperature difference, and the symbol c2 is used:

[0127] Calculate the proportion of the number of c1 in the total number of temperature differences, denoted as R1;

[0128] Calculate the proportion of the number of c2 in the total number of temperature differences, denoted as R2;

[0129] Using the formula Calculate the temperature correction coefficient ; wherein the temperature correction coefficient is set in the range of 0.05-0.2;

[0130] After determining the temperature correction coefficient, the temperature correction coefficient is multiplied by the temperature evaluation coefficient by default for correction, as the temperature evaluation coefficient for subsequent determination of the speed correction coefficient, specifically:

[0131] If R2>R1, the temperature evaluation coefficient is multiplied by (1+ ); if R2 ).

[0132] S5: Collect X groups (where X>3) of transmission time differences and ultrasonic wave propagation speeds after S4 processing, and calculate the average time difference and average propagation speed after mean value calculation;

[0133] S6: Based on the average time difference , the inner diameter D of the gas pipeline, the average propagation speed h, and the straight line distance between the two ultrasonic wave transducers, update and output the real-time gas flow Q; Embodiment

[0134] Please refer to Figure 2 , based on the anti-interference ultrasonic gas meter flow metering method provided by the embodiment 1 of the present application, the embodiment 2 of the present application proposes an anti-interference ultrasonic gas meter flow metering system. Embodiment 2 is only a preferred way of embodiment 1, and the implementation of embodiment 2 will not affect the separate implementation of embodiment 1.

[0135] Specifically, the anti-interference ultrasonic gas meter flow metering system provided by the embodiment 2 of the present application is different in that it comprises:

[0136] Acquisition module: set the transmission frequency, power and sampling period of the ultrasonic wave transducer, and trigger the environmental parameter monitoring signaling to obtain the interference parameter; the interference parameter includes signal amplitude and temperature;

[0137] Interference judgment module: analyze and evaluate the interference parameter to determine whether there is interference at present, and identify the interference type if there is interference; wherein the interference type includes airflow pulsation interference and temperature mutation interference;

[0138] Correction analysis module: if there is interference, the transmission time difference and the ultrasonic wave propagation speed are corrected based on the interference type, combined with the database and the anti-interference compensation algorithm logic;

[0139] Result output module: collect X sets of transmission time difference and ultrasonic wave propagation speed after correction processing, respectively calculate the mean value to determine the average time difference and average propagation speed, and combine the gas pipeline inner diameter and the straight line distance between the two ultrasonic transducers to calculate the real-time gas flow;

[0140] The above formulas are all dimensionless values, and the specific dimensionless can be standardized and other means, which will not be described here. The formula is obtained by software simulation of a large amount of data to obtain the most real situation. The preset parameters in the formula are set by the person skilled in the art according to the actual situation.

[0141] The above embodiments can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, the above embodiments can be realized in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (such as a floppy disk, an ATA hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid state ATA hard disk.

[0142] It should be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0143] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware or in a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solutions. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0144] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be realized in other ways. For example, the device embodiments described above are merely schematic, for example, the division of the units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0145] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, which can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0146] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0147] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile ATA hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0148] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A flow measurement method for an ultrasonic gas meter with anti-interference function, characterized in that, include: S1: Start the interference detection subroutine, analyze and evaluate the interference parameters to determine whether interference exists, and if interference exists, identify the type of interference. The types of interference include airflow pulsation interference and temperature abrupt change interference; the interference parameters include signal amplitude and temperature. S2: If interference exists, the transmission time difference and ultrasonic propagation speed are corrected based on the interference type and the database using anti-interference compensation algorithm logic; If the disturbance is caused by airflow pulsation, the specific correction process is as follows: S2-1: If it is airflow pulsation interference, first mark the current transmission time difference as T1, retrieve the preset signal amplitude rating, calculate the signal evaluation coefficient, and then convert it into a time correction coefficient through the mapping rule between the signal evaluation coefficient and the time correction coefficient. Multiply T1 by the time correction coefficient to obtain the time correction difference one. Identify experimental sample data in the database that belong to airflow pulsation interference, and extract the signal amplitude at each time point during the experiment from each group of experimental sample data; The signal similarity distance between each group of experimental sample data and the signal amplitude at each time point is calculated using Euclidean distance calculation logic. Retain sample data that are less than the signal distance threshold as similar data, and extract the time correction coefficient for each group of similar data; The time correction difference 2 is obtained by multiplying T1 by the time correction coefficient of each group of similar data and taking the average. The final corrected time difference is calculated by using a weighted fusion algorithm between time correction 1 and time correction difference 2. If the interference is due to a sudden temperature change, the specific correction process is as follows: S2-2: If the interference is caused by a sudden temperature change, first mark the current ultrasonic wave propagation speed as v1, retrieve the preset temperature reference value, calculate the temperature evaluation coefficient, and then convert it into a speed correction coefficient through the mapping rule between the temperature evaluation coefficient and the speed correction coefficient; multiply v1 by the speed correction coefficient to obtain the speed correction value. Identify experimental sample data in the database that are subject to temperature change interference, and extract the gas temperature at each time point during the experiment from each group of experimental sample data. The Euclidean distance calculation logic is used to calculate the temperature similarity distance between each group of experimental sample data and the gas temperature at each current time point. Retain sample data that are less than the temperature distance threshold as similar data, and extract the velocity correction coefficient for each group of similar data. The velocity correction coefficients of v1 and each group of similar data are multiplied and averaged to obtain the binary velocity correction value. The final corrected propagation velocity is calculated using a weighted fusion algorithm between the first and second velocity correction values. S3: Collect the transmission time difference and ultrasonic propagation speed of group X after correction by S2, calculate the mean value, and determine the mean time difference and mean propagation speed. S4: Based on average time difference The gas pipeline inner diameter D, average propagation velocity h, and straight-line distance between the two ultrasonic transducers are used to update and output the real-time gas flow rate Q.

2. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 1, characterized in that, The step S1, determining whether interference exists, specifically involves: Extract the signal amplitude of the ultrasonic receiver at each time point within the set time zone, and calculate the coefficient of variation, which is obtained by calculating the standard deviation and the average value. If the coefficient of variation is higher than the set variation threshold coefficient, it is determined that there is airflow pulsation interference. The gas temperature at each time point within the set time zone is extracted, the average value is taken, and then matched with the reference temperature range. If the matching fails, it is determined that there is a temperature change interference.

3. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 1, characterized in that, In step S2, the transmission time difference and ultrasonic propagation speed are corrected based on the interference type and the database using an anti-interference compensation algorithm. If the interference is a combination of airflow pulsation and temperature change, the specific correction process is as follows: S2-3: If the disturbance is a combination of airflow pulsation and temperature change, then calculate the time correction difference and velocity correction values ​​in steps S2-1 and S2-2 respectively; The database identifies experimental sample data belonging to combined interference, and extracts the signal amplitude and gas temperature at each time point during the experiment from each group of experimental sample data; Sample data whose signal similarity distance and temperature similarity distance are both below the corresponding distance threshold are retained as similar data, and the time correction coefficient and velocity correction coefficient of each group of similar data are extracted. The time correction factor and velocity correction factor of each group of similar data are multiplied by T1 and v1 respectively. The average value of the multiplication results of the time correction factors of each group is taken to obtain the time correction difference 2. The average value of the multiplication results of the velocity correction factors of each group is taken to obtain the velocity correction 2 value. The final correction time difference and the final correction propagation speed are calculated using a weighted fusion algorithm, respectively.

4. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 1, characterized in that, The calculation logic for the signal evaluation coefficient and the temperature evaluation coefficient is as follows: The signal amplitude of the ultrasonic receiver at each time point is obtained by decomposing the coefficient of variation. The average value is calculated to determine the signal mean. The highest and lowest signal amplitudes at each time point are identified. The signal evaluation coefficient is calculated by combining the signal amplitude rating with the signal mean and using weighted calculation logic. Identify the highest and lowest gas temperatures at each time point, and calculate the temperature evaluation coefficient by combining the average gas temperature with the temperature benchmark value using weighted calculation logic.

5. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 1, characterized in that, The mapping rules for steps S2-1 and S2-2 are set as follows: Establish a mapping rule between signal evaluation coefficients and time correction coefficients, that is, construct each set of signal coefficient intervals corresponding to the signal evaluation coefficients, and each set of signal coefficient intervals corresponds to a set of time correction coefficients; Establish a mapping rule between temperature evaluation coefficient and speed correction coefficient, that is, construct each set of temperature coefficient intervals corresponding to the temperature evaluation coefficient, and each set of temperature coefficient intervals corresponds to a set of speed correction coefficients.

6. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 1, characterized in that, Trend compensation is applied to the temperature assessment coefficient in step S2-2, specifically as follows: Using the gas temperature at each time point as a baseline, calculate the temperature difference for each consecutive time point and record the sign of the temperature difference. If a set of temperature differences is negative, it is recorded as a negative temperature difference, denoted by the symbol c1; otherwise, it is recorded as a positive temperature difference, denoted by the symbol c2. Calculate the proportion of c1 in the total temperature difference, and denote it as R1; Calculate the proportion of c2 in the total temperature difference, and denote it as R2; Using formula Calculate the temperature correction factor ; After determining the temperature correction coefficient, trend compensation is applied to the temperature assessment coefficient based on the comparison results of R2 and R1: if R2 > R1, then the temperature assessment coefficient is multiplied by (1 + ... If R2 < R1, then multiply the temperature assessment coefficient by (1- ).

7. An ultrasonic gas meter flow metering system with anti-interference function, applied to the ultrasonic gas meter flow metering method with anti-interference function according to any one of claims 1-6, characterized in that, include: Acquisition module: Sets the transmission frequency, power, and sampling period of the ultrasonic transducer, and simultaneously triggers environmental parameter monitoring signals to acquire interference parameters; interference parameters include signal amplitude and temperature; Interference determination module: Analyzes and evaluates interference parameters to determine whether interference exists. If interference exists, it identifies the type of interference. The types of interference include airflow pulsation interference and temperature change interference; Correction Analysis Module: If interference exists, the transmission time difference and ultrasonic propagation speed are corrected based on the interference type and the database using anti-interference compensation algorithm logic; Results output module: Collects the transmission time difference and ultrasonic propagation speed of X groups after correction processing, calculates the mean value, determines the average time difference and average propagation speed, and calculates the real-time gas flow rate by combining the inner diameter of the gas pipeline and the straight-line distance between the two ultrasonic transducers.

Citation Information

Patent Citations

  • Ultrasonic gas meter metering data sampling method and device

    CN113155214A

  • Ultrasonic metering compensation method and system based on intelligent gas internet of things, and medium

    CN116346864A