High-precision liquid flow detection method based on sensor

By deploying ultrasonic and temperature/pressure sensors in liquid flow detection, performing phase difference extraction and smoothing, and combining temperature calibration and turbulence compensation, the accuracy and stability problems of liquid flow detection in existing technologies are solved, achieving high-precision and reliable flow measurement.

CN121632276APending Publication Date: 2026-03-10THERMAL POWER RES INST OF CHINA MEASURING & TESTING TECH ACAD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511889383.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing liquid flow detection technologies suffer from limitations in accuracy, signal weakening, phase drift, noise interference, and insufficient temperature and pressure compensation in high-cleanliness, low-flow, non-invasive, or single-use scenarios, making it difficult to achieve continuous and accurate measurement of the flow rate of extremely small volumes, slow-flowing, or dynamically changing liquids.

Method used

Ultrasonic transmitting and receiving transducers, as well as temperature and pressure sensors, are deployed in selected sections of the pipeline. High-speed phase difference extraction and smoothing are performed. The actual sound velocity is calculated by combining two-point temperature calibration, the net phase difference is constructed and the instantaneous flow velocity is inverted, the turbulent equivalent velocity is estimated by pressure fluctuation, the instantaneous velocity is corrected, and finally the volumetric flow rate is calculated and anomaly detection and normalization are performed.

Benefits of technology

It achieves high-precision detection of liquid flow rate in complex environments, reduces measurement errors, improves system repeatability and robustness, adapts to wide temperature range and turbulent conditions, and outputs complete flow dynamics and total flow information to meet the cumulative monitoring needs of process industries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121632276A_ABST
    Figure CN121632276A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial process control and fluid dynamic measurement, and discloses a high-precision liquid flow detection method based on a sensor. The method comprises the following steps: arranging a sensor, initializing a measurement section, receiving an ultrasonic signal, extracting a phase difference updated along with time, executing two-point temperature calibration, converting liquid temperature and correcting sound velocity, and obtaining static propagation time delay and a theoretical phase; constructing a net phase difference, inverting an axial instantaneous flow velocity according to a propagation difference, and applying non-negative and upper bound constraints; collecting pressure fluctuation to estimate a turbulence equivalent speed and superposing the turbulence equivalent speed with the main speed; calculating the volume flow according to the cross section area and accumulating the volume; phase anomaly, temperature rate and pressure peak detection is carried out, and substitution, recalculation and interpolation are adopted respectively; and counting and normalizing the maximum values of the speed and the flow, and outputting the speed, the flow, the accumulated volume and a normalized curve.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of industrial process control and fluid dynamics measurement, in particular to a high-precision detection method for liquid flow based on sensors. BACKGROUND

[0002] High-precision detection of liquid flow is of great significance in medical infusion, fine chemical industry, food, pharmaceutical industry, energy and other fields. Existing liquid flow detection technologies can be roughly divided into mechanical flow meters, electromagnetic flow meters, thermal flow meters and ultrasonic flow meters. Among them, mechanical and electromagnetic flow meters are difficult to meet the needs of special scenarios such as high cleanliness, small flow, non-invasive or disposable use due to their complex structure, inconvenience of installation and maintenance, and dependence on fluid composition, electrical conductivity and environment. The thermal flow meter is extremely sensitive to temperature fluctuations and bubble disturbances, and is prone to errors and drift in high-precision measurement or medical micro-infusion environment.

[0003] As a non-invasive detection scheme, ultrasonic flow meter has good compatibility and safety, and is widely used in transparent pipelines and non-pollution requiring occasions. However, the mainstream ultrasonic flow meter currently uses time-of-flight difference method, phase shift method or Doppler method. These methods generally have limited precision, weak signal, phase drift, noise interference and insufficient compensation for temperature, pressure and pipeline disturbance in the environment of small flow, low flow rate or even pulsating flow. Although some high-end instruments have introduced temperature compensation and bubble removal functions, the related algorithms often rely on a large number of experimental parameters or fixed models, which have poor universality and are difficult to perform online self-correction for real-time flow field and environmental changes. For the micro-liter level precision requirement scenarios such as medical infusion, the current conventional scheme cannot realize continuous and accurate measurement of liquid flow with extremely small volume, slow flow or dynamic change. On the one hand, some products are limited by volume, power consumption and cost, and cannot integrate high-performance multi-parameter compensation modules, making it difficult to automatically correct measurement errors caused by temperature, pressure, turbulence and other factors. On the other hand, the existing signal processing methods often lack adaptive processing capability for signal noise, phase mutation and instantaneous turbulence, making it difficult to provide repeatable and reliable flow data in clinical environment.

[0004] Therefore, the present application aims to provide a high-precision detection method for liquid flow based on sensors. First, ultrasonic transmitting and receiving transducers and temperature and pressure sensors are arranged on the selected section of the pipeline, and the geometric and sampling parameters are initialized. Then, high-speed phase difference extraction and smoothing processing are performed, the actual sound speed is calculated by combining two-point temperature calibration, and the net phase difference is constructed to inverse the instantaneous flow rate. Then, the equivalent speed of turbulence is estimated by pressure fluctuation to correct the instantaneous speed, and finally the volume flow rate is calculated and the volume is accumulated in the interval. Finally, abnormal detection and normalization processing are performed to output the speed, flow rate and accumulated result. SUMMARY

[0005] The application provides a high-precision detection method for liquid flow based on a sensor, and promotes the solution to the problems mentioned in the background art.

