Flow data processing method applied to small-caliber pipeline

The method addresses flow measurement errors in small-diameter pipelines by using data processing techniques like Kalman filtering and zero drift correction to enhance accuracy and reliability.

CN119245751AInactive Publication Date: 2025-01-03ANHUI SHUNYU WATER AFFAIRS CO LTD

Patent Information

Application Number
CN202411751662.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing ultrasonic flow measurement systems for small diameter pipelines suffer from issues such as bubbles, zero drift, and other interference which cause large flow measurement errors.

Method used

A method involving data processing steps including temperature collection, time-to-digital conversion, data smoothing, Kalman filtering, zero drift processing, and flow rate calculation to stabilize and improve flow data accuracy.

Benefits of technology

Reduces measurement errors and enhances the reliability and accuracy of ultrasonic flow measurement in small-diameter pipelines by filtering out noise and interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119245751A_ABST
    Figure CN119245751A_ABST
Patent Text Reader

Abstract

The invention discloses a flow data processing method applied to a small-caliber pipeline, and belongs to the technical field of ultrasonic flow measurement. The invention discloses a flow data processing method applied to a small-caliber pipeline. The flow data processing method comprises smoothing processing, Kalman filtering and zero drift processing. Flight time data are obtained through a time-to-digital converter in the ultrasonic water meter, data smoothing processing and Kalman filtering are carried out on the flight time data so that measurement errors in the measurement process of the ultrasonic water meter can be reduced, and then a zero drift processing method is carried out. The external interference of the ultrasonic water meter at low flow and the instability of the water meter are reduced, so that the application range, the precision and the reliability of the measurement of the ultrasonic water meter can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of ultrasonic flow measurement, and in particular to a flow data processing method applied to a small-diameter pipeline. Background Art

[0002] Ultrasonic flow measurement has the advantages of high accuracy, wide range ratio, and small pressure loss. It is the direction of fully electronic flow measurement for small-diameter pipelines. Ultrasonic water meters have achieved miniaturization of ultrasonic water meters, popularized residential water use, and brought technological innovation and development to the water metering industry.

[0003] However, due to the small diameter of household ultrasonic water meters, the propagation time of ultrasonic waves is very short, and the flow rate is affected by interference such as bubbles, zero drift, and impurities, resulting in a prominent problem of large flow measurement errors. Summary of the invention

[0004] The purpose of the present invention is to solve the problems in the prior art and to propose a method for processing flow data of small-diameter pipelines.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] The method comprises the following steps: S1, judging whether to perform temperature collection and update the flight time reference according to the time interval;

[0007] S2, acquiring 4 flight time difference data through a time-to-digital converter and performing data smoothing processing;

[0008] S3, performing Kalman filtering on the flight time difference data obtained in step S2;

[0009] S4, performing zero drift processing on the filtered data obtained in step S3;

[0010] S5, calculating the flow rate according to the data obtained in step S4;

[0011] The judgment based on the time interval in step S1 is specifically: when the time interval is greater than or equal to 30 seconds, the temperature value is obtained through the time-to-digital converter, and when the water flow state variable is 1, the time-to-digital converter performs 10 ultrasonic flight time measurements, and the average value of the 10 flight times is calculated, and the calculation result is used as the flight time benchmark.

[0012] Preferably, the specific process of data smoothing in step S2 is: removing the maximum value and the minimum value of the four flight time difference data, and calculating the average value of the remaining two flight time difference data.

[0013] Preferably, the Kalman filtering in step S3 includes:

[0014] Step 1: Give the initial value of Kalman filter parameters

[0015] State transfer matrix F, control input matrix B, observation matrix H, process noise covariance Q, observation noise covariance R, control input u;

[0016] Step 2: Calculate the estimated value and estimated covariance value

[0017] X_pred[k]=F×X[k-1]+B×u

[0018] Where X_pred[k] is the estimated value at the kth moment, and X[k-1] is the estimated value at the k-1th moment

[0019] P_pred[k]=F×P[k-1]×F+Q

[0020] Where P_pred[k] is the estimated covariance value at the kth moment, and P[k-1] is the estimated covariance value at the k-1th moment;

[0021] Step 3: Update Kalman gain, prediction value, and covariance value

[0022] K=P_pred[k]×H / (H×P_pred[k]×H+R)

[0023] X[k]=X_pred[k]+K×(Z[k]-H×X_pred[k])

[0024] P[k] = (1-K × H) × P_pred[k]

