Ultrasonic water metering method based on signal characteristics

Through signal feature processing and dynamic compensation models, the ultrasonic water meter measurement method maintains high accuracy and stability in noisy environments, adapts to different working conditions, solves the problems of measurement instability and computational complexity in existing technologies, and realizes efficient and economical flow measurement.

CN122237699APending Publication Date: 2026-06-19QINGDAO DINGJUN ELECTRIC CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO DINGJUN ELECTRIC CO LTD
Filing Date
2025-07-15
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing ultrasonic water meter measurement methods are unstable under environmental noise interference and have high computational complexity, making it difficult to maintain high accuracy and real-time response under different operating conditions.

Method used

Discrete wavelet preprocessing is used to remove high-frequency interference from the signal. Combined with adaptive gain control and temperature and flow compensation, the signal amplitude and threshold are dynamically adjusted. Sliding window detection and three-point parabolic interpolation are used to accurately locate the peak value. The compensation coefficient is optimized online by gradient descent method to adapt to different pipeline conditions.

Benefits of technology

It improves the robustness and measurement accuracy of ultrasonic water meters under complex flow conditions, reduces computational complexity, simplifies system design, and lowers costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122237699A_ABST
    Figure CN122237699A_ABST
Patent Text Reader

Abstract

This invention discloses an ultrasonic water meter measurement method based on signal characteristics, comprising: signal preprocessing, dynamic threshold generation, peak detection, and parameter feedback adjustment. In this scheme, discrete wavelet preprocessing effectively removes high-frequency interference; adaptive gain control enables the system to maintain high accuracy and stability even in noisy environments; by introducing temperature and flow compensation, the threshold sensitivity can be dynamically adjusted when the flow rate changes rapidly, significantly improving the robustness of the algorithm under complex flow conditions; a sliding window coarse detection method is used to quickly locate candidate peaks, and three-point parabolic interpolation is used for precise positioning, improving the accuracy of time-of-flight calculation; the gradient descent method is used to minimize the peak positioning error, adapting to different operating conditions; and online learning continuously optimizes the compensation parameters, further improving measurement stability; the cumbersome calculation of full waveform matching is avoided, simplifying system design and reducing overall cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of ultrasonic water meter measurement, and in particular to an ultrasonic water meter measurement method based on signal characteristics. Background Technology

[0002] In the field of liquid ultrasonic flow meter measurement technology, accurately determining the flight time of ultrasonic waves is the core issue for achieving high-precision flow measurement. Existing methods include the threshold method, which is simple to implement, computationally inexpensive, and allows for real-time measurement, but is susceptible to environmental noise interference, leading to unstable and inaccurate results; the correlation method, which determines the flight time based on the similarity between the reference signal and the received signal, provides high measurement accuracy, but its performance is highly dependent on the sampling rate and it is difficult to dynamically update the reference signal under different operating conditions, resulting in insufficient adaptability; the fitting method uses mathematical models and optimization algorithms to estimate the optimal flight time, offering high measurement accuracy and good anti-interference capabilities, but its high computational complexity and large hardware resource consumption affect the system's real-time response speed. Therefore, how to improve anti-interference capabilities while ensuring measurement accuracy and maintaining computational efficiency is a key problem that urgently needs to be solved in current ultrasonic water meter measurement technology. Summary of the Invention

[0003] In view of this, the present invention provides an ultrasonic water meter measurement method based on signal features. It can effectively remove high-frequency interference through discrete wavelet preprocessing of the signal; employs adaptive gain control to dynamically adjust the signal amplitude according to environmental conditions, enabling the system to maintain high accuracy and stability even in noisy environments; by introducing temperature and flow compensation, it corrects the threshold in real time, eliminating ultrasonic signal amplitude drift caused by environmental temperature fluctuations, accurately locating features, and dynamically adjusting threshold sensitivity when the flow rate changes rapidly, significantly improving the robustness of the algorithm under complex flow conditions and accurately calculating the time of flight; it uses a sliding window coarse detection to quickly locate candidate peaks and a three-point parabolic interpolation for precise location, improving the accuracy of time of flight calculation; simultaneously, it uses gradient descent to learn compensation coefficients online, adapting to different pipeline conditions, minimizing peak location error using gradient descent, and continuously optimizing compensation parameters through online learning, further improving measurement stability; it reduces dependence on hardware resources, avoids the tedious calculation of full waveform matching, reduces computational complexity, simplifies system design, and lowers overall costs; combined with a dynamic compensation model, it can optimize the time of flight calculation under temperature and flow changes, reducing system errors.

