An ultrasonic meter zero drift online calibration method, an ultrasonic water meter and a medium

By employing an online zero-drift calibration method for ultrasonic meters, utilizing iterative calculation and threshold judgment, real-time monitoring and calibration of zero drift in ultrasonic water meters are achieved. This solves the problem of decreased measurement accuracy caused by zero drift and improves the stability and accuracy of metering.

CN121762004BActive Publication Date: 2026-05-01QINGDAO ITECHENE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO ITECHENE TECH CO LTD
Filing Date
2026-03-04
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing ultrasonic water meters exhibit zero drift during operation, leading to decreased measurement accuracy. Current calibration methods cannot effectively solve the dynamic zero drift problem and cannot meet the high-standard requirements for water metering in civil and industrial sectors.

Method used

An online zero-drift calibration method for ultrasonic meters is adopted. By initializing parameters and statistics, the average and variance of the time difference are updated using an iterative calculation method. Combined with variance threshold and time difference threshold, multiple static water tests and verifications are performed to achieve real-time monitoring and calibration of zero drift.

Benefits of technology

Without affecting normal measurement, it effectively eliminates misjudgments during the static water process, significantly improves the robustness of zero drift calculation and the reliability of calibration results, is suitable for large-scale deployment, and improves the accuracy and long-term stability of low flow measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121762004B_ABST
    Figure CN121762004B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of ultrasonic metering, and particularly provides an ultrasonic meter zero drift online calibration method, an ultrasonic water meter and a medium. The method comprises the following steps: initializing parameters and single-time static water statistics; collecting meter forward flow and reverse flow time of flight, calculating a reverse-to-forward flow time difference, updating a time difference average value, a variance cumulative value and a time difference sample number through an iterative statistical algorithm; judging whether the variance and the time difference average value are effective; carrying out difference check on the current time difference average value and a historical time difference average value, updating the historical time difference average value when a continuous difference threshold is met; when the average value calculation frequency reaches a maximum average value calculation frequency, accumulating a static water frequency and resetting the average value calculation frequency; when the static water frequency reaches a maximum static water frequency, updating the zero drift by updating the historical time difference average value, and completing online updating of the ultrasonic meter. The application can distinguish static water and small flow water, eliminate misjudgment caused by slight leakage, and enhance the robustness of zero drift calculation.
Need to check novelty before this filing date? Find Prior Art

Description

An online calibration method for zero drift of ultrasonic meters, an ultrasonic water meter and a medium Technical Field

[0001] This invention belongs to the field of ultrasonic metering technology, and particularly relates to an online calibration method for zero drift of ultrasonic meters, an ultrasonic water meter, and a medium. Background Technology

[0002] Ultrasonic water meters are flow meters that measure flow velocity based on the time-of-flight method. Due to their outstanding advantages such as having no internal moving parts, a wide range, and low pressure loss, they are widely used in both residential and industrial water metering. Their core working principle is: by detecting the time difference between the propagation of ultrasonic waves in the fluid along and against the flow, the average flow velocity of the fluid is calculated, and then the cumulative flow rate is derived, providing reliable data support for water metering.

[0003] However, in actual operation, the "zero drift" phenomenon seriously affects the measurement accuracy of ultrasonic water meters, becoming a key technical bottleneck restricting their metering reliability. Zero drift specifically refers to the phenomenon where, when the fluid in the pipeline is in a static state, the measurement system continuously outputs a non-zero flow velocity or a very small flow rate reading due to the combined effects of various complex factors such as sensor performance drift, circuit temperature drift, changes in acoustic window deposits, installation stress, and slight pipeline vibrations. This zero drift signal is an inherent background noise, and its value changes dynamically with time and environmental conditions. During low-flow-velocity measurement periods, it easily superimposes with the true flow rate signal, producing cumulative errors. Long-term operation will lead to serious metering deviations, impairing billing fairness and affecting the accuracy of water resource management. Currently, there are four main methods in the industry for dealing with the zero drift problem of ultrasonic water meters, but all of them have significant technical shortcomings. Firstly, the factory static calibration and threshold filtering method involves calibrating the zero point once under ideal experimental conditions and setting a fixed threshold before shipment. During use, readings below the threshold are ignored. This method cannot adapt to dynamic zero drift caused by changes in the field environment, device aging, and temperature fluctuations, and is prone to missed or over-measurements. Secondly, the periodic offline manual calibration method requires interrupting the water supply, disassembling the water meter, and sending it to a professional institution for calibration. The process is cumbersome and costly, and reinstallation can easily introduce new zero drift, making it impossible to maintain continuous online accuracy. Thirdly, the fixed-period or simply triggered online zero-point learning method is difficult to find a sufficiently long absolute static window, and the learning data is easily affected by pipeline network interference, which can introduce larger errors. Fourthly, the online comparison method that relies on external high-precision reference instruments is costly and complex to install, and is not suitable for large-scale field instrument calibration.

