Zero point tracking method, device and equipment of gas ultrasonic flowmeter and medium

By determining the feature vector in the gas ultrasonic flowmeter and performing zero-point correction using drift detection and calibration models, the problem of manual operation dependence is solved, and fast and accurate zero-point tracking is achieved, reducing costs and improving accuracy.

CN120489300APending Publication Date: 2025-08-15天津新智感知科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510928121.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The zero-point tracking scheme of existing gas ultrasonic flowmeters relies on manual operation, with high time and labor costs and difficult to guarantee accuracy.

Method used

By determining the characteristic vector of the gas flow measurement value, the drift detection model is used to classify the vector category, and when the zero-point drift is detected, the drift calibration model is used to calculate the zero-point correction value for correction.

Benefits of technology

Automatic, fast and accurate zero-point tracking is achieved, reducing time and labor costs and improving accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120489300A_ABST
    Figure CN120489300A_ABST
Patent Text Reader

Abstract

The invention discloses a zero point tracking method, device and equipment of a gas ultrasonic flowmeter and a medium. The method comprises the following steps: determining a feature vector of a current gas flow measurement value according to a measurement correlation parameter corresponding to the current gas flow measurement value; the measurement correlation parameters comprise signal characteristic parameters, environment parameters and signal statistical parameters; classifying the feature vectors through a drift detection model, and determining vector categories of the feature vectors; the vector category is a zero drift feature vector or a normal feature vector; and when it is determined that the vector category is a zero drift feature vector, a zero correction value is determined through a drift calibration model, and the current gas flow measurement value is corrected according to the zero correction value. According to the embodiment of the invention, zero point tracking can be quickly and accurately carried out on the gas ultrasonic flowmeter arranged in the gas pipeline based on the measurement correlation parameters, the drift detection model and the drift calibration model, the time cost and the labor cost are reduced, and the accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a zero-point tracking method, device, equipment and medium for a gas ultrasonic flowmeter. Background Art

[0002] When monitoring gas pipeline usage, the flow of gas passing through the gas pipeline is typically measured using a gas ultrasonic flowmeter installed in the gas pipeline. During the process of measuring the gas flow, the gas ultrasonic flowmeter may experience zero drift. Zero drift in a gas ultrasonic flowmeter refers to a phenomenon where the gas flow measurement value obtained by the gas ultrasonic flowmeter is non-zero when the actual flow of gas passing through the gas pipeline is zero. When zero drift occurs in a gas ultrasonic flowmeter, the gas flow measurement value obtained by the gas ultrasonic flowmeter deviates from the actual flow of gas passing through the gas pipeline, necessitating correction of the gas flow measurement value obtained by the gas ultrasonic flowmeter. In order to ensure effective monitoring of the use of the gas pipeline, it is necessary to perform zero point tracking on the gas ultrasonic flowmeter installed in the gas pipeline, and detect whether the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has zero point drift. After determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has zero point drift, the gas flow measurement value obtained by the gas ultrasonic flowmeter is corrected to reduce the deviation between the gas flow measurement value and the actual flow of gas passing through the gas pipeline.

[0003] In the related art, the commonly used zero-point tracking solution for gas ultrasonic flowmeters is as follows: technicians manually detect whether the gas flow measurement value obtained by the gas ultrasonic flowmeter installed in the gas pipeline is the gas flow measurement value measured when the gas ultrasonic flowmeter experiences zero-point drift. After determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter experiences zero-point drift, the gas flow measurement value obtained by the gas ultrasonic flowmeter is corrected to reduce the deviation between the gas flow measurement value and the actual flow rate of gas passing through the gas pipeline. The zero-point tracking solution for gas ultrasonic flowmeters in the related art relies on manual operation, which is time-consuming and labor-intensive, and accuracy is difficult to guarantee. Summary of the Invention

[0004] The present invention provides a zero-point tracking method, device, equipment and medium for a gas ultrasonic flowmeter to solve the problem that the zero-point tracking solution of a gas ultrasonic flowmeter in the related art relies on manual operation, has high time and labor costs, and is difficult to ensure accuracy.

[0005] According to one aspect of the present invention, a zero point tracking method for a gas ultrasonic flowmeter is provided, comprising:

[0006] Determining a characteristic vector of a current gas flow measurement value of the gas ultrasonic flowmeter based on measurement-related parameters corresponding to the current gas flow measurement value; wherein the measurement-related parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters;

[0007] Classifying the feature vector using a drift detection model to determine a vector category of the feature vector; wherein the vector category is a zero-point drift feature vector or a normal feature vector;

[0008] When it is determined that the vector category is a zero-point drift characteristic vector, the zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through the drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value.

[0009] According to another aspect of the present invention, a zero-point tracking device for a gas ultrasonic flowmeter is provided, comprising:

[0010] a vector determination module, configured to determine a characteristic vector of a current gas flow measurement value of the gas ultrasonic flowmeter based on measurement-related parameters corresponding to the current gas flow measurement value; wherein the measurement-related parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters;

[0011] a drift detection module, configured to classify the feature vector using a drift detection model to determine a vector category of the feature vector; wherein the vector category is a zero-point drift feature vector or a normal feature vector;

[0012] A drift correction module is used to determine the zero point correction value of the current gas flow measurement value according to the measurement value sequence of the current gas flow measurement value through a drift calibration model when it is determined that the vector category is a zero point drift characteristic vector, and correct the current gas flow measurement value according to the zero point correction value.

[0013] According to another aspect of the present invention, an electronic device is provided, comprising:

[0014] at least one processor;

[0015] and a memory communicatively coupled to the at least one processor;

[0016] The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the zero point tracking method of the gas ultrasonic flowmeter described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the zero point tracking method of a gas ultrasonic flowmeter according to any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the zero point tracking method of the gas ultrasonic flowmeter according to any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention determines the characteristic vector of the current gas flow measurement value according to the measurement associated parameters corresponding to the current gas flow measurement value of the gas ultrasonic flowmeter; wherein the measurement associated parameters include signal characteristic parameters, environmental parameters and signal statistical parameters; then the characteristic vector is classified by a drift detection model to determine the vector category of the characteristic vector; wherein the vector category is a zero-point drift characteristic vector or a normal characteristic vector; when it is determined that the vector category is a zero-point drift characteristic vector, the zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through the drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value, thereby solving the problem that the zero-point tracking solution of the gas ultrasonic flowmeter in the related art relies on manual operation, has high time cost and labor cost, and is difficult to guarantee accuracy, and can automatically The method can quickly and accurately detect whether the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has a zero drift, and automatically determine the zero point correction value of the gas flow measurement value based on the drift calibration model after determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has a zero drift, and correct the gas flow measurement value according to the zero point correction value to reduce the deviation between the gas flow measurement value and the actual flow of the gas passing through the gas pipeline, thereby realizing fast and accurate zero point tracking of the gas ultrasonic flowmeter installed in the gas pipeline, reducing the time cost and labor cost of the zero point tracking process, and improving the accuracy of the zero point tracking process.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 This is a flow chart of a zero point tracking method for a gas ultrasonic flowmeter provided in Example 1 of the present invention.

[0023] Figure 2 A schematic diagram of a zero-point tracking process provided in Example 1 of the present invention.

[0024] Figure 3 A schematic diagram of a training process of a drift calibration model provided in Example 1 of the present invention.

[0025] Figure 4 This is a flow chart of a zero point tracking method for a gas ultrasonic flowmeter provided in Example 2 of the present invention.

[0026] Figure 5 This is a structural schematic diagram of a zero point tracking device for a gas ultrasonic flowmeter provided in Example 3 of the present invention.

