A method and apparatus for ultrasonic water meter calibration with no cumulative error flow averaging

By using steady-state window determination and rational number recursive averaging, the problems of cumulative error and synchronization error in ultrasonic water meter calibration are solved, achieving high-precision flow velocity calibration and ensuring the reliability of the correction coefficient.

CN123045490APending Publication Date: 2026-11-06HANGZHOU XINCHUANG ZHILIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611554418.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing ultrasonic water meter calibration methods are prone to cumulative errors when the flow rate is unstable or the echo quality is poor. Furthermore, the synchronization error between the standard meter and the water meter being calibrated affects the reliability of the correction coefficient, resulting in inaccurate calibration results.

Method used

The flow velocity averaging method without cumulative error is adopted. Through steady-state window determination, sample confidence weight generation and rational number recursive averaging, combined with synchronization error to calculate the confidence level of the correction coefficient, outlier data is eliminated and rounding errors are avoided to ensure calibration accuracy.

Benefits of technology

It effectively eliminates abnormal data, reduces cumulative and synchronization errors, improves calibration accuracy, and ensures the reliability and accuracy of correction coefficients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123045490A_ABST
    Figure CN123045490A_ABST
Patent Text Reader

Abstract

The application discloses a cumulative error-free flow rate averaging method and device for ultrasonic water meter calibration, and particularly relates to the technical field of ultrasonic calibration; the application collects a pre-monitoring flow rate sequence after an ultrasonic water meter to be calibrated enters a current standard flow point, and identifies a steady-state calibration interval through window mean, variance and maximum difference; flow rate measurement values and ultrasonic echo data are read in the steady-state interval, sample credible weights are generated according to echo amplitude, signal-to-noise ratio, flow state stability, peak width, peak value sharpness and propagation time consistency, and a rational number recursive rule is adopted to update average state variables, so that a final weighted average flow rate is obtained; further, a correction coefficient is calculated according to standard meter data, a credible level is determined in combination with sampling fluctuation and synchronization error, and calibration results are stored or re-calibration is triggered according to a writing condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ultrasonic calibration technology, and more specifically, to a method and apparatus for averaging flow rates without cumulative error for calibrating ultrasonic water meters. Background Technology

[0002] When ultrasonic water meters are calibrated at the factory or periodically, it is usually necessary to collect the flow velocity or flow rate measurement values ​​of the water meter being calibrated at multiple standard flow points on a standard meter stand. Then, the average measurement result of the water meter being calibrated is compared with the standard value given by the standard meter stand to obtain the correction coefficient for the corresponding flow point.

[0003] However, the existing velocity averaging method without cumulative error still has the following shortcomings in practical applications:

[0004] Averaging using a fixed sampling duration or a fixed number of samplings assumes consistent data quality within the sampling interval. This method can meet general calibration requirements under conditions of stable flow, clear echoes, and small synchronization errors. However, if bubbles, pipe wall reflections, multipath interference, slight flow pulsations, or echo peak distortion occur during the calibration process, the reliability of different sampling points will vary significantly. If all sampled values ​​are still processed with equal weight, samples with lower amplitudes, poor signal-to-noise ratios, broadened main peaks, or inconsistent upstream / downstream propagation times will also be included in the averaging. The final average value may appear smoother on the surface, but it may actually deviate from the true steady-state flow velocity.

[0005] Another easily overlooked problem lies in the averaging calculation itself. The controllers of the ultrasonic water meters being calibrated often use MCUs or embedded processors with limited resources. If floating-point accumulation or long-term cumulative summation is used, problems such as gradual accumulation of rounding errors, excessively large intermediate values, and uncontrolled growth of the denominator can easily occur when there are many sampling times, inconsistent weights, or high precision of fixed-point quantization of flow velocity. In other words, the average value is not only affected by the flow field and echo quality, but the calculation method itself may also become a source of error. This is more obvious in scenarios with small flow points, long-term sampling, or high-precision calibration.

[0006] Furthermore, the metering window of the standard meter station and the average window of the water meter being calibrated are not always perfectly synchronized; there may be a time deviation between the start and end times of metering of the standard meter station and the start and end times of the water meter being calibrated being included in the average; for steady-state flow, this deviation may seem to be only a window misalignment of a few seconds or less, but when the effective calibration time is short or there are small fluctuations in flow, the synchronization error will directly affect the reliability of the correction coefficient. If only the correction coefficient is calculated without evaluating whether the correction coefficient is reliable, it is easy to write the flow point results with large sampling fluctuations or large synchronization deviations into the water meter storage area, making it difficult to identify in time whether the flow point needs to be checked or recalibrated during subsequent use.