[0025] Where K is the Kalman gain, X[k] is the predicted value at the kth moment, Z[k] is the original value at the kth moment, and P[k] is the covariance value at the kth moment;

[0026] Step 4: Return the predicted value.

[0027] Preferably, the zero-point drift processing in step S4 includes: subtracting the flight time reference from the flight time difference data filtered in step S3, comparing the difference with the static threshold, and if the difference is less than the threshold, setting the water flow state variable to 1 and setting the flight time difference data to 0; if the difference is greater than the threshold, setting the water flow state variable to 0 and using the difference as the new flight time difference.

[0028] Preferably, the flow calculation in step S5 includes:

[0029]

[0030] in, is the flight time difference data obtained in step S4, is the water flow velocity, the distance between the two reflectors is L, and c is the speed of ultrasonic wave propagation in water;

[0031] The linear average velocity of water flow can be simplified as:

[0032]

[0033] The maximum instantaneous flow value flowing through the water meter pipe :

[0034]

[0035] in, is the diameter of the water meter pipe.

[0036] Preferably, in step S1, abnormal data of the 10 ultrasonic flight times measured by the time-to-digital converter are eliminated, and the specific steps are: 10 groups of flight time data are calculated, and if the error value verification is not passed, the abnormal data is screened out; if the error value verification is passed and the number of 10 groups of flight time data is met, the average value of the 10 obtained flight times is calculated, and the calculation result is used as the flight time benchmark; if the number of 10 groups of flight time data is not met, the missing flight time is supplemented and the supplementary measured flight time is summarized with the flight time that passes the error value verification to form 10 groups of flight time, and the error value verification is performed again.

[0037] Furthermore, the 10 ultrasonic flight times measured by the time-to-digital converter are .

[0038] Furthermore, the formula for judging abnormal data of the 10 ultrasonic flight times measured by the time-to-digital converter is:

[0039]

[0040]

[0041] ,in, , Represents the average value of 10 ultrasonic flight time data, is the standard deviation, Represents a single ultrasound time-of-flight data point and its overall data set average The relative distance between them.

[0042] Compared with the prior art, the present invention provides a method for processing flow data of small-diameter pipelines, which has the following beneficial effects:

[0043] 1. The ultrasonic water meter data processing method obtains flight time data through a time-to-digital converter in the ultrasonic water meter, and performs data smoothing and Kalman filtering on the flight time data to reduce the measurement error in the ultrasonic water meter measurement process.

[0044] 2. The ultrasonic water meter data processing method reduces the external interference of the ultrasonic water meter and the instability of the water meter itself at low flow by performing a zero drift processing method.

[0045] The parts not involved in the ultrasonic water meter data processing method are the same as the prior art or can be implemented by using the prior art. The present invention can effectively improve the application scope, accuracy and reliability of ultrasonic water meter measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of the internal structure of a pipeline applied to a method for processing flow data of a small-diameter pipeline proposed by the present invention;

[0047] Figure 2 The process of a method for processing flow data of small-diameter pipelines proposed by the present invention is as follows: Figure 1 ;

[0048] Figure 3 This is a rendering of the unprocessed time-of-flight difference data in a method for processing flow data in a small-diameter pipeline proposed by the present invention;

[0049] Figure 4 This is a rendering of the flight time difference data after processing in a method for processing flow data in a small-diameter pipeline proposed by the present invention;

[0050] Figure 5 The process of a method for processing flow data of small-diameter pipelines proposed by the present invention is as follows: Figure 2 . DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0052] In the description of the present invention, it is necessary to understand that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0053] Reference Figure 1 Specifically, in this embodiment, water flows through the water pipe along the direction of V, the distance between the two transducers is L, and the diameter of the water pipe is D. Here, it is assumed that the transducer on the left is transducer A and the transducer on the right is transducer B. When the water flows through, if transducer A sends out a pulse and it is reflected by the reflective sheet, there are two reflective sheets, so that transducer B receives the pulse, and then transducer B sends out a pulse, which is received by transducer A (the propagation direction of the pulse is: one transducer sends out a pulse, the first reflective sheet receives it and reflects it to the second reflective sheet, the second reflective sheet reflects the pulse to another transducer and is received by another transducer), the time difference between the two pulse propagations can be obtained.