[0027] Figure 6 A schematic structural diagram of an electronic device for implementing the zero-point tracking method of a gas ultrasonic flowmeter according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "target", "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprise", "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] Figure 1 A flowchart of a zero-point tracking method for a gas ultrasonic flowmeter provided in the first embodiment of the present invention. This embodiment can be applied to zero-point tracking of a gas ultrasonic flowmeter installed in a gas pipeline, detecting whether the gas flow measurement value obtained by the gas ultrasonic flowmeter is a gas flow measurement value measured when the gas ultrasonic flowmeter has a zero-point drift, and after determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is a gas flow measurement value measured when the gas ultrasonic flowmeter has a zero-point drift, correcting the gas flow measurement value obtained by the gas ultrasonic flowmeter to reduce the deviation between the gas flow measurement value and the actual flow of the gas passing through the gas pipeline. This method can be executed by a zero-point tracking device of a gas ultrasonic flowmeter, and the zero-point tracking device of the gas ultrasonic flowmeter can be implemented in the form of hardware and / or software, and the zero-point tracking device of the gas ultrasonic flowmeter can be configured in a gas ultrasonic flowmeter installed in a gas pipeline. Figure 1 As shown, the method includes:

[0032] Step 101: Determine a characteristic vector of a current gas flow measurement value of a gas ultrasonic flow meter according to measurement association parameters corresponding to the current gas flow measurement value.

[0033] The measurement-related parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters.

[0034] Optionally, the gas ultrasonic flowmeter may be a gas ultrasonic flowmeter for measuring the flow of gas passing through a gas pipeline using ultrasonic signals. The gas flow measurement value may refer to the flow of gas passing through the gas pipeline measured by the gas ultrasonic flowmeter using ultrasonic signals. The current gas flow measurement value may refer to the most recently measured gas flow measurement value obtained by the gas ultrasonic flowmeter before zero tracking processing is performed.

[0035] Optionally, after the total number of gas flow measurement values measured by the ultrasonic gas flowmeter exceeds n, each time the ultrasonic gas flowmeter measures a new gas flow measurement value, the new gas flow measurement value obtained by the ultrasonic gas flowmeter may be determined as the current gas flow measurement value of the ultrasonic gas flowmeter. n is a positive integer greater than or equal to 2. Exemplarily, n is 19. Thus, for each determination of the current gas flow measurement value, the total number of gas flow measurement values measured prior to the current gas flow measurement value is greater than n.

[0036] Optionally, the measurement-associated parameters corresponding to the current gas flow measurement value may be multiple parameters related to the process of measuring the current gas flow measurement value. The measurement-associated parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters. After each determination of the current gas flow measurement value of the gas ultrasonic flowmeter, the signal characteristic parameters and environmental parameters corresponding to the current gas flow measurement value may be obtained, and the signal statistical parameters corresponding to the current gas flow measurement value may be calculated.

[0037] Optionally, the signal characteristic parameters may be parameters related to the ultrasonic signal used to measure the current gas flow measurement value, measured by the gas ultrasonic flowmeter via a signal measurement sensor. Signal characteristic parameters include, but are not limited to, ultrasonic signal propagation time difference, ultrasonic signal amplitude, and ultrasonic signal phase difference. The ultrasonic signal propagation time difference, ultrasonic signal amplitude, and ultrasonic signal phase difference of the ultrasonic signal can be synchronously measured by the signal measurement sensor to capture the dynamic fluctuations in the energy and phase of the ultrasonic signal. The ultrasonic signal propagation time difference may refer to the difference between the downstream and upstream propagation times of the ultrasonic signal in the gas passing through the gas pipeline. The ultrasonic signal amplitude may refer to the amplitude of the ultrasonic signal. The ultrasonic signal phase difference may refer to the phase difference between the ultrasonic signal and the previously used ultrasonic signal. The signal measurement sensor may be a sensor provided in the gas ultrasonic flowmeter to measure the ultrasonic signal used by the gas ultrasonic flowmeter to obtain the ultrasonic signal propagation time difference, ultrasonic signal amplitude, and ultrasonic signal phase difference. The ultrasonic signal propagation time difference, ultrasonic signal amplitude, and ultrasonic signal phase difference corresponding to the current gas flow measurement value can be obtained from the signal measurement sensor.

[0038] Optionally, the environmental parameters may be parameters related to the environment in which the ultrasonic gas flowmeter is located, measured by a temperature sensor, a pressure sensor, and a vibration sensor when the ultrasonic gas flowmeter measures the current gas flow measurement value. Environmental parameters include, but are not limited to, temperature, pressure, and pipeline vibration frequency. Temperature may refer to the temperature at the location of the ultrasonic gas flowmeter measured by the temperature sensor when measuring the current gas flow measurement value. Pressure may refer to the pressure at the location of the ultrasonic gas flowmeter measured by the pressure sensor when measuring the current gas flow measurement value. Pipeline vibration frequency may refer to the vibration frequency at the location of the ultrasonic gas flowmeter measured by the vibration sensor when measuring the current gas flow measurement value. The temperature sensor may be a sensor provided in the ultrasonic gas flowmeter for measuring the temperature at the location of the ultrasonic gas flowmeter. The pressure sensor may be a sensor provided in the ultrasonic gas flowmeter for measuring the pressure at the location of the ultrasonic gas flowmeter. The vibration sensor may be a sensor provided in the ultrasonic gas flowmeter for measuring the vibration frequency at the location of the ultrasonic gas flowmeter. The temperature corresponding to the current gas flow measurement value may be obtained from the temperature sensor. The pressure corresponding to the current gas flow measurement value may be obtained from the pressure sensor. The pipeline vibration frequency corresponding to the current gas flow measurement value can be obtained from the vibration sensor.

[0039] Optionally, the signal statistical parameter may be a parameter calculated based on the ultrasonic signal amplitude and ultrasonic signal phase difference measured by the signal measurement sensor. The signal statistical parameter includes the ultrasonic signal amplitude fluctuation coefficient and the ultrasonic signal phase change rate.

[0040] Optionally, the ultrasonic signal amplitude fluctuation coefficient may be a numerical value calculated based on all ultrasonic signal amplitudes already measured by the signal measurement sensor. The average value of all ultrasonic signal amplitudes already measured by the signal measurement sensor, and the maximum and minimum values of all ultrasonic signal amplitudes already measured by the signal measurement sensor may be calculated, and the ultrasonic signal amplitude fluctuation coefficient corresponding to the current gas flow measurement value may be calculated based on the calculated average value, maximum value, and minimum value. The calculated average value, maximum value, and minimum value may be substituted into the following amplitude fluctuation coefficient calculation formula to calculate the ultrasonic signal amplitude fluctuation coefficient corresponding to the current gas flow measurement value:

[0041]

[0042] Among them, K A is the ultrasonic signal amplitude fluctuation coefficient, A max A is the maximum value of all ultrasonic signal amplitudes measured by the signal measurement sensor. min A is the minimum value of all ultrasonic signal amplitudes measured by the signal measurement sensor. avgIt is the average value of all ultrasonic signal amplitudes measured by the statistical signal measurement sensor.

[0043] Optionally, the ultrasonic signal phase change rate may be the rate of change between the two ultrasonic signal phase differences most recently measured by the signal measurement sensor. The two ultrasonic signal phase differences most recently measured by the signal measurement sensor and the measurement time of the two ultrasonic signal phase differences most recently measured may be obtained from the signal measurement sensor. The measurement time of the ultrasonic signal phase difference may be the time at which the ultrasonic signal phase difference is recorded. The difference between the two ultrasonic signal phase differences most recently measured and the difference between the measurement times of the two ultrasonic signal phase differences most recently measured may be calculated, and then the ratio of the difference between the two ultrasonic signal phase differences most recently measured and the difference between the measurement times of the two ultrasonic signal phase differences most recently measured may be calculated to obtain the ultrasonic signal phase change rate corresponding to the current gas flow measurement value.