[0007] To address this, a flow velocity averaging method and apparatus for ultrasonic water meter calibration without cumulative error is proposed. Summary of the Invention

[0008] To overcome the above-mentioned deficiencies of the prior art, embodiments of the present invention provide a method and apparatus for averaging flow velocity without cumulative error for calibrating ultrasonic water meters.

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

[0010] A flow velocity averaging method without cumulative error for ultrasonic water meter calibration is as follows:

[0011] After the ultrasonic water meter being calibrated enters the current standard flow point, a pre-monitoring flow velocity sequence is collected, and the current standard flow point is determined to have entered the steady-state calibration interval based on the window mean, window variance, and maximum window difference of the candidate steady-state window.

[0012] After entering the steady-state calibration interval, the average state variables are initialized to I=0, M=0, D=1, C=0, where I is the integer part of the average flow velocity, M is the numerator of the average flow velocity, D is the denominator of the average flow velocity, and C is the cumulative effective weight. The current weighted average flow velocity is expressed as Avg=I+M / D.

[0013] Within the steady-state calibration interval, the flow velocity measurement value x of the ultrasonic water meter being calibrated is collected, and the corresponding ultrasonic echo waveform data is read. Based on the echo amplitude, signal-to-noise ratio, flow stability, echo peak width, peak sharpness, and consistency of upstream / downstream propagation time, a sample confidence weight w is generated.

[0014] When w=0, the corresponding flow velocity measurement value is discarded; when w>0, the corresponding flow velocity measurement value is included in the weighted recursive average, and I, M, D, and C are updated according to the rational number recursion rule.

[0015] Repeatedly collect data, generate weights, and use rational number recursive averaging until the cumulative effective weight C reaches the target cumulative weight.

[0016] The correction factor K is calculated based on the final weighted average flow velocity Avg and the standard flow value given by the standard meter, and the reliability level of the correction factor is calculated by combining the sampling fluctuation and synchronization error of the water meter being calibrated.

[0017] When the confidence level of the correction coefficient meets the writing conditions, the correction coefficient K and the confidence level are written to the non-volatile storage module of the ultrasonic water meter being calibrated according to the flow point.

[0018] Specifically, the determination of the steady-state calibration range includes:

[0019] In the pre-monitoring phase following the switch to the current standard flow point, a candidate steady-state window of length W is established, where W ranges from 20 to 120; the window mean is calculated for the candidate steady-state window. Window variance Maximum difference between the window and ;

[0020] Compare the current candidate steady-state window with the previous candidate window. If both conditions are met:

[0021] ; ; ;

[0022] This represents the average flow rate of the previous steady-state detection window before the current candidate window; This represents the maximum range of average velocity variation allowed between two adjacent steady-state windows. This indicates the maximum statistical range of flow velocity fluctuations allowed within the window. This indicates the maximum allowable instantaneous fluctuation range within the window; and the flow point is considered stable when the above conditions are met consecutively L times.

[0023] Specifically, the generation of the sample confidence weight w includes:

[0024] Calculate the amplitude quality value separately Signal-to-noise ratio quality value Flow quality value Peak width quality value Peak sharpness quality value Consistency quality value with propagation time ;

[0025] The sample confidence weights w are synthesized as follows:

[0026] ;

[0027] in , , , , as well as These are the preset synthesis weights.

[0028] Specifically, the generation of echo peak width quality value and peak sharpness quality value includes;

[0029] The position of the main peak is determined by obtaining the echo correlation peak sequence corresponding to the j-th echo waveform, and the half-peak determination threshold is formed by multiplying the maximum peak value of the main peak by a preset peak ratio coefficient.

[0030] Search for positions that reach the half-peak determination threshold to the left and right of the main peak position to obtain the left and right positions, respectively. Calculate the echo peak width by combining the echo sampling frequency; calculate the peak width quality value based on the deviation between the echo peak width and the reference peak width.

[0031] Establish a peak analysis window on both sides of the main peak position, calculate the average amplitude within the window, and determine the peak sharpness by the ratio between the maximum peak value of the main peak and the average amplitude of the window. Then, calculate the peak sharpness quality value based on the relationship between the peak sharpness and the reference peak sharpness.

[0032] Specifically, the generation of propagation time consistency quality values ​​includes:

[0033] For the j-th sample value, read the upstream propagation time and downstream propagation time, and calculate the actual propagation time difference;

[0034] Calculate the theoretical propagation time difference by combining the current reference flow velocity, the ultrasonic propagation path length L, the angle between the sound path and the pipe axis, and the sound velocity in water at the current water temperature.

[0035] The propagation time consistency deviation is generated based on the difference between the actual propagation time difference and the theoretical propagation time difference, and the propagation time consistency quality value is calculated in combination with the preset maximum allowable propagation time deviation.

[0036] Specifically, the recursive rules for rational numbers include:

[0037] Incorporate the current flow velocity measurement x and the sample confidence weight w into the current average state variables I, M, D, and C to calculate the temporary molecule. Temporary denominator and the updated cumulative effective weight ;

[0038] ; ; .

[0039] Specifically, the adjustment and simplification of the integer part after the recursion of rational numbers includes;

[0040] right and Perform integer part adjustment to make the adjusted and satisfy ; then calculate and Greatest common divisor And order:

[0041] ; ;

[0042] Then I, M, D, and C are updated respectively. , , , .

[0043] Specifically, the calculation of the correction factor K and the confidence level of the correction factor includes;

[0044] ;

[0045] in The standard flow rate or standard volume converted flow rate value given by the standard meter at the current flow point; This represents the final weighted average flow velocity expressed by I, M, and D;

[0046] Based on the weighted dispersion between the effective flow velocity sample value and the final weighted average flow velocity Avg within the steady-state calibration interval, the sampling fluctuation component of the water meter under calibration is calculated.

[0047] Based on the deviation between the start and end metering times of the standard meter station and the start and end times of the water meter being calibrated, which are included in the average calculation, the synchronization error component is calculated.

[0048] A reliability coefficient is generated based on the sampling fluctuation component and synchronization error component of the water meter being calibrated. .

[0049] Specifically, the mapping and write control of the correction coefficient trust level include;

[0050] when At that time, the confidence level of the correction coefficient is level one, allowing writing to the non-volatile storage module;

[0051] when At that time, the confidence level of the correction coefficient is level two, allowing it to be written and marked as a candidate flow point for review.

[0052] when When the confidence level of the correction coefficient is level three, writing is prohibited, triggering extended sampling or recalibration;

[0053] , These are the preset first-level credibility threshold and second-level credibility threshold.

[0054] The technical effects and advantages of this invention are as follows:

[0055] This invention first performs steady-state identification after switching the standard flow point. Only when the window mean, variance, and maximum difference meet the conditions is the formal averaging initiated. It also generates sample reliability weights by combining echo amplitude, signal-to-noise ratio, flow stability, peak width, peak sharpness, and propagation time consistency. This can eliminate or reduce the impact of abnormal echoes, bubbles, multipath interference, and transient flow fluctuations on the samples, making the flow velocity data participating in the calibration closer to the true steady-state flow velocity.

[0056] This invention employs four average state variables to perform rational number recursive averaging, and adjusts the integer part and reduces the greatest common divisor during the recursive process to avoid rounding errors and intermediate quantity expansion caused by long-term floating-point accumulation. At the same time, before writing the correction coefficient, it combines sampling fluctuations and synchronization errors to generate a confidence level. Low confidence results are not directly written to the water meter storage area, thereby reducing the risk of erroneous calibration coefficients becoming fixed. Attached Figure Description

[0057] Figure 1 This is a flowchart of a flow velocity averaging method for ultrasonic water meter calibration without cumulative error, according to the present invention. Detailed Implementation

[0058] 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.

[0059] Example 1

[0060] like Figure 1 As shown, a flow velocity averaging method without cumulative error for ultrasonic water meter calibration is as follows:

[0061] S1. After the ultrasonic water meter being calibrated enters the current standard flow point, a pre-monitoring flow velocity sequence is collected, and steady-state identification is performed on the pre-monitoring flow velocity sequence. When the mean fluctuation, variance, and maximum difference of W consecutive sampled values ​​all meet the corresponding thresholds, it is determined that the current standard flow point has entered the steady-state calibration interval.

[0062] Steady-state identification includes:

[0063] In the pre-monitoring phase following the switch to the current standard flow point, a candidate steady-state window of length W is established, where W ranges from 20 to 120; the window mean is calculated for the candidate steady-state window. Window variance Maximum difference between the window and ;

[0064] W can be determined by the standard gauge platform piping volume, valve response time, and flow point size.