[0004] In summary, existing zero-drift handling methods cannot effectively solve the dynamic zero-drift problem in complex field environments, cannot accurately distinguish between zero-drift signals and real low-flow signals, and cannot meet the high-standard requirements of water metering in civil and industrial sectors. Summary of the Invention

[0005] To address the limitations on the long-term metering accuracy of ultrasonic water meters in the existing technology, this invention provides an online zero-drift calibration method for ultrasonic meters, comprising the following steps:

[0006] Step S1: Initialize parameters, including the number of times the average value of the single still water time difference is calculated and the number of still water cycles, and set the maximum number of times the average value of the single still water time difference is calculated and the maximum number of still water cycles respectively;

[0007] Step S2: Initialize the statistics required for a single still water test, including the number of time difference samples, the mean of time differences, and the cumulative variance.

[0008] Step S3: Collect the downstream and upstream flight times of the meter, calculate the upstream and downstream time difference, and update the average value, cumulative variance, and time difference sample number of the time difference through an iterative statistical algorithm until the time difference sample number reaches the sample number limit.

[0009] Step S4: Calculate the variance based on the number of time difference samples and the cumulative variance. If the variance is greater than the variance threshold or the average time difference is greater than the water flow time difference threshold, return to step S1; otherwise, proceed to step S5.

[0010] Step S5: If it is the first time the average value of still water is calculated, the current average value of time difference is saved as the historical average value of time difference. If it is not the first time the average value of still water is calculated, the difference between the current average value of time difference and the historical average value of time difference is checked. If the continuous difference threshold is met, the historical average value of time difference is updated and the number of times the average value of still water time difference is calculated is accumulated.

[0011] Step S6: When the number of times the average value of the single still water time difference is calculated reaches the maximum number of times the average value of the single still water time difference is calculated, the number of still water times is accumulated and the number of times the average value of the single still water time difference is calculated is reset.

[0012] Step S7: When the number of still water cycles reaches the maximum number of still water cycles, the zero drift is updated using the updated historical time difference average value to complete the online update of the ultrasonic meter.

[0013] Specifically, step S3 includes:

[0014] S3.1, Collect the downstream flight time and upstream flight time of the transducer signal transmission of the ultrasonic meter;

[0015] S3.2, Calculate the time difference between upstream and downstream flows: t = Tu - Td, where, t is the time difference between upstream and downstream, Tu is the upstream flight time, and Td is the downstream flight time;

[0016] S3.3, Based on the time difference between upstream and downstream currents, an iterative statistical algorithm is used to update the average value of the time difference, the cumulative value of the variance, and the number of time difference samples;

[0017] S3.4 Determine whether the number of time difference samples is greater than the sample number limit. If not, repeat steps S3.1-S3.3. If yes, proceed to step S4.

[0018] Preferably, the iterative statistical algorithm is the Welford algorithm, and step S3 calculates the average time difference, cumulative variance, and number of time difference samples using the Welford algorithm:

[0019] cal_count' = cal_count + 1;

[0020] cal_diff= t-cal_avg;

[0021] cal_avg'=cal_avg+cal_diff / cal_count';

[0022] cal_var_sum'=cal_var_sum+cal_diff*( t-cal_avg');

[0023] Where cal_count' and cal_count represent the number of time difference samples before and after the update, respectively, and cal_avg' and cal_avg represent the average time difference before and after the update, respectively. t represents the current time difference between upstream and downstream, cal_diff represents the difference between the current time difference between upstream and downstream and the time difference before the update, and cal_var_sum' and cal_var_sum represent the cumulative variance values ​​after the update and before the update, respectively.