[0044] Typically, changes in the ultrasonic signal and the measurement environment can cause zero drift in a gas ultrasonic flowmeter. The ultrasonic signal propagation time difference, ultrasonic signal amplitude, ultrasonic signal phase difference, ultrasonic signal amplitude fluctuation coefficient, and ultrasonic signal phase change rate corresponding to the current gas flow measurement are data that can fully reflect the actual conditions of the ultrasonic signal used when measuring the current gas flow measurement. The temperature, pressure, and pipeline vibration frequency corresponding to the current gas flow measurement are data that can fully reflect the actual conditions of the measurement environment when measuring the current gas flow measurement. The ultrasonic signal propagation time difference, ultrasonic signal amplitude, ultrasonic signal phase difference, ultrasonic signal amplitude fluctuation coefficient, ultrasonic signal phase change rate, temperature, pressure, and pipeline vibration frequency corresponding to the current gas flow measurement are data that can be used to comprehensively analyze and detect whether the current gas flow measurement is the gas flow measurement value measured when the gas ultrasonic flowmeter is experiencing zero drift.

[0045] Optionally, the feature vector of the current gas flow measurement value may be a vector used to characterize the actual conditions of the ultrasonic signal used when measuring the current gas flow measurement value and the actual conditions of the measurement environment when measuring the current gas flow measurement value.

[0046] Optionally, the signal characteristic parameters include ultrasonic signal propagation time difference, ultrasonic signal amplitude and ultrasonic signal phase difference, the environmental parameters include temperature, pressure and pipeline vibration frequency, and the signal statistical parameters include ultrasonic signal amplitude fluctuation coefficient and ultrasonic signal phase change rate; according to the measurement association parameters corresponding to the current gas flow measurement value of the gas ultrasonic flowmeter, the characteristic vector of the current gas flow measurement value is determined, including: constructing the characteristic vector of the current gas flow measurement value according to the ultrasonic signal propagation time difference, the ultrasonic signal amplitude, the ultrasonic signal phase difference, the temperature, the pressure, the pipeline vibration frequency, the ultrasonic signal amplitude fluctuation coefficient and the ultrasonic signal phase change rate.

[0047] Optionally, an 8-dimensional row vector can be constructed based on the ultrasonic signal propagation time difference, ultrasonic signal amplitude, ultrasonic signal phase difference, temperature, pressure, pipeline vibration frequency, ultrasonic signal amplitude fluctuation coefficient, and ultrasonic signal phase change rate corresponding to the current gas flow measurement value. The first dimension of the row vector is the ultrasonic signal propagation time difference corresponding to the current gas flow measurement value, the second dimension of the row vector is the ultrasonic signal amplitude corresponding to the current gas flow measurement value, the third dimension of the row vector is the ultrasonic signal phase difference corresponding to the current gas flow measurement value, the fourth dimension of the row vector is the temperature corresponding to the current gas flow measurement value, the fifth dimension of the row vector is the pressure corresponding to the current gas flow measurement value, the sixth dimension of the row vector is the pipeline vibration frequency corresponding to the current gas flow measurement value, the seventh dimension of the row vector is the ultrasonic signal amplitude fluctuation coefficient corresponding to the current gas flow measurement value, and the eighth dimension of the row vector is the ultrasonic signal phase change rate corresponding to the current gas flow measurement value. The constructed 8-dimensional row vector can be used to characterize the actual conditions of the ultrasonic signal used when measuring the current gas flow measurement value and the actual conditions of the measurement environment when measuring the current gas flow measurement value. The constructed 8-dimensional row vector can be determined as the eigenvector of the current gas flow measurement value, thereby constructing the eigenvector of the current gas flow measurement value. The constructed 8-dimensional row vector can be expressed as Among them, X is the constructed 8-dimensional row vector, Δt is the ultrasonic signal propagation time difference corresponding to the current gas flow measurement value, A is the ultrasonic signal amplitude corresponding to the current gas flow measurement value, is the phase difference of the ultrasonic signal corresponding to the current gas flow measurement value, T is the temperature corresponding to the current gas flow measurement value, P is the pressure corresponding to the current gas flow measurement value, f is the pipeline vibration frequency corresponding to the current gas flow measurement value, K A is the ultrasonic signal amplitude fluctuation coefficient corresponding to the current gas flow measurement value, It is the rate of change of the ultrasonic signal phase corresponding to the current gas flow measurement value.

[0048] Step 102: Classify the feature vector using a drift detection model to determine the vector category of the feature vector.

[0049] The vector category is a zero-drift eigenvector or a normal eigenvector.

[0050] Optionally, the vector category of the feature vector can be information used to characterize whether the feature vector is a feature vector of a gas flow measurement value measured when the gas ultrasonic flow meter experiences zero drift. If the vector category of the feature vector is a zero drift feature vector, it indicates that the feature vector is a feature vector of a gas flow measurement value measured when the gas ultrasonic flow meter experiences zero drift, and the gas flow measurement value to which the feature vector belongs is a gas flow measurement value measured when the gas ultrasonic flow meter experiences zero drift. If the vector category of the feature vector is a normal feature vector, it indicates that the feature vector is a feature vector of a gas flow measurement value measured when the gas ultrasonic flow meter does not experience zero drift, and the gas flow measurement value to which the feature vector belongs is not a gas flow measurement value measured when the gas ultrasonic flow meter experiences zero drift.

[0051] Optionally, classifying the feature vector through a drift detection model to determine the vector category of the feature vector includes: inputting the feature vector into a pre-trained drift detection model to obtain the vector category of the feature vector output by the drift detection model.

[0052] Optionally, a pre-trained drift detection model is provided in the gas ultrasonic flowmeter. The pre-trained drift detection model can be a model for analyzing and calculating the characteristic vector of the input gas flow measurement value, obtaining the probability that the vector category of the characteristic vector is a zero-point drift characteristic vector and the probability that the vector category of the characteristic vector is a normal characteristic vector, and then determining the vector category of the characteristic vector based on the obtained probabilities. The input of the drift detection model is the characteristic vector of the gas flow measurement value, and the output of the drift detection model is the vector category of the characteristic vector of the gas flow measurement value. The characteristic vector of the gas flow measurement value is input into the pre-trained drift detection model. The pre-trained drift detection model analyzes and calculates the characteristic vector of the input gas flow measurement value, obtaining the probability that the vector category of the characteristic vector of the gas flow measurement value is a zero-point drift characteristic vector and the probability that the vector category of the characteristic vector of the gas flow measurement value is a normal characteristic vector, and then determining the vector category of the characteristic vector of the gas flow measurement value based on the obtained probabilities and outputting the vector category of the characteristic vector of the gas flow measurement value. The vector category of the characteristic vector of the gas flow measurement value output by the drift detection model can be obtained. Determining the vector category of the feature vector based on the obtained probability and outputting the vector category of the feature vector may include: when the probability that the vector category of the feature vector is a zero-drift feature vector is greater than or equal to the probability that the vector category of the feature vector is a normal feature vector, determining that the vector category of the feature vector is a zero-drift feature vector; when the probability that the vector category of the feature vector is a zero-drift feature vector is less than the probability that the vector category of the feature vector is a normal feature vector, determining that the vector category of the feature vector is a normal feature vector. The drift detection model can be obtained by training a machine learning model using the feature vectors of the gas flow measurement values collected in advance and the vector categories of the gas flow measurement value feature vectors. The machine learning model includes but is not limited to a Gaussian naive Bayes classifier.

[0053] Optionally, the feature vector of the current gas flow measurement value can be input into a pre-trained drift detection model. The pre-trained drift detection model analyzes and calculates the feature vector of the current gas flow measurement value, obtains the probability that the vector category of the feature vector of the current gas flow measurement value is a zero-point drift feature vector, and the probability that the vector category of the feature vector of the current gas flow measurement value is a normal feature vector. The model then determines the vector category of the feature vector of the current gas flow measurement value based on the obtained probabilities and outputs the vector category of the feature vector of the current gas flow measurement value. The vector category of the feature vector of the current gas flow measurement value output by the drift detection model can be obtained.

[0054] Step 103: When it is determined that the vector category is a zero-point drift characteristic vector, a zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through a drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value.