[0065] Compare the current candidate steady-state window with the previous candidate window. If both conditions are met:

[0066] ;

[0067] This represents the average flow rate of the previous steady-state detection window before the current candidate window;

[0068] ;

[0069] ;

[0070] This represents the maximum range of average velocity variation allowed between two adjacent steady-state windows.

[0071] This indicates the maximum statistical range of flow velocity fluctuations allowed within the window.

[0072] This indicates the maximum allowable instantaneous fluctuation range within the window;

[0073] Furthermore, the flow point is considered stable when the above conditions are met consecutively L times; where L ranges from 2 to 5. as well as Based on the nominal flow rate, calibration level, and pipeline stabilization time preset at the current standard flow point.

[0074] In some embodiments, a DN15 ultrasonic water meter is used in... Taking flow point calibration as an example. After the standard meter is switched to this flow point, the water meter MCU does not start formal averaging immediately, but instead collects pre-monitoring data at a sampling frequency of 2Hz. The window length W is set to 40, which is approximately 20 seconds of data.

[0075] Calculate the window mean for each candidate window. Window variance Maximum difference between the window and ;

[0076] If the current window and the previous window satisfy:

[0077] ; ; ;

[0078] If the conditions are met for three consecutive windows, then the formal averaging process will begin. The value can be taken as 0.05% to 0.2% of the integer quantization value of the current flow point; The value can be taken as 0.1% to 0.5% of the integer quantization value of the current flow point; Press The configuration is on the order of squares.

[0079] S2, when entering the steady-state calibration interval, initialize the average state variables to I=0, M=0, D=1, C=0; where I is the integer part of the average flow velocity, M is the numerator of the average flow velocity, D is the denominator of the average flow velocity, and C is the cumulative effective weight. The current weighted average flow velocity is expressed as: Avg=I+M / D.

[0080] S3. Collect the flow velocity measurement value x of the ultrasonic water meter being calibrated within the steady-state calibration interval, read the waveform data of the ultrasonic echo, extract the echo peak width, peak sharpness, and upstream / downstream propagation time consistency from the echo waveform, and generate a sample confidence weight w by combining the ultrasonic signal amplitude, signal-to-noise ratio, and flow stability corresponding to the flow velocity measurement value; when w=0, discard the flow velocity measurement value, and when w>0, allow the flow velocity measurement value to participate in the weighted recursive average;

[0081] The calculation process for the sample confidence weight w is as follows:

[0082] Based on the ultrasonic signal amplitude, signal-to-noise ratio, and flow stability, the amplitude quality value, signal-to-noise ratio quality value, and flow stability value are calculated.

[0083] Amplitude quality value :

[0084] ;

[0085] For the current echo amplitude, For the lowest available amplitude, This is the full-quality reference amplitude.

[0086] Additional explanation, if equal ,but Treat it as 0 to avoid division by zero.

[0087] Signal-to-noise ratio quality value :

[0088] ;

[0089] SNR is the current echo signal-to-noise ratio. For the lowest usable signal-to-noise ratio, For reference signal-to-noise ratio;

[0090] Flow quality value :

[0091] ;

[0092] The median within the steady-state window or the steady-state mean of the previous period. This represents the maximum allowable instantaneous fluctuation at the current flow point.

[0093] This indicates taking the absolute value of a number.

[0094] Echo peak width is used to determine whether the main echo peak is widened by reflections from multipaths, bubbles, or pipe walls.

[0095] Obtain the echo correlation peak sequence corresponding to the j-th echo waveform. ;

[0096] This represents the echo correlation amplitude corresponding to the nth sampling point during the j-th sampling; n is the echo sampling point number.

[0097] Determine the location of the main peak: ; This represents the position of the main peak of the j-th echo;

[0098] Using the preset peak ratio coefficient calculate ;

[0099] The maximum peak value of the j-th echo; We set it to 0.5, which means we use the half-peak width for calculation;

[0100] Search both sides of the main peak to reach Position; Left side position: Right side position: ;

[0101] Calculate echo peak width ; This refers to the echo sampling frequency;

[0102] Then the peak width quality value ; This is the preset allowable deviation for peak width;

[0103] in The preset reference peak width is represented as the average peak width under high-quality echo conditions. It is calculated by selecting the N echoes with the highest signal-to-noise ratio and calculating the average peak width after the current flow point enters a stable state.

[0104] Determine the main peak analysis window ;

