Gas flow measuring method and device and readable storage medium

By obtaining envelope data under standard conditions and working conditions and calculating absolute flight time, the problems of low ultrasonic metering accuracy and insufficient stability are solved, and accurate measurement of gas flow and improved system reliability are achieved.

CN120141587APending Publication Date: 2025-06-13ZHEJIANG WEIXING INTELLIGENT METER STOCK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510159831.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-13

Smart Images

  • Figure CN120141587A_ABST
    Figure CN120141587A_ABST
Patent Text Reader

Abstract

The invention discloses a gas flow measurement method. The method comprises the following steps: acquiring up and down envelope data of a gas pipeline; obtaining uplink absolute flight time under the working condition, downlink absolute flight time under the working condition and the uplink and downlink flight time difference based on the uplink and downlink envelope data; and calculating a real-time flow value of the fuel gas based on the relevant data of the fuel gas pipeline, the uplink absolute flight time under the working condition, the downlink absolute flight time under the working condition and the uplink and downlink flight time difference. According to the method, the stability in the signal processing process can be remarkably improved on the premise that the metering precision is guaranteed, and the method is particularly suitable for gas metering equipment with high real-time performance requirements in the aspects of absolute flight time and relative flight time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas metering, and particularly to a gas flow measurement method, device, and readable storage medium. Background Art

[0002] Natural gas is a very important clean and high-quality energy source and has been widely used in various fields of national production and life. Currently, in the world energy consumption structure, the proportion of natural gas consumption in the total energy consumption is gradually increasing. In the rapid development process of the natural gas industry, the accurate and effective metering of natural gas energy is an important means for scientific energy management, energy conservation and consumption reduction, and improvement of economic benefits.

[0003] In the gas industry, ultrasonic metering usually collects the upstream and downstream acoustic wave signals through an ADC and processes them to calculate the flow rate. Traditional methods rely on the cross-correlation operation of the upstream and downstream wave signals, but under complex flow field or low flow rate conditions, the anchor points on which the data operation depends are unstable, resulting in large fluctuations in the absolute flight time, thus affecting the metering accuracy and stability. Summary of the Invention

[0004] Aiming at the defects existing in the prior art, the purpose of this application is to provide a gas flow measurement method, device, and readable storage medium to solve the problems of low ultrasonic metering accuracy and insufficient stability in the prior art.

[0005] In a first aspect, this application provides a gas flow measurement method, including the following steps: S1. Obtain the upstream envelope data under standard conditions, the upstream envelope data under working conditions, and the downstream envelope data under working conditions respectively; S2. Obtain the upstream absolute flight time t under standard conditions based on the upstream envelope data under standard conditions 1标 ; S3. Perform autocorrelation calculation on the upstream envelope data under standard conditions and the upstream envelope data under working conditions to obtain the upstream flight time difference Δt 上 ; S4. Calculate the upstream absolute flight time t under standard conditions 1标 and the upstream time difference Δt 上 to obtain the upstream absolute flight time t under working conditions 1 ; S5. Perform cross-correlation calculation on the upstream envelope data under working conditions and the downstream envelope data under working conditions to obtain the upstream and downstream flight time difference Δt; S6. Calculate the downstream absolute flight time t under working conditions based on the upstream absolute flight time t under working conditions 1 and the upstream and downstream flight time difference Δt 2 ; S7. Calculate the real-time flow rate value of the gas based on the upward absolute flight time t under the said working conditions 1 , the downward absolute flight time t under the said working conditions 2 and the flight time difference Δt between the upward and downward flights.

[0006] In some embodiments, the step S1 includes: S11. Install ultrasonic transducers and receivers in the pipeline, excite the transducers to emit ultrasonic signals, and receive the propagated signals by the receivers; S12. Filter the received signals to obtain filtered signals; S13. Perform AD conversion on the filtered signals to obtain envelope data; S14. Execute the above steps S11 to S13 respectively under standard conditions and working conditions to obtain the upward envelope data under standard conditions, the upward envelope data under working conditions, and the downward envelope data under working conditions.

