Ultrasonic velocity measurement method and system
By extracting the downstream and counterflow data envelope information in ultrasonic measurement, setting the voltage threshold, finding the threshold point, and calculating the flight time, the problem of low accuracy in fluid flow velocity measurement in the existing technology is solved, and high accuracy and low Complexity of fluid velocity measurements.
Patent Information
- Application Number
- CN202210934241.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-08-04
AI Technical Summary
Existing ultrasonic measurement technology has low accuracy in fluid flow velocity measurement, especially low sensitivity at low flow rates, and the Doppler effect method is not suitable for gas measurement and has large error fluctuations.
By acquiring downstream and counterflow data, extracting envelope information, setting voltage thresholds, finding threshold points that meet specific conditions, determining flight time, calculating fluid speed, and using sliding mean filtering or Kalman filtering to denoise, the anti-noise capability is improved.
It improves the accuracy of fluid velocity measurement, reduces errors caused by noise interference and signal amplitude attenuation, simplifies algorithms and calculations, reduces MCU requirements, and achieves efficient and fast fluid velocity measurement.
Smart Images

Figure CN115308434B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ultrasonic measurement, and in particular relates to an ultrasonic velocity measurement method and system. Background Art
[0002] The use of ultrasound to measure fluid velocity is one of the commonly used technologies at present. Compared with the beam shift method, correlation method, and Doppler effect method, the use of ultrasound to measure fluid velocity is less restricted by conditions when measuring flow velocity. For example, the beam shift method uses three transducers, and the distance between the first transducer and the second transducer is equal to the distance between the first transducer and the third transducer. The first transducer emits ultrasound in a direction perpendicular to the axis of the pipe. When the fluid is stationary, the signal strength received by the second transducer and the third transducer is the same; when there is a flow rate, the signal strength received by the second transducer and the third transducer will change with the change of the flow rate. The energy difference measured by the second transducer and the third transducer can be used to measure the flow rate. The beam frequency shift method is greatly affected by the sensitivity and signal strength of the transducer, and at low flow rates, the sensitivity is low, so that the obtained fluid velocity is inaccurate. For example, the Doppler effect method is based on the scattering principle, which requires solid particles or bubbles in the fluid. As a result, the beam frequency shift method cannot be used for gas measurement and requires the particles or bubbles in the fluid to maintain good uniformity. Otherwise, the error fluctuation will be very large, affecting the accuracy of the image fluid velocity.
[0003] Based on the above reasons, ultrasonic waves are mostly used to measure fluid velocity at present. For example, in the Chinese invention patent application document with application publication number CN114526778A, a method for determining ultrasonic time difference is disclosed. This method first sets multiple frequency points for the transducer, and uses the ultrasonic data of each frequency point whose frequency cannot be divided by an integer to determine the phase difference at each frequency point; then uses the FFT algorithm, Goertzel algorithm and other algorithms to determine the corresponding time difference through the phase difference; finally, the ultrasonic time difference is determined according to the time difference of each frequency point, the period of the frequency point and the proportional coefficient between the periods of each frequency point. This method has a small amount of calculation, but the denoising ability is weak, and the fluid velocity calculated using this method has low accuracy. Summary of the invention
[0004] The object of the present invention is to provide an ultrasonic velocity measurement method and system to solve the problem of low accuracy of fluid velocity measurement in the prior art.
[0005] In order to solve the above technical problems, the technical solutions provided by the present invention and the corresponding beneficial effects of the technical solutions are as follows:
[0006] An ultrasonic velocity measurement method of the present invention comprises the following steps:
[0007] Acquire the downstream data and upstream data sampled when ultrasonically measuring the flow velocity of the fluid to be measured; calculate the corresponding flight time based on the downstream data and the upstream data respectively; calculate the fluid velocity based on the flight time corresponding to the downstream data and the flight time corresponding to the upstream data;
[0008] The method for calculating the flight time comprises the following steps:
[0009] 1) Extracting corresponding envelope information based on the acquired data and determining the corresponding envelope peak value;
[0010] 2) C voltage thresholds are set according to the envelope peak value, where C≥2; and the acquired data are compared with the C voltage thresholds respectively according to the following conditions to obtain multiple threshold points that meet the conditions:
[0011] V(k)≤V i <V(k+1)
[0012] Among them, V i Represents the voltage value of the threshold point, i∈[1,C], V(k) represents a point in the data, V(k+1) represents the next data point of V(k), k∈[0,N-1], N is the data sampling length;
[0013] 3) Determine a plurality of time values according to the intersection of a straight line where any two of the plurality of threshold points are located and the time axis, and determine the corresponding flight time according to the plurality of time values.
[0014] The beneficial effects of the above technical solution are as follows: the present invention obtains envelope information and envelope peak value for the forward and reverse flow data; sets the voltage threshold according to the envelope peak value, and searches for the voltage that satisfies the formula V(k)≤V in the forward and reverse flow data. iThe voltage value of <V(k + 1)>, and then determine multiple threshold points; the data selected by the present invention through the above conditions is the data in the controlled stage during the period when the data rises stably when an excitation signal is applied to the transducer. The data in this stage is more accurate. Unlike the falling period, it is affected by free oscillation and has large data errors. Then, determine multiple time values based on the intersection of the straight line passing through any two threshold points among the multiple threshold points and the time axis, and determine the corresponding flight time based on the multiple time values. Finally, calculate the fluid velocity based on the flight time corresponding to the downstream data and the flight time corresponding to the upstream data. The present invention first utilizes the envelope characteristics of the received upstream and downstream data and performs simple data processing, thereby improving the anti-noise ability and being beneficial to improving the accuracy of the calculation result; the signal can be collected once, and multiple sets of calculation results can be obtained. The multiple sets of results are subjected to simple data processing operations, which are simple to operate and can improve the operation accuracy. Since the present invention uses the data in the controlled stage, the data is accurate and the number of sampling points is small. Therefore, the present invention has less computational complexity, a simple algorithm, relatively low requirements for the MCU, short measurement time, and more importantly, an ultrasonic velocity measurement method with accurate measurement of fluid velocity.
[0015] Further, in step 2), when setting C voltage thresholds according to the envelope peak value, the following formula is used for setting:
[0016] V i = η * Mval
[0017] Wherein, Mval represents the envelope peak value, and 10% ≤ η ≤ 60%.
[0018] Further, it is characterized in that: C ∈ [5, 10].
[0019] Further, in step 3), when determining multiple time values based on the intersection of the straight line passing through any two threshold points among the multiple threshold points and the time axis, it is necessary to determine the time value corresponding to the voltage value among the threshold points, and the time value corresponding to the voltage value is calculated by using the linear interpolation method.
[0020] Further, in order to improve the accuracy of the calculated fluid flow rate, after extracting the corresponding envelope information in step 1), it is also necessary to perform denoising processing on the envelope information to remove the mutation points caused by noise interference.
[0021] Further, in order to reduce the error caused by signal amplitude attenuation, before determining the corresponding envelope peak value in step 1), it is also necessary to perform normalization processing on the envelope information.
[0022] Further, when calculating the fluid velocity based on the flight time corresponding to the downstream data and the flight time corresponding to the upstream data, the following calculation formula is used:
[0023]
[0024] Among them, v m is the fluid velocity, is the angle between the straight line formed by the ultrasonic emission point and the receiving point and the flow channel, L is the distance between the ultrasonic emission point and the receiving point, T1 is the downstream flight time, and T2 is the upstream flight time.
[0025] Furthermore, sliding mean filtering or Kalman filtering is used to perform denoising on the envelope information.
[0026] An ultrasonic velocity measurement system of the present invention comprises a plurality of transducers, an analog switch and a main control unit, wherein the plurality of transducers are respectively arranged on both sides of a fluid flow channel to be measured, and the transducers on one side of the fluid flow channel to be measured and the transducers on the other side cannot be arranged on a straight line perpendicular to the fluid flow channel at the same time, and are used to send or receive ultrasonic signals; the main control unit switches the working states of the plurality of transducers by controlling the analog switch, so that the transducers on one side of the fluid flow channel to be measured are in a signal transmitting state, and the transducers on the other side are in a signal receiving state; the main control unit is used to execute a computer program to implement an ultrasonic velocity measurement method of the present invention.
[0027] The beneficial effects of the above technical solution are as follows: under the control of the main control unit, the present invention realizes the sending and receiving of ultrasonic signals by the transducers on both sides of the fluid flow channel to be measured, and finally the main control unit calculates the fluid flow rate based on the received forward and reverse flow waveform signals. The data selected by the present invention through the set conditions are the data of the controlled stage during the stable rising period of the data when the excitation signal is applied to the transducer. The data in this stage is more accurate, unlike the falling period, which is affected by free oscillation and has a large data error. Since the present invention uses the data of the controlled stage, the data is accurate, the number of sampling points involved in the back-end algorithm processing is small, and the real-time performance is high. Therefore, the present invention has a small amount of calculation, a simple algorithm, a relatively low requirement for the MCU, and a short measurement time.
[0028] Furthermore, the system also includes a signal sending amplification circuit and a signal receiving amplification circuit, and the signal sending amplification circuit and the signal receiving amplification circuit are respectively connected to multiple transducers through analog switches. The signal sending amplification circuit and the signal receiving amplification circuit are also connected to a main control unit. The signal sending amplification circuit is used to amplify the excitation signal that excites the transducer, and the signal receiving amplification circuit is used to amplify the ultrasonic signal received by the transducer. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a structural block diagram of an ultrasonic velocity measurement system of the present invention;
[0030] Figure 2It is a schematic diagram of ADC sampling signal and envelope information of the present invention;
[0031] Figure 3 It is a schematic diagram of a flow channel installation sample in an embodiment of an ultrasonic velocity measurement system of the present invention;
[0032] Figure 4 It is a flow chart of an ultrasonic velocity measurement method of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0034] An ultrasonic speed measurement system embodiment:
[0035] An embodiment of an ultrasonic velocity measurement system of the present invention is as follows Figure 1 As shown, it includes the main control MCU, 2 transducers ( Figure 1 In the embodiment, the main control unit comprises a main control MCU, a transducer A and a transducer B, an analog switch, a signal sending amplifying circuit, and a signal receiving amplifying circuit. In this embodiment, the main control unit adopts a main control MCU. Transducer A and transducer B are arranged on both sides of the flow channel, and transducer A and transducer B cannot be arranged on a straight line perpendicular to the fluid flow channel at the same time. Transducer A and transducer B are connected to the signal sending amplifying circuit and the signal receiving amplifying circuit through the analog switch. The analog switch is controlled by the main control MCU, and the main control MCU sends a transducer working state command to the analog switch, and controls the working state of transducer A and transducer B through the analog switch. Among them, transducer A and transducer B can both be used as transmitting transducers and as receiving transducers; however, the working states of transducer A and transducer B cannot be the same, and the receiving and sending signals of the working states of transducer B and transducer A are performed alternately. During the specific working process, when transducer A is used as a transmitting transducer, the main control MCU controls the analog switch to connect transducer A to the signal sending and amplifying circuit, and transducer B to the signal receiving and amplifying circuit. The main control MCU transmits PWM of different frequency bands as the excitation signal of the transducer according to the characteristics of the transducer. In this embodiment, the excitation signal can be a single-frequency signal or a multi-frequency signal; the excitation signal is sent to transducer A after being processed by the signal sending and amplifying circuit, and transducer A transmits an ultrasonic signal after receiving the excitation signal. Transducer B on the other side of the gas flow channel will receive the corresponding ultrasonic signal after a certain delay, and then send it to the main control MCU after being processed by the signal receiving and amplifying circuit. The main control MCU can use an ultrasonic velocity measurement method of the present invention to process the received signal to obtain the fluid velocity of the fluid to be measured by ultrasonic measurement.
[0036] The specific process of an ultrasonic velocity measurement method of the present invention is as follows: Figure 4 As shown, the following is an explanation in combination with the steps.
[0037] (A) According to the amplitude-frequency characteristics of the transducer used, several optimal frequency bandwidths are selected. Within this bandwidth, the main control MCU can send a single-frequency signal or a multi-frequency signal as an excitation signal for the transmitting transducer, stimulate the transmitting transducer to emit an ultrasonic signal, and collect the upstream and downstream signal data from the receiving transducer. The optimal frequency range of the transducer is obtained based on the amplitude-frequency diagram in the transducer manual provided by different manufacturers.
[0038] Each time a set of measurements is started, the waveform data of the upstream and downstream flows are collected and recorded as: UpVal(i), i=0,1,2,......,N-1; DnVal(i), i=0,1,2,.....,N-1. In other embodiments, multiple sets of measurements can be started to obtain multiple sets of upstream and downstream signal data when the flow rate is determined. In the case of multiple sets of upstream and downstream waveform data, the method of the present invention is performed.
[0039] According to the collected downstream and upstream signal data, the following steps are used to calculate the corresponding flight time: the flight time corresponding to the downstream is determined according to the downstream signal data, and the flight time corresponding to the upstream is determined according to the upstream signal data.
[0040] (B) According to the collected signal data, the corresponding envelope information is obtained. Commonly used signal envelope extraction methods include: extreme value method, detection filter method, Hilbert detection method, etc. Figure 2 shown.
[0041] (C) Preprocess the obtained envelope signal to remove the mutation points caused by noise interference, such as sliding mean filtering, Kalman filtering, etc.
[0042] (D) The denoised envelope information is normalized, and then a simple peak location algorithm is used to obtain the sampling time Tmax corresponding to the envelope peak and the corresponding peak value Mval, i.e. (Tmax, Mval).
[0043] (E) Select a certain percentage of the envelope peak value as the voltage threshold, and select 5 to 10 appropriate voltage thresholds according to the following formula:
[0044] V i =η*Mval
[0045] Among them, 10%≤η≤60%.
[0046] Compare the sampled forward and reverse flow data with the selected multiple voltage thresholds to find the voltage threshold that meets the following conditions:
[0047] V(k)≤V i <V(k+1),k=1,2,3,4,.......,N-1
[0048] The sampling data selected by the present invention under the above conditions has the following characteristics:
[0049] Based on the rising edge interval of the envelope, the signal envelope is controlled by the excitation signal, the envelope signal has good stability, and the falling stage of the envelope is avoided, which causes large errors in the calculation results due to the influence of free oscillation.
[0050] The points that meet the above conditions will be found, and the corresponding time points will be found through the following linear interpolation:
[0051] t i =(V i -V(k)) / (V(k+1)-V(k))+k
[0052] That is, we get several corresponding coordinate points (t i , V i ), also called the threshold point.
[0053] (F) At several corresponding coordinate points (t i , V i ) to calculate a curve, and calculate the time value T0f when the fitting line crosses the time axis n , repeatedly select different coordinate points (t i , V i ) to obtain multiple groups of time values T0f n , n>1, the calculated multiple groups of T0f n The average value is calculated as the final flight time T.
[0054] Based on the schemes introduced in (B)-(F), the propagation time of the ultrasonic signal in the downstream and upstream directions is calculated, that is, the flight time T1 corresponding to the downstream and the flight time T2 corresponding to the upstream. Then, for example, using Figure 3 The flow channel installation example shown in the figure can calculate the corresponding flow velocity information when the flow channel information is known:
[0055]
[0056] in, It is the angle between the straight line formed by a pair of transducers and the flow channel (the angle between the straight line formed by the ultrasonic emitting point and the receiving point and the flow channel), and L is the distance between a pair of transducers (the distance between the ultrasonic emitting point and the receiving point).
[0057] When the fluid flows in the flow channel, the effective signal will arrive earlier when measuring downstream, and will arrive later when measuring upstream. The offset between the effective signals in the downstream and upstream states is used to calculate the corresponding time difference information, and finally the flow velocity is measured.
[0058] Therefore, the present invention has the following beneficial effects:
[0059] The present invention firstly utilizes the envelope characteristics of the received upstream and downstream data and performs simple data processing to improve the anti-noise capability, which is beneficial to improve the accuracy of the calculation results; then utilizes the signal envelope and normalizes it to reduce the error caused by signal amplitude attenuation; finally, a signal can be collected once to obtain multiple groups of calculation results, and multiple groups of results can be processed by simple data processing to improve the accuracy of the calculation. The beneficial effects of the present invention are described one by one below:
[0060] (1) The number of sampling points involved in the operation is small, the amount of calculation is small, the algorithm is simple, and there is no complex complex frequency domain transformation; for example, the use of the cross-correlation algorithm to realize the delay calculation involves fast Fourier transform, inverse fast Fourier transform, and an interpolation algorithm with a large amount of calculation. The amount of calculation involved in a fast Fourier transform is:
[0061] Complex multiplication:
[0062] Complex number addition is: Nlog2N
[0063] As the number of sampling points increases, the overall amount of calculation will be huge, but the present invention only requires N real number multiplications and 1 complex number multiplication. Overall, the amount of calculation is significantly reduced and fewer algorithms are involved.
[0064] (2) The requirements for MCU are relatively low and are not restricted by dedicated chips, which increases the selection range of MCU chips.
[0065] (3) It takes a short time to complete a test, thus reducing system power consumption.
[0066] (4) The device used is a universal transceiver, which is not restricted by the device.
[0067] (5) The present invention measures fluid time difference with high accuracy, thereby obtaining fluid velocity data with high accuracy.
[0068] An ultrasonic velocity measurement method embodiment:
[0069] An embodiment of an ultrasonic velocity measurement method of the present invention, the method first obtains the waveform data of the downstream and upstream flow sampled when ultrasonically measuring the flow rate of the fluid to be measured; secondly, the corresponding envelope information is calculated for the waveform data of the downstream and upstream flow; then, the envelope peak value is obtained after denoising and normalization of the calculated envelope information. Multiple threshold points are set according to the envelope peak value, and then the threshold points that meet the set conditions are searched in the waveform data; the time corresponding to the threshold point that meets the set conditions is determined according to the threshold point, so as to obtain the coordinate point composed of the time point and the threshold point; finally, the flight time of the ultrasonic measurement of the fluid is determined according to the coordinate point. The fluid velocity is determined according to the flight time corresponding to the upstream and downstream. The specific implementation process of this method has been described in detail in an embodiment of an ultrasonic velocity measurement system, and will not be repeated here.
Claims
1. An ultrasonic velocity measurement method, Features: The steps include: Acquire the downstream data and upstream data sampled when ultrasonically measuring the flow velocity of the fluid to be measured; calculate the corresponding flight time based on the downstream data and the upstream data respectively; calculate the fluid velocity based on the flight time corresponding to the downstream data and the flight time corresponding to the upstream data; The calculation method of the flight time corresponding to the downstream data and the flight time corresponding to the upstream data both includes the following steps: 1) Extracting corresponding envelope information based on the acquired data and determining the corresponding envelope peak value; 2) C voltage thresholds are set according to the envelope peak value, where C≥2; and the acquired data are compared with the C voltage thresholds respectively according to the following conditions to obtain multiple threshold points that meet the conditions: V(k)≤V i <V(k+1) Among them, V i Represents the voltage value of the threshold point, i∈[1,C], V(k) represents a point in the data, V(k+1) represents the next data point of V(k), k∈[0,N-1], N is the data sampling length; 3) Determine a plurality of time values according to the intersection of a straight line where any two of the plurality of threshold points are located and the time axis, and determine the corresponding flight time according to the plurality of time values.
2. The ultrasonic velocity measurement method according to claim 1, Features: In step 2), when setting C voltage thresholds according to the envelope peak value, the following formula is used for setting: V i =η*Mval Wherein, Mval represents the envelope peak value, 10%≤η≤60%.
3. The ultrasonic velocity measurement method according to claim 1, Features: C∈[5,10]。 4. The ultrasonic velocity measurement method according to claim 1, Features: In step 3), when multiple time values are determined based on the intersection of the straight line where any two threshold points among the multiple threshold points are located and the time axis, it is necessary to determine the time value corresponding to the voltage value in the threshold point, and use linear interpolation to calculate the time value corresponding to the voltage value.
5. The ultrasonic velocity measurement method according to any one of claims 1 to 4, Features: After extracting the corresponding envelope information in step 1), the envelope information needs to be denoised to remove mutation points caused by noise interference.
6. The ultrasonic velocity measurement method according to any one of claims 1 to 4, Features: Before determining the corresponding envelope peak value in step 1), the envelope information needs to be normalized.
7. The ultrasonic velocity measurement method according to any one of claims 1 to 4, Features: The following calculation formula is used to calculate the fluid velocity based on the flight time corresponding to the downstream data and the flight time corresponding to the upstream data: Among them, v m is the fluid velocity, is the angle between the straight line formed by the ultrasonic emission point and the receiving point and the flow channel, L is the distance between the ultrasonic emission point and the receiving point, T 1 is the flight time corresponding to downstream, T 2 is the flight time corresponding to the countercurrent.
8. The ultrasonic velocity measurement method according to claim 5, Features: The envelope information is denoised using sliding mean filtering or Kalman filtering.
9. An ultrasonic speed measurement system, Features: The system includes multiple transducers, an analog switch and a main control unit, wherein the multiple transducers are respectively arranged on both sides of the fluid flow channel to be measured, and the transducers on one side of the fluid flow channel to be measured and the transducers on the other side cannot be simultaneously arranged on a straight line perpendicular to the fluid flow channel, and are used to send or receive ultrasonic signals; the main control unit switches the working states of the multiple transducers by controlling the analog switch, so that the transducers on one side of the fluid flow channel to be measured are in a signal transmitting state, and the transducers on the other side are in a signal receiving state; the main control unit is used to execute a computer program to implement the ultrasonic velocity measurement method as described in any one of claims 1 to 8.
10. The ultrasonic velocity measurement system according to claim 9, Features: The system also includes a signal sending amplifying circuit and a signal receiving amplifying circuit, wherein the signal sending amplifying circuit and the signal receiving amplifying circuit are respectively connected to multiple transducers through analog switches, and the signal sending amplifying circuit and the signal receiving amplifying circuit are also connected to a main control unit. The signal sending amplifying circuit is used to amplify the excitation signal of the excitation transducer, and the signal receiving amplifying circuit is used to amplify the ultrasonic signal received by the transducer.