[0105] The location of the main peak. This is the half-window length for main peak analysis; it can be set to 1 to 2 times the number of sampling points corresponding to the reference peak width.

[0106] Calculate the average amplitude within the main peak analysis window. ;in The peak sharpness is the number of sampling points within the window. When the main peak is concentrated and clear, the peak value is much higher than the surrounding average amplitude. The peak value is relatively large; however, when multipath reflection and bubble interference are present, the peak value diffuses. reduce.

[0107] Combined with the preset minimum allowable sharpness Calculate peak sharpness quality value ;

[0108] in is the preset reference peak sharpness; is the average peak sharpness under high-quality echo conditions;

[0109] For the j-th sample value, read respectively and ;in This represents the upstream propagation time of the j-th time, i.e., the time required for the ultrasonic wave to propagate upstream. This represents the downstream propagation time of the j-th wave, i.e., the time required for the ultrasonic wave to propagate downstream.

[0110] The actual propagation time difference ;

[0111] Combined with the current reference flow rate Calculate the theoretical propagation time difference ;

[0112] Where L is the sound path length of the ultrasound propagation. The angle between the sound path and the axial direction of the pipe; The speed of sound in water at the current water temperature can be obtained through a speed of sound meter or a pre-stored speed of sound function.

[0113] Transmission time consistency deviation ;

[0114] Combined with the preset maximum allowable propagation time deviation Calculate the propagation time consistency quality value ;

[0115] Based on the combined quality values ​​of each group, w is:

[0116] ;

[0117] in , , , , as well as The preset synthesis weights are 1000.

[0118] In some embodiments, , , , , as well as The values ​​are 150 / 150 / 200 / 150 / 150 / 200 respectively.

[0119] S4. Update the average state variable according to the rational number recursion rule with no accumulated error. The recursion rule is as follows:

[0120] ;

[0121] ;

[0122] ;

[0123] in, As a temporary molecule, As a temporary denominator, This is the updated cumulative effective weight;

[0124] In some embodiments,

[0125] Assume that after reaching steady state, the average state is initialized as follows: I=0, M=0, D=1, C=0;

[0126] The sampled value is 0.00001. The unit of measurement is used. Assume the first four valid samples are:

[0127] x1=250000, w1=1000;

[0128] x2=249980, w2=800;

[0129] x3=250020, w3=900;

[0130] x4=250000, w4=1000;

[0131] When the first sample enters:

[0132] ;

[0133] ;

[0134] When carrying over:

[0135] ; ; ; ;

[0136] When the second sample enters:

[0137] ;

[0138] .

[0139] S5, for and Perform integer part adjustment to make the adjusted and satisfy ; then calculate and Greatest common divisor And order:

[0140] ;

[0141] ;

[0142] Then I, M, D, and C are updated respectively. , , , ;

[0143] In some embodiments,

[0144] Since the result of sample x2 in the above embodiment is negative, a borrow is performed:

[0145] ; ;

[0146] ;

[0147] ;

[0148] ;

[0149] ;

[0150] Simplify ,get: , , ;

[0151] The average value at this time is ,correspond The integer fixed-point value, that is ;

[0152] This result equals: ;

[0153] The third and fourth samples were processed according to the same rules. The entire process did not involve floating-point addition, nor did it simply accumulate all samples into an ever-increasing sum; each step used the greatest common divisor to simplify the fraction, avoiding uncontrolled growth of the denominator.

[0154] It is important to note that and It is recommended to use 64-bit signed integers for intermediate multiplication values. If the target MCU does not support hardware 64-bit multiplication, pre-determine C and D, w and D, or M and D, and then perform segmented calculations. This measure does not change the mathematical result, only the execution order.

[0155] S6, repeat steps S3 to S5 until the cumulative effective weight C reaches the preset target cumulative weight. Or the number of valid samples reaches the target number of sampling times N;

[0156] S7, based on the final weighted average flow rate Compared with the standard flow rate value given by the standard meter Calculate the correction factor K, and combine it with the sampling fluctuation and synchronization error of the water meter being calibrated to calculate the reliability level of the correction factor;

[0157] Specifically:

[0158] ;

[0159] in The standard flow rate or standard volume converted flow rate value given by the standard meter at the current flow point;

[0160] This represents the final weighted average flow velocity expressed by I, M, and D.

[0161] In some embodiments,

[0162] After completing the target sampling of the current flow point, we obtain ;

[0163] The standard platform provides: ;

[0164] If the calculation yields: ,but .