[0024] Preferably, the method for determining the sample size limit is as follows:

[0025] Obtain the standard deviation of the current time difference of the ultrasonic meter;

[0026] The sample size limit is determined based on the expected theoretical deviation: cal_limit = (2 × 1.96 × σ ÷ d)²;

[0027] Where cal_limit is the sample size limit, σ is the standard deviation, and d is the expected theoretical deviation.

[0028] Preferably, in step S5, the continuous difference threshold con_limit is: d ≤ con_limit ≤ 2d.

[0029] Based on the above scheme, when the number of still water cycles in step S7 reaches the maximum number of still water cycles, the following conditions must be met: within the maximum number of consecutive still water cycles, the average time difference of each consecutive still water cycle must be calculated within the maximum number of cycles, and the number of time difference samples must be within the sample number limit to meet the still water zero drift calibration conditions: the variance of the time difference is less than the variance threshold, the average time difference is less than the water flow time difference threshold, and the difference of the average time difference for each cycle is less than the continuous difference threshold.

[0030] Based on the above scheme, step S4 specifically includes:

[0031] S4.1 Calculate the variance based on the number of time difference samples and the cumulative variance: Variance = Cumulative variance ÷ (Number of time difference samples) 1);

[0032] S4.2, obtain the preset variance threshold and water flow time difference threshold, and compare the variance with the variance threshold and the average time difference with the water flow time difference threshold respectively;

[0033] S4.3 If the variance is greater than the variance threshold or the average time difference is greater than the water flow time difference threshold, return to step S1; otherwise, proceed to step S5.

[0034] Based on the above scheme, in step S5, when both the number of times the average value of the single still water time difference is calculated and the number of still water times are 0, it is determined to be the first still water average value calculation; if it is not the first time, the absolute difference between the current average value of the time difference and the historical average value of the time difference is calculated. If the absolute difference is less than or equal to the continuous difference threshold, the verification is deemed qualified and zero drift calibration continues.

[0035] On the other hand, the present invention provides an ultrasonic water meter, including a first transducer and a second transducer, which adopts the ultrasonic meter zero-drift online calibration method as described above.

[0036] The present invention also provides a computer-readable storage medium having a computer program that, when executed by a processor, implements the steps of the above-described online calibration method for zero drift of an ultrasonic meter.

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

[0038] This invention calculates the average value of the time difference in multiple rounds of still water and verifies the continuous difference threshold within a single still water state. It can compare and judge the average value difference in each statistical period, effectively eliminate misjudgments caused by factors such as minor leakage and instantaneous disturbance during the still water process, and ensure the validity and stability of single still water detection data.

[0039] This invention uses multiple independent water flow-still water cycles for cyclic detection, and iteratively compares and updates the average time difference between the countercurrent and current flow after multiple water flow cycles. Only after the results of multiple tests meet the verification conditions is the final zero drift calibration value determined. This can effectively eliminate single test errors caused by valves not closing tightly or micro-leaks, and significantly improve the robustness of zero drift calculation and the reliability of calibration results.

[0040] This invention adopts an online calibration method throughout the process, without interrupting the water supply or disassembling the meter. It completes the real-time monitoring and calibration of dynamic zero drift online without affecting the normal measurement of the ultrasonic meter, thus balancing calibration accuracy and ease of use.

[0041] This invention can accurately distinguish between zero drift signals and true low flow signals even under complex operating conditions with slight real water usage or pipeline disturbances, avoiding miscalibration; it effectively resists transient interference such as pressure changes, water hammer, and vibration, preventing zero-point misjudgment and ensuring long-term stability and reliability of metering data; it can automatically track and compensate for long-term slow zero drift caused by factors such as temperature changes, device aging, and changes in pipeline conditions, ensuring continuous and effective calibration capability.

[0042] This invention requires no additional hardware or modification to the existing instrument structure, and can be easily embedded into existing smart water meter systems, making it suitable for large-scale deployment and upgrades. It can significantly improve the low-flow measurement accuracy and long-term stability of ultrasonic water meters in complex environments, providing a reliable technical foundation for accurate metering and smart water management. Attached Figure Description

[0043] Figure 1 is a flowchart of the online zero-drift calibration method of the present invention;

[0044] Figure 2 shows a sample of the time difference between single-stage still water countercurrent and concurrent flow according to the present invention.

