A first wave detection method of an ultrasonic water meter

By initializing the SPI serial port and the bias voltage register of the first wave comparator, and adjusting the first wave level using the continuous range of the maximum bias voltage value, the problem of inaccurate identification of the first wave signal of the ultrasonic water meter is solved, ensuring the accuracy and stability of the measurement.

CN118960881BActive Publication Date: 2026-08-25HUNAN WEIMING ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411207555.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-08-25
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Existing ultrasonic water meters have inaccuracies in identifying the first wave signal, leading to errors in flow rate calculation and inaccurate measurement. This is especially noticeable when the probe is aging or the signal reflector is affected by scale, making it impossible to quickly and accurately identify the first wave signal.

Method used

By initializing the SPI serial port and the bias voltage register of the first wave comparator, reading the value of the pulse width ratio register, determining whether the pulse width ratio is within the normal range, recording the bias voltage value, and using the duration range of the maximum bias voltage value as the optimal first wave adjustment range, the first wave level is adaptively adjusted to ensure accurate identification of the first wave.

Benefits of technology

Even when the probe is aging or the signal reflector is affected by scale, it can still quickly and accurately identify the first wave of the ultrasonic water meter, avoiding measurement errors and improving measurement accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118960881B_ABST
    Figure CN118960881B_ABST
Patent Text Reader

Abstract

The application discloses a first wave detection method of an ultrasonic water meter, and comprises the following steps: starting a self-checking mode, initializing an SPI serial port and a bias voltage register of a first wave comparator; reading a value of a pulse width ratio register, judging whether the pulse width ratio at each moment is in a normal range; if yes, recording a bias voltage value of the first wave comparator at the moment when the pulse width ratio is normal; if no, recording a continuous interval of the bias voltage value of the first wave comparator at the moment when the pulse width ratio is normal; judging whether the bias voltage of the first wave comparator is greater than a maximum value of a first wave level; if yes, completing full-range scanning of the bias voltage of the first wave comparator, taking the continuous interval of the maximum bias voltage value of the first wave comparator at the moment when the pulse width ratio is normal as an optimal first wave adjustment interval, and determining an optimal first wave level according to the optimal first wave adjustment interval. The application solves the technical problem of how to accurately and quickly identify the first wave of the ultrasonic water meter and output the result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ultrasonic water meter technology, and in particular to a method for first-wave detection of ultrasonic water meters. Background Technology

[0002] Ultrasonic water meters are based on the principle of ultrasonic time difference. They detect the time difference caused by the change in the speed of the ultrasonic beam as it propagates in the water upstream and downstream, analyze and process this data to determine the water flow rate, and then calculate the water flow rate. To ensure the accuracy and stability of ultrasonic water meters, first-wave signal identification is a crucial prerequisite. First-wave signal identification allows for the determination of the received waveform and precise definition of its location. Once the first wave is identified, time signal acquisition is performed accordingly. Failure to correctly identify the first wave will lead to incorrect judgment of the fluid flow direction, resulting in incorrect flow velocity calculations and inaccurate water meter readings. For ultrasonic water meters that omit temperature sensors to reduce costs, incorrect first-wave identification will lead to errors in calculating real-time water temperature using time-of-flight, resulting in incorrect sound velocity lookup and inaccurate measurement. The time-of-flight of an ultrasonic water meter refers to the time difference caused by the change in speed of the ultrasonic beam as it propagates upstream and downstream in water. Furthermore, aging of the ultrasonic probe and scale buildup on the signal reflector can weaken the received echo signal, leading to inaccurate time signal acquisition and measurement errors. The echo amplitude of an ultrasonic water meter changes with temperature and flow rate, causing the previously set first-wave level to become inapplicable to the current state, resulting in periodic jumps and inaccurate time signal acquisition, leading to measurement errors.

[0003] Application number CN201910799715.0 discloses an ultrasonic water meter, including an inlet section, an outlet section, and a measuring section. One end of the measuring section is equipped with an ultrasonic generator, and the other end with an ultrasonic receiver. The ultrasonic generator generates and emits ultrasonic waves and records the emission time, while the ultrasonic receiver receives the ultrasonic waves and records the reception time. Due to the difficulty in identifying the first wave signal using GP21 and GP22, under normal circumstances, the propagation time downstream is shorter than the upstream propagation time. If the amplitude of the first wave signal is too low during downstream measurement, it may lead to the detection of the second wave instead of the first wave. The downstream propagation time is longer than the upstream propagation time, resulting in incorrect identification as reverse flow. This situation requires external flow direction detection for approximately 10 seconds. Based on GP30, the first wave is identified by analyzing the echo signal amplitude and pulse width ratio. Extensive full-flow experiments were conducted on prototypes before shipment to obtain the optimal first wave that satisfies these varying conditions from a large amount of experimental data. Therefore, there is an urgent need to propose a first wave detection method for ultrasonic water meters to solve the technical problem of how to accurately and quickly identify the first wave of an ultrasonic water meter and output the results. Summary of the Invention

[0004] The main objective of this invention is to propose a method for detecting the first wave of an ultrasonic water meter, aiming to solve the technical problem of how to accurately and quickly identify the first wave of an ultrasonic water meter and output the results.

