Ultrasonic flow measurement temperature compensation method based on sliding variance weighting

By using a temperature compensation method with sliding variance weighting to dynamically correct the sound velocity, the measurement error problem of traditional ultrasonic flowmeters in temperature fluctuation environments is solved, achieving high precision and stability, and adapting to various environments and media.

CN121594984APending Publication Date: 2026-03-03CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511772098.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Traditional ultrasonic flow meters cannot respond to temperature changes in real time in high-temperature or fluctuating environments, leading to measurement errors and stability issues.

Method used

A temperature compensation method based on sliding variance weighting is adopted. By dynamically correcting the sound velocity and combining dual-path sound velocity estimation and outlier protection mechanism, the flow meter is calibrated in real time by tracking temperature changes.

Benefits of technology

It improves the measurement accuracy and stability of the flow meter under complex working conditions, balances real-time performance and stability, enhances anti-interference capabilities, and requires no hardware modification, making it suitable for various environments and media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121594984A_ABST
    Figure CN121594984A_ABST
Patent Text Reader

Abstract

The invention relates to an ultrasonic flow measurement temperature compensation method based on sliding variance weighting, which is suitable for dynamic correction of sound velocity by temperature change in an ultrasonic flow measurement system. According to the method, real-time sound velocity estimation obtained by fusing forward and reverse flow time difference inverse deduction and a sound velocity value obtained by looking up a table through a temperature sensor are used for respectively calculating variances of two paths of sound velocity estimation in a sliding window with a certain length, and then a fusion weight is dynamically distributed according to the variance inverse ratio, so that self-adaptive weighted estimation of the sound velocity is realized. According to the method, the reliability of the two paths of signals in the current measurement environment can be automatically identified, the capability of inhibiting abnormal values is enhanced, and the robustness and precision of a flow measurement system in a temperature fluctuation scene are effectively improved; the real-time sound velocity compensation device is especially suitable for real-time sound velocity compensation requirements of complex working conditions such as temperature excursion, fluid disturbance or transducer noise interference in an industrial field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ultrasonic flow measurement technology, specifically to a temperature compensation method for ultrasonic flow measurement based on sliding variance weighting. This method is applicable to scenarios in industrial fluid measurement where there are temperature fluctuations, temperature drift, and interference from multiple physical fields. It is used to achieve dynamic correction of the sound velocity of the ultrasonic flow meter, thereby improving the accuracy and stability of flow measurement. Background Technology

[0002] Ultrasonic flow meters are widely used in various flow measurement applications due to their advantages such as non-contact operation, high accuracy, wide rangeability, and low pressure loss. As an important flow measurement instrument, ultrasonic flow meters rely on ultrasonic transducers to convert acoustic energy into electrical energy for measurement. However, with the diversification of application environments, especially in high-temperature or large-temperature-fluctuation environments, the propagation speed of ultrasonic signals is affected by temperature fluctuations and environmental noise, leading to measurement errors. Traditional temperature compensation methods often cannot cope with these changes in real time, affecting the accuracy and stability of the flow meter.

[0003] Especially under complex operating conditions, temperature fluctuations have a more significant impact on ultrasonic flow meters. Therefore, a novel dynamic temperature compensation method is proposed to improve the robustness and measurement accuracy of ultrasonic flow meters in variable environments. This method can track temperature changes in real time and dynamically correct the flow meter according to environmental conditions, thereby effectively reducing errors caused by temperature fluctuations and improving the measurement accuracy and stability of the ultrasonic flow meter. Summary of the Invention

[0004] The purpose of this invention is to provide a temperature compensation method for ultrasonic flow measurement based on sliding variance weighting. This method solves the problem of measurement errors caused by the inability of traditional temperature compensation methods to adapt to temperature fluctuations and complex operating conditions in real time by dynamically correcting the influence of temperature changes on sound velocity. The specific steps are as follows:

[0005] Step S1: Obtain the downstream propagation time t1 and upstream propagation time t2 of the ultrasonic signal in the ultrasonic flowmeter, and deduce the first estimated value of the sound velocity C1 by reverse calculation using the formula: Where L is the ultrasonic transducer spacing and θ is the angle between the ultrasonic wave propagation direction and the fluid flow direction, this formula is derived from the time difference method principle.

[0006] Step S2: Collect the temperature data of the current measurement environment using a high-precision resistance temperature sensor such as PT1000, and obtain the second sound velocity estimate C2 corresponding to the current temperature based on the preset standard temperature-velocity curve database corresponding to the medium type and by using a lookup table method.