[0006] The application provides the following technical scheme: a high-precision detection method for liquid flow based on a sensor, comprising: Sensor arrangement and initialization of a measurement section are performed; Ultrasonic signal reception and original phase difference extraction are performed to obtain time-updated phase difference data; Temperature sensor two-point calibration is performed to convert the actual temperature of the liquid and correct the sound speed in the liquid, and the static condition propagation time delay and the theoretical phase are obtained; Net phase difference is constructed, liquid axial instantaneous flow rate is inverted based on propagation difference, and non-negative and upper bound constraints are set; Pressure fluctuation is collected, turbulent equivalent velocity is estimated, and a composite axial velocity is formed by superposition; The volume flow rate is calculated according to the cross-sectional area of the pipeline, and the volume is accumulated in a selected time period; Phase anomaly, temperature rate and pressure peak detection are performed, and substitution, recalculation and interpolation processing are respectively implemented; The maximum values of the speed and flow rate during the observation period are calculated, the maximum values are normalized, the normalized amount is set to zero when the maximum value is zero, and the speed curve, the flow rate curve, the accumulated volume and the normalized curve are output.

[0007] Optionally, the sensor arrangement and initialization of the measurement section specifically comprises: A straight pipe section of the infusion pipeline is selected as the measurement section, and the effective length of the measurement section is recorded; A pair of ultrasonic transducers are symmetrically installed on the outer wall at both ends of the measurement section, the left side is numbered as the transmitting end, the right side is numbered as the receiving end, the center distance between the two is recorded, and the center distance is equal to the effective length of the measurement section, and the axes of the pair of ultrasonic transducers are in the same direction as the pipeline axis; A temperature sensor is pasted on the outer wall at the midpoint of the measurement section, and a miniature pressure fluctuation sensor is installed; The infusion pipeline is continuously filled with liquid during flow rate detection; The ultrasonic excitation frequency and the excitation angular frequency are set; The transmitting end drive signal is set as a fixed-amplitude sine wave, a continuous time sequence is established, and the voltage waveform of the transmitting end at each time is recorded, and the transmitting amplitude adopts the reference amplitude set by the system.

[0008] Optionally, the ultrasonic signal reception and original phase difference extraction to obtain time-updated phase difference data specifically comprises: The receiving end transducer converts the sound wave into voltage output, records the phase information corresponding to the time-varying amplitude envelope and the propagation time delay; Perform high-speed sampling and quadrature demodulation to obtain the original phase difference at the current moment; Set the calculation sampling period and the moving average window size to establish a smooth phase difference indexed by discrete time points; When the difference between two consecutive smoothed phase differences exceeds the phase jump threshold, the average of the previous two smoothed values ​​is used to replace the current smoothed value. If there are fewer than two historical samples, skip the replacement and retain the current smoothed value.

[0009] Optionally, the two-point calibration of the temperature sensor is performed to calculate the actual temperature of the liquid and correct the speed of sound in the liquid, while obtaining the propagation delay under stationary conditions and the theoretical phase, specifically including: Record the voltage of the temperature sensor at two sets of calibration points and the corresponding actual temperature, and calculate the linear calibration slope and intercept. When the voltages at the two points are equal, the data at the second point is collected again until the computable conditions are met. The current voltage is converted to the actual liquid temperature using a linear relationship; The velocity of sound in the liquid is corrected based on the reference temperature, the reference velocity of sound, and the linear coefficient of temperature. When the corrected sound speed is not positive, it is set to a small proportional value to the reference sound speed; The propagation delay under stationary conditions is calculated based on the center-to-center distance and the corrected sound velocity, and the theoretical phase under stationary conditions is obtained accordingly.

[0010] Optionally, the construction of the net phase difference, based on the propagation difference inversion of the instantaneous axial flow velocity of the liquid and setting non-negativity and upper bound constraints, specifically includes: Subtract the theoretical phase under rest conditions from the smoothed phase difference to obtain the net phase difference; Based on the theoretical differences between upward propagation and stationary states, the additional propagation delay caused by the flow is calculated; The instantaneous axial velocity of the liquid is inverted based on the relationship between the net phase difference and the additional propagation delay; Apply nonnegative constraints to the instantaneous flow velocity; When the calculation result exceeds the upper limit of the velocity, it is rolled back by the upper limit offset. When the calculation result is negative, it is set to zero.

[0011] Optionally, the process of collecting pressure fluctuations, estimating turbulent equivalent velocities, and superimposing them to form a synthetic axial velocity specifically includes: The pressure sequence of the miniature pressure fluctuation sensor is collected, the number of samples in the window is set, and the pressure mean and variance within the window are calculated. At the same time, the pressure standard deviation is obtained. Obtain the liquid density; Construct the turbulent equivalent velocity based on the pressure standard deviation and liquid density; The turbulent equivalent velocity is added to the instantaneous axial velocity to form the turbulence-corrected composite axial velocity.

[0012] Optionally, the step of calculating the volumetric flow rate based on the pipe cross-sectional area and accumulating the volume over a selected time period specifically includes: Calculate the cross-sectional area of ​​the pipe based on its inner diameter; The volumetric flow rate at each sampling time is obtained by multiplying the composite axial velocity by the cross-sectional area of ​​the pipe. By selecting a discrete start and end time interval, the volumetric flow rate is accumulated item by item according to the sampling period to obtain the cumulative volume of that interval.

[0013] Optionally, the detection of phase anomalies, temperature rates, and pressure peaks involves performing substitution, recalculation, and interpolation processes, respectively, specifically including: When the adjacent difference of the smoothed phase difference exceeds the phase jump threshold, the current value is replaced by the average of the two adjacent smoothed values. If the sampling sequence is sampled less than twice, skip the replacement and retain the current value; When the rate of temperature change exceeds the maximum threshold, the liquid sound velocity is recalculated based on the latest temperature and the theoretical phase under static conditions is recalculated. When a pressure spike is detected and exceeds a threshold based on the pressure standard deviation, the frame is skipped and linear interpolation is performed using the synthetic axial velocity at adjacent time points. When there is no previous or next moment, the composite axial velocity of the next or previous moment is used as the substitute.