[0007] In some embodiments, the step S2 includes: S21. Obtain the upward envelope data under the standard conditions; S22. Obtain the maximum peak point of the upward envelope data; S23. Take half of the maximum peak point as the anchor line; S23. Take a peak point before the anchor line and a peak point after the anchor line as reference points respectively; S24. Calculate the upward absolute flight time t under standard conditions based on the coordinates of the reference points 1标 .

[0008] In some embodiments, the step S4 includes: t 1 = t 1标 + Δt 上 .

[0009] In some embodiments, the step S6 includes: t 2 = t 1 + Δt.

[0010] In some embodiments, the step S7 includes: S71. Obtain the travel distance L of the ultrasonic signal 1 , the distance L between the transducer and the receiver 2 and the cross-sectional area S of the pipeline; S72. Calculate the sound speed C in the gas pipeline based on the L1, t1, t2 and L2; S73. Based on the sound speed C, the travel distance L of the ultrasonic signal1 and calculating the flow velocity V of the gas in the pipeline based on the up-and-down time-of-flight difference Δt; S74. Calculating the gas flow rate based on the flow velocity V of the gas in the pipeline and the cross-sectional area S of the pipeline.

[0011] In some embodiments, the step S72 includes: .

[0012] In some embodiments, the step S73 includes: .

[0013] In a second aspect, the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.

[0014] In a third aspect, the present application further provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0015] In summary, the beneficial technical effects of the present application at least include: (1) The technical solution of the present application calculates the up-and-down absolute time-of-flight under working conditions by obtaining the up (down) envelope under standard conditions and the up (down) envelope under working conditions, and further calculates the final flow rate. By improving the stability and recognition accuracy of the anchor points, this method realizes precise detection of the flow rate, significantly improves the stability of time-of-flight measurement and the reliability of system metering, and at the same time maintains a high metering accuracy; (2) The technical solution of the present application can significantly improve the stability in the signal processing process on the premise of ensuring the metering accuracy, especially in terms of absolute time-of-flight and relative time-of-flight, and is applicable to gas metering devices with high requirements for real-time performance; (3) The technical solution of the present application has obvious advantages in improving data consistency and equipment stability. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1Schematic diagram of signal anchor points provided by the prior art; Figure 2 Method flowchart of a gas flow measurement method provided by an embodiment of this specification; Figure 3 Schematic diagram of the selection of reference points provided by an embodiment of this specification; Figure 4 Structural block diagram of a computing device provided by an embodiment of this specification. Detailed implementation manners

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are some but not all of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the scope of protection of this application.

[0019] The flowchart shown in the accompanying drawings is only an example illustration, and does not necessarily include all the content and operations / steps, nor does it necessarily need to be executed in the described order. For example, some operations / steps can also be decomposed, combined, or partially merged. Therefore, the actual execution order may change according to the actual situation.

[0020] Ultrasonic metering and detection instruments are a type of new electronic instrument that is currently recognized by various researchers and manufacturers and is being promoted for use. This fully automatic electronic instrument based on the ultrasonic detection principle has a series of advantages such as high precision, high sensitivity, wide range ratio, and long service life, which are incomparable to mechanical instruments. It is bound to be the future development trend. With the rapid development of the social economy, the social demand for ultrasonic instruments will increase day by day.

[0021] However, in the gas industry, ultrasonic metering usually collects the upstream and downstream acoustic signals through ADC and processes them to calculate the flow rate. The traditional method relies on the cross-correlation operation of the upstream and downstream wave signals, and its anchor point method is specifically as Figure 1 shown. However, this method has the following problems: 1. Under complex flow field or low flow rate conditions, the signal anchor points are unstable, resulting in the measurement results of the time-of-flight difference being prone to fluctuations, which in turn affects the consistency of flow metering and the reliability of the system.