[0054] In the present invention, by using two transducers A and B and two reflectors to measure the time difference between two pulse propagations in the water flow, a non-contact, real-time water flow velocity measurement method is provided with high measurement accuracy, and the water flow velocity can be measured continuously and uninterruptedly, providing real-time data support for water flow monitoring and control.

[0055] Reference Figure 2 , including the following steps: S1, judging whether to perform temperature acquisition and update the flight time benchmark according to the time interval; S2, obtaining 4 flight time difference data through the time digital converter, and performing data smoothing processing; S3, performing Kalman filtering on the flight time difference data obtained in step S2; S4, performing zero drift processing on the filtered data obtained in step S3; S5, calculating the flow rate according to the data obtained in step S4; the specific judgment according to the time interval in step S1 is: when the time interval is greater than or equal to 30 seconds, obtaining the temperature value through the time digital converter, and when the water flow state variable is 1, the time digital converter performs 10 ultrasonic flight time measurements, and the average value of the obtained 10 flight times is calculated, and the calculation result is used as the flight time benchmark; the specific process of data smoothing processing in step S2 is: eliminating the maximum value and the minimum value of the 4 flight time difference data, and calculating the average value of the remaining 2 flight time difference data;

[0056] The Kalman filtering in step S3 includes:

[0057] Step 1: Give the initial value of Kalman filter parameters

[0058] State transfer matrix F, control input matrix B, observation matrix H, process noise covariance Q, observation noise covariance R, control input u

[0059] Step 2: Calculate the estimated value and estimated covariance value

[0060] X_pred[k]=F×X[k-1]+B×u

[0061] Where X_pred[k] is the estimated value at the kth moment, and X[k-1] is the estimated value at the k-1th moment

[0062] P_pred[k]=F×P[k-1]×F+Q

[0063] Where P_pred[k] is the estimated covariance value at the kth moment, and P[k-1] is the estimated covariance value at the k-1th moment.

[0064] Step 3: Update Kalman gain, prediction value, and covariance value

[0065] K=P_pred[k]×H / (H×P_pred[k]×H+R)

[0066] X[k]=X_pred[k]+K×(Z[k]-H×X_pred[k])

[0067] P[k] = (1-K × H) × P_pred[k]

[0068] Where K is the Kalman gain, X[k] is the predicted value at the kth moment, Z[k] is the original value at the kth moment, and P[k] is the covariance value at the kth moment

[0069] Step 4: Return the predicted value

[0070] The Kalman algorithm uses a one-dimensional matrix. In order to facilitate the Kalman algorithm to quickly reduce the error between the actual value and the predicted value, some empirical values ​​in actual engineering are used to assign initial values ​​to the variables of the Kalman algorithm: state transfer matrix F=1; control input matrix B=0; observation matrix H=1; process noise covariance Q=0.0001; observation noise covariance R=0.1; control input u=0; initial covariance P=0.0031; initial state estimate X=0.0065;

[0071] The zero drift processing in step S4 includes: subtracting the flight time reference from the flight time difference data filtered in step S3, comparing the difference with the static threshold, and setting the water flow state variable to 1 and the flight time difference data to 0 if the difference is less than the threshold; setting the water flow state variable to 0 and taking the difference as the new flight time difference if the difference is greater than the threshold;

[0072] The flow calculation in step S5 includes:

[0073]

[0074] in, is the flight time difference data obtained in step S4, is the water flow velocity, the distance between the two reflectors is L, and c is the speed of ultrasonic wave propagation in water;

[0075] The linear average velocity of water flow can be simplified as:

[0076]

[0077] The maximum instantaneous flow value flowing through the water meter pipe :

[0078]

[0079] in, is the diameter of the water meter pipe.

[0080] In the present invention, in the first step, whether to perform temperature acquisition and update the flight time reference is determined according to the time interval; if the interval is 30 seconds, the current temperature is obtained, and then the flight time reference is used to determine whether the current water flow is in a flowing state. If it is not in a flowing state, 10 flight time measurements are performed to obtain an average as a new flight time reference, and the second step is performed. If the current water flow is in a flowing state, the second step is performed directly;

[0081] The second step is to obtain the 4 flight time difference data through the time-to-digital converter and perform data smoothing processing; measure the up and down flight time difference of the ultrasonic wave in the pipeline 4 times, remove the maximum and minimum values, and calculate the average of the remaining values ​​as the remaining flight time difference 1 of this time;

[0082] The third step is to filter the flight time difference through Kalman filtering to obtain the flight time difference 2;

[0083] Step 4: Subtract the flight time reference from the flight time difference 2 to obtain the flight time difference 3;