[0014] Optionally, the maximum values ​​of velocity and flow rate during the statistical observation period are normalized to the maximum values. When the maximum value is zero, the corresponding normalized value is set to zero. The output includes velocity curves, flow rate curves, cumulative volume curves, and normalized curves, specifically including: The maximum value of the composite axial velocity and the maximum value of the volumetric flow rate within the statistical observation period; The composite axial velocity and volumetric flow rate at each sampling time are normalized using the maximum value to obtain the normalized velocity and normalized volumetric flow rate. Output the original synthetic axial velocity curve, volumetric flow rate curve, cumulative volume at start and end times, normalized velocity curve, and normalized volumetric flow rate curve; The measurement closed loop is periodically updated based on the output results.

[0015] The present invention has the following beneficial effects: 1. By coordinating the deployment of ultrasonic transducers, temperature sensors, and miniature pressure sensors within the same measurement section, spatial consistency of phase and temperature measurements is ensured, while synchronous capture of pressure disturbances is achieved. Compared to existing technologies that rely solely on single temperature compensation or dispersed installations, this scheme provides a precise geometric reference for subsequent processes by symmetrically installing ultrasonic transducers at both ends of the measurement section and defining their effective length. Synchronous acquisition of temperature and pressure data at the midpoint of the measurement section avoids spatiotemporal deviations due to changing operating conditions. This deployment method ensures accurate correspondence between the sound wave propagation path and temperature and pressure compensation, fundamentally reducing measurement errors and laying a reliable foundation for high-precision detection. Furthermore, setting the excitation frequency and drive signal amplitude during the initialization phase provides stable excitation conditions for subsequent phase extraction and signal processing, improving the system's repeatability and robustness.

[0016] 2. Based on high-speed sampling and orthogonal demodulation techniques, the original phase difference is extracted in real time and an adaptive moving average is applied to effectively suppress high-frequency noise and transient interference. Unlike traditional direct phase detection, this scheme sets a moving average window and replaces the signal with the average of the previous two smoothed values ​​when a transition is detected. This preserves the dynamic characteristics of the signal while avoiding abrupt changes caused by single-frame noise. When there are insufficient samples, the replacement is skipped, ensuring that the smoothing algorithm is friendly to the initial stage. This dual approach improves the stability of the phase difference data without over-smoothing and masking the actual flow velocity changes. The real-time smoothing and transition correction strategy solves the problem of phase incomprehensibility in traditional systems at low flow velocities or when flow velocities change abruptly, providing a solid and reliable input for subsequent flow velocity inversion and improving the accuracy and stability of the entire detection chain.

[0017] 3. To address the significant impact of temperature on liquid sound velocity, this solution establishes a two-point calibration mechanism. It establishes a linear temperature-voltage mapping in real time to ensure accurate conversion of the actual liquid temperature when the temperature changes. Furthermore, it dynamically corrects the sound velocity within the tube based on a reference sound velocity and a first-order temperature coefficient. Unlike calibration only at the factory or single-point compensation, this method continuously monitors the consistency of calibration points during the testing process. If the calibration voltages are equal, it automatically resamples, ensuring calibration accuracy. A lower limit constraint is applied to non-positive values ​​of the corrected sound velocity, effectively preventing algorithm crashes caused by abnormal temperature values. Combining temperature calibration with sound velocity compensation, it synchronizes temperature drift and sound velocity changes in real time, providing a reliable basis for net phase difference calculation, reducing measurement errors caused by temperature fluctuations, and improving the system's reliability over a wide temperature range.

[0018] 4. By subtracting the static theoretical phase from the moving average phase difference, a net phase difference is constructed, and then the instantaneous axial velocity of the liquid is directly inverted based on the difference in propagation delay. Simultaneously, non-negative and upper bound constraints are applied, and the offset is backed up when the upper bound is exceeded, ensuring that the inversion results are always within a physically reasonable range. Compared to traditional methods based on empirical models or simple difference calculations, this scheme combines information from both static references and dynamic measurements to accurately extract the phase shift caused by the flow velocity. The non-negative constraint and upper bound back-up mechanism effectively avoid negative velocity values ​​or abnormal peak values, and maintain system continuity through small positive offsets.

[0019] 5. Considering that minute pressure fluctuations caused by turbulence can introduce additional disturbances to ultrasonic phase measurements, this scheme combines the instantaneous pressure sequence output by the miniature pressure sensor with the liquid density to construct a turbulent equivalent velocity function, which is then superimposed on the inverted instantaneous flow velocity. Compared with existing techniques that only compensate for average flow velocity or ignore the influence of turbulence, this method quantifies the contribution of turbulence in real time by calculating the pressure variance and standard deviation within a window, and directly corrects the flow velocity curve, thereby improving the accuracy of flow measurement under turbulent conditions. The pressure window adaptive sampling strategy further ensures the stability and response speed of the statistics. This innovation solves the problem of difficulty in compensating for flow velocity measurement errors caused by turbulence, enabling the system to maintain high-precision output even under high Reynolds number conditions.

[0020] 6. Instantaneous volumetric flow rate is directly calculated based on the pipe cross-sectional area and the combined axial velocity, and then accumulated item by item according to the sampling period within any user-defined time period to obtain cumulative volume information. Unlike traditional methods that only output instantaneous flow rate or indirectly estimate based on instantaneous velocity, this solution explicitly defines the area calculation formula, ensures consistency between velocity and area values, and introduces a flexible start and end time indexing mechanism to meet the accumulation needs of different application scenarios. Furthermore, the discrete accumulation method balances real-time performance and accuracy, and can be used for real-time monitoring and historical statistical analysis. By combining instantaneous and cumulative indicators, it provides users with complete flow dynamics and total volume information, meeting the stringent requirements of process industries for cumulative monitoring.

