A method of acoustic path adaptive tracking for ultrasonic flow measurement
By updating the acoustic path parameters and adjusting the receiving window in real time by inverting the liquid sound velocity, the problem of flow meter measurement accuracy and stability caused by changes in liquid sound velocity is solved, achieving higher measurement accuracy and continuity.
Patent Information
- Application Number
- CN202611679811.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing time-difference ultrasonic flow meters suffer from decreased measurement accuracy, insufficient echo reception stability, and a high risk of loss of lock when the liquid sound velocity changes, especially in large-diameter, long-path, and multi-pass scenarios.
By inverting the transit time between upstream and downstream in real time to obtain the liquid sound velocity, updating the refraction angle, liquid sound path and horizontal sound path, and actively adjusting the receiving window, the acoustic path parameters are adaptively adjusted and the echo position is tracked.
It reduces flow rate errors and lockout risks caused by changes in sound velocity, improves measurement accuracy and continuity, reduces measurement interruptions and output freezing, and adapts to changes in liquid state.
Smart Images

Figure CN123175376A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasonic flow measurement technology, and in particular to a method for adaptive acoustic path tracking in ultrasonic flow measurement. Background Technology
[0002] Time-of-flight ultrasonic flow meters calculate fluid velocity and flow rate by measuring the time difference of ultrasonic waves propagating in the downstream and upstream directions. This type of measurement has no moving mechanical parts and is suitable for non-invasive measurement, and has been widely used in the field of liquid flow measurement.
[0003] In time-of-flight ultrasonic flow measurement, the liquid sound velocity is a crucial parameter affecting the measurement results. Liquid sound velocity varies with factors such as temperature and medium type. When the actual sound velocity deviates from the nominal sound velocity used in calibration or setting, it can easily cause flow measurement errors. Existing technologies typically employ fixed sound velocity with external temperature sensor lookup table compensation, or use the average of forward and reverse flow transit times to invert the liquid sound velocity and perform compensation. Among these methods, the fixed sound velocity approach is difficult to adapt to changes in operating conditions, the temperature sensor compensation method requires additional hardware, and the method of inverting the sound velocity using transit time is generally mainly used to correct the sound velocity parameter in flow velocity calculations.
[0004] In reality, changes in the velocity of sound in a liquid not only affect the propagation time of ultrasound waves but also alter the angle of refraction of the ultrasound waves within the liquid, thereby causing changes in the actual propagation path and the effective sound path along the pipe axis. Therefore, if only the velocity of sound is corrected while the fixed sound path parameters under calibration are still used, a deviation may occur between the sound path model and the actual propagation state, resulting in residual measurement errors.
[0005] On the other hand, changes in the liquid's sound velocity can also cause the echo arrival time to drift. For ultrasonic flow meters that use a preset receiving window to acquire the target echo, echo mismatch or loss of lock can easily occur when the echo drifts beyond the original window or verification range. Existing solutions typically re-search for the target echo and adjust the receiving window after detecting a timing anomaly or echo verification failure. This is a passive handling method after mismatch occurs, and measurement interruptions or output freezes may occur during the re-search. This problem is particularly pronounced in large-diameter, long-path, and multi-pass measurement scenarios.
[0006] Therefore, in existing time-of-flight ultrasonic flow measurement techniques, changes in liquid sound velocity not only affect the flow calculation parameters but also further influence the acoustic path state and echo arrival location. Current methods that only compensate for sound velocity without simultaneously considering changes in acoustic path parameters and echo drift still suffer from reduced measurement accuracy, insufficient echo reception stability, and the need for re-searching after loss of lock-on, requiring further improvement. Summary of the Invention
[0007] To address the above issues, this invention uses real-time inversion of liquid sound velocity through forward and reverse flow transit time, and updates the refraction angle, liquid sound path, and horizontal sound path online based on the inversion results. This enables adaptive adjustment of sound path parameters as the liquid state changes. Simultaneously, it combines the updated sound path model to predict the echo arrival time and actively adjust the receiving window to achieve continuous echo position tracking. This reduces flow error and lockout risk caused by sound velocity changes, and improves measurement accuracy and continuity.
[0008] According to an embodiment of the present invention, a method for adaptive acoustic path tracking in ultrasonic flow measurement is provided.
[0009] In a first aspect of the invention, a method for adaptive acoustic path tracking in ultrasonic flow measurement is provided. The method includes: Step S01: Obtain the transit time of the ultrasonic wave propagating along the fluid's downstream and upstream directions, and determine the average propagation time and transit time difference; Step S02: Subtract the pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid by combining the current liquid sound path. Update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path, and the horizontal sound path along the pipe axis using the real-time sound velocity, and calculate the fluid velocity by combining the transit time difference. Step S03: Predict the echo arrival time of the next measurement cycle using the updated real-time sound velocity and sound path parameters, and adjust the ultrasonic receiving window to the position corresponding to the echo arrival time; Step S04: In the next measurement cycle, obtain the actual echo arrival time, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform the real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
[0010] Furthermore, the pre-calibrated fixed delay mentioned in step S02 is obtained through static water calibration, including: Under the condition that the inside of the pipe to be tested is filled with static liquid, multiple bidirectional transit time measurements are performed, the average propagation time corresponding to each measurement is calculated, and the median is taken as the calibration average propagation time. The liquid propagation time is determined by using the liquid sound path and the nominal sound velocity of the liquid under the calibration state, and the liquid propagation time is subtracted from the calibration average propagation time to obtain a fixed delay; The reasonableness of the range of the average propagation time obtained from multiple measurements and the fixed delay is judged. When the preset calibration conditions are met, the fixed delay is written into the non-volatile memory; otherwise, the calibration operation is re-executed.
[0011] Furthermore, the current liquid acoustic path mentioned in step S02 is determined by a pre-established acoustic path model, including: Obtain the outer diameter, wall thickness, pipe material, liquid type, and probe model of the pipe to be tested, and determine the inner diameter of the pipe, the nominal sound velocity of the liquid, the probe spacing, the wedge angle, and the acoustic parameters of each propagation medium. The Snell refraction equations are solved using the bisection method, with the sum of the horizontal displacement of the ultrasonic wave in each solid propagation layer and the horizontal displacement in the liquid propagation segment satisfying the probe spacing as a constraint condition, to determine the refraction angle of the ultrasonic wave in the liquid. The initial liquid sound path and horizontal sound path are determined by using the obtained refraction angle, pipe inner diameter and number of transits in the liquid. The number of transits is determined by the automatic sound path selection rules or installation scan during the installation phase and remains unchanged in the current installation state.
[0012] Furthermore, the method for obtaining the real-time speed of sound in step S02 is as follows: The instantaneous sound velocity of the liquid is calculated using the liquid sound path saved after the update of the previous measurement cycle, and the difference between the average propagation time and the fixed delay of the current measurement cycle. In the first measurement cycle, the liquid sound path obtained by solving the initial sound path is used. The instantaneous sound velocity is compared with a preset sound velocity reasonable range. When the instantaneous sound velocity exceeds the preset sound velocity reasonable range, the real-time sound velocity and sound path parameters are not updated using the current inversion results. When the instantaneous sound velocity is within the preset sound velocity reasonableness range, the instantaneous sound velocity and the reliable real-time sound velocity of the previous measurement cycle are subjected to low-pass filtering to obtain the real-time sound velocity of the current measurement cycle.
[0013] Furthermore, the updating of the refraction angle, liquid sound path, and horizontal sound path along the pipe axis of the ultrasonic wave in step S02 is as follows: Substitute the real-time sound velocity obtained by inversion into the Snell refraction relation, and use the wedge angle, wedge sound velocity and the real-time sound velocity to determine the refraction angle of the ultrasonic wave in the liquid. The liquid sound path and the horizontal sound path along the pipe axis were calculated using the updated refraction angle, pipe inner diameter, and number of crossings, respectively. The square of the real-time sound velocity, the transit time difference, and the updated horizontal sound path are used to calculate the fluid linear velocity, and the updated liquid sound path is saved for use in the real-time sound velocity inversion of the next measurement cycle.
[0014] Furthermore, the step of adjusting the ultrasonic receiving window in step S03 is as follows: The predicted arrival time of the echo obtained in the current measurement cycle is compared with the predicted arrival time of the echo in the previous measurement cycle to determine the amount of prediction change. When the absolute value of the predicted change is less than the preset adjustment threshold, the position of the receiving window remains unchanged. When the absolute value of the predicted change is not less than the preset adjustment threshold, the target position of the receiving window is taken as the position of the preset lead amount before the current echo prediction arrival time, and the receiving window is adjusted within the preset single-cycle movement limit range. The adjusted receiving window position is written into the delay register of the time-to-digital converter.
[0015] Furthermore, the verification described in step S04 includes: The average propagation time obtained in the next measurement cycle is compared with the echo arrival time predicted in the previous measurement cycle to determine the prediction error. When the prediction deviation is within the preset tolerance range, it is determined that the actual echo matches the predicted acoustic path, the mismatch count is cleared, and real-time sound velocity inversion, acoustic path parameter update, and receiving window adjustment are continued. When the prediction deviation of a single measurement cycle exceeds the preset tolerance range, maintain the current reliable sound velocity and receiving window state, and increase the mismatch count; When the number of measurement cycles in which the prediction deviation exceeds the limit reaches the preset number of mismatches, it is determined that the target echo has lost lock. The last reliable sound velocity and sound path parameters are frozen, so that the receiving window is kept at the last reliable position. The predicted echo position corresponding to the last reliable sound velocity before the loss of lock is used to search for the target echo again.
[0016] In a second aspect of the invention, an apparatus for adaptive acoustic path tracking in ultrasonic flow measurement is provided. The apparatus includes: Data acquisition module: used to acquire the transit time of ultrasonic waves propagating along the fluid in the downstream and upstream directions, and to determine the average propagation time and transit time difference; Sound velocity inversion module: used to subtract a pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid in combination with the current liquid sound path. The real-time sound velocity is used to update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path and the horizontal sound path along the pipe axis, and the fluid flow velocity is calculated in combination with the transit time difference. Echo prediction module: used to predict the echo arrival time of the next measurement cycle using the updated real-time sound velocity and acoustic path parameters, and adjust the ultrasonic receiving window to the position corresponding to the echo arrival time; Prediction verification module: used to obtain the actual echo arrival time in the next measurement cycle, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform the real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
[0017] In a third aspect of the invention, an electronic device is provided. The electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the program to implement the method according to a first aspect of the invention.
[0018] In a fourth aspect of the invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method according to a first aspect of the invention.
[0019] This invention uses real-time inversion of liquid sound velocity through forward and reverse flow transit time, and updates the refraction angle, liquid sound path, and horizontal sound path online based on the inversion results. This enables adaptive adjustment of sound path parameters as the liquid state changes. Simultaneously, it combines the updated sound path model to predict the echo arrival time and actively adjust the receiving window to achieve continuous echo position tracking. This reduces flow error and lockout risk caused by sound velocity changes, and improves measurement accuracy and continuity.
[0020] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description.
[0021] The beneficial effects of this invention are: 1. By processing the transit time of the upstream and downstream flows, the real-time sound velocity of the liquid is obtained, and the liquid refraction angle, liquid sound path and horizontal sound path are updated synchronously using this sound velocity. This allows the sound path parameters used in flow calculation to be dynamically adjusted with changes in the liquid state, thereby reducing the residual measurement error caused by only correcting the sound velocity while keeping the sound path parameters unchanged, and improving the accuracy of flow measurement. 2. Based on the real-time updated acoustic path model, predict the arrival time of subsequent echoes and actively adjust the position of the receiving window accordingly. This allows the receiving window to track the echo drift caused by changes in the liquid sound velocity, thereby reducing the probability of mismatch or loss of lock caused by the target echo deviating from the receiving window and improving the stability and continuity of echo reception. 3. By forming a closed loop of sound velocity inversion, sound path update, echo time prediction, receiving window adjustment and prediction deviation verification, the sound velocity inversion results provide a basis for window adjustment. At the same time, window tracking ensures that the echoes collected later correspond to the same sound path, reducing the impact of erroneous echoes on sound velocity inversion and flow rate calculation. 4. Under conditions such as changes in liquid temperature, liquid type, large pipe diameter, long sound path, or multiple crossings, the receiving window can be adjusted in advance according to the change in echo position. Compared with the method of re-searching after echo mismatch, it can reduce measurement interruption and output freezing caused by loss of lock and re-search, and improve the reliability of flow measurement under complex conditions. 5. The entire process can be realized using the existing bidirectional transit time measurement data and acoustic path model of the ultrasonic flow meter, without the need for additional detection hardware such as temperature sensors. While reducing the requirements for additional hardware, the sound velocity obtained by inversion can also be used to assist in liquid state identification, empty pipe or bubble judgment, and installation status detection. Attached Figure Description
[0022] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. Wherein: Figure 1 A flowchart of a method for adaptive acoustic path tracking in ultrasonic flow measurement according to an embodiment of the present invention is shown; Figure 2 A schematic diagram comparing the inverted sound velocity with the theoretical curve according to an embodiment of the present invention is shown; Figure 3 A comparison diagram of echo drift and receiver window tracking according to an embodiment of the present invention is shown; Figure 4 A schematic diagram comparing flow error of three temperature compensation schemes according to an embodiment of the present invention is shown. Figure 5 A schematic diagram of echo drift and window tracking simulation according to an embodiment of the present invention is shown; Figure 6 A block diagram of an apparatus for adaptive acoustic path tracking of ultrasonic flow measurement according to an embodiment of the present invention is shown; Figure 7 A schematic diagram of an acoustic path adaptive tracking device for ultrasonic flow measurement according to an embodiment of the present invention is shown. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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.
[0024] According to an embodiment of the present invention, an adaptive acoustic path tracking method for ultrasonic flow measurement is proposed. The liquid sound velocity is inverted in real time by the transit time of the upstream and downstream flow, and the refraction angle, liquid sound path and horizontal sound path are updated online based on the inversion results. The acoustic path parameters are adaptively adjusted according to the changes in liquid state. At the same time, the echo arrival time is predicted by combining the updated acoustic path model and the receiving window is actively adjusted to achieve continuous tracking of the echo position. This reduces the flow error and loss of lock caused by changes in sound velocity, and improves the measurement accuracy and continuity.
[0025] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.
[0026] Figure 1This is a schematic flowchart of an ultrasonic flow measurement method with adaptive acoustic path tracking according to an embodiment of the present invention. The method includes: Step S01: Obtain the transit time of the ultrasonic wave propagating along the fluid's downstream and upstream directions, and determine the average propagation time and transit time difference; Step S02: Subtract the pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid by combining the current liquid sound path. Update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path and the horizontal sound path along the pipe axis using the real-time sound velocity, and calculate the fluid velocity by combining the transit time difference. Step S03: Predict the echo arrival time of the next measurement cycle using the updated real-time sound velocity and acoustic path parameters, and adjust the ultrasonic receiving window to the position corresponding to the echo arrival time. Step S04: In the next measurement cycle, obtain the actual echo arrival time, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
[0027] It should be noted that although the operation of the method of the present invention has been described in a specific order in the above embodiments and figures, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0028] To provide a clearer explanation of the above-described method for adaptive acoustic path tracking in ultrasonic flow measurement, two specific embodiments are described below. However, it is worth noting that these embodiments are only for better illustrating the present invention and do not constitute an undue limitation on the present invention.
[0029] The following two specific examples will further illustrate the method of adaptive acoustic path tracking in ultrasonic flow measurement in more detail.
[0030] Example 1
[0031] This embodiment provides an adaptive acoustic path tracking method for ultrasonic flow measurement, applied to a time-difference ultrasonic flow meter. By acquiring the transit time of ultrasonic waves in the downstream and upstream directions in the liquid, the liquid sound velocity is inverted in real time. The inversion results are used to update the acoustic path parameters, calculate the fluid velocity, and predict the arrival time of subsequent echoes, so that the ultrasonic receiving window can be actively adjusted according to the change of liquid sound velocity.
[0032] When ultrasound propagates in both the downstream and upstream directions, its transit time includes transducer delay, circuit delay, solid medium propagation time, and liquid propagation time. The fluid flow has opposite effects on the downstream and upstream transit times. By processing the transit times in both directions, we can obtain the average propagation time for inverting the liquid sound velocity and the transit time difference for calculating the fluid velocity.
[0033] This embodiment uses a 12×1.5mm stainless steel pipe as the specific application scenario, employs a 2MHz ultrasonic probe with a probe spacing of 37.79mm, determines the number of passes in the liquid through acoustic path calculation during the installation phase, and continuously updates the acoustic path status during subsequent measurements.
[0034] Step S01: Obtain the transit time of the ultrasonic wave propagating along the fluid's downstream and upstream directions, and determine the average propagation time and transit time difference.
[0035] Before performing transit time measurement, the ultrasonic flow meter is first initialized, the acoustic path model is established, and the initial echo is locked.
[0036] Specifically, the installation parameters of the pipe to be tested, such as the outer diameter, wall thickness, pipe material, liquid type, and probe model, are obtained. The inner diameter of the pipe is determined using the outer diameter and wall thickness. The calculation formula is: .
[0037] The sound velocity and propagation waveform corresponding to the pipe wall were obtained by looking up the pipe material parameters in a table, and the nominal sound velocity of the liquid was obtained by looking up the liquid type in a table. And by using the probe model, parameters such as probe spacing, wedge angle, thickness of each layer of the wedge, and corresponding sound velocity are obtained.
[0038] For pure water measurement, the nominal speed of sound near 20℃ is... A value of 1480 m / s can be used. The above installation parameters are used to establish the acoustic path model of ultrasonic waves propagating in the wedge, coupling layer, pipe wall, and liquid. When the input parameters exceed the applicable range of the current probe, resulting in no number of passes that meet the propagation conditions, a prompt message indicating that the current pipe diameter is not suitable for this probe will be output, and subsequent acoustic path solving and measurement operations will be terminated.
[0039] After obtaining the installation parameters, the refraction relationship of ultrasound in different propagation media is established, and the Snell refraction equations are solved using the bisection method to obtain the initial acoustic path parameters that meet the probe installation geometry.
[0040] Specifically, when ultrasound propagates through a wedge, coupling layer, pipe wall, and liquid, it is refracted at the interface of adjacent propagation media, and the propagation angle of each layer is constrained by Snell's law. Simultaneously, twice the sum of the horizontal displacements of the ultrasound in each solid layer is equal to its value in... The sum of the horizontal displacements in each liquid propagation segment should be equal to the installation distance between the two probes, i.e., satisfying the following: , in, , and These represent the horizontal displacement of the ultrasonic wave in the corresponding solid propagation layer. This indicates the number of times an ultrasound wave passes through a liquid. Indicates the inner diameter of the pipe. This represents the angle of refraction of ultrasound waves in a liquid.
[0041] When using the bisection method, the refraction relationship of each layer and the aforementioned probe spacing constraint are used as the solution conditions to obtain the initial liquid refraction angle and the corresponding acoustic path parameters.
[0042] Among them, the number of crossings The acoustic path is determined by the automatic selection rules or installation scan during the installation phase and remains unchanged in the current installation state. A value of 2 corresponds to a V-shaped acoustic path, a value of 4 corresponds to a W-shaped acoustic path, and a value of 6 corresponds to a three-reflection acoustic path. This embodiment does not limit the specific algorithm for determining the number of transits.
[0043] Obtain the refraction angle that satisfies the propagation conditions Then, the total oblique propagation path of the ultrasound in the liquid is calculated. and the horizontal projection of the sound path along the axial direction of the pipe. : , .
[0044] Simultaneously, the total propagation time of ultrasonic waves in the wedge, coupling layer, and pipe wall was calculated using an acoustic path model. And using the nominal speed of sound of liquids Determine the initial echo prediction arrival time: , The typical range of liquid refraction angle obtained from the initial acoustic path solution is 15° to 30°, and the typical range of echo prediction arrival time is 20 to 120 μs.
[0045] After obtaining the initial predicted arrival time of the echo, set the initial position of the ultrasonic receiving window, and set the starting point of the receiving window to: .
[0046] The start point of this window is written to the delay register of the time-to-digital converter (TDC) to control the opening time of the receive window. At this time, the width of the receive window remains the device's default large width, enabling the receiving system to capture the first echo exceeding the preset threshold after the window opens.
[0047] For the 12×1.5mm stainless steel pipe used in this embodiment, its inner diameter ID is 9mm, the probe wedge angle is 40°, and the probe spacing is 37.79mm. The number of transits in the liquid is determined through acoustic path calculation. The value is 6, corresponding to a required emission angle of approximately 40.2°, which matches the actual probe wedge angle. At this point, the oblique acoustic path in the liquid is approximately 58 mm, and the arrival time of the target echo under calibration conditions is approximately 48.9 μs. Therefore, the initial receiving window start point is set to 43.9 μs.
[0048] Because the echo time intervals between adjacent transits in this multi-transit sound path are small, further searching and authentication of the target echo is required.
[0049] Specifically, when the equipment is powered on or when echo lockout occurs, a round of bidirectional testing is first performed using the current receiving window to obtain the transit time of the ultrasonic waves propagating in the downstream and upstream directions, respectively. and And calculate the average propagation time. Time difference with crossing : , , in, and Measured by TDC. Since the influence of liquid flow on the two propagation directions is positive and negative respectively, taking the average value can offset the main influence of flow velocity under the measurement approximation conditions used, so that the average propagation time mainly reflects the current sound path state and liquid sound velocity; the transit time difference is used for subsequent fluid flow velocity calculation.
[0050] Determine the validity of the current test results: No measurement timeouts occurred in either the downstream or upstream direction; The absolute value of the transit time difference is less than 250 ns to reduce the possibility of the receiving system locking onto adjacent ultrasound cycles; The deviation between the measured average propagation time and the current predicted echo arrival time does not exceed the preset identity verification tolerance.
[0051] The authentication tolerance for small-diameter models can be set to ±5μs, and for large-diameter models it can be set to ±10μs, with the authentication tolerance being less than half the time interval between adjacent target echoes.
[0052] When the above validity conditions are met in 5 consecutive tests, the target echo is determined to be successfully locked and the normal measurement cycle begins. When the test results do not meet the validity conditions, the receiving window is scanned step by step with a step size of 1 to 2 μs until the target echo that meets the conditions is obtained.
[0053] If no valid echo is obtained after scanning to cover the entire reasonable echo range, an "no signal" or "empty tube" warning will be output. For re-searching after a loss of lock, it is preferable to use the predicted echo position corresponding to the last reliable sound velocity before the loss of lock as the search starting position, rather than reusing the position corresponding to the initial nominal sound velocity, in order to shorten the relocking process when the operating conditions have not changed significantly.
[0054] After initial echo lock is completed, the normal measurement cycle begins.
[0055] In this embodiment, a single normal measurement cycle is approximately 0.5 seconds. Each measurement cycle consists of 81 bidirectional measurements, one with the current and one against the current, and 81 sets of data are recorded. , And the corresponding timeout flag.
[0056] For each set of original measurement data, the average propagation time and transit time difference are calculated, and samples that time out in any propagation direction and abnormal samples with an absolute transit time difference greater than 250 ns are removed.
[0057] The median of the mean propagation time and transit time difference in the remaining samples after cleaning is used to obtain the current measurement period. and .
[0058] When the number of valid samples is no less than 65, the data for the current measurement cycle is deemed reliable, and the subsequent sound velocity inversion and acoustic path update process is allowed. When the number of timeout samples reaches 40 or more, the current measurement cycle is deemed to be in a state of empty tube, the real-time sound velocity and receiving window update are suspended, and the corresponding anomaly handling process is initiated. When the number of valid samples is less than 65 and the number of timeout samples is less than 40, the reliable sound velocity, acoustic path parameters, and receiving window status of the previous measurement cycle are maintained, and no updates are performed in this cycle.
[0059] Through the above processing, the average propagation time and transit time difference with stable physical meaning are obtained, providing input data for subsequent sound speed inversion and acoustic path adaptive update.
[0060] Step S02: Subtract the pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid by combining the current liquid sound path. Update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path, and the horizontal sound path along the pipe axis using the real-time sound velocity, and calculate the fluid velocity by combining the transit time difference.
[0061] To separate the propagation time variation caused by changes in the liquid sound velocity from the mean propagation time, a fixed delay is obtained in advance through hydrostatic calibration during the equipment installation or calibration phase. .
[0062] Specifically, under the condition that the pipe under test is filled with static liquid, 81 bidirectional transit time measurements were performed consecutively. The average propagation time for each measurement was calculated, and the median was taken as the calibration average propagation time. .
[0063] Using the obtained liquid sound path under calibration conditions Sound path and nominal speed of sound in liquid Calculate the propagation time of ultrasound in the liquid, and subtract this propagation time from the calibrated average propagation time to obtain: , in, It includes time components that do not change with the liquid state, such as transducer delay, circuit delay, and the propagation time of the solid segment formed by the propagation of ultrasound in the wedge, coupling layer, and pipe wall.
[0064] To ensure the reliability of the fixed-delay calibration results, a stability test was performed on 81 measurement samples. A sample was considered to meet the calibration stability requirements if the difference between the maximum and minimum mean propagation times was less than 1 μs; otherwise, the calibration was deemed a failure, and the calibration operation was repeated.
[0065] Furthermore, the calculated fixed delay is judged to be reasonable. For example, if the typical range of fixed delay for the corresponding model is 2 to 15 μs, and the calculated result exceeds this range, it indicates that there may be errors in the installation parameters or poor probe coupling.
[0066] Once the fixed delay calibration is successful, The data is written to non-volatile memory, while retaining the liquid and horizontal sound paths under calibration conditions, allowing for direct recall in subsequent measurements. Since the aforementioned fixed delay characterizes a time component that does not change with the liquid state, static water calibration is unnecessary for each measurement cycle, provided the installation conditions remain unchanged and the calibration data is valid.
[0067] During normal measurement, a pre-saved fixed delay is invoked. The current average propagation time is subtracted from the fixed delay to separate the propagation time of the ultrasound in the liquid, and then the instantaneous sound velocity in the liquid is calculated by combining this with the current liquid sound path. , The preferred liquid acoustic path is the one saved after the previous measurement cycle. In the first measurement cycle, the liquid acoustic path obtained from the initial acoustic path solution is used, thus realizing the transfer of acoustic path parameters between measurement cycles.
[0068] To avoid abnormal echoes or incorrect locking causing the retrieved sound velocity to deviate significantly from the actual liquid state, a reasonable threshold is set for the instantaneous sound velocity. In this embodiment, the reasonable range for the instantaneous sound velocity is 1300–1650 m / s. This range can cover the sound velocity variation range of approximately 1402–1551 m / s in pure water at 0–60°C, and leaves a certain margin to accommodate common water-based liquids.
[0069] When the instantaneous sound velocity obtained by inversion exceeds the above reasonable range, the current inversion result is determined to be abnormal, the mismatch count is increased by 1, the result is not used to update the real-time sound velocity and acoustic path parameters in this cycle, and the process is transferred to the subsequent prediction deviation verification process.
[0070] When the instantaneous sound velocity is within a reasonable range, further low-pass filtering is performed to calculate the real-time sound velocity for this measurement cycle. : , in, This represents the reliable real-time sound velocity obtained in the previous measurement cycle.
[0071] Since liquid temperature changes are typically slow processes, while bubbles, noise, and erroneous echo lock-in can cause rapid fluctuations in the instantaneous inversion results, the aforementioned low-pass filtering can suppress the impact of abnormal fluctuations on the sound velocity inversion results. For a measurement period of approximately 0.5 seconds, the above filtering coefficients correspond to a time constant of approximately 10 seconds for approximately 20 measurement periods.
[0072] Obtain the real-time speed of sound for this measurement period. Then, the real-time sound velocity is substituted into the acoustic path model to update the refraction angle of the ultrasound in the liquid. .
[0073] Specifically, the relationship between the speed of sound in a liquid and the angle of refraction is established using Snell's law: .
[0074] Since the wedge angle of the ultrasonic probe remains constant after installation, while the liquid sound velocity changes with temperature or liquid type, the liquid refraction angle can be updated using the liquid sound velocity obtained from real-time inversion, so that the acoustic path model reflects the changes in the liquid state.
[0075] After obtaining the updated refraction angle, the horizontal sound path along the pipe axis is further calculated: , In the current installation state, While the ID remains constant, the horizontal sound path is updated as the angle of refraction changes.
[0076] Using real-time sound speed Crossing the time difference and the updated horizontal sound path Calculate the linear velocity of the liquid : .
[0077] Multiply the linear velocity of the liquid by the cross-sectional area of the pipe to obtain the corresponding volumetric flow rate. : ,in, This indicates the cross-sectional area of the pipe through which the flow occurs.
[0078] For a circular pipe, its cross-sectional area can be expressed as: This yields the flow measurement results for the current measurement cycle.
[0079] It should be noted that changes in liquid sound velocity not only affect the squared term of the sound velocity in the flow velocity calculation formula, but also alter the actual propagation path and horizontal sound path of the ultrasonic wave in the liquid through changes in the refraction angle. Therefore, in this embodiment, the real-time sound velocity inversion result is used not only to correct the sound velocity parameters in the flow velocity calculation, but also to synchronously update the horizontal sound path, in order to avoid the horizontal sound path remaining at a fixed value under calibration conditions and generating systematic residual errors.
[0080] Furthermore, the new liquid sound path is calculated using the updated liquid refraction angle: .
[0081] The updated liquid sound path is used for sound velocity inversion in the next measurement cycle, enabling the liquid sound path to be continuously updated as the liquid sound velocity changes.
[0082] In the initialization phase, the refraction relationship between the media and the probe spacing constraint are solved by the bisection method to determine the initial acoustic path. In the normal measurement cycle, the fixed wedge angle, number of crossings and pipe size are updated online. The liquid refraction angle and corresponding liquid acoustic path parameters are refreshed by real-time sound velocity. There is no need to re-execute the complete bisection solution process of the initialization phase in each round, thereby reducing the amount of calculation per round.
[0083] In the aforementioned acoustic path update process, a parameter update method with a one-cycle lag is adopted. That is, the liquid acoustic path saved in the previous measurement cycle is used to invert the sound velocity of the current measurement cycle, and then the new liquid acoustic path is calculated using the current real-time sound velocity, which is then provided for use in the next measurement cycle. Since liquid temperature usually changes slowly, this method can reduce the online computational burden while meeting the real-time measurement requirements.
[0084] Taking the small-diameter six-pass acoustic path in this embodiment as an example, the oblique sound path of the liquid under its calibration state is about 58mm. During the measurement process, the refraction angle, horizontal sound path and liquid sound path are continuously corrected by the updated liquid sound velocity, so that the flow calculation parameters can be updated with the change of liquid state.
[0085] like Figure 2 As shown, the real-time liquid sound velocity obtained during the variable temperature test can be compared with the theoretical sound velocity-temperature curve to verify the tracking of the real-time sound velocity inversion result with the change of liquid temperature.
[0086] Changes in the liquid's sound velocity simultaneously affect both the sound velocity parameters and the horizontal sound path used in flow velocity calculations. By inverting the liquid's sound velocity in real time and updating the refraction angle and horizontal sound path synchronously, the residual measurement error caused by compensating only for the sound velocity while keeping the sound path parameters constant can be reduced.
[0087] Step S03: Predict the echo arrival time of the next measurement cycle using the updated real-time sound velocity and acoustic path parameters, and adjust the ultrasonic receiving window to the position corresponding to the echo arrival time.
[0088] After completing the real-time sound velocity inversion and sound path parameter update, the current real-time sound velocity is used. and the updated liquid refraction angle Based on the liquid acoustic path, the arrival time of the target echo in the next measurement cycle is predicted.
[0089] Specifically, the solid segment propagation time determined in step S01 is used. Number of crossings Given the pipe inner diameter ID, calculate the new predicted arrival time of the echo: , , in, The acoustic path model is determined by the initialization phase and remains unchanged under the condition that the probe installation state remains unchanged; The calibration values are used; the liquid refraction angle and real-time sound velocity are updated with the measurement cycle.
[0090] After obtaining the new predicted arrival time of the echo, it is compared with the predicted time saved in the previous measurement cycle to determine the predicted change in the target echo position. : , in, It is used to characterize the shift in the arrival time of the target echo caused by changes in the liquid sound velocity and the corresponding sound path.
[0091] The predicted change is used to determine whether the ultrasonic receiving window needs to be adjusted, and the adjusted receiving window position is written into the corresponding delay register of the TDC so that the receiving window moves to the position corresponding to the predicted echo before the start of the next measurement cycle.
[0092] In this embodiment, the following receiving window adjustment rules are adopted.
[0093] When the absolute value of the predicted change is less than 0.5 μs, it is considered that the change in the current echo prediction position is small, and the original receiving window position is kept unchanged to avoid frequent writing to the TDC delay register and introducing additional jitter.
[0094] When the absolute value of the predicted change is not less than 0.5 μs, the receiving window adjustment is triggered, and the new receiving window start point is set to: .
[0095] Furthermore, to avoid abrupt changes in the receiving window caused by abnormal inversion results, a limit range of ±2 μs is set for the window movement within a single measurement period. When the predicted change exceeds this range, the actual movement amplitude for that period is limited to prevent the receiving window from shifting too much with abnormal predicted values.
[0096] With the above settings, the receiving window can move in a stepwise manner according to the predicted echo position, so that the slow change in the echo arrival time is transformed into an active adjustment of the receiving window, without having to wait for the target echo to exceed the original receiving range before starting a new search.
[0097] like Figure 3 As shown, when the liquid sound velocity changes with temperature, the actual arrival time of the target echo drifts accordingly. For processing methods using a fixed receiving window, as the echo position gradually deviates from the initial position, a re-search may be triggered after the echo verification fails. However, this embodiment can use the real-time sound velocity obtained from the previous measurement cycle and the updated acoustic path model to predict the echo position of the next measurement cycle in advance and actively adjust the receiving window.
[0098] By shifting the receiving window with the predicted time, the echo position deviation caused by changes in the liquid sound velocity can be reduced, thereby reducing the risk of target echo mismatch or incorrect locking.
[0099] For the 12×1.5mm stainless steel pipe in this embodiment, due to the use of a six-pass acoustic path, the oblique acoustic path of the liquid is about 58mm. Within the temperature range of pure water from 0 to 60℃, the drift of the echo arrival time is about 1.85μs.
[0100] When the liquid sound velocity varies in the range of 1350 to 1650 m / s, the corresponding echo arrival time drifts relative to the calibration state by approximately +3.2 to -3.3 μs.
[0101] Although the echo drift of this model is relatively small, the echo time intervals corresponding to different transit times are close, with the time interval between adjacent transit echoes being approximately 11 μs. Therefore, the identity verification tolerance of the target echo needs to be limited to within ±5 μs to prevent the receiving system from identifying echoes corresponding to other transit times as the current target echo.
[0102] In this embodiment, the arrival time of the target sixth-crossing echo in the calibration state is approximately 48.9 μs, while the arrival time of the adjacent fourth-crossing echo is approximately 37.8 μs. By actively shifting the receiving window according to the predicted arrival time of the target sixth-crossing echo, the fourth-crossing echo can be kept outside the target receiving range, thereby avoiding incorrect switching of the number of crossings in the receiving system due to changes in the speed of sound in the liquid.
[0103] Therefore, for small-diameter, multi-pass receivers, active tracking of the receiving window is not only used to compensate for echo time drift, but also provides conditions for reducing identity verification tolerance and distinguishing echoes from different number of passes.
[0104] Step S04: In the next measurement cycle, obtain the actual echo arrival time, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
[0105] After the receiving window is adjusted, the next measurement cycle begins. The transit times in the downstream and upstream directions are reacquired using the adjusted receiving window, and a new average propagation time is determined.
[0106] The new mean propagation time is compared with the predicted arrival time of the echo calculated in the previous measurement cycle to determine the prediction error of the current echo: , in, This indicates the average propagation time actually measured in the next measurement cycle. This indicates the arrival time of the echo predicted in the previous measurement cycle.
[0107] In this embodiment, when the prediction bias satisfies: When the actual echo matches the predicted acoustic path, the mismatch count is cleared, and steps S02 and S03 are executed again to re-invert the real-time sound velocity, update the liquid acoustic path parameters, and predict the position of subsequent echoes based on the currently obtained average propagation time.
[0108] When a prediction deviation exceeds 5μs in a single measurement cycle, the target echo is not immediately determined to be out of lock. Instead, the current reliable sound velocity, acoustic path parameters, and receiver window status are temporarily maintained, and the mismatch count is increased by 1 to avoid unnecessary re-searching caused by bubbles, transient noise, or occasional abnormal echoes.
[0109] When the prediction deviation exceeds the limit for three consecutive measurement cycles, it is determined that the current target echo has lost lock. The real-time sound velocity and sound path parameters are stopped from being updated using abnormal echoes, and the last reliable sound velocity is frozen to keep the receiving window at the last reliable position.
[0110] Then, the echo search and locking process in step S01 is re-executed, and the initial predicted position for the re-search is calculated by prioritizing the last reliable sound velocity and acoustic path parameters before the loss of lock.
[0111] Once the target echo that meets the authentication conditions is obtained again, the normal measurement cycle resumes.
[0112] For other abnormal states that occur during echo measurement, this embodiment also sets up corresponding abnormal handling and recovery mechanisms.
[0113] Specifically, when the number of timeout samples reaches 40 or more within a certain measurement cycle, it is determined that the current pipeline may be in an empty pipe state, the real-time sound velocity and receiving window are stopped being updated, and the flow output is gradually reduced to zero according to the preset damping time constant to avoid sudden changes in the output value.
[0114] In the empty tube state, the last reliable sound velocity and the corresponding receiving window position are retained. When the number of timeout samples decreases and valid echoes reappear, it is first determined whether the deviation between the new average propagation time and the existing predicted arrival time does not exceed 5 μs. When this condition is met, the normal measurement cycle is directly resumed without having to perform a complete acoustic path search again, allowing the flow output to recover smoothly when the liquid refills the tube.
[0115] When the fixed delay is stored in non-volatile memory If the fixed delay calibration result is lost, cleared, or cannot be retrieved normally, the fixed delay calibration result is deemed invalid, and the static water calibration operation in step S02 is forcibly re-executed. Normal sound velocity inversion and flow measurement processes are not permitted until a valid fixed delay is obtained again.
[0116] Furthermore, this embodiment also utilizes the liquid sound velocity and measurement status information obtained through real-time inversion for auxiliary diagnosis.
[0117] When real-time speed of sound Stable deviation from the nominal speed of sound corresponding to the current liquid type If the error exceeds ±8%, an alert message will be displayed indicating that the liquid in the output tube does not match the preset liquid type, in order to help determine whether the liquid being tested has changed.
[0118] When a high timeout count occurs during the measurement process, and the real-time inversion sound velocity diverges significantly, it is determined that the current state may be an empty tube; when the timeout count is at a moderate level and the inversion sound velocity fluctuates drastically, it is determined that there may be bubble clusters in the current liquid, in order to distinguish the echo anomalies caused by different reasons.
[0119] After successfully locking onto the target echo for the first time, the real-time sound velocity obtained by inversion is compared with the nominal sound velocity of the liquid. When the deviation between the two exceeds ±5%, it indicates that there may be installation problems such as incorrect pipe inner diameter or wall thickness input or poor probe coupling, in order to assist in completing the installation status check.
[0120] The results of liquid identification, empty tube and bubble judgment, and installation status inspection mentioned above, in addition to outputting corresponding diagnostic information, can also be fed back to the echo search, locking, and anomaly recovery process to determine whether to continue the current measurement cycle.
[0121] This embodiment processes the transit times of upstream and downstream currents to obtain the average propagation time and transit time difference. The average propagation time is used to invert the real-time sound velocity of the liquid, and the sound path parameters are updated with the inverted real-time sound velocity. This allows for the prediction of subsequent echo arrival times and the active adjustment of the receiving window position. The actual echo arrival time is then used to verify the prediction results, forming a closed-loop processing process in which sound velocity inversion, sound path updating, echo prediction, window adjustment, and prediction verification are interconnected.
[0122] Among them, the sound velocity inversion result is used to determine the adjustment direction and adjustment range of the receiving window; the active tracking of the receiving window ensures that the echoes obtained by subsequent measurements correspond to the same physical sound path and number of transits, maintaining the physical consistency of the average propagation time; the sound path parameter update also provides a basis for flow velocity calculation and echo arrival time prediction.
[0123] In this closed-loop process, the installation parameters, number of transits, and solid segment propagation time are determined during installation initialization. The fixed delay is obtained through a one-time calibration. The average propagation time, transit time difference, and real-time sound velocity are updated in each effective measurement cycle. The liquid refraction angle, liquid sound path, and horizontal sound path are updated as the real-time sound velocity changes. The predicted arrival time of the echo is continuously calculated in the normal cycle, while the receiving window position is updated as needed according to preset adjustment conditions. The mismatch count is continuously maintained during the echo verification process.
[0124] The above process utilizes the existing bidirectional transit time measurement data, acoustic path model, and TDC receiving window control function of the ultrasonic flow meter, without the need for an additional liquid temperature sensor.
[0125] Example 2
[0126] This embodiment uses a large-diameter, long-path acoustic receiver as an example to illustrate the flow error and echo reception effect of the acoustic path adaptive tracking method under conditions of varying liquid acoustic velocity. The acoustic velocity inversion, acoustic path parameter update, echo prediction, reception window adjustment, and prediction deviation verification processes are the same as in Embodiment 1 and will not be repeated here.
[0127] In this embodiment, the pipe inner diameter ID is 70mm, and the number of crossovers in the liquid is... The value is 2, corresponding to a V-shaped acoustic path, with a probe spacing of 60mm, a wedge exit angle of 32.8°, and a liquid oblique acoustic path of approximately 147.5mm. The time interval between adjacent transit echoes for this model is approximately 11μs, and the tolerance must be less than half of this.
[0128] The simulation used a solid segment propagation time of 9.46 μs, an electronic fixed delay of 3.0 μs, a liquid sound velocity at the calibration point of 1480 m / s, and a corresponding echo arrival time of 112.11 μs; the actual liquid flow velocity was set to be constant at 1.0 m / s.
[0129] The actual sound velocity of the liquid was varied in the range of 1350 to 1650 m / s, covering the sound velocity range of pure water at 0 to 60℃, approximately 1402 to 1551 m / s. The influence of the change in liquid sound velocity on the flow measurement error and the arrival time of the echo was investigated.
[0130] like Figure 4 As shown, three methods are used for comparison. The first method maintains the speed of sound at 1480 m / s without compensation, and its flow error is (1480 ÷ actual speed of sound). 2 -1. Within the sound velocity range of 1350 to 1650 m / s, the error varies from approximately +20.2% to -19.5%; within the range corresponding to pure water at 0 to 60℃, the error is approximately +11.4% to -9.0%.
[0131] The second method uses the average transit time of the upstream and downstream flows to invert the liquid sound velocity and correct the sound velocity term in the flow velocity formula, but keeps the horizontal sound path and receiving window unchanged under the calibration conditions. Since the liquid refraction angle changes with the sound velocity, the horizontal sound path is not updated synchronously, and there is still a residual flow measurement error.
[0132] In the second method, such as Figure 4 As shown, when the liquid sound velocity varies within the range corresponding to 0–60℃ in pure water, the residual error of flow measurement is -4.74% to +4.23%; within the full sound velocity scanning range of 1350–1650 m / s, the residual error is -7.95% to +9.99%. Furthermore, as... Figure 5As shown, in this embodiment, under the simulation condition of setting the echo authentication tolerance to ±5μs, since the receiving window position remains unchanged, the actual echo arrival time gradually deviates from the calibrated position as the liquid sound velocity changes. When the liquid sound velocity is lower than approximately 1401m / s or higher than approximately 1569m / s, the offset of the echo arrival time exceeds the preset authentication tolerance, causing the target echo authentication to fail, thereby triggering a loss of lock and a re-search.
[0133] The third method adopts the closed-loop processing process of Example 1, which uses the real-time sound velocity obtained by inversion to update the liquid refraction angle, horizontal sound path and liquid sound path, calculates the flow rate with the updated horizontal sound path, and uses the updated sound path model to predict the arrival time of subsequent echoes, so that the receiving window is actively adjusted according to the prediction results.
[0134] like Figure 4 As shown, under the simulation conditions, the third method maintains the flow measurement error within ±0.3% in the sound velocity range of 1350–1650 m / s, reducing the residual error caused by only performing sound velocity inversion without updating the sound path parameters.
[0135] like Figure 5 As shown, when the liquid sound velocity changes from 1350 m / s to 1650 m / s, the actual echo arrival time changes from approximately 120.7 μs to approximately 103.0 μs, with a total drift of approximately 17.7 μs. Specifically, the echo drift in pure water within the 0–60°C range is approximately 4.96 μs, reaching approximately 99% of the ±5 μs identity verification tolerance amplitude set in this embodiment.
[0136] For the third method, the receiving window is adjusted with a threshold of 0.5 μs, moving in steps according to the predicted echo arrival time, and is limited by a single-round window movement of ±2 μs. Under the same authentication tolerance conditions, the receiving window can continuously track the target echo, and no loss of lock or measurement interruption caused by echo drift exceeding the authentication tolerance occurred during the simulation as in the second method.
[0137] Therefore, for large-diameter, long-path conditions, updating the acoustic path parameters synchronously using the liquid sound velocity obtained from real-time inversion can reduce the flow measurement error caused by changes in liquid sound velocity and refraction angle. At the same time, predicting the echo arrival time using the updated acoustic path model and actively adjusting the receiving window can reduce the risk of loss of lock caused by echo drift and improve the accuracy and continuity of flow measurement.
[0138] Based on the same inventive concept, this invention also proposes a device for adaptive acoustic path tracking in ultrasonic flow measurement. The implementation of this device can be found in the implementation of the method described above; repeated details will not be elaborated further. Figure 6 As shown, the device 100 includes: Data acquisition module 101: used to acquire the transit time of ultrasonic waves propagating along the downstream and upstream directions of the fluid, and to determine the average propagation time and transit time difference; Sound velocity inversion module 102: used to subtract a pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid in combination with the current liquid sound path, update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path and the horizontal sound path along the pipe axis using the real-time sound velocity, and calculate the fluid flow velocity in combination with the transit time difference. Echo prediction module 103: used to predict the arrival time of the echo in the next measurement cycle using the updated real-time sound velocity and sound path parameters, and to adjust the ultrasonic receiving window to the position corresponding to the arrival time of the echo. Prediction verification module 104: used to obtain the actual echo arrival time in the next measurement cycle, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform the real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0140] like Figure 7 As shown, the device includes a central processing unit (CPU), which can perform various appropriate actions and processes based on computer program instructions stored in read-only memory (ROM) or loaded from storage units into random access memory (RAM). The RAM can also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0141] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0142] The processing unit executes the various methods and processes described above, such as method steps S01 to S04. For example, in some embodiments, method steps S01 to S04 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of method steps S01 to S04 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute method steps S01 to S04 by any other suitable means (e.g., by means of firmware).
[0143] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload programmable logic devices (CPLDs), and so on.
[0144] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0145] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0146] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0147] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for adaptive acoustic path tracking in ultrasonic flow measurement, characterized in that, The method includes: Step S01: Obtain the transit time of the ultrasonic wave propagating along the fluid's downstream and upstream directions, and determine the average propagation time and transit time difference; Step S02: Subtract the pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid by combining the current liquid sound path. Update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path, and the horizontal sound path along the pipe axis using the real-time sound velocity, and calculate the fluid velocity by combining the transit time difference. Step S03: Predict the echo arrival time of the next measurement cycle using the updated real-time sound velocity and sound path parameters, and adjust the ultrasonic receiving window to the position corresponding to the echo arrival time; Step S04: In the next measurement cycle, obtain the actual echo arrival time, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform the real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
2. The method for adaptive acoustic path tracking in ultrasonic flow measurement according to claim 1, characterized in that, The pre-calibrated fixed delay mentioned in step S02 is obtained through static water calibration, including: Under the condition that the inside of the pipe to be tested is filled with static liquid, multiple bidirectional transit time measurements are performed, the average propagation time corresponding to each measurement is calculated, and the median is taken as the calibration average propagation time. The liquid propagation time is determined by using the liquid sound path and the nominal sound velocity of the liquid under the calibration state, and the liquid propagation time is subtracted from the calibration average propagation time to obtain a fixed delay; The reasonableness of the range of the average propagation time obtained from multiple measurements and the fixed delay is judged. When the preset calibration conditions are met, the fixed delay is written into the non-volatile memory; otherwise, the calibration operation is re-executed.
3. The method for adaptive acoustic path tracking in ultrasonic flow measurement according to claim 1, characterized in that, The current liquid acoustic path mentioned in step S02 is determined by a pre-established acoustic path model, including: Obtain the outer diameter, wall thickness, pipe material, liquid type, and probe model of the pipe to be tested, and determine the inner diameter of the pipe, the nominal sound velocity of the liquid, the probe spacing, the wedge angle, and the acoustic parameters of each propagation medium. The Snell refraction equations are solved using the bisection method, with the sum of the horizontal displacement of the ultrasonic wave in each solid propagation layer and the horizontal displacement in the liquid propagation segment satisfying the probe spacing as a constraint condition, to determine the refraction angle of the ultrasonic wave in the liquid. The initial liquid sound path and horizontal sound path are determined by using the obtained refraction angle, pipe inner diameter and number of transits in the liquid. The number of transits is determined by the automatic sound path selection rules or installation scan during the installation phase and remains unchanged in the current installation state.
4. The method for adaptive acoustic path tracking in ultrasonic flow measurement according to claim 1, characterized in that, The method for obtaining the real-time speed of sound in step S02 is as follows: The instantaneous sound velocity of the liquid is calculated using the liquid sound path saved after the update of the previous measurement cycle, and the difference between the average propagation time and the fixed delay of the current measurement cycle. In the first measurement cycle, the liquid sound path obtained by solving the initial sound path is used. The instantaneous sound velocity is compared with a preset sound velocity reasonable range. When the instantaneous sound velocity exceeds the preset sound velocity reasonable range, the real-time sound velocity and sound path parameters are not updated using the current inversion results. When the instantaneous sound velocity is within the preset sound velocity reasonableness range, the instantaneous sound velocity and the reliable real-time sound velocity of the previous measurement cycle are subjected to low-pass filtering to obtain the real-time sound velocity of the current measurement cycle.
5. The method for adaptive acoustic path tracking in ultrasonic flow measurement according to claim 1, characterized in that, The steps S02 described in the text refer to updating the refraction angle of the ultrasonic wave in the fluid, the liquid sound path, and the horizontal sound path along the pipe axis as follows: Substitute the real-time sound velocity obtained by inversion into the Snell refraction relation, and use the wedge angle, wedge sound velocity and the real-time sound velocity to determine the refraction angle of the ultrasonic wave in the liquid. The liquid sound path and the horizontal sound path along the pipe axis were calculated using the updated refraction angle, pipe inner diameter, and number of crossings, respectively. The square of the real-time sound velocity, the transit time difference, and the updated horizontal sound path are used to calculate the fluid linear velocity, and the updated liquid sound path is saved for use in the real-time sound velocity inversion of the next measurement cycle.
6. The method for adaptive acoustic path tracking in ultrasonic flow measurement according to claim 1, characterized in that, The step of adjusting the ultrasonic receiving window in step S03 is as follows: The predicted arrival time of the echo obtained in the current measurement cycle is compared with the predicted arrival time of the echo in the previous measurement cycle to determine the amount of prediction change. When the absolute value of the predicted change is less than the preset adjustment threshold, the position of the receiving window remains unchanged. When the absolute value of the predicted change is not less than the preset adjustment threshold, the target position of the receiving window is taken as the position of the preset lead amount before the current echo prediction arrival time, and the receiving window is adjusted within the preset single-cycle movement limit range. The adjusted receiving window position is written into the delay register of the time-to-digital converter.
7. The method for adaptive acoustic path tracking in ultrasonic flow measurement according to claim 1, characterized in that, The verification described in step S04 includes: The average propagation time obtained in the next measurement cycle is compared with the echo arrival time predicted in the previous measurement cycle to determine the prediction error. When the prediction deviation is within the preset tolerance range, it is determined that the actual echo matches the predicted acoustic path, the mismatch count is cleared, and real-time sound velocity inversion, acoustic path parameter update, and receiving window adjustment are continued. When the prediction deviation of a single measurement cycle exceeds the preset tolerance range, maintain the current reliable sound velocity and receiving window state, and increase the mismatch count; When the number of measurement cycles in which the prediction deviation exceeds the limit reaches the preset number of mismatches, it is determined that the target echo has lost lock. The last reliable sound velocity and sound path parameters are frozen, so that the receiving window is kept at the last reliable position. The predicted echo position corresponding to the last reliable sound velocity before the loss of lock is used to search for the target echo again.
8. A device for adaptive acoustic path tracking in ultrasonic flow measurement, characterized in that, The device implements the method as described in any one of claims 1 to 7, comprising: Data acquisition module: used to acquire the transit time of ultrasonic waves propagating along the fluid in the downstream and upstream directions, and to determine the average propagation time and transit time difference; Sound velocity inversion module: used to subtract a pre-calibrated fixed delay from the average propagation time, and invert the real-time sound velocity of the fluid in combination with the current liquid sound path. The real-time sound velocity is used to update the refraction angle of the ultrasonic wave in the fluid, the liquid sound path and the horizontal sound path along the pipe axis, and the fluid flow velocity is calculated in combination with the transit time difference. Echo prediction module: used to predict the echo arrival time of the next measurement cycle using the updated real-time sound velocity and acoustic path parameters, and adjust the ultrasonic receiving window to the position corresponding to the echo arrival time; Prediction verification module: used to obtain the actual echo arrival time in the next measurement cycle, verify the actual echo arrival time with the predicted echo arrival time, and continue to perform the real-time sound velocity inversion, sound path parameter update and receiving window adjustment when the verification is successful.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.