[0165] Fluctuation component of water meter under calibration Computational logic;

[0166] ;

[0167] ;

[0168] ;

[0169] in This represents the j-th effective flow velocity sample value within the steady-state calibration interval; This represents the sample confidence weight corresponding to the j-th valid flow velocity sample value; This represents the final weighted average flow rate;

[0170] It represents the weighted sampling fluctuation of the ultrasonic water meter being calibrated at the current flow point, reflecting the degree of dispersion after the combined effects of echo quality, flow disturbance and sampling stability;

[0171] This indicates the number of valid samples, used to avoid a small number of high-weighted samples being mistakenly considered as a large number of valid samples; flow rate samples with a confidence weight greater than 0 are considered valid samples. This represents the relative standard uncertainty component of the sampling fluctuation converted to the correction factor;

[0172] Synchronization error components Computational logic;

[0173] ;

[0174] ;

[0175] in, This indicates the time deviation between the time when the standard meter starts measuring and the time when the calibrated water meter begins to be included in the average calculation. This indicates the time deviation between the time when the standard meter station ends its metering and the time when the calibrated water meter stops being included in the average calculation.

[0176] This represents the total synchronization deviation within a single calibration interval; Indicates the valid calibration duration for the current flow point;

[0177] This represents the relative standard uncertainty component obtained from the synchronization error conversion. The meaning of this conversion is that, under steady-state flow, time window misalignment will cause the standard meter's integral interval and the average interval of the calibrated water meter to be not completely consistent. The larger the proportion of the misalignment time to the total calibration time, the lower the reliability of the correction coefficient.

[0178] Based on the sampling fluctuation components of the water meter being calibrated and synchronization error components Calculate the credibility coefficient ;

[0179] ;

[0180] in This represents the confidence level of the correction coefficient K for the current flow point, with a value ranging from 0 to 1; the larger the value, the more reliable the correction coefficient.

[0181] ;

[0182] ;

[0183] in Indicates the upper limit of allowable sampling fluctuation; Indicates the upper limit of the allowable synchronization error; This represents the normalized value of the sampling fluctuation; This represents the normalized value of the synchronization error; Indicates sampling fluctuation weight; This represents the synchronization error weights, and they sum to one.

[0184] clip{A,0,1} means that when A is less than 0, it takes the value 0; when A is greater than 1, it takes the value 1; and in other cases, it takes the value of A itself.

[0185] S8, when the confidence level of the correction coefficient meets the writing condition, write the correction coefficient K and the confidence level to the non-volatile storage module of the ultrasonic water meter being calibrated according to the flow point; when the confidence level of the correction coefficient does not meet the writing condition, extend the sampling time of the current flow point, or re-perform the calibration of the current flow point.

[0186] Specifically:

[0187] when At that time, the confidence level of the correction coefficient is level one, allowing writing to the non-volatile storage module;

[0188] when At that time, the confidence level of the correction coefficient is level two, allowing it to be written and marked as a candidate flow point for review.

[0189] when When the confidence level of the correction coefficient is level three, writing is prohibited, triggering extended sampling or recalibration;

[0190] , The preset first-level credibility threshold and second-level credibility threshold are used, and .

[0191] It should be noted that in the above calculation process, the conversion from flow rate to flow velocity needs to be selectively performed, that is, the standard flow volume is divided by the effective cross-sectional area of ​​the measuring tube.

[0192] Example 2

[0193] Based on the method for averaging flow rates without cumulative error for ultrasonic water meter calibration provided in Embodiment 1 of this application, Embodiment 2 of this application proposes a device for averaging flow rates without cumulative error for ultrasonic water meter calibration. Embodiment 2 is merely a preferred embodiment of Embodiment 1, and its implementation will not affect the individual implementation of Embodiment 1.

[0194] Specifically, Embodiment 2 of this application provides a flow velocity averaging device for ultrasonic water meter calibration without cumulative error, comprising an intelligent component, wherein the intelligent component is provided with:

[0195] The sampling and steady-state identification module is used to collect the pre-monitored flow velocity sequence after switching from the standard meter to the current flow point, and to determine whether the current flow point has entered the steady-state calibration range based on the window mean, window variance and window maximum difference.