[0021] 7. For three types of anomalies—phase jumps, excessive temperature rates, and pressure spikes—replacement, recalculation, and interpolation are implemented respectively: For phase jumps, the average of the previous two smoothed values ​​is used for replacement; for excessive temperature rates, the sound velocity and theoretical phase are recalculated; for pressure spikes, linear interpolation is used to fill in distorted frames, and forward or backward compensation is performed for missing boundary moments. This multi-mode parallel anomaly handling strategy overcomes the problem that single anomaly compensation cannot adequately address multiple interferences, enabling the system to maintain data continuity and usability even under extreme conditions such as sudden noise increases, rapid temperature changes, and pressure shocks. Compared to existing solutions that typically only process phase or temperature separately, this solution comprehensively covers the compensation needs of multi-source interference, improving system stability and reliability, and ensuring long-term online operation in complex industrial environments.

[0022] 8. After calculating the maximum values ​​of velocity and flow rate within the statistical observation period, the data at each time point are normalized to the maximum value, and zero values ​​are specifically set to zero. The final output includes the original and normalized velocity curves, flow rate curves, and cumulative volume, achieving periodic updates of the measurement closed loop. Unlike simply outputting raw data or simple normalization, this method considers both dynamic range and engineering visualization needs. Zero-value processing avoids division-by-zero anomalies, and multiple curve views are provided to facilitate quick evaluation of system performance and anomaly trends. The measurement closed-loop update mechanism can adaptively adjust upstream and downstream algorithm parameters based on the latest normalization results, providing feedback support for long-term stable system operation and further enhancing the intelligence and practicality of the entire detection scheme. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the process of the present invention.

[0024] Figure 2 This is a schematic diagram of the measuring section structure of the present invention.

[0025] In the figure: 1-measuring section, 2-ultrasonic transmitting transducer, 3-temperature sensor, 4-miniature pressure sensor, 5-ultrasonic receiving transducer, 6-axial direction. Detailed Implementation

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

[0027] Example, refer to Figure 1 A high-precision method for detecting liquid flow rate based on sensors, comprising: Deploy the sensors and initialize the measurement segment; Ultrasonic signal reception and raw phase difference extraction are performed to obtain phase difference data updated over time; Perform two-point calibration of the temperature sensor, calculate the actual temperature of the liquid and correct the speed of sound in the liquid, and obtain the propagation delay and theoretical phase under static conditions. Construct the net phase difference, invert the instantaneous axial velocity of the liquid based on the propagation difference, and set non-negative and upper bound constraints; Collect pressure fluctuations, estimate turbulent equivalent velocities, and superimpose them to form a synthetic axial velocity; Calculate the volumetric flow rate based on the pipe cross-sectional area and accumulate the volume over a selected time period; Perform phase anomaly, temperature rate and pressure peak detection, and implement substitution, recalculation and interpolation processes respectively; The maximum values ​​of velocity and flow rate during the statistical observation period are normalized to the maximum values. When the maximum value is zero, the corresponding normalized value is set to zero. The output curves are velocity curve, flow rate curve, cumulative volume, and normalized curve.

[0028] First, by symmetrically deploying ultrasonic sensors in the pipeline measurement section and installing temperature and pressure sensors at key points, a physical foundation is laid for subsequent high-precision measurements. Second, a step-by-step data acquisition and multi-level compensation method is employed to precisely extract and correct key influencing factors in flow detection. This method not only separates and processes interferences such as temperature drift and turbulent pressure fluctuations, but also introduces multi-mode processing and substitution mechanisms for sudden situations such as phase anomalies, temperature jumps, and pressure anomalies, effectively preventing misjudgments or distortions under a single algorithm. Finally, by normalizing the output velocity, flow rate, and cumulative volume, it not only facilitates comparative analysis under different operating conditions but also enables process control and data visualization. Compared with traditional flow detection, this method achieves real-time compensation and closed-loop updates for multiple parameters, improving detection accuracy and stability, and is suitable for applications requiring high reliability and accuracy in fluid flow detection.

[0029] Reference Figure 2 The process of deploying sensors and initializing the measurement segment specifically includes: Select a straight section of the infusion pipeline as the measurement section and record the effective length of the measurement section; A pair of ultrasonic transducers are symmetrically installed on the outer walls at both ends of the measuring section. The left side is numbered as the transmitting end and the right side is numbered as the receiving end. The center distance between the two is recorded, and the center distance is equal to the effective length of the measuring section. At the same time, the axes of the pair of ultrasonic transducers are in the same direction as the pipe axis. A temperature sensor is attached to the outer wall at the midpoint of the measurement section, and a miniature pressure fluctuation sensor is installed. The infusion pipeline is continuously filled with liquid during flow detection, meaning there are no continuous air sections, stratified flow, annular two-phase flow, or intermittent liquid columns. Set the ultrasonic excitation frequency and excitation angular frequency; The transmitter drive signal is set to a fixed amplitude sine wave. A continuous time series is established and the voltage waveform of the transmitter at each moment is recorded. The transmission amplitude adopts the reference amplitude set by the system.

[0030] Further specific implementation steps include: A straight section of the infusion pipeline is selected and designated as the measurement section; The effective length of the measurement segment is denoted as . ; A pair of ultrasonic transducers are symmetrically installed on the outside of the pipe wall at both ends of the measuring section. The left one is numbered as follows: The number on the right is The center-to-center distance is defined as ;in, Number the ultrasonic transmitting transducer; Number the ultrasonic receiving transducer; The center-to-center geometric distance between the transmitting and receiving transducers; A temperature sensor is installed on the outer wall at the midpoint of the measurement section, denoted as . At the same time, a miniature pressure fluctuation sensor is set up and denoted as ; Set the ultrasonic excitation frequency to The excitation angular frequency is The unit is ; The transmitting signal is set to a fixed amplitude sine wave, specifically: ;in, For continuous time points; For the transmitting end at time The voltage waveform; The reference amplitude of the transmitted signal set for the system.