[0004] To achieve the above objectives, the present invention provides the following technical solution: An ultrasonic water meter measurement method based on signal characteristics includes the following steps: S100, Signal Preprocessing: The ultrasonic received signal is preprocessed, and noise reduction is performed through discrete wavelet transform to separate high-frequency noise from low-frequency effective components in the signal, remove high-frequency interference, and dynamically adjust the signal amplitude through adaptive gain control to maintain signal stability. S200, Dynamic Threshold Generation: Tracks the signal baseline and generates adaptive thresholds based on temperature, flow rate and their rate of change to monitor and adapt to long-term amplitude changes; S300, Peak Detection: The flying time is calculated by using a sliding window coarse detection and parabolic interpolation fine-tuning. S400, Parameter Feedback Adjustment: Based on the gradient descent method, the peak positioning error is minimized, the compensation coefficient is optimized through online learning, and the adjustment strategy is adaptively changed according to the dynamic environment.

[0005] Preferably, the noise reduction through discrete wavelet transform, separating high-frequency noise from low-frequency effective components in the signal and removing high-frequency interference, includes performing a 3-level db4 wavelet decomposition on the original received signal x(t) to obtain the approximation coefficients a. j and detail coefficient d j For each level of detail coefficients, the threshold is estimated using the Stein unbiased risk method: , Where N is the signal length, This is an estimate of the noise standard deviation.

[0006] Preferably, the adaptive gain control dynamically adjusts the signal amplitude to maintain signal stability, including adjusting the approximation coefficient a. j Perform thresholding, and then apply the thresholded coefficient a. j Perform inverse wavelet transform to obtain the denoised signal. Adaptive gain control is applied to the signal to dynamically adjust the signal amplitude to the target range, avoiding amplitude fluctuations from interfering with threshold determination. , in, For the target amplitude, V min To prevent division by zero protection, the output signal is: .

[0007] Preferably, the tracking signal baseline includes a baseline threshold calculated using an exponentially weighted moving average: , in, Forgetting factor, which controls the weight of historical data. This represents the actual peak voltage detected in the previous cycle.

[0008] Preferably, the step of generating an adaptive threshold based on temperature, flow rate, and their rate of change, and monitoring and adapting to long-term amplitude changes, includes threshold correction by combining temperature T(t), flow rate Q(t), and their rate of change dQ / dt: , in, This is the temperature compensation coefficient. This is the flow compensation coefficient. For transient compensation coefficients, and These represent the changes in temperature and flow rate, respectively. This is the transient response correction.

[0009] Preferably, the sliding window coarse detection includes searching for local maxima within the signal time domain window to lock candidate peak values: , Among them, window width f s f is the sampling frequency. o This refers to the ultrasonic frequency.

[0010] Preferably, the parabolic interpolation refinement includes three-point parabolic interpolation: Let the candidate peak point be t. i The two points to its left and right are t respectively. i-1 t i+1 The corresponding peak values ​​are y i-1 y i y i+1 Then the peak offset is: , in , where is the sampling interval, and the final peak value is .

[0011] Preferably, the step of minimizing the peak positioning error based on the gradient descent method and optimizing the compensation coefficient through online learning to achieve adaptability in dynamic environments includes setting a threshold. and When the rate of change of flow And the rate of temperature change When the system is in a stable state, record the peak detection results for M consecutive cycles. Take the median t of the detection results during the steady-state phase. v As a virtual truth value: , Define the loss function as the variance during the steady-state phase: , , Update rules: , in, The learning rate is set to a step size of 0.001.