[0045] Figure 3 shows the changes in the initial still water and countercurrent / co-current time difference of the present invention;

[0046] Figure 4 shows the changes in the time difference between still water and countercurrent flow after the present invention has been placed for a period of time. Detailed Implementation

[0047] The invention will be further described below with reference to specific embodiments.

[0048] In actual operation, the measurement accuracy of ultrasonic water meters is significantly affected by the "zero drift" phenomenon. Due to complex factors such as sensor performance drift, circuit temperature drift, changes in acoustic window deposits, installation stress, or slight pipe vibration, the measurement system outputs non-zero flow velocity or very low flow rate readings. This inherent background noise signal dynamically changes with time and environmental conditions, and is superimposed on the true signal during low flow velocity measurement periods (such as low-flow water use at night), resulting in cumulative errors. In the long run, this will lead to serious metering deviations, compromising the fairness of billing and the accuracy of water resource management.

[0049] Table 1 Comparison of low-flow indication error and zero drift after long-term placement of prototype Q2

[0050]

[0051] As shown in Table 1, this application tested 10 meters after a period of time and found that the error of the Q2 flow point reading of one meter was 2.33% larger. When the time difference between zero flow and Q2 was compared with the initial data, the zero drift was positively biased by 35ps, and the time difference under Q2 flow was positively biased by 43ps. The zero drift caused a positive bias of 1.9%, which was the main factor of the offset.

[0052] To address the aforementioned problems and improve the measurement accuracy of ultrasonic meters, this invention provides an online zero-drift calibration method for ultrasonic meters, as shown in Figures 1 and 2, comprising the following steps:

[0053] Step S1: Initialize parameters, including the number of times the average value of the time difference in a single still water test is calculated (time difference average calculation count) avg_cnt and the number of still water tests still_cnt, and set the maximum number of times the average value of the time difference in a single still water test is calculated (maximum number of average value calculation count) avg_cnt_max and the maximum number of still water tests still_cnt_max respectively;

[0054] It should be clarified that the names in parentheses in the following text refer to the full names, and both are the same concept. Those skilled in the art should be clear about the specific meaning of each name.

[0055] Step S2: Initialize the statistics required for a single still water test, including the number of samples for the average time difference of a single still water test (time difference sample count) cal_count, the average time difference of a single still water test (time difference average) cal_avg, and the cumulative variance of the time difference of a single still water test (cumulative variance) cal_var_sum;

[0056] Step S3: Collect the flight time of the ultrasonic meter in the downstream and upstream directions, calculate the time difference between upstream and downstream directions, and update the average value, cumulative variance, and number of time difference samples through an iterative statistical algorithm until the number of time difference samples reaches the sample number limit.

[0057] Step S3 specifically includes:

[0058] S3.1, Collect the downstream flight time and upstream flight time of the transducer signal transmission of the ultrasonic meter;

[0059] In this embodiment, the ultrasonic meter includes a first transducer and a second transducer. The second transducer AR receives the signal that excites the first transducer AT and measures the downstream flight time Td. The first transducer AT receives the signal that excites the second transducer AR and measures the upstream flight time Tu.

[0060] S3.2, Calculate the time difference between upstream and downstream flows: t = Tu - Td, where, t is the time difference between upstream and downstream flow;

[0061] S3.3, based on the time difference between upstream and downstream, an iterative statistical algorithm is used to update the average time difference cal_avg, the cumulative variance cal_var_sum, and the number of time difference samples cal_count;

[0062] In a preferred embodiment, the iterative statistical algorithm used is the Welford algorithm. Specifically, step S3 calculates the average time difference, the cumulative variance, and the number of time difference samples using the Welford algorithm.

[0063] cal_count' = cal_count + 1;

[0064] cal_diff= t-cal_avg;

[0065] cal_avg'=cal_avg+cal_diff / cal_count';

[0066] cal_var_sum'=cal_var_sum+cal_diff*( t-cal_avg');

[0067] Where cal_count' and cal_count represent the number of time difference samples before and after the update, respectively, and cal_avg' and cal_avg represent the average time difference before and after the update, respectively. t represents the current time difference between upstream and downstream, cal_diff represents the difference between the current time difference between upstream and downstream and the time difference before the update, and cal_var_sum' and cal_var_sum represent the cumulative variance values ​​after the update and before the update, respectively.