[0084] The fifth step is to compare whether the flight time difference 3 is less than a certain threshold. If it is less than a certain threshold, the current water flow is static and the flight time difference 3 is set to 0. If it is greater than a certain threshold, the current water flow is dynamic.

[0085] Step 6: Calculate the flow rate using the flight time difference.

[0086] Furthermore, the flow calculation in step S5 is specifically as follows:

[0087]

[0088] :

[0089]

[0090] However, in actual values, the speed c of ultrasonic waves propagating in water is much greater than the water flow speed. , so the Ignoring, the linear average velocity of the water flow can be simplified as: ,

[0091] The maximum instantaneous flow rate flowing through the water meter pipe is for:

[0092] .

[0093] Reference Figure 3 , Figure 4 Specifically, in this embodiment, Figure 3 It represents the original flight time difference data set flight time 1, Figure 4 The data after Kalman filtering and subtracting the flight time reference is the flight time difference 3; Figure 3 The fluctuation range of the flight time difference is roughly 0.0006 microseconds. Figure 4 The flight time difference fluctuates within 0.00007 microseconds.

[0094] In the present invention, Figure 3 The raw flight time difference data set in the has a large fluctuation range of about 0.0006 microseconds. This large fluctuation may be caused by a variety of factors, such as measurement noise, changes in environmental factors, or instability of the equipment. Figure 4 After the data in the Kalman filter is filtered, the fluctuation range is significantly reduced to only 0.00007 microseconds, which shows that the Kalman filter effectively reduces noise and uncertainty, making the data smoother and more stable.

[0095] Reference Figure 1-Figure 5 In step S1, the abnormal data of the 10 ultrasonic flight times measured by the time digital converter are eliminated. The specific steps are: 10 groups of flight time data are calculated. If the error value verification is not passed, the abnormal data is screened out. If the error value verification is passed and the number of 10 groups of flight time data is met, the average value of the obtained 10 flight times is calculated, and the calculation result is used as the flight time benchmark. If the number of 10 groups of flight time data is not met, the flight time of the missing number is supplemented, and the supplementary measured flight time is combined with the flight time that passes the error value verification to form 10 groups of flight time, and the error value verification is performed again; the 10 ultrasonic flight times measured by the time digital converter are respectively The formula for judging abnormal data of 10 ultrasonic flight times measured by the time-to-digital converter is:

[0096]

[0097]

[0098] ,in, , Represents the average value of 10 ultrasonic flight time data, is the standard deviation, Represents a single ultrasound time-of-flight data point and its overall data set average The relative distance between them.

[0099] In actual work, the measurement equipment itself may have certain errors, such as the accuracy limitation of the time-to-digital converter, the sensitivity or stability problem of the ultrasonic sensor, the changes in the pressure, flow rate, viscosity and other states of the fluid, the change of temperature, external interference (such as electromagnetic interference, vibration, etc.), or abnormal events such as bubbles, impurities or sudden pressure changes in the fluid, which may cause the propagation path of the ultrasonic wave to change, thereby affecting the measurement data. If these abnormal data are not screened out, the accuracy of the flight time benchmark will not be guaranteed; and the flight time benchmark is one of the basic data for calculating the flow rate. If the benchmark is inaccurate, the calculated flow value will also have errors. This error may accumulate over time, causing the final flow data to deviate seriously from the actual value;

[0100] And an inaccurate flight time reference can affect the overall performance of the system. For example, it can cause the system to fail to accurately respond to flow changes in the pipeline, or cause the system to frequently misreport or miss flow anomalies. At the same time, if the flight time reference is inaccurate, the system may need to be maintained and calibrated more frequently to ensure data accuracy, which will increase maintenance costs and may affect the reliability and stability of the system.

[0101] In the present invention, the following abnormal data judgment formula is used:

[0102]

[0103]

[0104] , judge the 10 ultrasonic flight time data, screen out the abnormal data, and supplement the ultrasonic flight time data in time to make the number of flight time data meet 10 groups, thereby ensuring the accuracy of the flight time benchmark and making the system run reliably and stably.