[0012] As can be seen from the above technical solutions, the ultrasonic water meter measurement method based on signal features provided by this invention can effectively remove high-frequency interference by preprocessing the signal with discrete wavelets; it adopts adaptive gain control, which can dynamically adjust the signal amplitude according to environmental conditions, enabling the system to maintain high accuracy and stability even in noisy environments; by introducing temperature and flow compensation, the threshold is corrected in real time, eliminating the ultrasonic signal amplitude drift caused by environmental temperature fluctuations, accurately locating features, and dynamically adjusting the threshold sensitivity when the flow rate changes rapidly, which greatly improves the robustness of the algorithm under complex flow conditions and accurately calculates the flight time; it adopts sliding window coarse detection to quickly locate candidate peaks and three-point parabolic interpolation to accurately locate them, improving the accuracy of flight time calculation; at the same time, it can adapt to different pipeline conditions by learning the compensation coefficient online through gradient descent, minimizing the peak location error by using the gradient descent method, and continuously optimizing the compensation parameters through online learning, further improving measurement stability; it reduces the dependence on hardware resources, avoids the tedious calculation of full waveform matching, reduces computational complexity, simplifies system design, and reduces overall cost; combined with a dynamic compensation model, it can optimize the flight time calculation under temperature and flow changes, reducing system errors. Attached Figure Description

[0013] 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 these drawings without creative effort.

[0014] Figure 1 This is a flowchart illustrating an ultrasonic water meter metering method based on signal characteristics, according to an exemplary embodiment. Detailed Implementation

[0015] This invention discloses an ultrasonic water meter measurement method based on signal features. It effectively removes high-frequency interference through discrete wavelet preprocessing. Adaptive gain control dynamically adjusts the signal amplitude according to environmental conditions, ensuring high accuracy and stability even in noisy environments. Temperature and flow compensation are introduced to correct thresholds in real time, eliminating ultrasonic signal amplitude drift caused by environmental temperature fluctuations and accurately locating features. The method dynamically adjusts threshold sensitivity when flow changes rapidly, significantly improving the robustness of the algorithm under complex flow conditions and accurately calculating flight time. A sliding window coarse detection method is used to quickly locate candidate peaks, while three-point parabolic interpolation is used for precise location, improving the accuracy of flight time calculation. Gradient descent is used to learn compensation coefficients online, adapting to different pipeline conditions. Gradient descent minimizes peak location errors, and online learning continuously optimizes compensation parameters, further improving measurement stability. This method reduces reliance on hardware resources, avoids tedious full waveform matching calculations, lowers computational complexity, simplifies system design, and reduces overall cost. Combined with a dynamic compensation model, it optimizes flight time calculations under temperature and flow changes, reducing system errors.

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

[0017] This disclosure provides an exemplary embodiment of an ultrasonic water meter metering method based on signal characteristics, such as... Figure 1 As shown, Figure 1 This is a flowchart illustrating an ultrasonic water meter metering method based on signal characteristics, according to an exemplary embodiment. The following is in conjunction with... Figure 1 To explain.

[0018] The specific embodiments described below are intended to help those skilled in the art understand this embodiment, but this embodiment is not limited to the specific embodiments described below.

[0019] Reference Figure 1 This disclosure provides an exemplary embodiment of an ultrasonic water meter metering method based on signal characteristics, which includes: Step S100: Signal preprocessing: The ultrasonic received signal is preprocessed by using discrete wavelet transform to reduce noise, separating high-frequency noise from low-frequency effective components in the signal, removing high-frequency interference, and dynamically adjusting the signal amplitude through adaptive gain control to maintain signal stability. Step S200, Dynamic Threshold Generation: Track the signal baseline, generate an adaptive threshold based on temperature, flow rate and their rate of change, and monitor and adapt to long-term amplitude changes; Step S300, Peak Detection: Coarse detection using a sliding window and fine refinement using parabolic interpolation are employed to calculate the flight time; Step S400, Parameter Feedback Adjustment: Minimize the peak positioning error based on the gradient descent method, optimize the compensation coefficient through online learning, and adaptively change the adjustment strategy according to the dynamic environment.

[0020] For example, refer to Figure 1 In step S100, the signal preprocessing specifically includes: performing a 3-level db4 wavelet decomposition on the original received signal x(t) to obtain the approximation coefficients a. j and detail coefficient d j For each level of detail coefficients, the threshold is estimated using the Stein unbiased risk method: , Where N is the signal length, This is an estimate of the noise standard deviation.

[0021] The approximation coefficient 'a' after thresholding j Perform inverse wavelet transform to obtain the denoised signal. Adaptive gain control is applied to the signal to dynamically adjust the signal amplitude to the target range, avoiding amplitude fluctuations from interfering with threshold determination. The formula is: , in, For the target amplitude, V min To prevent zero-removal protection, the output signal is as follows: .