[0068] S3.4 Determine whether the number of time difference samples is greater than the sample number limit. If not, repeat steps S3.1-S3.3. If yes, proceed to step S4.

[0069] This embodiment uses the Welford algorithm to process the countercurrent and downstream time difference data, calculates the average value and cumulative variance of the time difference, meets the real-time requirements of online calibration, reduces system resource consumption, and saves power consumption.

[0070] The sample size limit was determined using the following method:

[0071] First, obtain the standard deviation of the current time difference of the ultrasonic meter; then determine the sample size limit based on the expected theoretical deviation: cal_limit = (2 × 1.96 × σ ÷ d)², where cal_limit is the sample size limit, σ is the standard deviation, and d is the expected theoretical deviation.

[0072] Before reaching the sample size limit, step S3 continuously collects the upstream and downstream time differences of the meters and updates the average time difference and cumulative variance in real time for subsequent judgment and screening of abnormal static water data; after reaching the sample size limit, step S4 continues.

[0073] Step S4: Calculate the variance based on the number of time difference samples and the cumulative variance. If the variance is greater than the variance threshold or the average time difference is greater than the water flow time difference threshold, return to step S1; otherwise, proceed to step S5.

[0074] Step S4 specifically includes:

[0075] S4.1 Calculate the variance cal_var based on the number of time difference samples cal_count and the cumulative variance cal_var_sum: cal_var = cal_var_sum / (cal_count-1);

[0076] S4.2, obtain the preset variance threshold var_limit and the water flow time difference threshold avg_limit, and compare the variance cal_var with the variance threshold var_limit and the average time difference cal_avg with the water flow time difference threshold avg_limit respectively;

[0077] S4.3 If the variance is greater than the variance threshold or the average time difference is greater than the water flow time difference threshold, it indicates that the current static water data fluctuates greatly and is unstable, there is an instantaneous interference anomaly or there is a small flow of water in the pipeline, and zero drift calibration cannot be performed. Return to step S1; otherwise, continue to step S5.

[0078] According to a preferred embodiment, the variance threshold is determined based on the standard deviation of the time difference, var_limit=(k*σ)^2, where k is the algorithm margin factor, and the value can be 1~1.5. The variance threshold is determined by selecting the value of k, and those skilled in the art can select it according to the actual situation.

[0079] This application uses a variance threshold to resist instantaneous interference and compares the average time difference with the water flow time difference threshold to distinguish between still water and low flow rate, thereby achieving data filtering and elimination of non-still water conditions, ensuring that zero drift calibration is performed under effective still water conditions.

[0080] Furthermore, when S4 meets the still water condition, step S5 is executed to determine whether it is the first still water average calculation. If it is the first still water average calculation, the current time difference average is saved as the historical time difference average. If it is not the first time, the difference between the current time difference average and the historical time difference average is checked. If the continuous difference threshold is met, the check is deemed qualified, the historical time difference average is updated, and the number of single still water time difference average calculations is accumulated, and zero drift calibration continues.

[0081] Step S5 specifically includes:

[0082] S5.1 When both the number of times the average value of the single still water time difference is calculated (avg_cnt) and the number of still water times (still_cnt) are 0, it is determined to be the first still water average value calculation. The current average value of the time difference (cal_avg) is saved as the historical average value of the time difference (prev_avg), and avg_cnt is incremented by 1. Steps S2 to S4 are repeated to calculate the average value of the single still water time difference again.

[0083] S5.2 If the number of times the average time difference is calculated or the number of times the still water is used is not 0, it is determined that it is not the first time the average still water is calculated. Calculate the absolute difference between the current average time difference and the historical average time difference. If the absolute difference is less than or equal to the continuous difference threshold con_limit, the verification is qualified. Update the historical average time difference, set avg_cnt+1, and continue zero drift calibration. If it does not meet the requirements, return to step S1 to reinitialize.

[0084] The historical time difference average is updated using the following formula:

[0085] prev_avg' = ((still_cnt*avg_cnt_max+avg_cnt-1)*prev_avg+cal_avg) / (still_cnt*avg_cnt_max+ avg_cnt);