[0022] 2. Due to the influence of factors such as noise, interference, and multipath effects on the signal, the traditional fitting anchor points may not be able to accurately identify the anchor point positions, resulting in errors in the calculation of the time-of-flight difference, thereby reducing the metering accuracy.

[0023] Based on the above problems, an embodiment of this specification proposes to calculate the final flow rate by calculating with the upstream (downstream) envelope and the upstream (downstream) absolute flight time under standard conditions. This method realizes the accurate measurement of the flow rate by improving the stability and recognition accuracy of the anchor point, significantly improves the stability of the flight time measurement and the reliability of the system metering, while maintaining a high metering accuracy.

[0024] Please refer to the attached Figure 2 , Figure 2 which shows a schematic flow chart of a gas flow measurement method provided by an embodiment of this specification.

[0025] As Figure 1 shown, the above gas flow measurement method includes the following steps: S1. Obtain the upstream envelope data under standard conditions, the upstream envelope data under working conditions, and the downstream envelope data under working conditions respectively; It should be particularly noted that in the embodiment of this specification, the standard condition refers to the situation where there is no gas flow and no air flow in the gas pipeline, while the working condition refers to the situation where air and gas are flowing normally in the gas pipeline; upstream refers to the direction of gas flow, and downstream refers to the reverse direction of the gas flow direction.

[0026] S2. Obtain the upstream absolute flight time t 1标 under standard conditions based on the upstream envelope data under standard conditions; S3. Perform autocorrelation calculation on the upstream envelope data under standard conditions and the upstream envelope data under working conditions to obtain the upstream flight time difference Δt 上 ; S4. Calculate the upstream absolute flight time t 1标 under standard conditions and the upstream time difference Δt 上 to obtain the upstream absolute flight time t 1 under working conditions; S5. Perform cross-correlation calculation on the upstream envelope data under working conditions and the downstream envelope data under working conditions to obtain the upstream and downstream flight time difference Δt; S6. Calculate the downstream absolute flight time t 1 under working conditions based on the upstream absolute flight time t 2 under working conditions and the upstream and downstream flight time difference Δt; S7. Calculate the real-time flow rate value of the gas based on the upstream absolute flight time t 1 under working conditions, the downstream absolute flight time t 2 under working conditions, and the upstream and downstream flight time difference Δt.

[0027] In a specific embodiment of this specification, step S1 includes: S11. Install ultrasonic transducers and receivers in the pipeline, excite the transducers to emit ultrasonic signals, and have the receivers receive the propagated signals; Specifically, the main function of the ultrasonic transducer is to convert electrical energy into mechanical energy, or convert mechanical energy into electrical energy. Specifically, through the piezoelectric effect, the ultrasonic transducer converts the input electrical power into mechanical power (i.e., ultrasonic waves) and transmits it, while consuming a very small part of its own power.

[0028] S12. Filter the received signal to obtain a filtered signal; Specifically, in a specific embodiment of this specification, the above filtering process is median filtering, and the specific calculation method of median filtering is well-known in the art and will not be elaborated here.

[0029] S13. Perform AD conversion on the filtered signal to obtain envelope data; S14. Execute the above steps S11 - S13 respectively under standard conditions and working conditions to obtain the uplink envelope data under standard conditions, the uplink envelope data under working conditions, and the downlink envelope data under working conditions.

[0030] Preferably, the step S2 includes: S21. Obtain the uplink envelope data under standard conditions; S22. Obtain the maximum peak point of the uplink envelope data; S23. Take half of the maximum peak point as the anchor line; S23. Take a peak point before the anchor line and a peak point after the anchor line as reference points respectively; S24. Calculate the uplink absolute flight time t under standard conditions based on the coordinates of the reference points 1标 .

