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 by using an anti-interference compensation algorithm to optimize transmission time difference and speed, the problem of insufficient metering accuracy in ultrasonic gas meters is solved, and higher flow calculation accuracy is achieved.
Patent Information
- Application Number
- CN202511595964.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-11-04
AI Technical Summary
Ultrasonic gas meter flow measurement systems are susceptible to interference from airflow pulsation and temperature changes, leading to reduced measurement accuracy. Existing correction methods are difficult to adapt to the nonlinear characteristics of various interferences, resulting in large measurement errors.
By activating an interference detection subroutine to identify airflow pulsation and temperature change interference types, an anti-interference compensation algorithm is used to differentiate the transmission time difference and ultrasonic propagation speed, and the correction values are optimized by combining experimental databases and weighted fusion algorithms.
This improves the adaptability and correction accuracy of the metering system to various interferences, and enhances the accuracy and stability of flow calculation.
Smart Images

Figure CN121048705A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas flow metering technology, and more specifically, to an ultrasonic gas meter flow metering method and system with anti-interference function. Background Technology
[0002] With the intelligent development of the gas industry, ultrasonic gas meters have gradually replaced traditional mechanical gas meters and become the mainstream in the market 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 ultrasonic gas meters is easily affected by various interference factors, resulting in reduced metering accuracy and failing to meet the needs of accurate metering.
[0003] However, in practical applications, the ultrasonic gas meter flow measurement method still has the following shortcomings: On the one hand, when gas is transmitted in the pipeline, it is easily affected by factors such as frequent switching of stoves by users, partial blockage of the pipeline, or pressure fluctuations, which can cause airflow pulsation interference. This interference can lead to unstable phenomena such as turbulence and vortex in the gas flow field. This not only causes the ultrasonic waves to be scattered and reflected during propagation, resulting in drastic fluctuations in the signal amplitude at the receiving end, but also changes the local flow velocity of the gas, causing random deviations in the measurement of the time difference between ultrasonic wave propagation in the forward and reverse directions, which directly affects the accuracy of flow calculation. On the other hand, temperature changes in the gas usage environment can cause temperature abrupt disturbances. According to physical principles, when the actual temperature exceeds the reference temperature range, the measured value of ultrasonic propagation speed will deviate significantly from the true value, which will then be transmitted to the final metering result through the flow calculation formula, causing metering errors. In addition, in real-world scenarios, airflow pulsations and temperature abrupt changes often coexist, forming a combined interference. Traditional measurement methods often employ a single interference correction logic or ignore the coupling effect between interferences, making it difficult to adapt to the nonlinear characteristics of both types of interference simultaneously. Furthermore, they lack precise correction criteria based on experimental data, leading to insufficient or excessive correction and further reducing measurement accuracy.
[0004] To address this, an ultrasonic gas meter flow measurement method and system with anti-interference function has been developed. Summary of the Invention
[0005] To overcome the above-mentioned defects of the prior art, embodiments of the present invention provide an ultrasonic gas meter flow measurement method and system with anti-interference function.
[0006] To achieve the above objectives, the present invention provides the following technical solution: An ultrasonic gas meter flow measurement method with anti-interference function includes: S1: Start the interference detection subroutine to analyze and evaluate interference parameters to determine whether interference exists. If interference exists, identify the type of interference. Interference types include airflow pulsation interference and temperature change interference. 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; 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 the average time difference The gas pipeline's inner diameter D and average propagation velocity h, combined with the flow rate calculation formula. Let L be the straight-line distance between the two ultrasonic transducers, and calculate the real-time gas flow rate Q.
[0007] Specifically, in step S1, determining whether interference exists 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.
[0008] Specifically, 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. For airflow pulsation interference, 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 value. The final corrected time difference is calculated by using a weighted fusion algorithm between time correction 1 and time correction difference 2.
[0009] Specifically, 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. For temperature abrupt change interference, the specific correction process is as follows: If the interference is due to a sudden temperature change, the current ultrasonic propagation speed is first marked as v1. The preset temperature reference value is retrieved, the temperature evaluation coefficient is calculated, and then the temperature evaluation coefficient is converted into the speed correction coefficient through the mapping rule between the temperature evaluation coefficient and the speed correction coefficient. v1 is multiplied 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 velocity correction binary. The final corrected propagation velocity is calculated using a weighted fusion algorithm between the velocity correction I and the velocity correction binary.
[0010] Specifically, 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.
[0011] Specifically, 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.
[0012] Specifically, 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.
[0013] Specifically, the trend compensation for the temperature evaluation coefficient in step S2-2 is 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- ).
[0014] An ultrasonic gas meter flow metering system with anti-interference function includes: 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. Interference types 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.
[0015] The technical effects and advantages of this invention are as follows: (1) By designing differentiated correction logic to correct the transmission time difference and the propagation speed for airflow pulsation, temperature change and the combination of the two, the combined interference is simultaneously corrected with two parameters and matched with two-dimensional similar samples, thus solving the problem of poor adaptability of traditional single correction. (2) By constructing an experimental database containing multiple interference scenarios, the correction is based on the mapping rules derived from physical laws to achieve theoretical correction, and similar experimental samples are screened by Euclidean distance to obtain sample correction coefficients. The final correction value is obtained by weighted fusion, which improves the accuracy of correction. (3) By calculating the proportion of temperature difference symbols at continuous time points, the temperature correction coefficient is obtained and the temperature evaluation coefficient is trend-compensated, which can accurately adapt to dynamic scenarios where the temperature continues to rise and fall. Attached Figure Description
[0016] Figure 1 This is a flowchart of an ultrasonic gas meter flow measurement method with anti-interference function according to the present invention. Figure 2 This is a schematic diagram of the flow measurement method of an ultrasonic gas meter with anti-interference function according to the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1
[0019] like Figure 1 As shown, an ultrasonic gas meter flow measurement method with anti-interference function includes: S1: Initialize the hardware system of the ultrasonic gas meter, set the transmission frequency, power and sampling period of the ultrasonic transducer, and trigger the environmental parameter monitoring signal to obtain interference parameters; the interference parameters include signal amplitude and temperature; Data acquisition location: the receiving end of the second ultrasonic transducer; Acquisition accuracy: resolution 0.1mV, sampling times 10 times / cycle (average value is taken as single sample value), to avoid false acquisition caused by transient noise; Sensor installation: The temperature sensor should be placed close to the inner wall of the gas pipeline (5-10mm away from the transducer) to avoid the influence of ambient temperature (e.g., the temperature difference between the outer wall of the pipeline and the internal gas temperature should be ≤1℃). Acquisition accuracy: 16-bit AD conversion is used, with a resolution of 0.0625℃. After each sampling, filtering processing (such as moving average filtering, with 5 groups of windows) is required to eliminate sensor jitter error.
[0020] S2: Using a dual-channel alternating transmission mode, the first ultrasonic transducer is controlled to emit ultrasonic signals along the gas flow direction, and the second ultrasonic transducer receives the signals; after a preset time interval, the second ultrasonic transducer is switched to emit signals in the opposite direction of the gas flow, and the first ultrasonic transducer receives the signals, and the time difference between the two signal transmissions is recorded. The interval between downstream transmission (from the first transducer to the second transducer) and upstream transmission (from the second transducer to the first transducer) is set to 10ms. It must satisfy the condition that "interval time > transducer residual oscillation time" (usually 5-8ms residual oscillation time) to avoid the time difference superposition error caused by the residual signal from the previous transmission.
[0021] S3: Start the interference detection subroutine to analyze and evaluate the interference parameters to determine whether interference exists. If interference exists, identify the type of interference. The types of interference include airflow pulsation interference and temperature change interference. Specifically: 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. Calculation steps: Set time zone: Select "10 consecutive signal amplitude samples" as one judgment period; Find the mean and standard deviation of the 10 effective amplitudes, denoted as A and B, then the coefficient of variation = .
[0022] The average value of the gas temperature at each time point within the set time zone is extracted and matched with the reference temperature range. If the matching fails, it is determined that there is a temperature change interference. The reference temperature range is established based on the temperature value calibrated and stored under standard operating conditions, with allowable fluctuation values above and below. S4: 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; The database stores experimental data (obtained from laboratory-simulated interference scenarios), including interference type labels, interference characteristic parameters, etc. Specifically: S4-0: The database stores experimental data and correction results under different types of interference scenarios; S4-1: If the interference is caused by airflow pulsation, first mark the current transmission time difference as T1, and retrieve the preset signal amplitude rating; this represents the signal amplitude reference under interference-free conditions. 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. Specifically: The highest signal amplitude, the lowest signal amplitude, and the signal mean are respectively labeled as... The signal amplitude reference value is marked as According to the formula Calculate the signal evaluation coefficient P; where All are preset weighting coefficients. The sum of the three values equals 1.
[0023] 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; multiply T1 by the time correction coefficients to obtain the time correction difference one; An increase in amplitude means a reduction in energy attenuation during ultrasonic wave propagation. Essentially, this means that the intensity of airflow pulsation is weakened. When airflow pulsation is weakened, the fluctuation amplitude of the local flow velocity of the gas decreases and is closer to the true average flow velocity. According to the calculation logic of the transmission time difference, it is the reverse flow time minus the forward flow time. The more stable the flow velocity, the smaller the original measured value of the transmission time difference will be. The mapping rule is established based on the following: by simulating different airflow pulsation intensities in the laboratory, the quantitative correlation between the signal evaluation coefficient and the time correction coefficient is obtained by linear fitting of effective data. For example: For interval 1: above 0.95, the corresponding time correction factor is 0.97; Interval 2: 0.85-0.95, corresponding to a time correction factor of 1.03; Interval 3: 0.75-0.85, corresponding to a time correction factor of 1.07; For interval 4: below 0.75, the corresponding time correction factor is 1.12; The time correction factor is limited to the range of 0.91-1.15.
[0024] 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 number of time points is consistent with the number of current time points. 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. Specifically: Euclidean distance is used to quantify the "degree of difference" between two vectors. The smaller the distance, the more similar the time series trends of the two sets of amplitudes are, and the higher the reference value of the sample for correcting current operating conditions. Its calculation formula is: m represents the number of time points. Let J be the signal amplitude at the j-th time point of the sample data. This represents the signal amplitude at the current j-th time point.
[0025] The signal similarity distance of each group of experimental sample data is compared with the preset signal distance threshold. Sample data with a signal distance less than the signal distance threshold are retained as similar data, and the time correction coefficient of each group of similar data is extracted. 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 value. The final corrected time difference is calculated using a weighted fusion algorithm between time correction one and time correction difference two. That is, by setting the theoretical time confidence weight and the time sample confidence weight corresponding to time correction one and time correction difference two respectively, time correction one and time correction difference two are multiplied by their corresponding weights respectively, and then summed to obtain the final corrected time difference; the sum of the theoretical time confidence weight and the time sample confidence weight is 1; Time Correction 1 (Theoretical Mapping Path): Based on the signal evaluation coefficient (weighted calculation of highest / lowest / average amplitude), the time correction coefficient is associated with the signal evaluation coefficient. Its core function is to capture the overall intensity characteristics of airflow pulsation and ensure that the correction direction conforms to physical laws. Time Correction 2 (Experimental Sample Path): Similar experimental samples are matched by Euclidean distance to extract sample correction coefficients. Its core advantage is to capture the time series details of the amplitude (such as the dynamic trend of "amplitude drops sharply at the 3rd time point and rebounds at the 5th time point"), avoiding the error of theoretical models that only focus on overall features and ignore instantaneous fluctuations.
[0026] S4-2: If the interference is due to a sudden temperature change, first mark the current ultrasonic wave propagation speed as v1 and retrieve the preset temperature reference value; that is, the middle value of the reference temperature range. 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. Specifically: The highest gas temperature, the lowest gas temperature, and the average gas temperature are respectively labeled as follows: The temperature reference value is marked as According to the formula Calculate the temperature assessment coefficient N; where All are preset weighting coefficients. The sum of the three values equals 1.
[0027] Establish a mapping rule between the temperature evaluation coefficient and the 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; multiply v1 by the speed correction coefficient to obtain the speed correction value; Temperature directly affects the propagation speed of ultrasound in gas, because the thermal motion speed of gas molecules increases with increasing temperature, which promotes the propagation of ultrasound and makes the propagation speed greater. The mapping rule is established based on the following: by simulating different temperature change scenarios in the laboratory, the quantitative correlation between the temperature evaluation coefficient and the speed correction coefficient is obtained by linear fitting using effective data. For example: For ranges above 1:1.1, the corresponding speed correction factor is 0.95; Interval 2: 1.0-1.1, corresponding to a speed correction factor of 0.98; Interval 3: 0.9-1.0, corresponding to a speed correction factor of 1.0; For range 4: below 0.9, the corresponding speed correction factor is 1.06; The speed correction factor is limited to the range of 0.9-1.15.
[0028] Identify experimental sample data in the database that are subject to temperature abrupt interference, and extract the gas temperature at each time point during the experiment from each group of experimental sample data; the number of time points is consistent with the number of current time points. 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. The temperature similarity distance of each group of experimental sample data is compared with the preset temperature distance threshold. Sample data with a temperature distance less than the temperature distance threshold are retained as similar data, and the velocity correction coefficient of each group of similar data is extracted. 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. That is, by setting the theoretical reliability weight and the sample reliability weight corresponding to the first and second values of velocity correction, respectively, the first and second values of velocity correction are multiplied by their corresponding weights, and then summed to obtain the final corrected propagation velocity; the sum of the theoretical reliability weight and the sample reliability weight is 1. S4-3: If the disturbance is a combination of airflow pulsation and temperature abrupt change, then after calculating the time correction difference and velocity correction values in steps S4-1 and S4-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; After calculating the signal similarity distance and temperature similarity distance of each group of experimental sample data, the sample data whose signal similarity distance and temperature similarity distance are both lower than 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. S4-4: In step S4-2, compensation calculations are performed for the temperature evaluation coefficient. Using the gas temperature at each time point as a benchmark, the temperature difference is calculated for each consecutive time point, and the sign of the temperature difference is recorded. 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 The temperature correction factor is set in the range of 0.05-0.2. After determining the temperature correction factor, by default, the temperature correction factor is multiplied by the temperature evaluation factor for correction, and this result is used as the temperature evaluation factor for subsequently determining the speed correction factor. Specifically: If R2 > R1, then multiply the temperature assessment coefficient by (1 + ... If R2 < R1, then multiply the temperature assessment coefficient by (1- ).
[0029] S5: Collect the transmission time difference and ultrasonic propagation speed of X groups (where X>3) after processing by S4, calculate the mean value, and determine the mean time difference and mean propagation speed. S6: Based on the average time difference The gas pipeline's inner diameter D and average propagation velocity h, combined with the flow rate calculation formula. L is the straight-line distance between the two ultrasonic transducers, and the real-time gas flow rate Q is calculated. Example
[0030] Please see Figure 2 As shown, based on Embodiment 1 of this application, an ultrasonic gas meter flow measurement method with anti-interference function is provided. Embodiment 2 of this application proposes an ultrasonic gas meter flow measurement system with anti-interference function. Embodiment 2 is merely a preferred embodiment of Embodiment 1, and the implementation of Embodiment 2 will not affect the separate implementation of Embodiment 1.
[0031] Specifically, the difference between the ultrasonic gas meter flow meter system with anti-interference function provided in Embodiment 2 of this application is that it includes: 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. Interference types 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, 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 distance between the two ultrasonic transducers. The above formulas are all dimensionless calculations. Dimensionless calculations can be performed using various methods such as standardization, which will not be elaborated here. The formulas are derived from software simulations based on a large amount of collected data, and the preset parameters in the formulas can be set by those skilled in the art according to the actual situation.
[0032] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, ATA hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state ATA hard disk.
[0033] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0034] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0035] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0036] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0037] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0038] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable ATA hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0039] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the 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; 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 the average time difference The gas pipeline's inner diameter D and average propagation velocity h, combined with the flow rate calculation formula. Let L be the straight-line distance between the two ultrasonic transducers, and calculate 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. For airflow pulsation interference, 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 value. The final corrected time difference is calculated by using a weighted fusion algorithm between time correction 1 and time correction difference 2.
4. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 3, 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. For temperature abrupt change interference, the specific correction process is as follows: If the interference is due to a sudden temperature change, the current ultrasonic propagation speed is first marked as v1. The preset temperature reference value is retrieved, the temperature evaluation coefficient is calculated, and then the temperature evaluation coefficient is converted into the speed correction coefficient through the mapping rule between the temperature evaluation coefficient and the speed correction coefficient. v1 is multiplied 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 velocity correction binary. The final corrected propagation velocity is calculated using a weighted fusion algorithm between the velocity correction I and the velocity correction binary.
5. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 4, 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.
6. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 5, 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.
7. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 6, 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.
8. The ultrasonic gas meter flow measurement method with anti-interference function according to claim 7, characterized in that, The trend compensation for the temperature evaluation coefficient in step S2-2 is 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- ).
9. 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-8, 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
Ultrasonic gas meter detection and correction system and method based on corrected flight time
CN117309075A
Ultrasonic electronic gas meter
CN117705206A
NB remote transmission ultrasonic gas meter, supervision method and system thereof and storage medium
CN119714450A