[0086] Wherein, prev_avg' is the updated historical average time difference. This invention uses an iterative formula to update the historical average time difference, incorporating the number of still water events and the number of calculations within a single still water event into the average value calculation, balancing the proportion of the historical average value and the current average value, and obtaining an accurate average time difference. This avoids interference from single abnormal data (micro-leakage / dripping) on ​​the zero drift benchmark, and ensures that the zero drift calibration value is updated with the actual drift state of the meter.

[0087] According to a preferred embodiment, a continuous difference threshold, con_limit, is determined based on the expected theoretical deviation, d, and is set to 1 to 2 times the expected theoretical deviation: d ≤ con_limit ≤ 2d. This embodiment sets the continuous difference threshold to 1 to 2 times the theoretical deviation, which can cover the normal statistical fluctuations of the average static time difference and effectively identify abnormal data exceeding the normal fluctuation range, eliminating interference from minor leaks, and improving the accuracy of zero drift calculation while ensuring calibration robustness.

[0088] Those skilled in the art should understand that the error deviation of the meter reading Q2 is generally expected to be less than 0.5%. Therefore, the time difference between the reverse and forward flow at the Q2 flow rate is about 1800ps, and the expected theoretical deviation d is about 9ps. Furthermore, the continuous difference threshold con_limit can be selected from 9 to 18ps.

[0089] Furthermore, the average time difference is calculated multiple times consecutively by determining whether the maximum number of calculations exceeds the single static water average value, as detailed in step S6.

[0090] Step S6: When the number of times the average value of a single still water time difference is calculated (average value calculation count) reaches the maximum number of times the average value of a single still water time difference is calculated (maximum average value calculation count), the cumulative still water time count still_cnt+1 is incremented, and the average value calculation count avg_cnt=0 is reset; when the average value calculation count avg_cnt is less than the maximum average value calculation count avg_cnt_max, steps S2-S5 are repeated to calculate the average value of the time difference multiple times.

[0091] According to step S6, this application calculates the average time difference between the countercurrent and current flow of still water after multiple water flows, compares the differences, enhances the robustness of zero drift calculation, and eliminates misjudgments caused by minor leaks due to improper valve closure during a single water flow.

[0092] Step S7: Further determine whether the still water count still_cnt reaches the maximum still water count still_cnt_max. If still_cnt < still_cnt_max, wait for the water to flow and then still water again, repeat steps S2 - S7, and calculate the average time difference again. If still_cnt >= still_cnt_max, update the zero drift using the updated historical average time difference in step S5 to complete the online update of the ultrasonic meter.

[0093] When the still water count reaches the maximum still water count in step S7, within the maximum number of consecutive still water counts, within the maximum number of times for calculating the average continuous time difference in each still water, the number of time difference samples does not exceed the sample number limit value, and it meets the still water zero drift calibration conditions: the variance of the time difference is less than the variance threshold, the average time difference is less than the flowing water time difference threshold, and the difference between the average time differences each time is less than the continuous difference threshold.

[0094] Preferably, the maximum number of times for average value calculation is taken as 3 - 8 times, which is used to exclude instantaneous disturbances and minor leaks through multiple rounds of statistical verification in a single still water state; the maximum number of still water times is taken as 2 - 5 times, which is used to verify the zero drift stability in multiple independent flowing water - still water cycles, avoid misjudgment caused by不严阀门关闭不严、微滴漏, and take into account the calibration efficiency while ensuring the calibration accuracy.

[0095] According to the above method steps, the present invention splits a single still water into multiple sample quantity segments, calculates the average value and variance respectively, and resists transient interference through the variance threshold; distinguishes still water and small - flow water flow by comparing the average value with the flowing water time difference threshold; excludes misjudgment caused by minor leaks by comparing the differences in the average values of each sample quantity segment. Calculate the average still water reverse and forward flow time differences after multiple flowing waters, compare the differences, enhance the robustness of zero drift calculation, and exclude misjudgment caused by不严阀门关闭不严、微滴漏 in a single flowing water when closing the valve.