[0055] Optionally, for each gas flow measurement value measured when the ultrasonic gas flowmeter exhibits zero drift, the gas flow measurement value may deviate from the actual flow rate of gas passing through the gas pipeline. A zero correction value for the gas flow measurement value may be a value calculated based on the gas flow measurement value and n gas flow measurement values measured prior to the gas flow measurement value to reduce the deviation between the gas flow measurement value and the actual flow rate of gas passing through the gas pipeline. The zero correction value for the gas flow measurement value may be added to the gas flow measurement value to reduce the deviation between the gas flow measurement value and the actual flow rate of gas passing through the gas pipeline.

[0056] Optionally, when it is determined that the vector category of the eigenvector of the current gas flow measurement value is a zero-drift eigenvector, it can be determined that the eigenvector of the current gas flow measurement value is a eigenvector of the gas flow measurement value measured when the gas ultrasonic flowmeter has zero-drift, and the current gas flow measurement value is a gas flow measurement value measured when the gas ultrasonic flowmeter has zero-drift, and the current gas flow measurement value needs to be corrected to reduce the deviation between the current gas flow measurement value and the actual flow of gas passing through the gas pipeline. Therefore, when it is determined that the vector category of the eigenvector of the current gas flow measurement value is a zero-drift eigenvector, a zero-point correction value of the current gas flow measurement value is determined based on the measurement value sequence of the current gas flow measurement value through a drift calibration model, and the current gas flow measurement value is corrected based on the zero-point correction value to reduce the deviation between the current gas flow measurement value and the actual flow of gas passing through the gas pipeline.

[0057] Optionally, when it is determined that the vector category of the eigenvector of the current gas flow measurement value is a zero-drift eigenvector, it can be determined that the vector category of the eigenvector of the current gas flow measurement value is a normal eigenvector, indicating that the eigenvector of the current gas flow measurement value is the eigenvector of the gas flow measurement value measured when the gas ultrasonic flowmeter does not have zero-drift, and the gas flow measurement value to which the eigenvector belongs is not the gas flow measurement value measured when the gas ultrasonic flowmeter has zero-drift, and there is no need to correct the current gas flow measurement value, thereby reducing the deviation between the current gas flow measurement value and the actual flow of gas passing through the gas pipeline. Therefore, when it is determined that the vector category of the eigenvector of the current gas flow measurement value is a zero-drift eigenvector, it is determined that there is no need to correct the current gas flow measurement value according to the zero-point correction value, and it is determined that the zero-point tracking processing of the current gas flow measurement value is completed. The current gas flow measurement value after zero-point tracking processing is the original gas flow measurement value.

[0058] Optionally, the zero point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through a drift calibration model, including: inputting the measurement value sequence of the current gas flow measurement value into a pre-trained drift calibration model to obtain the zero point correction value of the current gas flow measurement value output by the drift calibration model.

[0059] Optionally, the gas ultrasonic flowmeter is provided with a pre-trained drift calibration model. The pre-trained drift calibration model can be a model used to analyze and calculate a measurement value sequence of input gas flow measurement values to obtain a zero-point correction value for the gas flow measurement values. The measurement value sequence of the gas flow measurement values can be a sequence obtained by sorting the gas flow measurement values and n gas flow measurement values measured before the gas flow measurement values in order of measurement time from the beginning to the end. The sequence contains n+1 gas flow measurement values. For example, n is 19, and the sequence contains 20 gas flow measurement values. The input of the drift calibration model is the measurement value sequence of the gas flow measurement values, and the output of the drift detection model is the zero-point correction value for the gas flow measurement values. The measurement value sequence of the gas flow measurement values is input into the pre-trained drift calibration model. The pre-trained drift calibration model analyzes and calculates the measurement value sequence of the gas flow measurement values to obtain a zero-point correction value for the gas flow measurement values, and outputs the zero-point correction value for the gas flow measurement values. The zero-point correction value for the gas flow measurement values output by the drift calibration model can be obtained. The drift calibration model can be obtained by training a machine learning model using a previously collected sequence of gas flow measurement values and a zero-point correction value. The machine learning model includes but is not limited to a long-short term memory (LSTM) network model.

[0060] Optionally, before determining the characteristic vector of the current gas flow measurement value based on the measurement association parameters corresponding to the current gas flow measurement value of the gas ultrasonic flowmeter, it also includes: using a preset number of measurement value sequences and zero point correction values of gas flow measurement values as training samples, training a machine learning model, and obtaining a drift calibration model; wherein the input of the drift calibration model is the measurement value sequence of the gas flow measurement value, and the output of the drift calibration model is the zero point correction value of the gas flow measurement value.

[0061] Optionally, the measurement value sequence and zero-point correction value of the preset number of gas flow measurement values may be a measurement value sequence and zero-point correction value of a plurality of gas flow measurement values pre-collected and stored in the gas ultrasonic flowmeter. The preset number may be a preset number. Exemplarily, the preset number is 300. The measurement value sequence and zero-point correction value of the preset number of gas flow measurement values stored in the gas ultrasonic flowmeter may be obtained, and the measurement value sequence and zero-point correction value of the preset number of gas flow measurement values may be used as training samples to train a pre-set machine learning model, determine the parameters of the machine learning model, and obtain a drift calibration model. The input of the drift calibration model is the measurement value sequence of the gas flow measurement value, and the output of the drift calibration model is the zero-point correction value of the gas flow measurement value.

[0062] Optionally, the current gas flow measurement value and n gas flow measurement values measured before the current gas flow measurement value can be obtained from the gas ultrasonic flow meter, the measurement time of each gas flow measurement value recorded by the gas ultrasonic flow meter can be obtained from the gas ultrasonic flow meter, and then the current gas flow measurement value and the n gas flow measurement values measured before the current gas flow measurement value can be sorted in order from front to back according to the measurement time to obtain a measurement value sequence of the current gas flow measurement value. The measurement time of the gas flow measurement value can be the time when the gas flow measurement value is measured and recorded by the gas ultrasonic flow meter. The measurement value sequence of the current gas flow measurement value can be input into a pre-trained drift calibration model. The pre-trained drift calibration model will analyze and calculate the measurement value sequence of the current gas flow measurement value, obtain the zero point correction value of the current gas flow measurement value, and output the zero point correction value of the current gas flow measurement value. The zero point correction value of the current gas flow measurement value output by the drift calibration model can be obtained.

[0063] Optionally, the current gas flow measurement value is corrected according to the zero point correction value, including: adding the zero point correction value of the current gas flow measurement value to the current gas flow measurement value to obtain the corrected current gas flow measurement value, thereby completing the correction of the current gas flow measurement value and reducing the deviation between the current gas flow measurement value and the actual flow of gas passing through the gas pipeline.

[0064] Optionally, after correcting the current gas flow measurement value according to the zero point correction value, it also includes: verifying the reliability of the corrected current gas flow measurement value based on historical gas flow measurement values and statistical characteristic values of the corrected current gas flow measurement value.

[0065] Optionally, verifying the reliability of the corrected current gas flow measurement value may refer to detecting whether the corrected current gas flow measurement value is a reliable measurement value or an unreliable measurement value. A reliable measurement value may refer to a gas flow measurement value that does not have any abnormalities in its value. An unreliable measurement value may refer to a gas flow measurement value that does have any abnormalities in its value.

[0066] Optionally, the historical gas flow measurement values may refer to gas flow measurement values that have undergone zero-point tracking processing prior to the current gas flow measurement value. Each gas flow measurement value may be a raw gas flow measurement value or a corrected gas flow measurement value. The statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value may refer to the variance of each gas flow measurement value in a sequence obtained by sorting the historical gas flow measurement values and the corrected current gas flow measurement value in chronological order.

[0067] Optionally, the reliability of the corrected current gas flow measurement value is verified based on the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value, including: determining the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value; when the statistical characteristic value is less than or equal to a first value, determining that the corrected current gas flow measurement value is a reliable measurement value; when the statistical characteristic value is greater than the first value and less than or equal to a second value, performing reliability verification on the corrected current gas flow measurement value based on the historical gas flow measurement values and the corrected current gas flow measurement value through a pre-trained reliability verification model; when the statistical characteristic value is greater than the second value, determining that the corrected current gas flow measurement value is an unreliable measurement value, and sending a preset prompt message to the target user.