[0196] The sample confidence weight generation module is used to collect flow velocity measurement values ​​x within the steady-state calibration interval, extract echo amplitude, signal-to-noise ratio, flow stability, echo peak width, peak sharpness, and upstream / downstream propagation time consistency, and generate amplitude quality values, signal-to-noise ratio quality values, flow stability quality values, peak width quality values, peak sharpness quality values, and propagation time consistency quality values, respectively, and then synthesize sample confidence weights w; when w=0, the corresponding flow velocity measurement value is discarded, and when w>0, the corresponding flow velocity measurement value is included in the weighted recursive average;

[0197] The error recursive averaging module is used to initialize and update the four average state variables I, M, D, and C. It performs integer part adjustment and greatest common divisor reduction according to the rational number recursion rule to obtain the final weighted average flow velocity Avg.

[0198] The correction coefficient calculation module is used to interact with the standard station to obtain the standard flow value of the current flow point and record the time information of calibration start, calibration end, and average window start and stop. Then, the correction coefficient K is calculated based on the final weighted average flow rate Avg and the standard flow value, and the confidence coefficient and its mapped confidence level are output synchronously.

[0199] The non-volatile storage module is used to store the correction coefficient K, trust level, and verification mark by flow point.

[0200] 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 preset parameters in the formulas can be set by those skilled in the art according to the actual situation.

[0201] 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.

[0202] 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.

[0203] 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.

[0204] 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.

[0205] 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.

[0206] 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.

[0207] 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.

[0208] 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 velocity averaging method without cumulative error for ultrasonic water meter calibration, characterized in that, include: After the ultrasonic water meter being calibrated enters the current standard flow point, a pre-monitoring flow velocity sequence is collected, and the current standard flow point is determined to have entered the steady-state calibration interval based on the window mean, window variance, and maximum window difference of the candidate steady-state window. After entering the steady-state calibration interval, the average state variables are initialized to I=0, M=0, D=1, C=0, where I is the integer part of the average flow velocity, M is the numerator of the average flow velocity, D is the denominator of the average flow velocity, and C is the cumulative effective weight. The current weighted average flow velocity is expressed as Avg=I+M / D. Within the steady-state calibration interval, the flow velocity measurement value x of the ultrasonic water meter being calibrated is collected, and the corresponding ultrasonic echo waveform data is read. Based on the echo amplitude, signal-to-noise ratio, flow stability, echo peak width, peak sharpness, and consistency of upstream / downstream propagation time, a sample confidence weight w is generated. When w=0, the corresponding flow velocity measurement value is discarded; when w>0, the corresponding flow velocity measurement value is included in the weighted recursive average, and I, M, D, and C are updated according to the rational number recursion rule. Repeatedly collect data, generate weights, and use rational number recursive averaging until the cumulative effective weight C reaches the target cumulative weight. The correction factor K is calculated based on the final weighted average flow velocity Avg and the standard flow value given by the standard meter, and the reliability level of the correction factor is calculated by combining the sampling fluctuation and synchronization error of the water meter being calibrated. When the confidence level of the correction coefficient meets the writing conditions, the correction coefficient K and the confidence level are written to the non-volatile storage module of the ultrasonic water meter being calibrated according to the flow point.

2. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 1, characterized in that: The determination of the steady-state calibration range includes: In the pre-monitoring phase following the switch to the current standard flow point, a candidate steady-state window of length W is established, where W ranges from 20 to 120; the window mean is calculated for the candidate steady-state window. Window variance Maximum difference between the window and ; Compare the current candidate steady-state window with the previous candidate window. If both conditions are met: ; ; ; This represents the average flow rate of the previous steady-state detection window before the current candidate window; This represents the maximum range of average velocity variation allowed between two adjacent steady-state windows. This indicates the maximum statistical range of flow velocity fluctuations allowed within the window. This indicates the maximum allowable instantaneous fluctuation range within the window; and the flow point is considered stable when the above conditions are met consecutively L times.

3. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 2, characterized in that: The generation of the sample confidence weight w includes: Calculate the amplitude quality value separately Signal-to-noise ratio quality value Flow quality value Peak width quality value Peak sharpness quality value Consistency quality value with propagation time ; The sample confidence weights w are synthesized as follows: ; in , , , , as well as These are the preset synthesis weights.

4. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 3, characterized in that: The generation of echo peak width quality value and peak sharpness quality value includes: The position of the main peak is determined by obtaining the echo correlation peak sequence corresponding to the j-th echo waveform, and the half-peak determination threshold is formed by multiplying the maximum peak value of the main peak by a preset peak ratio coefficient. Search for positions that reach the half-peak determination threshold to the left and right of the main peak position to obtain the left and right positions, respectively. Calculate the echo peak width by combining the echo sampling frequency; calculate the peak width quality value based on the deviation between the echo peak width and the reference peak width. Establish a peak analysis window on both sides of the main peak position, calculate the average amplitude within the window, and determine the peak sharpness by the ratio between the maximum peak value of the main peak and the average amplitude of the window. Then, calculate the peak sharpness quality value based on the relationship between the peak sharpness and the reference peak sharpness.

5. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 4, characterized in that: The generation of propagation time consistency quality values ​​includes: For the j-th sample value, read the upstream propagation time and downstream propagation time, and calculate the actual propagation time difference; Calculate the theoretical propagation time difference by combining the current reference flow velocity, the ultrasonic propagation path length L, the angle between the sound path and the pipe axis, and the sound velocity in water at the current water temperature. The propagation time consistency deviation is generated based on the difference between the actual propagation time difference and the theoretical propagation time difference, and the propagation time consistency quality value is calculated in combination with the preset maximum allowable propagation time deviation.

6. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 5, characterized in that: The recursive rules for rational numbers include: Incorporate the current flow velocity measurement x and the sample confidence weight w into the current average state variables I, M, D, and C to calculate the temporary molecule. Temporary denominator and the updated cumulative effective weight ; ; ; 。 7. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 6, characterized in that: Adjustments and simplifications of the integer part of rational numbers after recursion include; right and Perform integer part adjustment to make the adjusted and satisfy ; then calculate and Greatest common divisor And order: ; ; Then I, M, D, and C are updated respectively. , , , .

8. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 7, characterized in that: The calculation of the correction factor K and the confidence level of the correction factor includes; ; in The standard flow rate or standard volume converted flow rate value given by the standard meter at the current flow point; This represents the final weighted average flow velocity expressed by I, M, and D; Based on the weighted dispersion between the effective flow velocity sample value and the final weighted average flow velocity Avg within the steady-state calibration interval, the sampling fluctuation component of the water meter under calibration is calculated. Based on the deviation between the start and end metering times of the standard meter station and the start and end times of the water meter being calibrated, which are included in the average calculation, the synchronization error component is calculated. A reliability coefficient is generated based on the sampling fluctuation component and synchronization error component of the water meter being calibrated. .

9. The method for averaging flow velocity without cumulative error for calibrating ultrasonic water meters according to claim 8, characterized in that: The mapping and write control of the correction coefficient trust level include; when At that time, the confidence level of the correction coefficient is level one, allowing writing to the non-volatile storage module; when At that time, the confidence level of the correction coefficient is level two, allowing it to be written and marked as a candidate flow point for review. when When the confidence level of the correction coefficient is level three, writing is prohibited, triggering extended sampling or recalibration; , These are the preset first-level credibility threshold and second-level credibility threshold.

10. A flow velocity averaging device without cumulative error for ultrasonic water meter calibration, applied to the flow velocity averaging method without cumulative error for ultrasonic water meter calibration according to any one of claims 1-9, characterized in that, Includes smart components, which contain the following: The sampling and steady-state identification module is used to collect the pre-monitored flow velocity sequence after switching from the standard meter to the current flow point, and to determine whether the current flow point has entered the steady-state calibration range based on the window mean, window variance and window maximum difference. The sample confidence weight generation module is used to collect flow velocity measurement values ​​x within the steady-state calibration interval, extract echo amplitude, signal-to-noise ratio, flow stability, echo peak width, peak sharpness, and upstream / downstream propagation time consistency, and generate amplitude quality values, signal-to-noise ratio quality values, flow stability quality values, peak width quality values, peak sharpness quality values, and propagation time consistency quality values, respectively, and then synthesize sample confidence weights w; when w=0, the corresponding flow velocity measurement value is discarded, and when w>0, the corresponding flow velocity measurement value is included in the weighted recursive average; The error recursive averaging module is used to initialize and update the four average state variables I, M, D, and C. It performs integer part adjustment and greatest common divisor reduction according to the rational number recursion rule to obtain the final weighted average flow velocity Avg. The correction coefficient calculation module is used to interact with the standard station to obtain the standard flow value of the current flow point and record the time information of calibration start, calibration end, and average window start and stop. Then, the correction coefficient K is calculated based on the final weighted average flow rate Avg and the standard flow value, and the confidence coefficient and its mapped confidence level are output synchronously. The non-volatile storage module is used to store the correction coefficient K, trust level, and verification mark by flow point.