[0022] In step S200, the dynamic threshold generation specifically includes: Step S210, Baseline Threshold Update: The baseline threshold is calculated using the Exponentially Weighted Moving Average (EWMA) formula, as follows: , in, Forgetting factor, which controls the weight of historical data. This represents the actual peak voltage detected in the previous cycle. By weighting historical data and assigning higher weight to recent data, the system can quickly respond to slow changes in the signal baseline and avoid misjudging empty / full tube states by tracking the signal baseline.

[0023] Step S220, Dynamic compensation calculation: Threshold correction is performed by combining temperature T(t), flow rate Q(t), and its rate of change dQ / dt: , in, This is the temperature compensation coefficient. This is the flow compensation coefficient. For transient compensation coefficients, and These represent the changes in temperature and flow rate, respectively. This is the transient response correction.

[0024] The dynamic threshold generation model includes compensation terms for temperature, flow rate, and flow rate change rate to ensure accurate and stable thresholds under different operating conditions, and also incorporates the flow rate change rate. Threshold calculation is introduced to address transient interference issues. By updating the baseline threshold in real time, the system can effectively respond to changes in environmental conditions, further improving the reliability and accuracy of measurement results.

[0025] In step S300, peak detection specifically includes: Step S310, Coarse detection using a sliding window: Search for local maxima within the signal's time domain window to quickly identify candidate peak values. The formula is as follows: , Among them, window width f s f is the sampling frequency. o This refers to the ultrasonic frequency.

[0026] Potential peak points are initially screened out using a sliding window extreme value search, allowing for rapid localization.

[0027] Step S320, Three-point parabolic interpolation: Let the candidate peak point be t. i The two points to its left and right are t respectively. i-1 t i+1 The corresponding peak values ​​are y i-1 y i y i+1 Then the peak offset is: , in , where is the sampling interval, and the final peak value is .

[0028] By using parabolic interpolation for refinement, accuracy is improved and the computational rate of the algorithm is reduced. Combined with a dynamic compensation model, flight time calculation under temperature and flow rate changes can be optimized, reducing system errors.