[0068] Optionally, the gas flow measurement values in the historical gas flow measurement values and the corrected current gas flow measurement value may be sorted in order of measurement time. The variance of each gas flow measurement value in the sequence obtained by sorting the gas flow measurement values in the historical gas flow measurement values and the corrected current gas flow measurement value in order of measurement time may be calculated to determine the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value. The variance of each gas flow measurement value in the sequence may be expressed as Among them, σ 2 is the variance of each gas flow measurement value in the sequence, N is the total number of each gas flow measurement value in the sequence, is the average value of each gas flow measurement in the sequence, A i is the i-th gas flow measurement value in the sequence, i=1,2...N.

[0069] Optionally, the first value may be the product of the corrected current gas flow measurement value and a first coefficient. The second value may be the product of the corrected current gas flow measurement value and a second coefficient. The first coefficient and the second coefficient may be two different pre-set coefficients. The first coefficient and the second coefficient are greater than 0 and less than 1. The first coefficient is smaller than the second coefficient. For example, the first coefficient is 0.0015 and the second coefficient is 0.05. Generally, when the statistical characteristic value of the historical gas flow measurement value and the corrected current gas flow measurement value is less than or equal to the first value, the corrected current gas flow measurement value can be determined to be a reliable measurement value. When the statistical characteristic value of the historical gas flow measurement value and the corrected current gas flow measurement value is greater than the second value, the corrected current gas flow measurement value can be determined to be an unreliable measurement value. When the statistical characteristic value of the historical gas flow measurement value and the corrected current gas flow measurement value is greater than the first value and less than or equal to the second value, it is impossible to determine whether the corrected current gas flow measurement value is a reliable measurement value or an unreliable measurement value. Re-verification of the reliability of the corrected current gas flow measurement value using a pre-trained reliability verification model is required to ensure the accuracy of the reliability verification and avoid misjudgment.

[0070] Optionally, when the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value are less than or equal to a first value, the corrected current gas flow measurement value is determined to be a reliable measurement value, and then the zero point tracking process for the current gas flow measurement value is determined to be completed. The current gas flow measurement value that has undergone the zero point tracking process is the corrected gas flow measurement value.

[0071] Optionally, when the statistical characteristic value of the historical gas flow measurement value and the corrected current gas flow measurement value is greater than a second value, the corrected current gas flow measurement value is determined to be an unreliable measurement value, and a preset prompt information is sent to the target user. The preset prompt information may be pre-set information for prompting that the corrected current gas flow measurement value is an unreliable measurement value. The target user may be a technician responsible for managing the gas ultrasonic flowmeter. The preset prompt information may be sent to the terminal device used by the target user so that the target user can manually intervene in the abnormal situation of the gas ultrasonic flowmeter and further correct the corrected current gas flow measurement value. After the target user further corrects the corrected current gas flow measurement value, it may be determined that the zero point tracking processing of the current gas flow measurement value is completed. The current gas flow measurement value after the zero point tracking processing is the gas flow measurement value after the secondary correction.

[0072] Optionally, the ultrasonic gas flowmeter is provided with a pre-trained reliability verification model. The pre-trained reliability verification model can be a model for analyzing and detecting an input sequence obtained by sorting the individual gas flow measurement values in historical gas flow measurement values and the corrected current gas flow measurement value in chronological order, and determining the measurement value category of the corrected current gas flow measurement value. The input to the reliability verification model is a sequence obtained by sorting the individual gas flow measurement values in historical gas flow measurement values and the corrected current gas flow measurement value in chronological order, and the output of the reliability verification model is the measurement value category of the corrected current gas flow measurement value. The measurement value category of the current gas flow measurement value can be information indicating whether the corrected current gas flow measurement value is a reliable measurement value or an unreliable measurement value. The measurement value category of the current gas flow measurement value can be either reliable or unreliable. If the measurement value category of the current gas flow measurement value is reliable, it indicates that the corrected current gas flow measurement value is a reliable measurement value. If the measurement value category of the current gas flow measurement value is unreliable, it indicates that the corrected current gas flow measurement value is an unreliable measurement value. The sequence obtained by sorting the individual gas flow measurement values in the historical gas flow measurement values and the corrected current gas flow measurement values in order of measurement time is input into a pre-trained reliability verification model. The pre-trained reliability verification model analyzes and detects the sequence obtained by sorting the individual gas flow measurement values in the historical gas flow measurement values and the corrected current gas flow measurement values, determines the measurement value category of the corrected current gas flow measurement value, and outputs the measurement value category of the corrected current gas flow measurement value. The measurement value category of the corrected current gas flow measurement value output by the reliability verification model can be obtained. The reliability verification model can be obtained by training a machine learning model using a pre-collected gas flow measurement value sequence and measurement value category. Machine learning models include but are not limited to random forest models.

[0073] Optionally, when the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement values are greater than the first value and less than or equal to the second value, the reliability of the corrected current gas flow measurement values is verified based on the historical gas flow measurement values and the corrected current gas flow measurement values through a pre-trained reliability verification model. The reliability of the corrected current gas flow measurement value is verified based on the historical gas flow measurement value and the corrected current gas flow measurement value through a pre-trained reliability verification model, including: inputting the sequence obtained by sorting the individual gas flow measurement values in the historical gas flow measurement values and the corrected current gas flow measurement value in order from front to back according to the measurement time into the pre-trained reliability verification model, and obtaining the measurement value category of the corrected current gas flow measurement value output by the reliability verification model; when the measurement value category of the corrected current gas flow measurement value is reliable data, determining that the corrected current gas flow measurement value is a reliable measurement value, and determining that the zero point tracking processing of the current gas flow measurement value is completed; when the measurement value category of the corrected current gas flow measurement value is unreliable data, determining that the corrected current gas flow measurement value is an unreliable measurement value, sending a preset prompt message to the target user, and after the target user further calibrates the corrected current gas flow measurement value, determining that the zero point tracking processing of the current gas flow measurement value is completed.

[0074] The technical solution of the embodiment of the present invention determines the characteristic vector of the current gas flow measurement value according to the measurement associated parameters corresponding to the current gas flow measurement value of the gas ultrasonic flowmeter; wherein the measurement associated parameters include signal characteristic parameters, environmental parameters and signal statistical parameters; then the characteristic vector is classified by a drift detection model to determine the vector category of the characteristic vector; wherein the vector category is a zero-point drift characteristic vector or a normal characteristic vector; when it is determined that the vector category is a zero-point drift characteristic vector, the zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through the drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value, thereby solving the problem that the zero-point tracking solution of the gas ultrasonic flowmeter in the related art relies on manual operation, has high time cost and labor cost, and is difficult to guarantee accuracy, and can automatically The method can quickly and accurately detect whether the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has a zero drift, and automatically determine the zero point correction value of the gas flow measurement value based on the drift calibration model after determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has a zero drift, and correct the gas flow measurement value according to the zero point correction value to reduce the deviation between the gas flow measurement value and the actual flow of the gas passing through the gas pipeline, thereby realizing fast and accurate zero point tracking of the gas ultrasonic flowmeter installed in the gas pipeline, reducing the time cost and labor cost of the zero point tracking process, and improving the accuracy of the zero point tracking process.

