Ultrasonic water meter flow measurement method, system and device based on depth sampling
By acquiring and processing the sampling sequence of the ultrasonic water meter in the downstream and counter-current directions, and calculating the relative flight time, the problem of flight time difference and temperature influence of the ultrasonic water meter in static water is solved, and the reliability and accuracy of the flow measurement are improved.
Patent Information
- Application Number
- CN202111123921.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-09-24
AI Technical Summary
The flight time difference of ultrasonic water meters in static water is not zero, which causes zero point drift and affects the reliability of flow measurement. In addition, temperature and medium differences lead to batch consistency problems and reduce the accuracy of flow measurement.
By obtaining the sampling sequence in the downstream and counter-flow directions, performing quadratic interpolation and cosine interpolation, calculating the relative flight time, achieving instantaneous flow measurement, reducing the influence of temperature, and improving measurement accuracy.
It effectively reduces the zero drift characteristics, improves the reliability of flow measurement, avoids the influence of temperature sensor differences, and ensures measurement accuracy and production efficiency.
Smart Images

Figure CN113899417B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of metering instruments, and in particular to an ultrasonic water meter flow measurement method, system and device based on depth sampling. Background Art
[0002] The measurement principle of ultrasonic water meters is to calculate the flight time difference of ultrasonic waves through the difference in propagation speed of ultrasonic waves in the water, and then further calculate the flow rate of the fluid based on the basics of fluid mechanics by analyzing the difference in the propagation speed of ultrasonic waves in the downstream and upstream directions. Compared with traditional mechanical water meters, ultrasonic water meters have the advantages of high precision, wide range ratio, low starting flow, small pressure loss, long service life, and no mechanical wear. In addition, relying on the measurement characteristics of ultrasonic water meters, the operation status of the pipeline network can be monitored in real time, and water resources can be reasonably allocated in conjunction with the energy management system;
[0003] The ultrasonic measurement method measures the flow rate based on the difference in propagation speed between the upstream and downstream. The propagation speed in water is very fast. Due to differences in the measurement pipe section, transducer size, temperature performance and electronic components, the flight time difference of the ultrasonic water meter in static water is not zero, and the minimum flow point also has a flight time difference. If the consistency of the ultrasonic water meter is poor, zero point drift will occur under different conditions. The zero point offset will cause the error to exceed the measurement accuracy requirement, thereby reducing the reliability of fluid flow measurement;
[0004] Ultrasonic waves propagate at different speeds in water of different temperatures and densities. Even if the ultrasonic wave velocity is temperature compensated, differences in the performance of temperature measuring devices and fluid media will lead to measurement batch consistency problems in the production and operation of ultrasonic water meters, which will further reduce the reliability of fluid flow measurement. Summary of the invention
[0005] In order to solve the problems of the prior art, the embodiments of the present invention provide an ultrasonic water meter flow measurement method, system and device based on deep sampling. The technical solution is as follows:
[0006] In a first aspect, a method for measuring flow rate of an ultrasonic water meter based on depth sampling is provided, the method comprising:
[0007] respectively acquiring a first sampling sequence in a downstream direction and a second sampling sequence in a reverse downstream direction;
[0008] Performing secondary interpolation on the first sampling sequence and the second sampling sequence;
[0009] Respectively obtaining the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence;
[0010] Respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence;
[0011] Traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtaining the first echo signal sequence and the second echo signal sequence indicated by the index respectively;
[0012] Acquiring a correlation between the first echo signal sequence and the second echo signal sequence;
[0013] According to the correlation calculation, cosine interpolation is performed to obtain relative flight time;
[0014] The instantaneous flow rate is calculated according to the relative flight time.
[0015] Optionally, performing secondary interpolation on the first sampling sequence and the second sampling sequence includes:
[0016] For any three points P1(X1, F(X1)), P2(X2, F(X2)), P3(X3, F(X3)), the parabola satisfies the condition:
[0017] X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then:
[0018] m(X)=F(X1) + F(X2) + F(X3) ;
[0019] Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
[0020] Optionally, the respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence comprises:
[0021] The maximum value satisfies the following conditions:
[0022] m(X2+δ)= δ(δ-1)- δ(δ+1);
[0023] Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
[0024] Optionally, after traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and respectively obtaining the first echo signal sequence and the second echo signal sequence indicated by the index, the method further includes:
[0025] The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
[0026] Optionally, performing cosine interpolation according to the correlation calculation to obtain the relative flight time includes:
[0027] The relative flight time is obtained by the following formula:
[0028] ΔT= ;
[0029] in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence.
[0030] Optionally, calculating the instantaneous flow rate according to the relative flight time includes:
[0031] The instantaneous flow rate is calculated by the following formula:
[0032] Q instant=3600*T time / F(T temperature * );
[0033] Among them, F (T temperature * ) is the functional relationship model under working condition, T time represents ΔT / (Tup *Tdn), Indicates the dynamic viscosity of water during calibration, Indicates the density of water under working conditions, The density of water when the meter is calibrated, Indicates the dynamic viscosity of water under working conditions.
[0034] In a second aspect, an ultrasonic water meter flow measurement system based on depth sampling is provided, the system comprising:
[0035] At least includes a front-end sampling system, which includes a plurality of sampling related devices, a measuring pipe section, an instantaneous flow calculator and a related operator, wherein the plurality of sampling related devices are arranged on both sides of the measuring pipe section; wherein:
[0036] The plurality of sampling related devices respectively acquire a first sampling sequence in a downstream direction and a second sampling sequence in a upstream direction corresponding to the measurement pipe section;
[0037] The correlation operator is used for:
[0038] Performing secondary interpolation on the first sampling sequence and the second sampling sequence;
[0039] Respectively obtaining the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence;
[0040] Respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence;
[0041] Traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtaining the first echo signal sequence and the second echo signal sequence indicated by the index respectively;
[0042] Acquiring a correlation between the first echo signal sequence and the second echo signal sequence;
[0043] According to the correlation calculation, cosine interpolation is performed to obtain relative flight time;
[0044] The instantaneous flow calculator is used to calculate the instantaneous flow according to the relative flight time.
[0045] Optionally, the related operator is specifically used for:
[0046] For any three points P1(X1, F(Y1)), P2(X2, F(Y2)), P3(X3, F(Y3)), the parabola satisfies the condition:
[0047] X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then:
[0048] m(X)=F(X1) + F(X2) + F(X3) ;
[0049] Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
[0050] Optionally, the related operator is specifically used for:
[0051] The maximum value satisfies the following conditions:
[0052] m(X2+δ)= δ(δ-1)- δ(δ+1);
[0053] Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
[0054] Optionally, the related operator is specifically used for:
[0055] The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
[0056] Optionally, the related operator is specifically used for:
[0057] The relative flight time is obtained by the following formula:
[0058] ΔT= ;
[0059] in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence.
[0060] Optionally, the instantaneous flow calculator is specifically used for:
[0061] The instantaneous flow rate is calculated by the following formula:
[0062] Q instant=3600*T time / F(T temperature * );
[0063] Among them, F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), Indicates the dynamic viscosity of water during calibration, Indicates the density of water under working conditions, The density of water when the meter is calibrated, Indicates the dynamic viscosity of water under working conditions.
[0064] In a third aspect, an ultrasonic water meter flow metering device based on depth sampling is provided, the device comprising:
[0065] An interpolation module, used for performing secondary interpolation on the first sampling sequence and the second sampling sequence;
[0066] A sampling module, used to obtain the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence respectively;
[0067] A processing module, used for respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence;
[0068] An index module, used to traverse the first echo sequence and the second echo sequence respectively, obtain the index of the echo amplitude closest to the threshold, set the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtain the first echo signal sequence and the second echo signal sequence indicated by the index respectively;
[0069] The processing module is further used to obtain the correlation between the first echo signal sequence and the second echo signal sequence;
[0070] The processing module is also used to perform cosine interpolation based on the correlation calculation to obtain relative flight time;
[0071] The processing module is further used to calculate the instantaneous flow rate according to the relative flight time.
[0072] Optionally, the interpolation module is specifically used for:
[0073] For any three points P1(X1, F(X1)), P2(X2, F(X2)), P3(X3, F(X3)), the parabola satisfies the condition:
[0074] X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then:
[0075] m(X)=F(X1) + F(X2) + F(X3) ;
[0076] Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
[0077] Optionally, the processing module is specifically used for:
[0078] The maximum value satisfies the following conditions:
[0079] m(X2+δ)= δ(δ-1)- δ(δ+1);
[0080] Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
[0081] Optionally, the processing module is further used for:
[0082] The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
[0083] Optionally, the processing module is further specifically used for:
[0084] The relative flight time is obtained by the following formula:
[0085] ΔT= ;
[0086] in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence.
[0087] Optionally, the processing module is further specifically used for:
[0088] The instantaneous flow rate is calculated by the following formula:
[0089] Q instant=3600*T time / F(T temperature * );
[0090] Among them, F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), Indicates the dynamic viscosity of water during calibration, Indicates the density of water under working conditions, The density of water when the meter is calibrated, Indicates the dynamic viscosity of water under working conditions.
[0091] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0092] 1. Through the front-end sampling system, the sampling sequence in the downstream and upstream directions is obtained, and the absolute flight time and relative flight time of the ultrasonic wave are calculated by quadratic interpolation and cosine interpolation to realize the flow measurement of the ultrasonic water meter, thereby effectively reducing the zero drift characteristics affected by the temperature of the ultrasonic transducer, ensuring higher measurement accuracy and lower starting flow, thereby improving the reliability of fluid flow measurement;
[0093] 2. In addition, the application of irrelevant ultrasonic velocity in the calculation model can avoid the consistency problem of mass production caused by the difference of temperature sensor devices, improve production efficiency, and improve the consistency of errors during operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0095] Figure 1 This is a flow chart of an ultrasonic water meter flow measurement method based on deep sampling provided by an embodiment of the present invention;
[0096] Figure 2 It is a schematic diagram of an ultrasonic water meter flow measurement system based on deep sampling provided by an embodiment of the present invention;
[0097] Figure 3 It is a schematic diagram of a downstream sampling sequence provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0098] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0099] Reference Figure 1 As shown, a method for ultrasonic water meter flow measurement based on depth sampling is provided, and the method includes:
[0100] 101. Acquire a first sampling sequence in a downstream direction and a second sampling sequence in a reverse downstream direction respectively;
[0101] 102. Perform secondary interpolation on the first sampling sequence and the second sampling sequence;
[0102] 103. Obtain the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence respectively;
[0103] 104. Acquire a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence respectively;
[0104] 105. Traverse the first echo sequence and the second echo sequence respectively, obtain the index of the echo amplitude closest to the threshold, set the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtain the first echo signal sequence and the second echo signal sequence indicated by the index respectively;
[0105] 106. Obtaining correlation between the first echo signal sequence and the second echo signal sequence;
[0106] 107. Perform cosine interpolation based on correlation calculation to obtain relative flight time;
[0107] 108. Calculate instantaneous flow rate based on relative flight time.
[0108] Optionally, performing secondary interpolation on the first sampling sequence and the second sampling sequence includes:
[0109] For any three points P1(X1, F(X1)), P2(X2, F(X2)), P3(X3, F(X3)), the parabola satisfies the condition:
[0110] X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then:
[0111] m(X)=F(X1) + F(X2) + F(X3) ;
[0112] Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
[0113] Optionally, respectively acquiring a first echo sequence composed of maximum value points of the first sampling sequence and a second echo sequence composed of maximum value points of the second sampling sequence includes:
[0114] The maximum value satisfies the following conditions:
[0115] m(X2+δ)= δ(δ-1)- δ(δ+1);
[0116] Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
[0117] Optionally, after traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and respectively obtaining the first echo signal sequence and the second echo signal sequence indicated by the index, the method further includes:
[0118] The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
[0119] Optionally, cosine interpolation is performed based on correlation calculation to obtain relative flight time including:
[0120] The relative flight time is obtained by the following formula:
[0121] ΔT= ;
[0122] in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence.
[0123] Optionally, based on the relative flight time, the instantaneous flow rate is calculated including:
[0124] The instantaneous flow rate is calculated using the following formula:
[0125] Q instant=3600*T time / F(T temperature * );
[0126] Among them, F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), Indicates the dynamic viscosity of water during calibration, Indicates the density of water under working conditions, The density of water when the meter is calibrated, Indicates the dynamic viscosity of water under working conditions.
[0127] Step 1: Establish a front-end sampling system to obtain the downstream sampling sequence UPsequence[N] and the upstream sampling sequence DOWNsequence[N] (N=256, 512, 1024). The front-end sampling system includes an ultrasonic transducer, a measuring pipe section, a low-impedance sequence signal generator, a gain comparator, an anti-aliasing filter, a high-speed analog-to-digital converter, and a correlation operator.
[0128] Step 1.2: Apply n (n=3, 4, 5…) excitation pulse signals with the same frequency as the ultrasonic transducer to the ultrasonic transducer through the low impedance sequence signal generator in the front-end sampling system. First, apply n excitation pulse signals to the Up downstream transducer, and the Dn upstream transducer receives the echo signal.
[0129] Step 1.3: The front-end sampling system sets the receiving window opening time (40μs~50μs), when the time reaches , the front-end sampling system turns on the gain comparator and anti-aliasing filter to wait for receiving the Up direction echo signal.
[0130] Step 1.4: Based on step 1.3, the front-end sampling system sets the signal sampling frequency (3.4MHz~8MHz), sampling duration (30μs~40μs), and turn on the high-speed analog-to-digital converter to obtain the downstream sampling sequence UPsequence [N].
[0131] Step 1.5: Similarly, change the direction and execute steps 1.2, 1.3, and 1.4 to obtain the countercurrent sampling sequence DOWNsequence [N].
[0132] Step 2: Combined with the sampling sequence of ultrasonic signals propagating downstream and upstream, the correlation operator in the front-end sampling system performs the absolute flight time in the downstream direction. , Absolute flight time in the upstream direction calculate.
[0133] The processing of step 2 is as follows: perform secondary interpolation on the sequence UPsequence [N] to find the peak point of each excitation echo signal. For any three points P1 (X1, F (X1)), P2 (X2, F (X2)), P3 (X3, F (X3)), satisfying X1 < X2 < X3 and F (X2) ≥ F (X1) and F (X2) ≥ F (X3), there is a unique parabola m passing through the three points:
[0134] m(X)=F(X1) + F (X2) +F(X3) ; (1)
[0135] From the calculation formula (1), when m(x) reaches the extreme point, x can be expressed as:
[0136] Xmax= =X2+δ; (2)
[0137] Traverse the sequence UPsequence [N] and find all z that satisfy UPsequence [Z] ≥ UPsequence [Z-1] and UPsequence [Z] ≥ UPsequence [Z+1]. Interpolate UPsequence [Z-1], UPsequence [Z], UPsequence [Z+1] again. From calculation formulas (1) and (2), we can get:
[0138] δ = ; (3)
[0139] m(X2+δ)= δ(δ-1)- δ(δ+1); (4)
[0140] Step 2.1: Find the maximum amplitude of the echo signal according to step 2. After interpolation and processing, the sequence of echo peak points is Lobemax[Z], which has the maximum amplitude of the echo:
[0141] UPsequencemax=max(Lobemax[Z]); (5)
[0142] Step 2.2: Set the detection threshold. Use a certain ratio of the maximum amplitude of the echo as the threshold for detecting a specific excitation echo. The detection threshold is denoted as AmpThres. The fixed ratio is η. Then:
[0143] AmpThres=ηUPsequencemax; (6)
[0144] Step 2.3: Calculate the absolute flight time in the downstream direction, recorded as Tup. Assuming that the locked echo is the echo of the kth excitation pulse, traverse Lobemax[Z] to find the index Zk of the echo amplitude closest to the threshold, that is, the echo found at this time is considered to be the echo of the kth excitation pulse. The Tup calculation formula is:
[0145] Tup = + +const; (7)
[0146] Step 2.4: Similarly, change the direction and execute steps 2, 2.1, 2.2, and 2.3 to obtain the absolute flight time in the countercurrent direction, recorded as Tdown.
[0147] Step 3: Calculate the relative flight time ΔT. According to step 1, obtain the downstream sampling sequence UPsequence[N] and the upstream sampling sequence DOWNsequence[N], and calculate the correlation results of the two direction sequences:
[0148] M[m]= DOWNsequence[nm]; (8)
[0149] Step 3.1: Find the maximum point index m' of M[m]:
[0150] m'=argmax(M[m]); (9)
[0151] Step 3.2: Perform cosine interpolation on M[m'-1], M[m'], and M[m'+1], and find the offset of the extreme point to m' after interpolation, which is recorded as ε. Then:
[0152] ω= ( ); (10)
[0153] φ= ( ); (11)
[0154] Offset calculation formula ε=- .
[0155] Step 3.3: Calculate the relative flight time according to the calculation formulas (10) and (11) in step 3.2:
[0156] ΔT= ; (12)
[0157] Step 4: Calculate the average linear velocity Vline of the fluid propagation based on the ΔT, Tup, and Tdown obtained in the above steps, where L is the ultrasonic transmission distance and C is the ultrasonic transmission velocity. The calculation formula is as follows:
[0158] Tup= ; (13)
[0159] Tdown= ; (14)
[0160] According to formulas (13) and (14), we can get:
[0161] V Line = ; (15)
[0162] Step 5: The instantaneous flow rate is recorded as Q instantaneous, and the calculation formula is as follows:
[0163] Q instant = 3600*S*V surface; (16)
[0164] Where S represents the cross-sectional area of the ultrasonic water meter measuring pipe section, in m2, V is the average velocity of the fluid flowing through the cross-sectional area S, in m / s, and the instantaneous flow rate Q is in m³ / h.
[0165] V-line and V-surface exist =f(Re), where Re is the Reynolds coefficient and the flow correction factor k is a function of Re. Then Q instant can be organized as:
[0166] Q instant=3600*T time / B; (17)
[0167] Where B = 2*f(Re) / (S*L), T time =ΔT / (Tup*Tdown).
[0168] Step 6: According to step 5, establish the functional relationship model B=F(T temperature ).
[0169] Step 7: Conversion of flow rate under working condition and calibration condition, establish equation relationship based on Reynolds number similarity principle in fluid mechanics. The equation model can be established by Re = Re standard:
[0170] V line mark = ; (18)
[0171] In the above calculation formula, η is the dynamic viscosity at the calibration temperature, η is the dynamic viscosity under the working state, ρ is the density of water at the calibration temperature, and ρ is the density of water under the working state.
[0172] From the calculation formula (18), we can know that B=F(T temperature * ). The final corrected ultrasonic water meter instantaneous flow calculation formula is as follows:
[0173] Q instant=3600*T time / F(T temperature * );
[0174] The ultrasonic water meter consists of a main controller and a front-end sampling system. The front-end sampling system framework is as follows: Figure 2 As shown, the specific implementation steps are as follows:
[0175] (1) First, the ultrasonic water meter is initialized and the operating parameters are set, including the front-end sampling system configuration parameters. The configuration parameters are as follows:
[0176] =50μs;
[0177] =4MHz;
[0178] =30μs.
[0179] (2) Control the front-end sampling system to apply n (n=10) excitation pulses with a period of 1 MHz and an excitation voltage of 3 V to the downstream transducer.
[0180] (3) To extend the battery life, the main controller needs to control the front-end sampling system to enter a low-power sleep state and wait for the timing time. Timing completed.
[0181] (4) As in (3), after the timer count is completed, the main control controls the front-end sampling system to start the gain comparator, filter, and digital-to-analog converter for deep high-speed sampling, and performs fast Fourier transform on the acquired sampling signal to obtain the sampling sequence UPsequence[N]={8, -8, -24, 32, 69, -65, -137, 117...}, where the value of the sequence length N is 256. The schematic diagram of the downstream sampling sequence is shown in Figure 3 shown.
[0182] (5) Similarly, as in (1), (2), (3), and (4), the main controller controls the front-end sampling system to obtain the sampling sequence in the countercurrent direction, DOWNsequence [N] = {-15, -17, 53, 47, -109, -90, 195, 162…}.
[0183] (6) Traverse the sequence UPsequence[N] to find all the points that satisfy UPsequence[i]≥UPsequence[i-1] and UPsequence[i]≥UPsequence[i+1], and then interpolate UPsequence[i-1], UPsequence[i], and UPsequence[i+1]. Using formulas (2) and (3), the sequence of echo peak points Lobemax={69, 239, 444, 565, 672, 756…}.
[0184] (7) Set the threshold detection coefficient η, UPsequencemax is the maximum value of the echo peak, and the maximum value of the echo peak can be obtained from UPsequence[N], which is 945. The detection coefficient η is 0.08, and the first echo signal is locked as the detection wave. The amplitude of the excitation echo is fixed relative to the maximum value of the echo peak and is in the interval with the fastest echo amplitude rise speed.
[0185] (8) As in (7), the locked echo is the echo of the first excitation pulse. After setting the threshold, traverse Lobemax[i] to find the index 1 of the echo amplitude closest to the threshold. According to the calculation formula (7), δi = 0.25341 μs, the absolute flight time in the downstream direction Tup = 55.25341 μs.
[0186] (9) Similarly, the same calculation method is applied to the sequence DOWNsequence [N] to obtain the absolute flight time in the countercurrent direction Tdown = 55.75341 μs.
[0187] (10) Based on the obtained sampling sequences UPsequence[N] and DOWNsequence[N], ΔT=0.4576676648657μs is calculated according to formulas (10), (11), and (12).
[0188] (11) According to the above steps, the density and dynamic viscosity of water at 20°C are Standard = 1.003754Pa*S, = 1.0037Kg / m³. To further simplify the calculation steps, a density curve function with respect to temperature can be generated. =f(t); dynamic viscosity curve function with respect to temperature =f(t), where t is the current operating temperature of the ultrasonic water meter.
[0189] (12) Calculate the instantaneous flow rate Q. According to the calculation formulas (17), (18), and (19), the ultrasonic instantaneous flow rate Q = 3.099 m³ / h, and the cumulative flow rate Q = .
[0190] Embodiment 2 provides an ultrasonic water meter flow measurement system based on depth sampling, the system comprising:
[0191] At least includes a front-end sampling system, which includes multiple sampling related equipment, a measuring pipe section, an instantaneous flow calculator and a related operator, and multiple sampling related equipment are arranged on both sides of the measuring pipe section; wherein:
[0192] A plurality of sampling related devices respectively obtain a first sampling sequence in the downstream direction and a second sampling sequence in the upstream direction corresponding to the measuring pipe section;
[0193] The correlation operator is used to:
[0194] Performing secondary interpolation on the first sampling sequence and the second sampling sequence;
[0195] Respectively obtaining the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence;
[0196] Respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence;
[0197] Traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtaining the first echo signal sequence and the second echo signal sequence indicated by the index respectively;
[0198] Acquiring the correlation between the first echo signal sequence and the second echo signal sequence;
[0199] According to the correlation calculation, cosine interpolation is performed to obtain the relative flight time;
[0200] The instantaneous flow calculator is used to calculate the instantaneous flow rate based on the relative flight time.
[0201] Optionally, the related operator is specifically used for:
[0202] For any three points P1(X1, F(X1)), P2(X2, F(X2)), P3(X3, F(X3)), the parabola satisfies the condition:
[0203] X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then:
[0204] m(X)=F(X1) + F(X2) + F(X3) ;
[0205] Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
[0206] Optionally, the related operator is specifically used for:
[0207] The maximum value satisfies the following conditions:
[0208] m(X2+δ)= δ(δ-1)- δ(δ+1);
[0209] Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
[0210] Optionally, the related operator is specifically used for:
[0211] The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
[0212] Optionally, the related operator is specifically used for:
[0213] The relative flight time is obtained by the following formula:
[0214] ΔT= ;
[0215] in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence.
[0216] Optionally, the instantaneous flow calculator is specifically used for:
[0217] The instantaneous flow rate is calculated using the following formula:
[0218] Q instant=3600*T time / F(T temperature * )
[0219] Among them, F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), Indicates the dynamic viscosity of water during calibration, Indicates the density of water under working conditions, The density of water when the meter is calibrated, Indicates the dynamic viscosity of water under working conditions.
[0220] Embodiment 3 provides an ultrasonic water meter flow measurement device based on depth sampling, the device comprising:
[0221] An interpolation module, used for performing secondary interpolation on the first sampling sequence and the second sampling sequence;
[0222] A sampling module, used to obtain the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence respectively;
[0223] A processing module, used for respectively acquiring a first echo sequence composed of maximum value points of the first sampling sequence and a second echo sequence composed of maximum value points of the second sampling sequence;
[0224] An index module, used to traverse the first echo sequence and the second echo sequence respectively, obtain the index of the echo amplitude closest to the threshold, set the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtain the first echo signal sequence and the second echo signal sequence indicated by the index respectively;
[0225] The processing module is also used to obtain the correlation between the first echo signal sequence and the second echo signal sequence;
[0226] The processing module is also used to perform cosine interpolation based on correlation calculation to obtain relative flight time;
[0227] The processing module is also used to calculate the instantaneous flow rate according to the relative flight time.
[0228] Optionally, the interpolation module is specifically used to:
[0229] For any three points P1(X1, F(X1)), P2(X2, F(X2)), P3(X3, F(X3)), the parabola satisfies the condition:
[0230] X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then:
[0231] m(X)=F(X1) + F(X2) + F(X3) ;
[0232] Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
[0233] Optionally, the processing module is specifically used for:
[0234] The maximum value satisfies the following conditions:
[0235] m(X2+δ)= δ(δ-1)- δ(δ+1);
[0236] Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
[0237] Optionally, the processing module is further configured to:
[0238] The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
[0239] Optionally, the processing module is further specifically used for:
[0240] The relative flight time is obtained by the following formula:
[0241] ΔT= ;
[0242] in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence.
[0243] Optionally, the processing module is further specifically used for:
[0244] The instantaneous flow rate is calculated using the following formula:
[0245] Q instant=3600*T time / F(T temperature * );
[0246] Among them, F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), Indicates the dynamic viscosity of water during calibration, Indicates the density of water under working conditions, The density of water when the meter is calibrated, Indicates the dynamic viscosity of water under working conditions.
[0247] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present invention, which will not be described in detail here.
[0248] It should be noted that: the ultrasonic water meter flow metering system and device based on depth sampling provided in the above embodiments only use the division of the above functional modules as an example when executing the ultrasonic water meter flow metering method based on depth sampling. In actual applications, the above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the system and the device is divided into different functional modules to complete all or part of the functions described above. In addition, the ultrasonic water meter flow metering method, system and device embodiments based on depth sampling provided in the above embodiments belong to the same concept. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0249] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0250] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An ultrasonic water meter flow measurement method based on depth sampling, characterized in that: The method comprises: respectively acquiring a first sampling sequence in a downstream direction and a second sampling sequence in a reverse downstream direction; Performing secondary interpolation on the first sampling sequence and the second sampling sequence; Respectively obtaining the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence; Respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence; Traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtaining the first echo signal sequence and the second echo signal sequence indicated by the index respectively; Acquiring a correlation between the first echo signal sequence and the second echo signal sequence; According to the correlation calculation, cosine interpolation is performed to obtain relative flight time; Calculating instantaneous flow rate according to the relative flight time; The performing cosine interpolation according to the correlation calculation to obtain the relative flight time comprises: The relative flight time is obtained by the following formula: ; in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence; The instantaneous flow rate is calculated by the following formula: Q instant = 3600*T time / F(T temperature * ). Among them, the F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), It represents the dynamic viscosity of water during calibration. Indicates the density of water under working conditions. The density of water when calibrating the table is Indicates the dynamic viscosity of water under working conditions; After traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and respectively obtaining the first echo signal sequence and the second echo signal sequence indicated by the index, the method further includes: The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
2. The method according to claim 1, characterized in that The performing secondary interpolation on the first sampling sequence and the second sampling sequence comprises: For any three points P1(X1, F(X1)), P2(X2, F(X2)), P3(X3, F(X3)), the parabola satisfies the condition: X1<X2<X3 and F(X2)≥F(X1) and F(X2)≥F(X3); then: m(X)=F(X1) + F(X2) + F(X3) ; Among them, m(x) represents the quadratic interpolation function, and P1, P2, and P3 are three points on the parabola that meet the conditions.
3. The method according to claim 2, characterized in that The step of respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence comprises: The maximum value satisfies the following conditions: m(X2+δ)= d(d-1)- d(d+1); Among them, X2+δ represents the horizontal coordinate of the point when the maximum value is reached, Z∈N, and UPsequence[Z]≥UPsequence[Z-1] and UPsequence[Z]≥UPsequence[Z+1].
4. An ultrasonic water meter flow measurement system based on deep sampling, characterized in that: The system at least includes a front-end sampling system, which includes a plurality of sampling-related devices, a measuring pipe section, an instantaneous flow calculator and a related operator, wherein the plurality of sampling-related devices are arranged on both sides of the measuring pipe section; wherein: The plurality of sampling related devices respectively acquire a first sampling sequence in a downstream direction and a second sampling sequence in a upstream direction corresponding to the measurement pipe section; The correlation operator is used for: Performing secondary interpolation on the first sampling sequence and the second sampling sequence; Respectively obtaining the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence; Respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence; Traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtaining the first echo signal sequence and the second echo signal sequence indicated by the index respectively; Acquiring a correlation between the first echo signal sequence and the second echo signal sequence; According to the correlation calculation, cosine interpolation is performed to obtain relative flight time; The instantaneous flow calculator is used to calculate the instantaneous flow according to the relative flight time; The relative flight time is obtained by the following formula: ; in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence; The instantaneous flow rate is calculated by the following formula: Q instant = 3600*T time / F(T temperature * ). Among them, the F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), It represents the dynamic viscosity of water during calibration. Indicates the density of water under working conditions. The density of water when calibrating the table is Indicates the dynamic viscosity of water under working conditions; After traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and respectively obtaining the first echo signal sequence and the second echo signal sequence indicated by the index, the method further includes: The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
5. An ultrasonic water meter flow measurement device based on depth sampling, characterized in that: The device comprises: An interpolation module, used for performing secondary interpolation on the first sampling sequence and the second sampling sequence; A sampling module, used to obtain the maximum value point of the first sampling sequence and the maximum value point of the second sampling sequence respectively; A processing module, used for respectively acquiring a first echo sequence composed of the maximum value points of the first sampling sequence and a second echo sequence composed of the maximum value points of the second sampling sequence; An index module, used to traverse the first echo sequence and the second echo sequence respectively, obtain the index of the echo amplitude closest to the threshold, set the echo indicated by the index as the echo corresponding to the echo signal sequence, and obtain the first echo signal sequence and the second echo signal sequence indicated by the index respectively; The processing module is further used to obtain the correlation between the first echo signal sequence and the second echo signal sequence; The processing module is also used to perform cosine interpolation based on the correlation calculation to obtain relative flight time; The processing module is also used to calculate the instantaneous flow rate according to the relative flight time; The relative flight time is obtained by the following formula: ; in, Indicates the offset, represents the sampling frequency, ΔT represents the relative flight time, and m represents the correlation between the first echo signal sequence and the second echo signal sequence; The instantaneous flow rate is calculated by the following formula: Q instant = 3600*T time / F(T temperature * ). Among them, the F (T temperature * ) is the functional relationship model under working condition, Q instantaneous represents instantaneous flow, T time represents ΔT / (Tup * Tdn), It represents the dynamic viscosity of water during calibration. Indicates the density of water under working conditions. The density of water when calibrating the table is Indicates the dynamic viscosity of water under working conditions; After traversing the first echo sequence and the second echo sequence respectively, obtaining the index of the echo amplitude closest to the threshold, setting the echo indicated by the index as the echo corresponding to the echo signal sequence, and respectively obtaining the first echo signal sequence and the second echo signal sequence indicated by the index, the method further includes: The absolute flight time Tup in the downstream direction and the absolute flight time Tdn in the upstream direction are obtained respectively.
