An ultrasonic gas meter, method and system for flow stabilizing filtering
By setting dynamic factors and filtering factors to calculate the filtering coefficients and the weighted sum of input data, the problem of slow initial value stabilization speed in the Kalman filtering method is solved, realizing rapid flow point switching and stable data output of ultrasonic gas meters and flow meters, thus improving metering accuracy.
Patent Information
- Application Number
- CN202111460492.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2041-12-02
AI Technical Summary
In the calibration process of ultrasonic gas meters and flow meters, the existing Kalman filtering method has a slow initial value stabilization speed. The response speed is inversely proportional to the filtering stability, resulting in untimely switching of flow data and insufficient stability, which affects the measurement accuracy.
The filter coefficients are calculated by setting dynamic factors and filter factors, and the input data is weighted and summed. Stable data is output through the filter result calculation module, which includes a filter coefficient calculation module, a filter data calculation module, and a filter result calculation module, to achieve fast switching and stable data output.
It enables rapid flow point switching between ultrasonic gas meters and flow meters, provides efficient and stable data output, and improves metering accuracy and data stability.
Smart Images

Figure CN114152299B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasonic gas meter metering data processing technology, specifically to a method and system for flow stabilization filtering of ultrasonic gas meters and flow meters. Background Technology
[0002] Ultrasonic gas meters and flow meters are highly accurate, have low pressure loss, are easy to maintain, and have high reliability due to the absence of moving parts. Following orifice flow meters and turbine flow meters, they have become the third type of legal gas metering instrument authorized for trade settlement. Most existing verification methods for ultrasonic gas meters and flow meters are Kalman filtering methods.
[0003] Kalman filtering is a series of mathematical equations that use the criterion of minimizing the mean square error to find the optimal solution iteratively. Each iteration consists of two steps:
[0004] Step 1: Estimate the current state using past states, i.e., "predict";
[0005] Step 2: Observe the current state and use the observed values to correct the estimated values, i.e., "correction".
[0006] By applying Kalman filtering to process the flow data of ultrasonic gas meters and flow meters, a stable and effective data output can be obtained after a certain time period.
[0007] Reference Figure 1 , Figure 1 This is a statistical graph of data from a Kalman filter simulation. In the graph, segment a represents the input data, and segment b represents the output data. According to... Figure 1 It is evident that Kalman filtering simulation applied to the calibration of ultrasonic gas meters and flow meters has certain shortcomings in stability and response speed. Its initial value stabilization speed is slow, and the response speed is inversely proportional to and relatively fixed with the filtering stability. Data switching requires a certain amount of stabilization time. This results in the inability to effectively output flow data during the calibration of ultrasonic gas meters, and the inability to quickly switch and obtain stable filtered data after switching. Therefore, it is necessary to design a method and system for stable flow filtering of ultrasonic gas meters and flow meters to solve the above problems. Summary of the Invention
[0008] To address the aforementioned problems in the existing technology, the present invention provides the following technical solution:
[0009] A method for stabilizing and filtering the flow of an ultrasonic gas meter or flow meter includes the following steps:
[0010] Set the dynamic factor and the filter factor;
[0011] The weighted sum of the filter coefficients is calculated based on the dynamic factor and the filter factor;
[0012] Input filtered data;
[0013] The weighted sum of the input data is calculated based on the filter factor and the filter data;
[0014] The filtered data output result is calculated by weighting the filter coefficients and the input data.
[0015] Furthermore, the weighted sum of the filter coefficients is calculated as follows: Sumk = Sumk*(kt) / k+1+p / k, that is, Sumk = (k+p) / t, where Sumk represents the weighted sum of the filter coefficients, k represents the filter factor, t represents time, and p represents the dynamic factor.
[0016] Furthermore, the weighted sum of the input data is calculated as follows: Sumv = Sumv * (k-1) / k + Vin, that is, Sumv = k * Vin, where Sumv represents the weighted sum of the input data and Vin represents the filtered data.
[0017] Furthermore, the method for calculating the filtered data output result is: Vout = Sumv / Sumk, where Vout represents the filtered data output result.
[0018] A system for implementing the method described in any one of the above claims includes a filter coefficient calculation module, a filter data calculation module, and a filter result calculation module, wherein,
[0019] The filter coefficient calculation module is used to calculate the weighted sum of the filter coefficients;
[0020] The filtered data calculation module is used to receive the input filtered data and calculate the weighted sum of the input data;
[0021] The filtering result calculation module is used to calculate the output result of the filtered data.
[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0023] This invention calculates the weighted sum of the filter coefficients and the weighted sum of the input data separately, and then calculates the output filter data through the filter result calculation module. Compared with the traditional Kalman filter simulation method, the method disclosed in this invention has a faster initial value stabilization speed, can quickly switch different flow points and obtain stable data output. It has the characteristics of fast output of stable data, high data stability, and flexible switching of flow points, providing efficient and stable data support for product accuracy verification and measurement. Attached Figure Description
[0024] Figure 1 Statistical graphs of data from Kalman filter simulations;
[0025] Figure 2 This is a data statistics chart of an ultrasonic gas meter and flow meter flow stabilization filtering method disclosed in this invention;
[0026] Figure 3 This is a system flowchart of an ultrasonic gas meter and flow meter flow stabilization filter disclosed in this invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] The present invention will now be described in further detail with reference to the accompanying drawings:
[0029] Reference Figure 2 In the diagram, segment A represents input data and segment B represents output data. A method for stabilizing and filtering the flow of an ultrasonic gas meter or flow meter is characterized by the following steps:
[0030] Set the dynamic factor and the filter factor, where the filter factor is the filter data container, and the dynamic factor will affect the dynamic response speed of the filter.
[0031] The weighted sum of the filter coefficients is calculated based on the dynamic factor and the filter factor. The weighted sum of the filter coefficients is the total sum of the filter coefficients. The calculation method for the weighted sum of the filter coefficients is: Sumk = Sumk*(kt) / k+1+p / k, that is, Sumk = (k+p) / t, where Sumk represents the weighted sum of the filter coefficients, k represents the filter factor, t represents time, and p represents the dynamic factor.
[0032] Input filtered data;
[0033] The input data weighted sum is calculated based on the filter factor and the filtered data. The calculation method for the input data weighted sum is: Sumv = Sumv*(k-1) / k+Vin, that is, Sumv = k*Vin, where Sumv represents the input data weighted sum and Vin represents the filtered data.
[0034] The filtered data output is calculated by weighting the filter coefficients and the input data. The calculation method for the filtered data output is: Vout = Sumv / Sumk, where Vout represents the filtered data output.
[0035] and Figure 1 Compared to the Kalman filter simulation data statistics chart, the method disclosed in this invention has a faster initial value stabilization speed, can quickly switch between different flow points and obtain stable data output, providing effective data assurance for the verification and measurement of gas meters.
[0036] Reference Figure 3 A system for implementing any of the above methods includes a filter coefficient calculation module, a filter data calculation module, and a filter result calculation module, wherein...
[0037] The filter coefficient calculation module is used to calculate the weighted sum of the filter coefficients;
[0038] The filtered data calculation module is used to receive the input filtered data and calculate the weighted sum of the input data;
[0039] The filter result calculation module is used to calculate the output result of the filtered data.
[0040] The workflow of this system is as follows:
[0041] The filter coefficient calculation module calculates the weighted sum of the filter coefficients, and the filter data calculation module calculates the weighted sum of the input data based on the input filter data. Then, the weighted sum of the filter coefficients and the weighted sum of the input data are passed to the filter result calculation module, which calculates the output filter data.
[0042] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for stabilizing and filtering the flow rate of an ultrasonic gas meter or flow meter, characterized in that: Includes the following steps: Set the dynamic factor and the filter factor; The weighted sum of the filter coefficients is calculated based on the dynamic factor and the filter factor; wherein, the calculation method of the weighted sum of the filter coefficients is: Sumk=Sumk*(kt) / k+1+p / k, that is, Sumk=(k+p) / t, where Sumk represents the weighted sum of the filter coefficients, k represents the filter factor, t represents time, and p represents the dynamic factor; Input filtered data; The input data weighted sum is calculated based on the filter factor and the filter data; wherein the input data weighted sum is calculated as follows: Sumv = Sumv*(k-1) / k+Vin, that is, Sumv = k*Vin, where Sumv represents the input data weighted sum and Vin represents the filter data; The filtered data output result is calculated by weighting the filter coefficients and the input data; wherein the method for calculating the filtered data output result is: Vout = Sumv / Sumk, where Vout represents the filtered data output result.
2. A system for implementing the method of claim 1, characterized in that: It includes a filter coefficient calculation module, a filter data calculation module, and a filter result calculation module, among which, The filter coefficient calculation module is used to calculate the weighted sum of the filter coefficients; The filtered data calculation module is used to receive the input filtered data and calculate the weighted sum of the input data; The filtering result calculation module is used to calculate the output result of the filtered data.
Citation Information
Patent Citations
Filtering method and system based on flow state switching and flow meter
CN113612466A