[0075] Optionally, in a specific example, Figure 2This is a schematic diagram of a zero-point tracking process provided in a first embodiment of the present invention. A gas ultrasonic flowmeter is provided with a signal measurement sensor, a sensor signal conditioning circuit, a temperature sensor, a pressure sensor, and a vibration sensor. Operations performed during the zero-point tracking process may include data preprocessing, drift detection, dynamic calibration, and verification feedback. Data preprocessing may involve synchronously acquiring signal characteristic parameters and environmental parameters corresponding to the current gas flow measurement value measured by the signal measurement sensor, the temperature sensor, the pressure sensor, and the vibration sensor, determining signal statistical parameters corresponding to the current gas flow measurement value based on the signal characteristic parameters, and then determining a feature vector of the current gas flow measurement value based on the signal characteristic parameters, environmental parameters, and signal statistical parameters corresponding to the current gas flow measurement value. Drift detection may involve classifying the feature vector using a drift detection model to determine a vector category of the feature vector, which may be a zero-point drift feature vector or a normal feature vector. Dynamic calibration may involve, when the vector category is determined to be a zero-point drift feature vector, determining a zero-point correction value for the current gas flow measurement value based on the measurement value sequence of the current gas flow measurement value using a drift calibration model, and correcting the current gas flow measurement value based on the zero-point correction value. Verification feedback may refer to reliability verification of the corrected current gas flow measurement value based on the statistical characteristic values of the historical gas flow measurement value and the corrected current gas flow measurement value. The operations performed during the zero tracking process may also include sending relevant data during the zero tracking process to a designated device through a communication interface or obtaining data required for the zero tracking process from a designated device. The operations performed during the zero tracking process may also include generating a trend graph for displaying the trend of zero drift of the gas ultrasonic flowmeter based on the relevant data during the zero tracking process, and displaying the generated trend graph and the confidence level of the model used in the zero tracking process on a visual display screen connected to the gas ultrasonic flowmeter.

[0076] Optionally, in a specific example, Figure 3This is a schematic diagram of a drift calibration model training process provided in Example 1 of the present invention. Acquiring a historical data set may refer to pre-collecting a specified number of gas flow measurement values. For example, the specified number is 6,000. The pre-collected specified number of gas flow measurement values includes 5,000 gas flow measurement values measured when the ultrasonic gas flow meter did not experience zero drift and 1,000 gas flow measurement values measured when the ultrasonic gas flow meter experienced zero drift. Data pre-processing may refer to processing the pre-collected specified number of gas flow measurement values to determine a measurement sequence and zero-point correction value for a preset number of gas flow measurement values. Model initialization may refer to initializing a predetermined LSTM network model. Forward propagation may refer to training the predetermined LSTM network model using the measurement sequence and zero-point correction value for the preset number of gas flow measurement values as training samples to obtain a drift calibration model. Loss calculation may refer to calculating the model loss value of the drift calibration model. Parameter updating may refer to detecting whether the parameters of the drift calibration model need to be updated based on the model loss value of the drift calibration model. If so, the drift calibration model is validated based on the validation sample. If not, backpropagation is performed. Backpropagation refers to returning to the model initialization process, retraining the set LSTM network model using a preset number of gas flow measurement value sequences and zero-point correction values as training samples to obtain a drift calibration model, thereby updating the drift calibration model parameters. After the drift calibration model passes model validation, it is determined that the drift calibration model training is complete, and the drift calibration model can be used for model inference. Real-time data acquisition can refer to obtaining a measurement value sequence of the current gas flow measurement value. Model inference can refer to inputting the measurement value sequence of the current gas flow measurement value into a pre-trained drift calibration model to obtain the zero-point correction value of the current gas flow measurement value output by the drift calibration model. Online fine-tuning can refer to updating the model parameters of the drift calibration model at a specified time to optimize the model parameters.

[0077] Optionally, in a specific embodiment, the signal measurement sensor has a resolution of 0.25 mm / s when measuring the propagation time difference of the ultrasonic signal. The dynamic range of the amplitude of the ultrasonic signal measured by the signal measurement sensor is -40 to 0 dBm. The accuracy of the signal measurement sensor when measuring the phase difference of the ultrasonic signal is ±0.5°.

[0078] Optionally, in one specific embodiment, the temperature sensor has an accuracy of ±0.15°C. The pressure sensor can measure a pressure range of 0 to 136 MPa, which covers the pressure at the location of the gas ultrasonic flowmeter. The pressure sensor has an accuracy of ±0.25% FS. The vibration sensor can measure a vibration frequency range of 0.1 to 200 Hz, which covers the vibration frequency at the location of the gas ultrasonic flowmeter.

[0079] Optionally, in a specific embodiment, the technical solutions of the embodiments of the present invention can be implemented by a designated single-chip microcomputer provided in a gas ultrasonic flowmeter. The designated single-chip microcomputer can utilize a high-precision timer to achieve microsecond-level timestamp synchronization, and the 32kHz crystal oscillator integrated within the designated single-chip microcomputer can ensure timing accuracy. The transducer within the designated single-chip microcomputer uses an operating frequency of 200kHz, which can effectively reduce noise interference, improve signal stability and measurement accuracy, and provide a more sensitive perception of subtle changes in gas flow measurement.

[0080] Optionally, in a specific example, the drift detection model is obtained by training a Gaussian Naive Bayes classifier using the feature vectors of the gas flow measurement values collected in advance and the vector categories of the feature vectors of the gas flow measurement values. The trained Gaussian Naive Bayes classifier can be expressed as: Where P(drift) is the prior probability that the feature vector class is a zero-drift feature vector, P(drift|X) is the conditional probability that the feature vector class is a zero-drift feature vector, P(X) is the prior probability that the feature vector class is a normal feature vector, and P(X|drift) is the conditional probability that the feature vector class is a zero-drift feature vector. A Gaussian naive Bayes classifier is trained using the feature vectors and vector classes of previously collected gas flow measurement values. Laplace smoothing is introduced to handle sparse data. The resulting drift detection model achieves a drift detection accuracy of 98.7%. Compared to threshold-based drift detection methods, it improves noise immunity by 40%. By analyzing feature vectors using the drift detection model, it can efficiently and accurately identify whether a feature vector represents a gas flow measurement value measured when a gas ultrasonic flowmeter experiences zero drift, and whether the gas flow measurement value to which the feature vector belongs is a gas flow measurement value measured when a gas ultrasonic flowmeter experiences zero drift.

[0081] Optionally, in a specific instance, the drift calibration model can be obtained by training the LSTM network model using a measurement value sequence and a zero-point correction value of pre-collected gas flow measurement values. The LSTM network model includes a 3-layer bidirectional LSTM network and an attention mechanism network. Each layer of the LSTM network contains 128 neurons. The LSTM network model can effectively process the measurement value sequence of the gas flow measurement value, capture the dynamic change characteristics in the measurement value sequence of the gas flow measurement value, and output the zero-point correction value of the gas flow measurement value. After the training is completed, the model parameters of the LSTM network model can be updated every 50 milliseconds at a learning rate of 0.001 through the adaptive gradient (Adagrad) optimizer. Thus, the accuracy and timeliness of the LSTM network model are continuously adapted to the working condition changes of the gas ultrasonic flowmeter through online learning. The zero-point correction value of the gas flow measurement value output by the LSTM network model can be expressed as: ΔZ t =LSTM(X t-n , X t-n+1 ,...,X t ). ΔZ t Is the zero point correction value of the gas flow measurement value. X t-n , X t-n+1 ,...,X t Represents a measurement value sequence of gas flow measurement values obtained by sorting the gas flow measurement values and n gas flow measurement values measured before the gas flow measurement value in order of measurement time from the beginning to the end. t-n The first gas flow measurement in the sequence. t-n+1 The second gas flow measurement in the sequence. t The last gas flow measurement value in the sequence. LSTM() represents the operation of the LSTM network model on the sequence of gas flow measurements. The LSTM network model can be used to calculate the accurate zero-point correction value of the gas flow measurement value, achieving dynamic calibration of zero-point drift.