[0031] First, a straight section of the pipeline is selected as the measurement segment to ensure the uniformity of fluid flow and the representativeness of the measurement data. Accurate acquisition of the effective length of the measurement segment provides a reliable benchmark for all subsequent space-related calculations. Ultrasonic transducers are symmetrically installed at both ends with a defined center-to-center distance to ensure a clear and symmetrical sound wave propagation path, reducing errors caused by installation deviations. Temperature and pressure sensors are simultaneously installed on the outer wall at the midpoint, enabling synchronous detection of the fluid state. Fixed excitation frequency and signal amplitude ensure stable ultrasonic signal output. This layout achieves spatial consistency of measurement data, reduces system errors caused by uneven distribution of temperature and pressure measurement points, and improves the system's robustness and reproducibility, forming the foundation for high-precision measurements.

[0032] The process of receiving ultrasonic signals and extracting the original phase difference to obtain phase difference data updated over time specifically includes: The receiver transducer converts the sound wave into a voltage output and records the phase information corresponding to the time-varying amplitude envelope and propagation delay. Perform high-speed sampling and quadrature demodulation to obtain the original phase difference at the current moment; Set the calculation sampling period and the moving average window size to establish a smooth phase difference indexed by discrete time points; When the difference between two consecutive smoothed phase differences exceeds the phase jump threshold, the average of the previous two smoothed values ​​is used to replace the current smoothed value. If there are fewer than two historical samples, skip the replacement and retain the current smoothed value.

[0033] Further specific implementation steps include: Receiver sensor After receiving the sound wave signal, it is converted into a voltage output: ;in, For the receiving end at time The voltage output; For the receiving end at time The real-time amplitude envelope; This is the total propagation delay of the sound wave from transmission to reception; The actual phase difference of the current signal is obtained by using a high-speed sampling and quadrature demodulation circuit, specifically: ;in, For a moment The original phase difference; Set the sampling period for each calculation to be... The moving average window size is ; Set the first The consecutive times of the sampling are ;in, This represents the start time of the sampling sequence; For discrete-time indexing; And construct a smooth phase difference as follows: ;in, For the first Smooth phase difference at each sampling time; To adapt the window length locally; For local summation index, it indicates the summation index within the window. Summing of lagged samples; If detected Then a one-time substitution correction will be performed, specifically as follows: ; when At that time, no alternative correction will be performed, and the modification will be retained. Original value.

[0034] An ultrasonic receiver converts sound wave signals into voltage signals, enabling real-time acquisition of the impact of fluid flow on sound wave propagation. High-speed sampling and quadrature demodulation allow for precise extraction of the actual phase difference at each moment, significantly improving data processing accuracy. A moving average window is introduced to smooth the original phase difference, effectively suppressing data jitter caused by transient noise or environmental disturbances. When a phase jump is detected, outliers are replaced with the average of the previous two values, reducing the impact of extreme values ​​on the overall data. Replacement is skipped when there are insufficient samples in the initial stage, avoiding invalid or erroneous corrections. These detailed operations work together to resolve interference from signal fluctuations and environmental noise on flow velocity detection, enhancing the system's anti-interference capability in complex field environments and ensuring the continuity and reliability of phase difference data.

[0035] The process involves two-point calibration of the temperature sensor, conversion of the actual liquid temperature, correction of the sound velocity in the liquid, and simultaneous acquisition of the propagation delay under stationary conditions and the theoretical phase. Specifically, this includes: Record the voltage of the temperature sensor at two sets of calibration points and the corresponding actual temperature, and calculate the linear calibration slope and intercept. When the voltages at the two points are equal, the data at the second point is collected again until the computable conditions are met. The current voltage is converted to the actual liquid temperature using a linear relationship; The velocity of sound in the liquid is corrected based on the reference temperature, the reference velocity of sound, and the linear coefficient of temperature. When the corrected sound speed is not positive, it is set to a small proportional value to the reference sound speed; The propagation delay under stationary conditions is calculated based on the center-to-center distance and the corrected sound velocity, and the theoretical phase under stationary conditions is obtained accordingly.

[0036] Further specific implementation steps include: Recording temperature sensor Output voltage Let the two reference points be: First point voltage Corresponding temperature Second point voltage Corresponding temperature ;in, For temperature sensor at time The voltage output; , These are the temperature sensor voltages at the two-point calibration points; , The known true temperatures corresponding to the two calibrated points; Calculate the linear calibration coefficients: , ;in, The slope of the temperature-voltage linear relationship; The temperature-voltage linear intercept; when Then, reacquire the second voltage and temperature pair until the condition is met. Then calculate and ; Current moment The actual temperature of the liquid below is ;in, For the first The actual temperature of the liquid at the time of the next sampling, in units ; The speed of sound is corrected according to temperature, and the reference speed of sound is denoted as . The temperature correction factor is ,but: ;in, For the first The velocity of sound in the liquid at the next sampling time, in units of ; Reference temperature The reference speed of sound; For reference temperature; It is the first-order linear coefficient of sound speed with respect to temperature. Its value can be obtained through on-site calibration or by consulting publicly available thermophysical property data, which is existing technology. when season ; The propagation delay under stationary conditions is calculated as follows: ;in, Under the assumption of rest, the first The propagation delay of each sample is measured in seconds. Therefore, the static theoretical phase is: ;in, Under the assumption of rest, the first The theoretical phase of the next sample.

[0037] The system records the voltage and actual temperature of the temperature sensor at two points, calculates the linear calibration coefficient, and thus achieves accurate conversion between temperature and voltage. Automatic resampling is performed when the data at either point is abnormal, effectively avoiding calibration failures caused by sensor characteristics or acquisition anomalies. Subsequently, the sound velocity in the liquid is dynamically corrected using real-time temperature data, completely resolving the impact of temperature changes on sound velocity and sound wave propagation. A lower limit constraint is introduced for abnormal sound velocity cases to prevent algorithm crashes. Finally, the static propagation delay and theoretical phase are accurately obtained through sound velocity and the geometric parameters of the measurement section, providing a solid foundation for net phase difference calculation and flow velocity inversion. This series of calibration and correction steps enables the system to accurately respond to temperature changes, improving the temperature adaptability and overall measurement accuracy of flow detection, representing an innovation distinct from conventional single-temperature compensation techniques.