[0096] As shown in Figures 3 and 4, the present invention detects the still water and the reverse and forward flow time differences of the same ultrasonic meter in its initial stage and after being used for a period of time. This ultrasonic meter uses the above - mentioned online zero drift calibration method for ultrasonic meters, and the result comparison shown in Table 2 is obtained. Among them, (a) the deviation of the expected Q2 indication error is less than 0.5%. According to the Q2 time difference of about 1800 ps, the expected theoretical deviation d is approximately equal to 1800 * 0.5% = 9 ps, and the continuous difference threshold con_limit can be taken as 1.5 * d = 13.5 ps; (b) the standard deviation of the still water time difference σ = 30 ps, and the variance threshold var_limit can be taken as (1.1667 * 30)^2 = 1225; (c) the sample number cal_limit can be taken as (2×1.96×σ÷d)² = 171, the maximum number of times for average value calculation avg_cnt_max is taken as 3 times, and the maximum number of still water times still_cnt_max is taken as 2 times.

[0097] Table 2 Comparison of statistical values ​​of countercurrent and downstream time differences in still water calculated using the method of this invention

[0098]

[0099] As can be seen from the data in the table, the zero-drift online calibration method described in this invention can accurately identify and correct the zero-drift offset of ultrasonic meters without interrupting water supply or disassembling the meters. It effectively filters out interference factors such as minor leaks, instantaneous disturbances, and valves not closing tightly, significantly improving the stability and reliability of the meters during long-term operation. In particular, it improves the measurement accuracy in the small flow range, making the indication error smaller and more stable, thus meeting the long-term high-precision measurement requirements.

[0100] Based on the same technical concept, the present invention provides an ultrasonic water meter, including a first transducer, a second transducer, and a control unit, wherein the control unit performs the ultrasonic meter zero-drift online calibration method as described above.

[0101] Specifically, the transducer is used to alternately transmit and receive ultrasonic signals to detect downstream flight time and upstream flight time;

[0102] When the control unit is running, it executes the online zero-drift calibration method for ultrasonic meters as described above, specifically for:

[0103] Initialize calibration parameters and statistics;

[0104] Collect downstream and upstream flight times and calculate the time difference between upstream and downstream. Use the Welford iterative statistical algorithm to update the average time difference, cumulative variance, and number of time difference samples.

[0105] Complete the validity assessment of variance threshold and water flow time difference threshold;

[0106] Continuous difference verification is performed on multiple static water average values, and the historical time difference average value is updated through a weighted iterative method.

[0107] After completing multiple water flow-still water cycle verifications, the final historical time difference average is written into the storage unit as the zero drift calibration value, realizing online zero drift update.

[0108] Furthermore, the ultrasonic meter zero-drift online calibration method according to the present invention can be recorded in a computer-readable recording medium. Specifically, according to the present invention, a computer-readable recording medium storing computer-executable instructions can be provided, which, when executed by a processor, causes the processor to perform the ultrasonic meter zero-drift online calibration method as described above.

[0109] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code containing at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0110] In general, various exemplary embodiments of the present invention can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of the present invention are illustrated or described as block diagrams, flowcharts, or represented using certain other images, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or certain combinations thereof.

[0111] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0112] While the specific embodiments of the present invention have been described above, they are not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. An online calibration method for zero drift of an ultrasonic meter, characterized in that, Includes the following steps: Step S1: Initialize parameters, including the number of times the average value of the single still water time difference is calculated and the number of still water cycles, and set the maximum number of times the average value of the single still water time difference is calculated and the maximum number of still water cycles respectively; Step S2: Initialize the statistics required for a single still water test, including the number of time difference samples, the average time difference, and the cumulative variance. Step S3: Collect the downstream and upstream flight times of the meter, calculate the upstream and downstream time differences, and update the average time difference, cumulative variance, and number of time difference samples using an iterative statistical algorithm until the number of time difference samples reaches the sample size limit. Step S4: Calculate the variance based on the average time difference and cumulative variance. If the variance is greater than the variance threshold or the average time difference is greater than the water flow time difference threshold, return to step S1; otherwise, proceed to step S5. Step S5: If this is the first still water average calculation, set the current time... The average difference is saved as the historical time difference average. If it is not the first time the static water average is calculated, the current time difference average is checked against the historical time difference average. If the continuous difference threshold is met, the historical time difference average is updated and the number of times the single static water time difference average is calculated is accumulated. Step S6: When the number of times the single static water time difference average is calculated reaches the maximum number of times the single static water time difference average is calculated, the number of static water times is accumulated and the number of times the single static water time difference average is calculated is reset. Step S7: When the number of static water times reaches the maximum number of static water times, the zero drift is updated using the updated historical time difference average, and the online update of the ultrasonic meter is completed.