[0005] To achieve the above objectives, the present invention provides a method for the initial detection of an ultrasonic water meter, wherein the method includes the following steps:

[0006] S1. Enable self-test mode and initialize the bias voltage register of SPI serial port and first wave comparator;

[0007] S2. Read the value of the pulse width ratio register and determine whether the pulse width ratio at each moment is within the normal range;

[0008] If so, record the bias voltage value of the comparator for the first wave at the normal pulse width ratio.

[0009] If not, record the duration of the bias voltage value of the comparator in the first wave at the normal pulse width ratio.

[0010] S3. Determine whether the bias voltage of the first comparator is greater than the maximum value of the first wave level;

[0011] If so, complete the full range scan of the first wave comparator bias voltage, and take the duration of the maximum bias voltage value of the first wave comparator when the pulse width ratio is normal as the optimal first wave adjustment range, and determine the optimal first wave level based on the optimal first wave adjustment range.

[0012] If not, return to step S2.

[0013] In one preferred embodiment, the initialization of the bias voltage register of the first wave comparator in step S1 is specifically as follows:

[0014] Set the minimum and maximum values ​​of the first wave level, the initial value of the pulse width ratio, and the echo number, and increment the loop register every first time interval.

[0015] In one preferred embodiment, the minimum value of the first wave level is 1mV.

[0016] In one preferred embodiment, the maximum value of the first wave level is 126mV.

[0017] In one preferred embodiment, the initial value of the pulse width ratio is 1.0.

[0018] In one preferred embodiment, after reading the value of the pulse width ratio register in step S2, the method further includes:

[0019] If the pulse width ratio at the current moment is greater than the pulse width ratio at the previous moment, then the echo sequence number is incremented by 1.

[0020] In one preferred embodiment, prior to step S3, the method further includes:

[0021] The bias voltage register is set to a step size of 2mV for the first wave level by cyclically incrementing at the first time interval.

[0022] In one preferred embodiment, if the bias voltage of the first wave comparator is greater than the maximum value of the first wave level in step S3, then the full range scan of the bias voltage of the first wave comparator is completed, and the continuous range of the maximum bias voltage of the first wave comparator when the pulse width ratio is normal is taken as the optimal first wave adjustment range, and the echo sequence number is saved; the median value of the optimal first wave adjustment range is taken as the optimal first wave level.

[0023] One preferred embodiment is that the first time interval is 200ms.

[0024] In the above technical solution of the present invention, the first wave detection method of the ultrasonic water meter includes the following steps: Enabling self-test mode, initializing the SPI serial port and the bias voltage register of the first wave comparator; reading the value of the pulse width ratio register, and determining whether the pulse width ratio at each moment is within the normal range; if yes, recording the bias voltage value of the first wave comparator when the pulse width ratio is normal; if no, recording the duration range of the bias voltage value of the first wave comparator when the pulse width ratio is normal; determining whether the bias voltage of the first wave comparator is greater than the maximum value of the first wave level; if yes, completing the full range scan of the bias voltage of the first wave comparator, using the duration range of the maximum bias voltage value of the first wave comparator when the pulse width ratio is normal as the optimal first wave adjustment range, and determining the optimal first wave level based on the optimal first wave adjustment range; if no, returning to the above steps. The present invention solves the technical problem of how to accurately and quickly identify the first wave of an ultrasonic water meter and output the result.

[0025] In this invention, the optimal first wave adjustment range is defined as the duration of the maximum bias voltage value of the first wave comparator when the pulse width ratio is normal, and the midpoint of the optimal first wave adjustment range is taken as the optimal first wave level. This effectively overcomes the problem of wave skipping. Especially when the ultrasonic probe ages or the signal reflector is affected by scale, the first wave level can be adaptively adjusted. In particular, by using the duration of the maximum bias voltage value as the optimal first wave adjustment range, the effective redundancy range of the detector is large, and wave skipping is not easy. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0027] Figure 1This is a first schematic diagram of a first-wave detection method for an ultrasonic water meter according to an embodiment of the present invention;

[0028] Figure 2 This is a first schematic diagram of a first-wave detection method for an ultrasonic water meter according to an embodiment of the present invention.

[0029] The realization of the objective, functional characteristics and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0030] 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 a part of the embodiments of the present invention, and not all of them. 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.

[0031] It should be noted that all directional indicators (such as up, down, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.

[0032] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0033] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0034] See Figures 1-2 According to one aspect of the present invention, the present invention provides a method for initial detection of an ultrasonic water meter, wherein the method for initial detection of an ultrasonic water meter includes the following steps:

[0035] S1. Enable self-test mode and initialize the bias voltage register of SPI serial port and first wave comparator;

[0036] S2. Read the value of the pulse width ratio register and determine whether the pulse width ratio at each moment is within the normal range;

[0037] If so, record the bias voltage value of the comparator for the first wave at the normal pulse width ratio.

[0038] If not, record the duration of the bias voltage value of the comparator in the first wave at the normal pulse width ratio.

[0039] S3. Determine whether the bias voltage of the first comparator is greater than the maximum value of the first wave level;