[0082] Optionally, in one specific example, the designated microcontroller can optimize the model parameters of the LSTM network model by updating them every 50 milliseconds using an adaptive gradient (Adagrad) optimizer. The memory used for model parameter optimization is less than 5MB. The model parameter update time is less than 10 milliseconds. When the gas ultrasonic flowmeter is operating in a low-pressure condition (i.e., when the pressure at the location of the gas ultrasonic flowmeter is less than 1.6 MPa), the dynamic response speed of the zero-point tracking solution is three times faster than that of the threshold-based zero-point tracking process. The transducer in the designated microcontroller is a 200kHz ultrasonic transducer. The transducer in the designated microcontroller can optimize the pulse time extension (PTE) method, achieving a single measurement time of less than 10 microseconds, improving the time difference resolution (0.25 mm / s) for high-frequency signals. The designated microcontroller can utilize a 16-bit timer to achieve microsecond-level timestamp synchronization. The designated MCU integrates a 12-bit analog-to-digital converter (ADC), which can process vibration signals and perform Fast Fourier Transform (FFT) analysis. This enables high-precision data acquisition and model deployment on a low-power platform.

[0083] Optionally, in some specific examples, the technical solutions of the embodiments of the present invention can improve the measurement accuracy of gas ultrasonic flowmeters. When the gas ultrasonic flowmeter is in an operating condition where the temperature fluctuation at its location is ±15°C and the pressure range at its location varies between 0 and 1.6 MPa, the measurement accuracy of the gas ultrasonic flowmeter can be improved to ±0.8%. The technical solutions of the embodiments of the present invention can reduce the response time for correcting the gas flow measurement values obtained by the gas ultrasonic flowmeter. The response time for correcting the gas flow measurement values obtained by the gas ultrasonic flowmeter under dynamic conditions is typically less than 70 milliseconds. The technical solutions of the embodiments of the present invention can reduce the cost of zero-point tracking. The technical solutions of the embodiments of the present invention do not require additional hardware, fully utilize the high-precision temperature sensors already in the gas ultrasonic flowmeter, avoid the introduction of complex and fault-prone additional hardware, and have a low system cost. The technical solutions of the embodiments of the present invention have strong anti-interference capabilities. When the pipeline vibration amplitude is less than 5g, the measurement error is less than ±1.2%.

[0084] Example 2

[0085] Figure 4 This is a flowchart of a zero-point tracking method for a gas ultrasonic flowmeter provided in the second embodiment of the present invention. The embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. Figure 4 As shown, the method includes:

[0086] Step 201: Determine a characteristic vector of a current gas flow measurement value of a gas ultrasonic flow meter according to measurement association parameters corresponding to the current gas flow measurement value.

[0087] The measurement-related parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters.

[0088] Step 202: Classify the feature vector using a drift detection model to determine the vector category of the feature vector.

[0089] The vector category is a zero-drift eigenvector or a normal eigenvector.

[0090] Step 203: When it is determined that the vector category is a zero-point drift characteristic vector, a zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through a drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value.

[0091] Step 204: Verify the reliability of the corrected current gas flow measurement value based on the historical gas flow measurement value and the statistical characteristic values of the corrected current gas flow measurement value.

[0092] Optionally, the reliability of the corrected current gas flow measurement value is verified based on the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value, including: determining the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement value; when the statistical characteristic value is less than or equal to a first value, determining that the corrected current gas flow measurement value is a reliable measurement value; when the statistical characteristic value is greater than the first value and less than or equal to a second value, performing reliability verification on the corrected current gas flow measurement value based on the historical gas flow measurement values and the corrected current gas flow measurement value through a pre-trained reliability verification model; when the statistical characteristic value is greater than the second value, determining that the corrected current gas flow measurement value is an unreliable measurement value, and sending a preset prompt message to the target user.

[0093] The technical solution of the embodiment of the present invention can automatically detect whether the gas flow measurement value obtained by the gas ultrasonic flowmeter is a gas flow measurement value measured when the gas ultrasonic flowmeter has zero drift based on the drift detection model and the signal characteristic parameters, environmental parameters and signal statistical parameters corresponding to the gas flow measurement value obtained by the gas ultrasonic flowmeter. After determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is a gas flow measurement value measured when the gas ultrasonic flowmeter has zero drift, the technical solution can automatically determine the zero point correction value of the gas flow measurement value based on the drift calibration model, correct the gas flow measurement value according to the zero point correction value, reduce the deviation between the gas flow measurement value and the actual flow of gas passing through the gas pipeline, automatically verify the reliability of the corrected gas flow measurement value, improve the reliability of the zero point tracking process, and realize fast and accurate zero point tracking of the gas ultrasonic flowmeter installed in the gas pipeline, thereby reducing the time cost and labor cost of the zero point tracking process and improving the accuracy of the zero point tracking process.

[0094] Example 3

[0095] Figure 5 This is a schematic diagram of the structure of a zero-point tracking device for a gas ultrasonic flowmeter provided in the third embodiment of the present invention. The device can be configured in an electronic device. Figure 5 As shown, the device includes: a vector determination module 301 , a drift detection module 302 and a drift correction module 303 .

[0096] Among them, the vector determination module 301 is used to determine the characteristic vector of the current gas flow measurement value of the gas ultrasonic flowmeter based on the measurement associated parameters corresponding to the current gas flow measurement value; wherein, the measurement associated parameters include signal characteristic parameters, environmental parameters and signal statistical parameters; the drift detection module 302 is used to classify the characteristic vector through the drift detection model to determine the vector category of the characteristic vector; wherein, the vector category is a zero-point drift characteristic vector or a normal characteristic vector; the drift correction module 303 is used to determine the zero-point correction value of the current gas flow measurement value according to the measurement value sequence of the current gas flow measurement value through the drift calibration model when it is determined that the vector category is a zero-point drift characteristic vector, and correct the current gas flow measurement value according to the zero-point correction value.

[0097] The technical solution of the embodiment of the present invention determines the characteristic vector of the current gas flow measurement value according to the measurement associated parameters corresponding to the current gas flow measurement value of the gas ultrasonic flowmeter; wherein the measurement associated parameters include signal characteristic parameters, environmental parameters and signal statistical parameters; then the characteristic vector is classified by a drift detection model to determine the vector category of the characteristic vector; wherein the vector category is a zero-point drift characteristic vector or a normal characteristic vector; when it is determined that the vector category is a zero-point drift characteristic vector, the zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through the drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value, thereby solving the problem that the zero-point tracking solution of the gas ultrasonic flowmeter in the related art relies on manual operation, has high time cost and labor cost, and is difficult to guarantee accuracy, and can automatically The method can quickly and accurately detect whether the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has a zero drift, and automatically determine the zero point correction value of the gas flow measurement value based on the drift calibration model after determining that the gas flow measurement value obtained by the gas ultrasonic flowmeter is the gas flow measurement value measured when the gas ultrasonic flowmeter has a zero drift, and correct the gas flow measurement value according to the zero point correction value to reduce the deviation between the gas flow measurement value and the actual flow of the gas passing through the gas pipeline, thereby realizing fast and accurate zero point tracking of the gas ultrasonic flowmeter installed in the gas pipeline, reducing the time cost and labor cost of the zero point tracking process, and improving the accuracy of the zero point tracking process.

[0098] In an optional implementation of an embodiment of the present invention, optionally, the zero point tracking device of the gas ultrasonic flowmeter also includes: a verification module, which is used to verify the reliability of the corrected current gas flow measurement value based on the statistical characteristic values of the historical gas flow measurement value and the corrected current gas flow measurement value.

[0099] In an optional implementation manner of an embodiment of the present invention, optionally, the signal characteristic parameters include ultrasonic signal propagation time difference, ultrasonic signal amplitude and ultrasonic signal phase difference, the environmental parameters include temperature, pressure and pipeline vibration frequency, and the signal statistical parameters include ultrasonic signal amplitude fluctuation coefficient and ultrasonic signal phase change rate; the vector determination module 301 is specifically used to: construct the characteristic vector of the current gas flow measurement value according to the ultrasonic signal propagation time difference, the ultrasonic signal amplitude, the ultrasonic signal phase difference, the temperature, the pressure, the pipeline vibration frequency, the ultrasonic signal amplitude fluctuation coefficient and the ultrasonic signal phase change rate.

[0100] In an optional implementation of the embodiment of the present invention, optionally, the drift detection module 302 is specifically configured to: input the feature vector into a pre-trained drift detection model to obtain a vector category of the feature vector output by the drift detection model.