2. The online calibration method for zero drift of ultrasonic meters according to claim 1, characterized in that, Step S3 specifically includes: S3.1, acquiring the downstream and upstream flight times of the transducer signal transmission of the ultrasonic meter; S3.2, calculating the downstream and upstream time difference: t = Tu - Td, where, t is the time difference between upstream and downstream, Tu is the upstream flight time, and Td is the downstream flight time; S3.3, based on the time difference between upstream and downstream, the average value of the time difference, the cumulative variance value, and the number of time difference samples are updated using an iterative statistical algorithm; S3.4, determine whether the number of time difference samples is greater than the sample number limit value. If not, repeat steps S3.1-S3.

3. If yes, execute step S4.

3. The online calibration method for zero drift of ultrasonic meters according to claim 2, characterized in that, The iterative statistical algorithm is the Welford algorithm. Step S3 calculates the average time difference, cumulative variance, and number of time difference samples using the Welford algorithm: cal_count' = cal_count + 1; cal_diff = t-cal_avg;cal_avg'=cal_avg+cal_diff / cal_count';cal_var_sum'=cal_var_sum+cal_diff*( t-cal_avg'); where cal_count' and cal_count are the number of time difference samples before and after the update, respectively, and cal_avg' and cal_avg are the average time difference before and after the update, respectively. t represents the current time difference between upstream and downstream, cal_diff represents the difference between the current time difference between upstream and downstream and the time difference before the update, and cal_var_sum' and cal_var_sum represent the cumulative variance values ​​after the update and before the update, respectively.

4. The online calibration method for zero drift of ultrasonic meters according to claim 1, characterized in that, The method for determining the sample size limit is as follows: obtain the standard deviation of the current time difference of the ultrasonic meter; determine the sample size limit based on the expected theoretical deviation: cal_limit = (2 × 1.96 × σ ÷ d)²; where cal_limit is the sample size limit, σ is the standard deviation, and d is the expected theoretical deviation.

5. The online calibration method for zero drift of ultrasonic meters according to claim 4, characterized in that, In step S5, the continuous difference threshold con_limit is: d ≤ con_limit ≤ 2d.

6. The online calibration method for zero drift of ultrasonic meters according to claim 1, characterized in that, In step S7, when the number of still water cycles reaches the maximum number of still water cycles, the following conditions must be met: within the maximum number of consecutive still water cycles, the average time difference of each single still water cycle must be calculated within the maximum number of cycles, and the number of time difference samples must be within the sample number limit to meet the still water zero drift calibration conditions: the variance of the time difference is less than the variance threshold, the average time difference is less than the water flow time difference threshold, and the difference of the average time difference for each cycle is less than the continuous difference threshold.

7. The online zero-drift calibration method for ultrasonic meters according to claim 1, characterized in that, Step S4 specifically includes: S4.1, calculating the variance based on the number of time difference samples and the cumulative variance: Variance = Cumulative variance ÷ (Number of time difference samples) 1) S4.2, obtain the preset variance threshold and water flow time difference threshold, and compare the variance with the variance threshold and the average time difference with the water flow time difference threshold respectively; S4.3, if the variance is greater than the variance threshold or the average time difference is greater than the water flow time difference threshold, return to step S1, otherwise execute step S5.

8. The online calibration method for zero drift of ultrasonic meters according to claim 1, characterized in that, In step S5, when both the number of times the average value of the single still water time difference is calculated and the number of still water times are 0, it is determined to be the first still water average value calculation; for non-first still water average value calculations, the absolute difference between the current average value of the time difference and the historical average value of the time difference is calculated. If the absolute difference is less than or equal to the continuous difference threshold, the verification is deemed qualified and zero drift calibration continues.

9. An ultrasonic water meter, characterized in that, It includes a first transducer and a second transducer, and employs the online zero-drift calibration method for ultrasonic meters as described in claim 1.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium has a computer program that, when executed by a processor, implements the steps of the online zero-drift calibration method for ultrasonic meters as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Flow velocity measurement method based on ultrasonic still water propagation distance and system inherent time difference

    CN112964898A

  • Low-power-consumption control method of GPS module

    CN120993444A