[0007] Step S3: During the sound speed compensation process, an outlier protection mechanism is activated. The difference between the first sound speed estimate and the second sound speed estimate, |C1-C2|, is calculated in real time. When the difference is less than the preset threshold α, the average of the two sound speeds is directly used as the compensation sound speed. When the difference is greater than or equal to the preset threshold α, variance weighting is triggered. The value of α is determined through experimental calibration.

[0008] Step S4: When the difference is greater than or equal to a preset threshold α, variance weighting processing is triggered. The first sound velocity estimate (C1) and the second sound velocity estimate (C2) are saved to sliding windows of fixed length N, respectively. The sliding variance within the two windows is calculated, yielding the sliding variances (σ1 and σ2) of C1 and C2, respectively. The formula for calculating the sliding variance is: Where C i This represents the estimated speed of sound within the window. The value is the mean of N sound speed estimates within the window, where N is 20 sampling points.

[0009] Step S5: Determine the weighting coefficients based on the sliding variance of the two sound velocity estimates. Calculate the weighted average of C1 and C2 according to their respective weights to obtain the final temperature-compensated sound velocity estimate C_final. The weighting coefficients are inversely proportional to the sliding variance, i.e., the weighting coefficient formula is: And ω1+ω2=1, C 温补 (t)=ω1C1+ω2C2.

[0010] Step S6: Calculate the final temperature-compensated sound velocity estimate C. 温补 (t), applied to flow measurement calculations, combined with the formula The original sound velocity value is compensated and corrected in real time to output accurate flow measurement results. Here, K is the compensation coefficient, Δt is the time difference between forward and reverse flow, D is the pipe diameter, and θ is the transducer installation angle.

[0011] The advantages and positive effects of this invention are as follows:

[0012] (1) Synergistic optimization of real-time performance and stability: By adopting the dual-path sound velocity estimation fusion strategy, the real-time flow field tracking capability of time difference back-calculation of sound velocity and the stability of temperature lookup table sound velocity are taken into account, which solves the defect of "real-time performance and stability cannot be achieved at the same time" in the existing methods, and the overall performance is significantly improved.

[0013] (2) Adaptive weight allocation improves accuracy: Based on the sliding variance, the weight is dynamically adjusted and the reliability of the signal is automatically identified. When a certain signal is disturbed, the weight is automatically reduced, which effectively improves the compensation accuracy and shows excellent measurement accuracy under complex working conditions.

[0014] (3) Significantly enhanced anti-interference capability: The outlier protection mechanism can quickly respond to significant deviations in the two sound velocities, suppress abnormal interferences such as transducer noise and fluid disturbances, and maintain good measurement stability even in scenarios such as sensor temperature drift.

[0015] (4) Excellent compatibility and scalability: No need to modify the existing ultrasonic flow meter hardware, only through algorithm optimization, it can be adapted to a variety of operating environments, supports the measurement of a variety of media, and is suitable for a variety of pipe specifications, with strong versatility.

[0016] (5) Low implementation cost: No additional hardware sensors are required. Existing temperature sensors and transducer data are used. The algorithm has a short processing time, meets the real-time measurement needs of industry, and is easy to implement in engineering. Attached Figure Description

[0017] To more clearly illustrate the technical solution of the present invention, the accompanying drawings, as part of the embodiments, further describe the present invention:

[0018] Figure 1 This is a schematic diagram of the ultrasonic flow meter structure used in this invention, showing the pipe wall, lining, rust-proof protective layer, and the installation positions of the upstream and downstream sensors, as well as the installation distance between the sensors. It also marks the angle θ between the downstream propagation time t1, the upstream propagation time t2, and the fluid flow direction.

[0019] Figure 2 This is a schematic diagram of the water medium temperature-sound velocity relationship curve used in this invention, where the horizontal axis represents temperature (unit: °C) and the vertical axis represents sound velocity (unit: m / s). This curve corresponds to the content of a preset temperature-sound velocity curve database, which is used to obtain the second sound velocity estimate C2 by looking up the table through temperature.

[0020] Figure 3 This is a complete flowchart of the ultrasonic flow measurement temperature compensation method based on sliding variance weighting of the present invention. It sequentially shows the triggering of flow and temperature measurement, acquisition of dual-channel sound velocity (C1, C2), determination of sound velocity difference (ΔC) and threshold (α), storage of sound velocity data in a sliding window (length 20), calculation of sliding variance (σ1, σ2), determination of weighting coefficients (ω1, ω2), and final compensation of sound velocity C. 温补 (t) The entire process of calculating and correcting flow output. Detailed Implementation