[0031] Specifically, the point selection method involved in step S2 is specifically as Figure 3 shown. In the figure, the maximum peak point is V p , then the anchor line is 50%V p . Take the peak point P 2 before the anchor line and the peak point P 3 after the anchor line as reference points respectively. Based on the above two reference points P 2 and P 3 to calculate the uplink absolute flight time under standard conditions, and the specific calculation formula is as follows: where the coordinates of P 1 ~P 4 are (x 1 , y 1 )~(x4 , y 4 ), TOF offset is the correction offset, specifically the time offset of the standard sound speed at an ambient temperature of 20 degrees, and y is the ordinate value of the anchor line.

[0032] In step S3, autocorrelation calculations are performed on the upstream envelope data under the standard conditions and the upstream envelope data under the operating conditions to obtain the upstream flight time difference Δt 上 .

[0033] Specifically, the cross-correlation function is a method for measuring the similarity between two signals, and its specific calculation process is an algorithm well-known in the art and will not be further elaborated here.

[0034] Preferably, step S4 includes: t 1 = t 1标 + Δt 上 .

[0035] Specifically, in the embodiments of this specification, after obtaining the upstream absolute flight time and the upstream flight time difference under the standard conditions through the foregoing partial calculations, adding the upstream absolute flight time and the upstream flight time difference under the standard conditions can obtain the upstream absolute flight time under the operating conditions.

[0036] In step S5, cross-correlation calculations are performed on the upstream envelope data and the downstream envelope data under the operating conditions to obtain the upstream and downstream flight time difference Δt; Preferably, step S6 includes: t 2 = t 1 + Δt.

[0037] Specifically, in the embodiments of this specification, after obtaining the upstream absolute flight time and the upstream and downstream flight time difference under the operating conditions through the foregoing partial calculations, adding the upstream absolute flight time and the upstream and downstream flight time difference under the operating conditions can obtain the downstream absolute flight time under the operating conditions.

[0038] In step S7, based on the upstream absolute flight time t 1 under the operating conditions, the downstream absolute flight time t 2 under the operating conditions, and the upstream and downstream flight time difference Δt, the real-time flow rate value of the gas is calculated, specifically including: S71. Obtain the travel distance L of the ultrasonic signal 1 , the distance L between the transducer and the receiver 2 and the cross-sectional area S of the pipeline; S72. Calculate the sound speed C in the gas pipeline based on the L1, t1, t2, and L2; S73. Based on the sound speed C and the travel distance L of the ultrasonic signal 1 and the round-trip flight time difference Δt, calculate the flow velocity V of the gas in the pipeline; S74. Calculate the gas flow rate based on the flow velocity V of the gas in the pipeline and the cross-sectional area S of the pipeline.

[0039] Preferably, the step S72 includes: .

[0040] Preferably, the step S73 includes: In step S74, calculate the gas flow rate based on the flow velocity V of the gas in the pipeline and the cross-sectional area S of the pipeline. Specifically, .

[0041] Please refer to Figure 4 , Figure 4 which shows a schematic structural diagram of another computer device provided by an embodiment of the present application.

[0042] As Figure 4 shown, the computer device may include at least one processor, at least one network interface, a user interface, a memory, and at least one communication bus.

[0043] Among them, the communication bus can be used to connect and communicate the above-mentioned various components.

[0044] Among them, the user interface may include buttons, and the optional user interface may further include a standard wired interface and a wireless interface.

[0045] Among them, the network interface may but is not limited to include a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0046] Among them, the processor may include one or more processing cores. The processor uses various interfaces and circuit connection means to connect various parts within the device. By running or executing instructions, programs, code sets, or instruction sets stored in the memory, and by calling data stored in the memory, it executes various functions of the gas flow measurement program and processes data. Optionally, the processor may be implemented in at least one hardware form of DSP, FPGA, or PLA. The processor may integrate one or a combination of several of CPU, GPU, and modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor and can be implemented separately by a single chip.