[0040] If so, complete the full range scan of the first wave comparator bias voltage, and take the duration of the maximum bias voltage value of the first wave comparator when the pulse width ratio is normal as the optimal first wave adjustment range, and determine the optimal first wave level based on the optimal first wave adjustment range.

[0041] If not, return to step S2.

[0042] Specifically, in this embodiment, before step S1, the method further includes: calibrating the meter and activating the self-test mode under static water full pipe conditions.

[0043] Specifically, in this embodiment, the self-test mode is enabled, and the SPI serial port, the interrupt configuration of the time-of-flight measurement completion I / O port, and the bias voltage register of the first wave comparator are initialized. Specifically, the initialization of the bias voltage register of the first wave comparator involves setting the minimum and maximum values ​​of the first wave level, the initial value of the pulse width ratio, and the echo sequence number, and incrementing the register in a loop every first time interval.

[0044] Specifically, in this embodiment, the minimum value of the first wave level is 1mV.

[0045] Specifically, in this embodiment, the maximum value of the first wave level is 126mV.

[0046] Specifically, in this embodiment, the initial value of the pulse width ratio is 1.0.

[0047] Specifically, in this embodiment, the first time interval is 200ms.

[0048] Specifically, in this embodiment, after reading the value of the pulse width ratio register in step S2, the method further includes: if the pulse width ratio at the current moment is greater than the pulse width ratio at the previous moment, then the echo sequence number is incremented by 1 and recorded and saved for subsequent adaptive adjustment of the first wave level.

[0049] Specifically, in this embodiment, before step S3, a bias voltage register with a first wave level step size of 2mV is cyclically incremented at a first time interval.

[0050] Specifically, in this embodiment, if the bias voltage of the first wave comparator is greater than the maximum value of the first wave level in step S3, then the full range scan of the bias voltage of the first wave comparator is completed, and the continuous range of the maximum bias voltage of the first wave comparator when the pulse width ratio is normal is taken as the optimal first wave adjustment range, and the echo sequence number is saved; the median value of the optimal first wave adjustment range is taken as the optimal first wave level; the optimal first wave adjustment range is accurately determined by the number of pulse width ratio flips.

[0051] Specifically, in this embodiment, the optimal first wave adjustment range is taken as the duration of the maximum bias voltage value of the first wave comparator when the pulse width ratio is normal, and the midpoint of the optimal first wave adjustment range is taken as the optimal first wave level. This effectively overcomes the problem of wave skipping. Especially when the ultrasonic probe ages and the signal reflector is affected by scale, the first wave level can be adaptively adjusted. In this embodiment, the optimal first wave adjustment range is taken as the duration of the maximum bias voltage value, and the effective redundancy range of the detector is large, making it less prone to wave skipping.

[0052] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. All equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for initial wave detection of an ultrasonic water meter, characterized in that, Includes the following steps: S1. Enable self-test mode, initialize SPI serial port, time-of-flight measurement completion IO port interrupt configuration and the bias voltage register of the first wave comparator; the initialization of the bias voltage register of the first wave comparator specifically involves: setting the minimum and maximum values ​​of the first wave level, the initial value of the pulse width ratio and the echo sequence number, and incrementing the register cyclically every first time interval; S2. Read the value of the pulse width ratio register and determine whether the pulse width ratio at each moment is within the normal range; If so, record the bias voltage value of the comparator for the first wave at the normal pulse width ratio. If not, record the duration of the bias voltage value of the comparator in the first wave at the normal pulse width ratio. S3. The bias voltage register with a step size of 2mV for the first wave level is set cyclically at the first time interval, and it is determined whether the bias voltage of the first wave comparator is greater than the maximum value of the first wave level. If so, the first wave comparator bias voltage full range scan is completed. The continuous range of the maximum bias voltage value of the first wave comparator when the pulse width ratio is normal is taken as the optimal first wave adjustment range. The optimal first wave level is determined according to the optimal first wave adjustment range. Specifically, the median value of the optimal first wave adjustment range is taken as the optimal first wave level. The optimal first wave adjustment range is accurately determined by the number of pulse width ratio flips. If not, return to step S2.

2. The method for initial wave detection of an ultrasonic water meter according to claim 1, characterized in that, The minimum value of the first wave level is 1mV.

3. The method for initial wave detection of an ultrasonic water meter according to claim 1, characterized in that, The maximum value of the first wave level is 126mV.

4. The method for first-wave detection of an ultrasonic water meter according to claim 1, characterized in that, The initial value of the pulse width ratio is 1.

0.

5. The method for first-wave detection of an ultrasonic water meter according to claim 1, characterized in that, After step S2 reads the value of the pulse width ratio register, the method further includes: If the pulse width ratio at the current moment is greater than the pulse width ratio at the previous moment, then the echo sequence number is incremented by 1.

6. The method for initial wave detection of an ultrasonic water meter according to any one of claims 1-5, characterized in that, The first time interval is 200ms.

Citation Information

Patent Citations

  • An ultrasonic water meter

    CN110455360B

  • Head wave detection threshold setting method for ultrasonic flow metering device

    CN115993158A