[0101] In an optional implementation manner of an embodiment of the present invention, optionally, when the drift correction module 303 performs the operation of determining the zero point correction value of the current gas flow measurement value based on the measurement value sequence of the current gas flow measurement value through the drift calibration model, it is specifically used to: input the measurement value sequence of the current gas flow measurement value into a pre-trained drift calibration model to obtain the zero point correction value of the current gas flow measurement value output by the drift calibration model.

[0102] In an optional implementation of an embodiment of the present invention, optionally, the zero point tracking device of the gas ultrasonic flowmeter also includes: a model training module, which is used to use a measurement value sequence and a zero point correction value of a preset number of gas flow measurement values as training samples to train a machine learning model to obtain a drift calibration model; wherein, the input of the drift calibration model is the measurement value sequence of the gas flow measurement value, and the output of the drift calibration model is the zero point correction value of the gas flow measurement value.

[0103] In an optional implementation of an embodiment of the present invention, optionally, the verification module is specifically used to: determine the statistical characteristic values of the historical gas flow measurement values and the corrected current gas flow measurement values; when the statistical characteristic value is less than or equal to the first value, determine that the corrected current gas flow measurement value is a reliable measurement value; when the statistical characteristic value is greater than the first value and less than or equal to the second value, perform reliability verification on the corrected current gas flow measurement value based on the historical gas flow measurement values and the corrected current gas flow measurement values through a pre-trained reliability verification model; when the statistical characteristic value is greater than the second value, determine that the corrected current gas flow measurement value is an unreliable measurement value, and send a preset prompt message to the target user.

[0104] The zero point tracking device of the gas ultrasonic flowmeter provided in the embodiment of the present invention can execute the zero point tracking method of the gas ultrasonic flowmeter provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0105] Example 4

[0106] Figure 6A schematic structural diagram of an electronic device 10 that can be used to implement the zero tracking method of a gas ultrasonic flow meter according to an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0107] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0108] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0109] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the zero-point tracking method for a gas ultrasonic flow meter.

[0110] In some embodiments, the zero tracking method of the gas ultrasonic flow meter can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on a heterogeneous hardware accelerator via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the zero tracking method of the gas ultrasonic flow meter described above can be performed. Alternatively, in other embodiments, the processor can be configured to execute the zero tracking method of the gas ultrasonic flow meter by any other appropriate means (for example, by means of firmware).

[0111] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or electronic device.

[0113] In the context of the present invention, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] To provide interaction with a user, the systems and techniques described herein can be implemented on a heterogeneous hardware accelerator that has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the heterogeneous hardware accelerator. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0115] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as data electronics), or a computing system that includes middleware components (e.g., application electronics), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0116] A computing system may include a client and an electronic device. The client and electronic device are generally remote from each other and typically interact via a communication network. The client-electronic device relationship is established by computer programs running on the respective computers and establishing a client-electronic device relationship. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited business scalability of traditional physical hosts and VPS services.

[0117] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0118] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A zero point tracking method for a gas ultrasonic flowmeter, characterized in that: include: Determining a characteristic vector of a current gas flow measurement value of the gas ultrasonic flowmeter based on measurement-related parameters corresponding to the current gas flow measurement value; wherein the measurement-related parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters; Classifying the feature vector using a drift detection model to determine a vector category of the feature vector; wherein the vector category is a zero-point drift feature vector or a normal feature vector; When it is determined that the vector category is a zero-point drift characteristic vector, the zero-point correction value of the current gas flow measurement value is determined according to the measurement value sequence of the current gas flow measurement value through the drift calibration model, and the current gas flow measurement value is corrected according to the zero-point correction value.

2. The zero point tracking method of a gas ultrasonic flowmeter according to claim 1, characterized in that: After correcting the current gas flow measurement value according to the zero point correction value, the method further includes: The reliability of the corrected current gas flow measurement value is verified based on the historical gas flow measurement value and the statistical characteristic values of the corrected current gas flow measurement value.

3. The zero point tracking method of a gas ultrasonic flowmeter according to claim 1, characterized in that: The signal characteristic parameters include ultrasonic signal propagation time difference, ultrasonic signal amplitude and ultrasonic signal phase difference; the environmental parameters include temperature, pressure and pipeline vibration frequency; the signal statistical parameters include ultrasonic signal amplitude fluctuation coefficient and ultrasonic signal phase change rate; Determining a characteristic vector of a current gas flow measurement value of the gas ultrasonic flowmeter according to a measurement association parameter corresponding to the current gas flow measurement value includes: A characteristic vector of the current gas flow measurement value is constructed based on the ultrasonic signal propagation time difference, the ultrasonic signal amplitude, the ultrasonic signal phase difference, the temperature, the pressure, the pipeline vibration frequency, the ultrasonic signal amplitude fluctuation coefficient, and the ultrasonic signal phase change rate.

4. The zero point tracking method of a gas ultrasonic flowmeter according to claim 1, characterized in that: Classifying the feature vector using a drift detection model to determine a vector category of the feature vector includes: The feature vector is input into a pre-trained drift detection model to obtain a vector category of the feature vector output by the drift detection model.

5. The zero point tracking method of a gas ultrasonic flowmeter according to claim 1, characterized in that: Determining a zero point correction value of the current gas flow measurement value according to a measurement value sequence of the current gas flow measurement value through a drift calibration model includes: The measurement value sequence of the current gas flow measurement value is input into a pre-trained drift calibration model to obtain a zero point correction value of the current gas flow measurement value output by the drift calibration model.

6. The zero point tracking method of a gas ultrasonic flowmeter according to claim 1, characterized in that: Before determining the characteristic vector of the current gas flow measurement value according to the measurement associated parameter corresponding to the current gas flow measurement value of the gas ultrasonic flowmeter, the method further includes: A preset number of measurement value sequences and zero-point correction values of gas flow measurement values are used as training samples to train a machine learning model to obtain a drift calibration model; wherein the input of the drift calibration model is the measurement value sequence of the gas flow measurement values, and the output of the drift calibration model is the zero-point correction value of the gas flow measurement values.

7. The zero point tracking method of a gas ultrasonic flowmeter according to claim 2, characterized in that: Performing reliability verification on the corrected current gas flow measurement value based on the historical gas flow measurement value and the statistical characteristic values of the corrected current gas flow measurement value, including: Determining statistical characteristic values of historical gas flow measurement values and the corrected current gas flow measurement value; When the statistical characteristic value is less than or equal to the first value, determining that the corrected current gas flow measurement value is a reliable measurement value; When the statistical characteristic value is greater than the first value and less than or equal to the second value, the reliability of the corrected current gas flow measurement value is verified based on the historical gas flow measurement value and the corrected current gas flow measurement value using a pre-trained reliability verification model; When the statistical characteristic value is greater than the second value, the corrected current gas flow measurement value is determined to be an unreliable measurement value, and a preset prompt message is sent to the target user.

8. A zero-point tracking device for a gas ultrasonic flowmeter, characterized in that: include: a vector determination module, configured to determine a characteristic vector of a current gas flow measurement value of the gas ultrasonic flowmeter based on measurement-related parameters corresponding to the current gas flow measurement value; wherein the measurement-related parameters include signal characteristic parameters, environmental parameters, and signal statistical parameters; a drift detection module, configured to classify the feature vector using a drift detection model to determine a vector category of the feature vector; wherein the vector category is a zero-point drift feature vector or a normal feature vector; A drift correction module is used to determine the zero point correction value of the current gas flow measurement value according to the measurement value sequence of the current gas flow measurement value through a drift calibration model when it is determined that the vector category is a zero point drift characteristic vector, and correct the current gas flow measurement value according to the zero point correction value.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the zero point tracking method for the gas ultrasonic flowmeter according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the zero-point tracking method of a gas ultrasonic flowmeter according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • A thermal gas flow drift correction method based on periodic thermal shock correction

    CN122730121A