[0038] Reference Figure 2 The construction of the net phase difference, which involves inverting the instantaneous axial flow velocity of the liquid based on the propagation difference and setting non-negativity and upper bound constraints, specifically includes: Subtract the theoretical phase under rest conditions from the smoothed phase difference to obtain the net phase difference; Based on the theoretical differences between upward propagation and stationary states, the additional propagation delay caused by the flow is calculated; The instantaneous axial velocity of the liquid is inverted based on the relationship between the net phase difference and the additional propagation delay; Apply nonnegative constraints to the instantaneous flow velocity; When the calculation result exceeds the upper limit of the velocity, it is rolled back by the upper limit offset. When the calculation result is negative, it is set to zero.

[0039] Further specific implementation steps include: Calculate the net phase difference: ;in, For the first The net phase difference of the samples, in units of ; In the computational theoretical model, the propagation difference between the upward and stationary states corresponds to the time difference, specifically: ;in, This is due to the additional propagation delay caused by the movement; For the first The axial flow velocity of the liquid in the next sample; The phase generated by this time difference is ; The instantaneous flow velocity of the liquid is calculated as follows: ; when season ; When the calculation result satisfies season ;in, This is the minimum positive offset used when constraining the upper velocity limit, in units of ; When the calculation result satisfies season .

[0040] By subtracting the static theoretical phase from the moving average phase difference, the phase changes caused by fluid flow are accurately distinguished, eliminating systematic errors introduced by static conditions and the equipment itself. Furthermore, real-time flow velocity inversion is achieved through propagation time difference, and non-negativity and upper bound constraints are introduced to prevent physically unreasonable results. For outliers exceeding the upper bound, a small backoff offset is used to avoid the impact of sudden data changes on the overall curve. Negative values ​​are directly set to zero, ensuring that all outputs have a clear physical meaning. This strict constraint and outlier handling strategy effectively solves the inversion distortion problem caused by noise, computational overflow, or extreme operating conditions. Compared with traditional simple difference or empirical formulas, this method has significant advantages in physical consistency and algorithm robustness, and is an important means to improve the reliability of real-time flow velocity calculation.

[0041] Reference Figure 2 The process of collecting pressure fluctuations, estimating turbulent equivalent velocities, and superimposing them to form a synthetic axial velocity specifically includes: The pressure sequence of the miniature pressure fluctuation sensor is collected, the number of samples in the window is set, and the pressure mean and variance within the window are calculated. At the same time, the pressure standard deviation is obtained. Obtain the liquid density; Construct the turbulent equivalent velocity based on the pressure standard deviation and liquid density; The turbulent equivalent velocity is added to the instantaneous axial velocity to form the turbulence-corrected composite axial velocity.

[0042] Further specific implementation steps include: collection Output pressure value sequence The sample size is ;in, For the first The instantaneous pressure at the time of the next sampling, in Pascals; Calculate the mean and variance of the pressure under the current window: , ; And calculate the pressure standard deviation as ; in, For the first The average pressure within the window corresponding to each sampling; The variance of pressure within the window; The standard deviation of pressure within the window; This is the number of effective samples that adapts to local conditions. For local window indexing; Obtain the density of the liquid, denoted as . The unit is ; The equivalent velocity function for turbulence is constructed as follows: ;in, For the first The turbulent equivalent velocity of the subsample; The corrected instantaneous velocity is: ;in, For the first The synthesized axial velocity after turbulence correction from the second sampling.

[0043] By acquiring pressure data in real time within the measurement section and calculating the pressure mean, variance, and standard deviation using a statistical window, a solid data foundation is provided for dynamically reflecting the flow field state. Furthermore, the liquid density is combined with the pressure standard deviation to calculate the turbulent equivalent velocity, which is then superimposed on the axial velocity to correct flow detection deviations caused by turbulent fluctuations. This innovative approach of introducing turbulence compensation breaks through the dependence of traditional flow detection on laminar flow assumptions, enabling the detection system to adapt to more complex and dynamic flow conditions. By accurately evaluating and correcting turbulence effects, not only is the accuracy of flow measurement improved, but the applicability of the detection method is also expanded, effectively solving the error problems common in non-ideal fluid flow conditions in industrial settings.

[0044] The calculation of volumetric flow rate based on pipe cross-sectional area and the accumulation of volume over a selected time period specifically includes: Calculate the cross-sectional area of ​​the pipe based on its inner diameter; The volumetric flow rate at each sampling time is obtained by multiplying the composite axial velocity by the cross-sectional area of ​​the pipe. By selecting a discrete start and end time interval, the volumetric flow rate is accumulated item by item according to the sampling period to obtain the cumulative volume of that interval.

[0045] Further specific implementation steps include: Calculate the cross-sectional area of ​​the pipe as follows: ;in, This refers to the inner diameter of the pipe. Calculate the first The volumetric flow rate of the next sample is ; At any time period The cumulative volume inside is: ;in, , For the continuous time intervals corresponding to the start and end sampling indices of the discrete interval; , It is a discrete index, and satisfies ; For interval The cumulative volume.