[0021] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are merely illustrative examples, and the scope of protection of the present invention is not limited thereto.

[0022] This embodiment selects an ultrasonic flow meter and its corresponding temperature sensor. The downstream and upstream propagation times of the ultrasonic flow meter are used to calculate the first sound velocity estimate (C1) based on the time difference. The process is as follows: Figure 1 As shown, where, Figure 1 A schematic diagram illustrating the time difference measured with and against the current is shown. The flow velocity can be deduced from the time difference measured by the sensor, and the speed of sound (C1) can be calculated using a known formula.

[0023] Simultaneously, a PT1000 temperature sensor was used to acquire real-time temperature data, and the estimated second velocity of sound (C2) under the corresponding temperature conditions was obtained through a lookup table method. For example... Figure 2 As shown, the curve illustrating the relationship between temperature and the speed of sound is presented. This curve allows us to obtain the speed of sound (C2) at a given temperature in real time. By comparing this curve with the first estimated speed of sound (C1), the difference between them (ΔC = C1 - C2) is calculated.

[0024] The flowchart of the sound velocity compensation method based on sliding variance weighting is as follows: Figure 3 As shown in the figure, the process of obtaining sound velocity estimates by measuring propagation time in the upstream and downstream directions, collecting temperature sensor data and looking up the sound velocity in a table, and calculating variance using a sliding window to support weighted compensation is illustrated.

[0025] The algorithm flowchart of this invention is as follows: Figure 3 As shown, the process begins by acquiring the downstream and upstream propagation times of the ultrasonic flow meter and using the time difference to estimate the sound velocity. Then, temperature data is collected, and the corresponding estimated sound velocity is obtained from a table. Next, a weighted average of the two estimated sound velocities is calculated using a sliding variance algorithm to obtain the real-time temperature-compensated sound velocity value. This compensated sound velocity value is applied in real-time to the flow measurement system, ensuring high accuracy and stability under complex operating conditions (such as temperature changes, fluid disturbances, and transducer noise).

[0026] The above examples are only for the purpose of helping to understand the core idea of ​​the present invention; at the same time, those skilled in the art will know that there will be changes in the specific implementation methods and application scope based on the idea of ​​the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A sound velocity compensation method based on sliding variance weighting, comprising: Step S1: Obtain the propagation time in the downstream and upstream directions of the ultrasonic flow meter, and calculate the first sound velocity estimate based on the time difference. Step S2: Collect temperature sensor data and obtain the second sound velocity estimate corresponding to the temperature by looking up a table; Step S3: Calculate the difference between the first sound velocity estimate and the second sound velocity estimate in real time. During the sound velocity compensation process, an outlier protection mechanism is enabled. When the difference is less than the preset threshold α, the average of the two sound velocities is directly used as the compensation sound velocity. When the difference is greater than the preset threshold α, variance weighting is triggered. The α value is determined through experimental calibration; in step S4, when the difference is greater than or equal to the preset threshold α, the variance weighting process is triggered, and the above two sound velocity estimates are saved to sliding windows of fixed length respectively to calculate the sliding variance within the first and second sound velocity windows respectively; in step S5, the two sound velocities are weighted and averaged according to their weights to obtain the final temperature-compensated sound velocity estimate, and then the sound velocity value in the flow measurement is compensated and corrected in real time.

2. The method according to claim 1, characterized in that: The first sound speed estimate is given by the formula By reverse deduction, we can find that t1 and t2 represent the transit times of the ultrasonic signal in the upstream and downstream directions.

3. The method according to claim 1, characterized in that: The temperature sensor is a high-precision resistance temperature detector (RTD) such as PT1000, and the lookup sound velocity is based on a preset database of standard temperature-sound velocity curves corresponding to the medium type.

4. The method according to claim 1, characterized in that: The formula for calculating the sliding variance is as follows: Where c i This is the estimated speed of sound within the window. This is the mean of window N.

5. The method according to claim 1, characterized in that: The weighting coefficient is in and These are the sliding variances of the first and second sound speeds, respectively.

6. The method according to claim 1, characterized in that: The sound speed compensation process is equipped with an outlier protection mechanism. When the difference between the two sound speeds, |C1-C2|, is ≥ α, variance weighting processing is triggered, where α is a preset threshold.

7. The method according to claim 1, characterized in that: In practical applications, the method can run in real time in the embedded system, edge device or host computer of the ultrasonic flow meter, and is suitable for high noise, temperature drift and multi-physics interference environments in industrial fluid measurement.