[0105] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for processing flow data in small-diameter pipelines, characterized in that: The following steps are involved: S1. Determine whether to perform temperature collection and update the flight time reference according to the time interval; S2, acquiring 4 flight time difference data through a time-to-digital converter and performing data smoothing processing; S3, performing Kalman filtering on the flight time difference data obtained in step S2; S4, performing zero drift processing on the filtered data obtained in step S3; S5, calculating the flow rate according to the data obtained in step S4; The judgment based on the time interval in step S1 is specifically: when the time interval is greater than or equal to 30 seconds, the temperature value is obtained through the time-to-digital converter, and when the water flow state variable is 1, the time-to-digital converter performs 10 ultrasonic flight time measurements, and the average value of the 10 flight times is calculated, and the calculation result is used as the flight time benchmark.

2. A method for processing flow data for small-diameter pipelines according to claim 1, characterized in that: The specific process of the data smoothing in step S2 is: removing the maximum value and the minimum value of the four flight time difference data, and calculating the average value of the remaining two flight time difference data.

3. The method for processing flow data of a small-diameter pipeline according to claim 1 is characterized in that: The Kalman filtering in step S3 includes: Step 1: Give the initial value of Kalman filter parameters State transfer matrix F, control input matrix B, observation matrix H, process noise covariance Q, observation noise covariance R, control input u; Step 2: Calculate the estimated value and estimated covariance value X_pred[k]=F×X[k-1]+B×u Where X_pred[k] is the estimated value at the kth moment, and X[k-1] is the estimated value at the k-1th moment P_pred[k]=F×P[k-1]×F+Q Where P_pred[k] is the estimated covariance value at the kth moment, and P[k-1] is the estimated covariance value at the k-1th moment; Step 3: Update Kalman gain, prediction value, and covariance value K=P_pred[k]×H / (H×P_pred[k]×H+R) X[k]=X_pred[k]+K×(Z[k]-H×X_pred[k]) P[k] = (1-K × H) × P_pred[k] Where K is the Kalman gain, X[k] is the predicted value at the kth moment, Z[k] is the original value at the kth moment, and P[k] is the covariance value at the kth moment; Step 4: Return the predicted value.

4. The method for processing flow data of a small-diameter pipeline according to claim 1 is characterized in that: The zero drift processing in step S4 includes: subtracting the flight time reference from the flight time difference data filtered in step S3, comparing the difference with the static threshold, and if the difference is less than the threshold, setting the water flow state variable to 1 and setting the flight time difference data to 0; if the difference is greater than the threshold, setting the water flow state variable to 0 and using the difference as the new flight time difference.

5. The method for processing flow data of a small-diameter pipeline according to claim 1 is characterized in that: The flow calculation in step S5 includes: , in, is the flight time difference data obtained in step S4, is the water flow velocity, the distance between the two reflectors is L, and c is the speed of ultrasonic wave propagation in water; The linear average velocity of water flow can be simplified as: , The maximum instantaneous flow value flowing through the water meter pipe : , in, is the diameter of the water meter pipe.

6. The method for processing flow data of a small-diameter pipeline according to claim 1 is characterized in that: In the step S1, abnormal data of the 10 ultrasonic flight times measured by the time-to-digital converter are eliminated, and the specific steps are: 10 groups of flight time data are calculated, and if the error value verification is not passed, the abnormal data is screened out; if the error value verification is passed and the number of 10 groups of flight time data is met, the average value of the 10 obtained flight times is calculated, and the calculation result is used as the flight time benchmark; if the number of 10 groups of flight time data is not met, the flight time of the missing number is supplemented and the supplementary measured flight time is summarized with the flight time that passes the error value verification to form 10 groups of flight time, and the error value verification is performed again.

7. A method for processing flow data for small-diameter pipelines according to claim 6, characterized in that: The 10 ultrasonic flight times measured by the time-to-digital converter are .

8. The method for processing flow data of a small-diameter pipeline according to claim 7, characterized in that: The formula for judging abnormal data of 10 ultrasonic flight times measured by the time-to-digital converter is: , , ,in, , Represents the average value of 10 ultrasonic flight time data, is the standard deviation, Represents a single ultrasound time-of-flight data point and its overall data set average The relative distance between them.

Citation Information

Patent Citations

  • Vibratory flow meter and zero check method

    CN103797340A

  • Supersonic wave water meter flow metering method and system

    CN105841762A

  • Zero drift temperature compensation method for ultrasonic transducer

    CN108180954A

  • Time difference ultrasonic flow measurement method based on improved Kalman filter

    CN112484798A

  • Water meter online calibration method and system

    CN114894276A

Cited By

  • Interference suppression method for ultrasonic flow measurement, medium and ultrasonic water meter

    CN120313693A