[0046] Accurate calculation of the cross-sectional area based on the pipe's inner diameter lays the foundation for accurate conversion of subsequent volumetric flow rate. Instantaneous volumetric flow rate is derived using the synthesized axial velocity and pipe area, minimizing cumulative errors caused by parameter inconsistencies. By accumulating values ​​over selected time periods, not only can instantaneous flow rate be output in real time, but also cumulative volume for any interval can be output as needed. This design fully considers the diverse needs for flow data in different application scenarios. Compared to existing solutions that only provide instantaneous values ​​or lack flexible accumulation capabilities, this claim provides more complete and flexible data support, facilitating both real-time monitoring and historical data statistics and subsequent analysis, thus enhancing the overall engineering application value of the system.

[0047] The detection of phase anomalies, temperature rates, and pressure spikes involves substitution, recalculation, and interpolation processes, respectively, including: When the adjacent difference of the smoothed phase difference exceeds the phase jump threshold, the current value is replaced by the average of the two adjacent smoothed values. If the sampling sequence is sampled less than twice, skip the replacement and retain the current value; When the rate of temperature change exceeds the maximum threshold, the liquid sound velocity is recalculated based on the latest temperature and the theoretical phase under static conditions is recalculated. When a pressure spike is detected and exceeds a threshold based on the pressure standard deviation, the frame is skipped and linear interpolation is performed using the synthetic axial velocity at adjacent time points. When there is no previous or next moment, the composite axial velocity of the next or previous moment is used as the substitute.

[0048] Further specific implementation steps include: If the detection conditions are met Then it is corrected to: ; when At that time, do not perform the correction, retain. Original value; If the rate of temperature change exceeds the maximum threshold, i.e. Then recalculate. , ;in, For the first Temperature change rate threshold at the next sampling time; For the first The standard deviation of temperature corresponding to each sampling; For the first The average temperature of the window sampled; This represents the number of samples for the in-situ adaptive temperature window. This represents the maximum number of samples in the temperature statistics window. If a pressure peak exists, that is If the frame is not found, skip it and use linear interpolation instead, specifically: ; When there is no previous moment season ; When there is no next moment season .

[0049] A triple detection and compensation mechanism for phase anomalies, temperature rates, and pressure spikes is proposed. When a phase jump is detected, the average of the first two values ​​is used as a substitute to prevent extreme noise from affecting the overall data. When the temperature change rate exceeds the limit, the sound velocity and theoretical phase are automatically recalculated to dynamically adapt to sudden changes in operating conditions. When an anomaly is detected in a pressure spike, the abnormal frame is skipped and repaired using linear interpolation to ensure the continuity of the data curve. Special compensation is also provided for missing boundary samples to avoid the impact of boundary effects on the overall results. This multi-level, multi-mode anomaly detection and compensation system effectively solves the impact of multi-source sudden interference on detection data in complex industrial environments, ensuring the continuity and reliability of the system output. Compared with traditional solutions that only address a single type of anomaly, this method has a wider coverage, stronger targeting, and improves the system's engineering applicability and anti-interference capability.

[0050] The maximum values ​​of velocity and flow rate during the statistical observation period are normalized to the maximum values. When the maximum value is zero, the corresponding normalized value is set to zero. The output includes velocity curves, flow rate curves, cumulative volume curves, and normalized curves, specifically including: The maximum value of the composite axial velocity and the maximum value of the volumetric flow rate within the statistical observation period; The composite axial velocity and volumetric flow rate at each sampling time are normalized using the maximum value to obtain the normalized velocity and normalized volumetric flow rate. Output the original synthetic axial velocity curve, volumetric flow rate curve, cumulative volume at start and end times, normalized velocity curve, and normalized volumetric flow rate curve; The measurement closed loop is periodically updated based on the output results.

[0051] Further specific implementation steps include: Maximum velocity and maximum flow rate within the statistical observation period: , ;in, This represents the maximum velocity within the observation period. The maximum flow rate within the observation period; Normalized velocity and flow output are: , ;in, For the first Normalization rate of each sample; For the first Normalized flow rate of the next sample; The final output includes: the original velocity curve. Flow curve Cumulative volume Normalized curve , ;in, The start time of the observation; This is the time when the observation ends.

[0052] By statistically analyzing data throughout the entire lifecycle, the maximum values ​​of velocity and flow rate are selected as normalization benchmarks to achieve unified comparison and analysis of data under different operating conditions. When the maximum value is zero, the normalized output is also zero, effectively preventing division-by-zero anomalies. The normalized output includes the original velocity, flow rate, cumulative volume, and standardized curve, which facilitates data visualization and process control, and also supports intelligent monitoring and anomaly trend analysis. Compared with traditional solutions that only output the original measurement results, this method takes into account data standardization, comparability, and diverse output requirements, improves data post-processing and application expansion capabilities, and enables the flow detection system to not only meet accuracy requirements but also adapt to the new demands of industrial intelligent development.

[0053] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0054] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A high-precision detection method for liquid flow based on a sensor, characterized in that, The method comprises the following steps: Carrying out sensor arrangement and initializing measurement section; Carrying out ultrasonic signal receiving and original phase difference extraction to obtain phase difference data updated over time; Performing two-point calibration of temperature sensor, converting actual temperature of liquid and correcting sound speed in liquid, and obtaining propagation time delay and theoretical phase under static condition at the same time; Constructing net phase difference, inverting axial instantaneous flow rate of liquid based on propagation difference and setting non-negative and upper bound constraints; Collecting pressure fluctuation, estimating turbulent equivalent velocity and superimposing to form composite axial velocity; Calculating volume flow rate according to cross-sectional area of pipeline and accumulating volume in selected time period; Performing phase anomaly, temperature rate and pressure peak detection, respectively implementing replacement, recalculation and interpolation processing; Statistically observing maximum value of velocity and flow rate in observation period, normalizing according to maximum value, setting zero when maximum value is zero, and outputting velocity curve, flow rate curve, accumulated volume and normalized curve.