[0029] In step S400, the parameter feedback adjustment specifically includes: When the rate of change of flow And the rate of temperature change hour( and To determine if the system is in a stable state (using a set threshold), record the peak detection results for M consecutive cycles at this point. The median t of the detection results during the steady-state phase is taken. v As a virtual truth value: .

[0030] Define the loss function as the variance during the steady-state phase: , , Update rules: , in The learning rate is set to a step size of 0.001.

[0031] An online learning mechanism for compensation coefficients based on regularized gradient descent optimizes system performance by monitoring and adjusting the compensation coefficients in real time. Regularization techniques prevent overfitting, and by iteratively updating the compensation coefficients, the system gradually approaches the optimal solution, continuously improving measurement accuracy without compromising real-time performance.

[0032] In this embodiment, discrete wavelet preprocessing is used to effectively remove high-frequency interference; adaptive gain control is employed to dynamically adjust the signal amplitude according to environmental conditions, enabling the system to maintain high accuracy and stability even in noisy environments; by introducing temperature and flow compensation, the threshold is corrected in real time to eliminate ultrasonic signal amplitude drift caused by environmental temperature fluctuations, accurately locate features, and dynamically adjust the threshold sensitivity when the flow rate changes rapidly, significantly improving the robustness of the algorithm under complex flow conditions and accurately calculating the flight time; a sliding window coarse detection is used to quickly locate candidate peaks, and three-point parabolic interpolation is used for precise positioning, improving the accuracy of flight time calculation; simultaneously, through The gradient descent online learning compensation coefficient can adapt to different pipeline conditions. It minimizes peak positioning error using the gradient descent method and continuously optimizes compensation parameters through online learning, further improving measurement stability. This reduces reliance on hardware resources, avoids the tedious calculations of full waveform matching, lowers computational complexity, simplifies system design, and reduces overall cost. Combined with a dynamic compensation model, it optimizes flight time calculations under temperature and flow rate variations, reducing system errors. Under steady-state conditions, it calculates the optimal compensation coefficient through historical data backtracking analysis, ensuring measurement consistency over long-term operation. By tracking the signal baseline using an exponentially weighted moving average, it effectively suppresses the impact of long-term drift on detection accuracy. This solution addresses the problems of weak anti-interference capability, poor real-time performance, difficulty in threshold selection, high computational resource requirements, and high system complexity in existing technologies, providing a more reliable, efficient, and economical solution for liquid ultrasonic flow meters.

[0033] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for ultrasonic water meter measurement based on signal characteristics, characterized in that, include: S100, Signal Preprocessing: The ultrasonic received signal is preprocessed, and noise reduction is performed through discrete wavelet transform to separate high-frequency noise from low-frequency effective components in the signal, remove high-frequency interference, and dynamically adjust the signal amplitude through adaptive gain control to maintain signal stability. S200, Dynamic Threshold Generation: Tracks the signal baseline and generates adaptive thresholds based on temperature, flow rate and their rate of change to monitor and adapt to long-term amplitude changes; S300, Peak Detection: The flying time is calculated by using a sliding window coarse detection and parabolic interpolation fine-tuning. S400, Parameter Feedback Adjustment: Based on the gradient descent method, the peak positioning error is minimized, the compensation coefficient is optimized through online learning, and the adjustment strategy is adaptively changed according to the dynamic environment.

2. The ultrasonic water meter metering method based on signal characteristics according to claim 1, characterized in that, The noise reduction method using discrete wavelet transform, which separates high-frequency noise from low-frequency effective components and removes high-frequency interference, includes performing a 3-level dB4 wavelet decomposition on the original received signal x(t) to obtain the approximation coefficients a. j and detail coefficient d j For each level of detail coefficients, the threshold is estimated using the Stein unbiased risk method: , Where N is the signal length, This is an estimate of the noise standard deviation.

3. The ultrasonic water meter metering method based on signal characteristics according to claim 2, characterized in that, The adaptive gain control dynamically adjusts the signal amplitude to maintain signal stability, including adjusting the approximation coefficient a. j Perform thresholding, and then apply the thresholded coefficient a. j Perform inverse wavelet transform to obtain the denoised signal. Adaptive gain control is applied to the signal to dynamically adjust the signal amplitude to the target range, avoiding amplitude fluctuations from interfering with threshold determination. , in, For the target amplitude, V min To prevent division by zero protection, the output signal is: .

4. The ultrasonic water meter metering method based on signal characteristics according to claim 1, characterized in that, The tracking signal baseline includes a baseline threshold calculated using an exponentially weighted moving average: , in, Forgetting factor, which controls the weight of historical data. This represents the actual peak voltage detected in the previous cycle.

5. The ultrasonic water meter metering method based on signal characteristics according to claim 1, characterized in that, The process of generating an adaptive threshold based on temperature, flow rate, and their rate of change, and monitoring and adapting to long-term amplitude changes, includes threshold correction by combining temperature T(t), flow rate Q(t), and their rate of change dQ / dt. , in, This is the temperature compensation coefficient. This is the flow compensation coefficient. For transient compensation coefficients, and These represent the changes in temperature and flow rate, respectively. This is the transient response correction.

6. The ultrasonic water meter metering method based on signal characteristics according to claim 1, characterized in that, The sliding window coarse detection includes searching for local maxima within the signal time-domain window and identifying candidate peak values: , Among them, window width , Sampling frequency, This refers to the ultrasonic frequency.

7. The ultrasonic water meter metering method based on signal characteristics according to claim 6, characterized in that, The parabolic interpolation refinement includes three-point parabolic interpolation: Let the candidate peak point be t. i The two points to its left and right are t respectively. i-1 t i+1 The corresponding peak values ​​are y i-1 y i y i+1 Then the peak offset is: , in , where is the sampling interval, and the final peak value is .

8. The ultrasonic water meter metering method based on signal characteristics according to claim 6, characterized in that, The method of minimizing peak localization error based on gradient descent, and optimizing compensation coefficients through online learning to achieve adaptability in dynamic environments, includes setting a threshold. and When the rate of change of flow And the rate of temperature change When the system is in a stable state, record the peak detection results for M consecutive cycles. The median t of the detection results during the steady-state phase is taken. v As a virtual truth value: , Define the loss function as the variance during the steady-state phase: , , Update rules: , in, The learning rate is set to a step size of 0.001.