[0047] Among them, the memory may include RAM and may also include ROM. Optionally, the memory includes a non-transitory computer-readable medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. Optionally, the memory may also be at least one storage device located far from the aforementioned processor. As Figure 3 shown, the memory as a computer storage medium may include an operating system, a network communication module, a user interface module, and a gas flow measurement program.

[0048] This application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps of the above method. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0049] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0050] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0051] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some service interfaces. The indirect couplings or communication connections of devices or units can be in electrical or other forms.

[0052] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0053] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0054] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. And the aforementioned memory includes: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks or optical disks and other media that can store program codes.

[0055] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.

[0056] The above are only exemplary embodiments of the present disclosure, and the scope of the present disclosure cannot be limited thereby. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. Those skilled in the art will readily conceive of other implementations of the present disclosure after considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for measuring gas flow, characterized in that: The steps include: S1. Obtaining uplink envelope data under standard conditions, uplink envelope data under working conditions, and downlink envelope data under working conditions respectively; S2. Obtaining the uplink absolute flight time t under the standard condition based on the uplink envelope data under the standard condition 1标 ; S3, performing autocorrelation calculation on the uplink envelope data under the standard condition and the uplink envelope data under the working condition to obtain the uplink flight time difference Δt 上 ; S4, the absolute uplink flight time t under the standard condition 1标 and the uplink time difference Δt 上 Calculate and obtain the absolute uplink flight time t1 under the working condition; S5, performing cross-correlation calculation on the uplink envelope data under the working condition and the downlink envelope data under the working condition to obtain an uplink and downlink flight time difference Δt; S6, calculating the downlink absolute flight time t2 under the working condition based on the uplink absolute flight time t1 under the working condition and the uplink and downlink flight time difference Δt; S7. Calculate the real-time flow value of the gas based on the uplink absolute flight time t1 under the working condition, the downlink absolute flight time t2 under the working condition, and the uplink and downlink flight time difference Δt.

2. The gas flow measurement method according to claim 1, characterized in that: The step S1 comprises: S11, installing an ultrasonic transducer and a receiver in the pipeline, emitting an ultrasonic signal by exciting the transducer, and receiving the propagated signal by the receiver; S12, filtering the received signal to obtain a filtered signal; S13, performing AD conversion on the filtered signal to obtain envelope data; S14, executing the above steps S11 to S13 under standard conditions and working conditions respectively, to obtain uplink envelope data under standard conditions, uplink envelope data under working conditions, and downlink envelope data under working conditions.

3. The gas flow measurement method according to claim 1, characterized in that: The step S2 comprises: S21, obtaining uplink envelope data under the standard condition; S22, obtaining the maximum peak point of the uplink envelope data; S23, taking half of the maximum peak point as an anchor point line; S23, taking a peak point before the anchor point line and a peak point after the anchor point line as reference points; S24, calculating the absolute uplink flight time t under standard conditions based on the coordinates of the reference point 1标 .

4. The gas flow measurement method according to claim 1, characterized in that: The step S4 comprises: t1=t 1标 +Δt 上 。 5. The gas flow measurement method according to claim 1, characterized in that: The step S6 comprises: t2=t1+Δt.

6. The gas flow measurement method according to claim 2, characterized in that: The step S7 comprises: S71, obtaining the travel L1 of the ultrasonic signal, the distance L2 between the transducer and the receiver, and the cross-sectional area S of the pipeline; S72, calculating the speed of sound C in the gas pipeline based on L1, t1, t2 and L2; S73, calculating the flow velocity V of the gas in the pipeline based on the sound velocity C, the travel distance L1 of the ultrasonic signal and the uplink and downlink flight time difference Δt; S74. Calculate the flow rate of the gas based on the flow velocity V of the gas in the pipeline and the cross-sectional area S of the pipeline.

7. The gas flow measurement method according to claim 6, characterized in that: The step S72 comprises: 。 8. The gas flow measurement method according to claim 1, characterized in that: The step S73 comprises: 。 9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.