2. The high-precision detection method of liquid flow based on a sensor according to claim 1, characterized in that, The step of carrying out sensor arrangement and initializing measurement section specifically comprises the following steps: Selecting straight pipe section of infusion pipeline as measurement section and recording effective length of measurement section; Symmetrically installing a pair of ultrasonic transducers on outer wall of both ends of measurement section, numbering left side as transmitting end and right side as receiving end, recording center distance between both, and satisfying that the center distance is equal to effective length of measurement section, and axes of the pair of ultrasonic transducers are in the same direction as pipeline axis; Sticking temperature sensor on outer wall of midpoint of measurement section and installing miniature pressure fluctuation sensor; The infusion pipeline is continuously filled with liquid during flow rate detection; Setting ultrasonic excitation frequency and excitation angular frequency; Setting transmitting end driving signal as fixed-amplitude sinusoidal wave, establishing continuous time sequence and recording voltage waveform of transmitting end at each time, and adopting reference amplitude set by system as transmitting amplitude.

3. The high-precision detection method of liquid flow based on a sensor according to claim 2, characterized in that, The step of carrying out ultrasonic signal receiving and original phase difference extraction to obtain phase difference data updated over time specifically comprises the following steps: Receiving end transducer converts sound wave into voltage output, recording phase information corresponding to time-varying amplitude envelope and propagation time delay; Performing high-speed sampling and quadrature demodulation to obtain original phase difference at current time; Setting calculation sampling period and sliding average window size, establishing smooth phase difference indexed by discrete time; When difference between adjacent two smooth phase differences exceeds phase jump threshold, replacing current smooth value with mean value of previous two smooth values; When historical samples are less than two, skipping replacement and keeping current smooth value.

4. The high-precision detection method of liquid flow based on a sensor according to claim 3, characterized in that, The step of performing two-point calibration of temperature sensor, converting actual temperature of liquid and correcting sound speed in liquid, and obtaining propagation time delay and theoretical phase under static condition at the same time specifically comprises the following steps: Recording voltage and corresponding real temperature of temperature sensor at two sets of calibration points, calculating linear calibration slope and intercept; When voltages at two points are equal, re-collecting data of second point until meeting calculable condition; Converting current voltage into real temperature of liquid according to linear relationship; Correcting sound speed in liquid according to reference temperature, reference sound speed and temperature first-order linear coefficient; When corrected sound speed is not positive, setting as a small positive proportional value of reference sound speed; Calculating propagation time delay under static condition based on center distance and corrected sound speed, and obtaining theoretical phase under static condition based on the same.

5. The high-precision detection method of liquid flow based on a sensor according to claim 4, characterized in that, The construction net phase difference, based on the propagation difference inversion liquid axial instantaneous flow rate and set non-negative and upper bound constraints, specifically includes: The smooth phase difference is subtracted from the static condition theory phase to obtain the net phase difference; Combined with the theoretical difference of uplink propagation and static state, the additional propagation delay caused by flow is calculated; According to the relationship between the net phase difference and the additional propagation delay, the liquid axial instantaneous flow rate is inverted; The non-negative constraint is performed on the instantaneous flow rate; When the calculation result exceeds the upper bound of the speed, the backoff is performed according to the upper bound offset; When the calculation result is negative, the zero processing is performed.

6. The high-precision detection method of liquid flow based on a sensor according to claim 5, characterized in that, The acquisition pressure fluctuation, estimation of turbulent equivalent velocity and superposition to form the synthetic axial velocity, specifically includes: The pressure sequence of the micro pressure fluctuation sensor is collected, the window sample number is set and the pressure mean and variance in the window are calculated, and the pressure standard deviation is obtained; The liquid density is obtained; The turbulent equivalent velocity is constructed according to the pressure standard deviation and the liquid density; The turbulent corrected synthetic axial velocity is formed by adding the turbulent equivalent velocity and the axial instantaneous flow rate.

7. The high-precision detection method of liquid flow based on a sensor according to claim 6, characterized in that, The volume flow rate is calculated according to the pipe cross-sectional area and the volume is accumulated in the selected time period, specifically including: The pipe cross-sectional area is calculated according to the pipe inner diameter; The volume flow rate at each sampling time is obtained by multiplying the synthetic axial velocity and the pipe cross-sectional area; The volume flow rate is accumulated item by item according to the sampling period in the selected discrete start and end time interval to obtain the cumulative volume in the interval.

8. The high-precision detection method of liquid flow based on a sensor according to claim 7, characterized in that, The phase anomaly, temperature rate and pressure peak detection are performed, and the replacement, recalculation and interpolation processing are respectively implemented, specifically including: When the adjacent difference value of the smooth phase difference exceeds the phase jump threshold, the average of the adjacent two smooth values is used to replace the current value; When the sampling sequence is less than twice, the replacement is skipped and the current value is maintained; When the temperature change rate exceeds the maximum threshold, the liquid sound speed is recalculated based on the latest temperature and the static condition theory phase is recalculated; When the pressure peak is detected and exceeds the threshold based on the pressure standard deviation, the frame is skipped and the synthetic axial velocity at the previous and next time is linearly interpolated; When there is no previous or next time, the synthetic axial velocity at the next or previous time is replaced, respectively.

9. The high-precision detection method of liquid flow based on a sensor according to claim 8, wherein, The maximum values of the observation period speed and flow are normalized according to the maximum value, the corresponding normalized amount is zero when the maximum value is zero, and the speed curve, flow curve, cumulative volume and normalized curve are output, specifically including: The maximum values of the synthetic axial velocity and the volume flow rate in the observation period are calculated; The maximum values are used to normalize the synthetic axial velocity and the volume flow rate at each sampling time, respectively, to obtain the normalized velocity and the normalized volume flow rate; The original synthetic axial velocity curve, volume flow curve, start and end time cumulative volume, normalized velocity curve and normalized volume flow curve are outputted; According to the output result, the periodic update of the measurement closed loop is completed.

Citation Information

Cited By

  • Sand-containing water conveying pipeline and conveying method

    CN122062200A