Detection and correction method and system based on forward and reverse durations of ultrasonic flowmeter
By updating ultrasonic sound speed and initialization detection in real time, the problem of inaccurate measurement of ultrasonic flowmeters under complex operating conditions is solved, achieving higher measurement accuracy and environmental adaptability.
Patent Information
- Application Number
- CN202510649142.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-06-20
AI Technical Summary
Under complex operating conditions, existing ultrasonic flowmeters have instability in signal and noise interference, resulting in inaccurate measurement of forward and reverse durations, which in turn affects the accuracy of flowmeters.
By updating the actual sound speed of ultrasonic waves in the gas pipeline in real time, the initial detection obtains the initial correct value of the average value of the forward and reverse duration, and judges whether the detection correction is completed or whether adjustment is required through comparison and analysis to improve the environmental adaptability of the detection correction.
The measurement accuracy of the ultrasonic flowmeter is enhanced, the flow measurement deviation caused by environmental changes and measurement errors is reduced, and the robustness and adaptability of detection and correction are improved.
Smart Images

Figure CN120176793A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasonic flowmeter data processing, and particularly to a detection and correction method and system based on the forward and reverse durations of an ultrasonic flowmeter. Background Art
[0002] With the development of industrial production, the requirements for the accuracy and reliability of flow measurement are constantly increasing. Traditional flow measurement methods often require intrusion into the pipeline, which not only increases the difficulty of installation and maintenance, but may also interfere with the production process. Non-intrusive ultrasonic flowmeters have emerged, meeting the needs of modern industry for accurate and reliable flow measurement. Ultrasonic flowmeters have been widely used in industries such as oil and gas, chemical, pharmaceutical, and food processing. In these industries, the accuracy and reliability of flow measurement are of great significance for production efficiency, product quality, and safety and environmental protection.
[0003] The types of media, pressures, and temperatures measured by ultrasonic flowmeters vary widely, and the operating conditions are very complex. Therefore, the signals received by the receiving transducers of gas ultrasonic flowmeters are only at the millivolt level or below and are very unstable. After being amplified and processed by an amplifier, the output signals not only have difficulty in stabilizing the amplitude within the target range, but also are often mixed with various noise signals. Whether it is a time-difference ultrasonic flowmeter using zero-crossing detection technology or correlation method measurement technology, the received wave signals are easily affected by unstable signal amplitude or noise interference after amplification, resulting in inaccurate measurement of the forward and reverse durations, and thus incorrect measurement of the time difference. If zero-crossing detection technology is used, this phenomenon is more obvious. At best, it will lead to inaccurate flow measurement of the ultrasonic flowmeter, and in severe cases, it will lead to a large flow deviation or even inability to operate normally.
[0004] For example, the ultrasonic time difference processing method of a multi-channel ultrasonic water meter disclosed in the invention patent with the publication number of CN117786362A includes: respectively collecting the original ultrasonic time differences of each channel; performing data filtering processing on the original ultrasonic time differences of each channel; performing multi-segment fitting processing on the original ultrasonic time differences of each channel after data filtering processing; storing the data results of the filtering processing and multi-segment fitting processing in a temporary array; performing linear normalization processing on the ultrasonic time differences of each channel after multi-segment fitting processing to obtain the ultrasonic time differences of each channel after linear normalization processing, as well as the correction coefficients and compensation coefficients of each channel.
[0005] For example, a method and system for optimizing measurement data of an ultrasonic gas meter disclosed in a patent for invention with the announcement number of CN119066598B includes: obtaining a gas meter distribution map from a database, installing an ultrasonic gas meter according to the distribution map; determining whether the ultrasonic gas meter is installed in the correct direction; determining whether the ultrasonic gas meter passes the anti-tampering detection; determining whether there is a small flow leakage in the gas meter; calculating an error value based on the recorded value in the gas meter and the actual gas flow; calibrating the gas meter according to the error value; determining whether the actual gas consumption after error correction meets the safe gas use standard; if so, completing the data optimization of the gas meter; if not, sending a reminder signal.
[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, it is found that the above technology has at least the following technical problems:
[0007] In the prior art, most of the ultrasonic flowmeters currently used in the market adopt the time difference method as the measurement principle. The positive and negative transmission times of ultrasonic waves in a closed pipeline are basically detected by the zero-crossing detection method or the correlation method. However, due to complex working conditions, factors such as turbulent flow, pipeline noise, surrounding electromagnetic radiation, low medium pressure or component may cause the signal after amplification of the received wave to be very unstable. For example, the commonly used conventional zero-crossing detection method or correlation method may lead to incorrect measurement of the time length and time difference, especially when using the zero-crossing detection method, it is more likely to cause mismeasurement or even measurement failure due to signal jumps. There is a problem of insufficient environmental adaptability of the detection and correction based on the positive and negative time lengths of the ultrasonic flowmeter. Summary of the Invention
[0008] By providing a method and system for detecting and correcting the positive and negative time lengths of an ultrasonic flowmeter, the embodiments of the present application solve the problem of insufficient environmental adaptability of the detection and correction based on the positive and negative time lengths of the ultrasonic flowmeter in the prior art, and achieve the effect of improving the environmental adaptability of the detection and correction of the positive and negative time lengths of the ultrasonic flowmeter.
[0009] The embodiments of the present application provide a method for detecting and correcting the positive and negative time lengths of an ultrasonic flowmeter, including the following steps: updating the actual ultrasonic sound speed of the gas pipeline according to the collected gas pipeline state parameters; initializing the detection to obtain the initial correct value of the average positive and negative time lengths measured by the gas pipeline; comparing and analyzing the average positive and negative time lengths of each time with the initial correct value of the average positive and negative time lengths, and judging whether the detection and correction is completed or whether adjustment is needed according to the comparison and analysis results.
[0010] The embodiment of the present application provides a detection and calibration system based on the forward and reverse durations of an ultrasonic flowmeter, including: a gas pipeline ultrasonic sound velocity update module, an initialization detection initial correct value module, and a detection and calibration adjustment module. The gas pipeline ultrasonic sound velocity update module: is used to update the actual ultrasonic sound velocity of the gas pipeline according to the collected gas pipeline state parameters; the initialization detection initial correct value module: is used to initialize the detection to obtain the initial correct value of the average forward and reverse durations measured by the gas pipeline; the detection and calibration adjustment module: is used to compare and analyze the average forward and reverse durations of each time with the initial correct value of the average forward and reverse durations, and judge whether the detection and calibration is completed or whether adjustment is needed according to the comparison and analysis results.
[0011] One or more technical solutions provided in the embodiment of the present application have at least the following technical effects or advantages:
[0012] 1. By updating the actual ultrasonic sound velocity of the gas pipeline in real time, the present invention enhances the measurement accuracy. Through initialization detection and comparative analysis, it ensures the measurement accuracy of the forward and reverse durations, and performs calibration when necessary. By analyzing and calibrating the forward and reverse durations, it reduces the flow measurement deviation caused by environmental changes and measurement errors; achieving the effect of improving the environmental adaptability of the detection and calibration of the forward and reverse durations of the ultrasonic flowmeter, and solving the problem of insufficient environmental adaptability of the detection and calibration based on the forward and reverse durations of the ultrasonic flowmeter in the prior art.
[0013] 2. By evaluating the mutation situation of the gas parameters inside the gas pipeline, it judges whether calibration adjustment is needed. Thus, it ensures that when the medium conditions mutate, the measurement results can be adjusted in time, and further realizes that the detection and calibration of the forward and reverse durations of the ultrasonic flowmeter still maintain accuracy when the environment mutates.
[0014] 3. By collecting the state parameters of the gas pipeline in real time, it calculates the actual propagation speed of ultrasonic waves under the current medium conditions; through continuous measurement and data analysis, it obtains the initial correct value of the forward and reverse durations. This step ensures that there is an accurate reference value for subsequent measurements, facilitating subsequent comparative analysis; thus, by comparing and analyzing the average forward and reverse durations of each measurement with the initial correct value, if the measurement results deviate greatly, calibration is performed, and further realizes that the detection and calibration process can adapt to the continuously changing medium conditions, improving the robustness of the detection and calibration of the forward and reverse durations of the ultrasonic flowmeter. Description of the Drawings
[0015] Figure 1 It is a flowchart of the detection and calibration method based on the forward and reverse durations of the ultrasonic flowmeter provided by the embodiment of the present application;
[0016] Figure 2 It is a schematic diagram of the sound channel structure layout of the pipe section type ultrasonic flowmeter of the ultrasonic flowmeter provided by the embodiment of the present application;
[0017] Figure 3 It is a flowchart for collecting gas pipeline state parameters to update the actual ultrasonic sound speed of the gas pipeline and for detection during processing in the embodiments of this application;
[0018] Figure 4 It is a flowchart for comparing and analyzing the average values of the forward and reverse durations of each time with the initial correct value of the average forward and reverse durations in the embodiments of this application;
[0019] Figure 5 It is a schematic flowchart for judging and performing calibration adjustment for ultrasonic flowmeter detection in the embodiments of this application;
[0020] Figure 6 It is a schematic structural diagram of a detection and calibration system based on the forward and reverse durations of an ultrasonic flowmeter in the embodiments of this application. Detailed implementation manners
[0021] In the embodiments of this application, by providing a detection and calibration method and system based on the forward and reverse durations of an ultrasonic flowmeter, the problem of insufficient environmental adaptability of the detection and calibration based on the forward and reverse durations of an ultrasonic flowmeter in the prior art is solved. By updating the sound speed, setting the initial value, comparing and analyzing to judge whether the calibration is completed and whether to adjust, the effect of improving the environmental adaptability of the detection and calibration of the forward and reverse durations of an ultrasonic flowmeter is achieved.
[0022] In order to better understand the above technical solution, the above technical solution will be described in detail below in combination with the accompanying drawings of the specification and specific implementation manners.
[0023] As Figure 1 shown, it is a flowchart of a detection and calibration method based on the forward and reverse durations of an ultrasonic flowmeter provided by the embodiments of this application. This method is applied to a detection and calibration system based on the forward and reverse durations of an ultrasonic flowmeter. The method includes the following steps: updating the actual ultrasonic sound speed of the gas pipeline according to the collected gas pipeline state parameters; initializing the detection to obtain the initial correct value of the average forward and reverse durations measured for the gas pipeline; comparing and analyzing the average forward and reverse durations of each time with the initial correct value of the average forward and reverse durations, and judging whether the detection and calibration is completed or whether to adjust according to the comparison and analysis results.
[0024] In this embodiment, the characteristics of ultrasonic wave transmission in a medium are utilized to diagnose and correct whether the forward and reverse durations are measured correctly. That is, under normal measurement conditions, the medium conditions are basically stable. Although the time difference between forward and reverse propagation is proportional to the medium flow velocity, the sum of the forward and reverse durations is gradually changing and is basically stable in a short period of time. Moreover, at different flow velocities, taking the reference value of the forward and reverse durations as the center point, the forward and reverse durations are basically symmetric on both sides of this center point. In addition, for an ultrasonic flowmeter with high-precision and fast measurement, the time interval between two adjacent measurements is very short, so the change in the time difference between two adjacent measurements is limited. By comprehensively utilizing this characteristic, the accuracy of the forward and reverse duration measurements can be diagnosed and corrected, thereby ensuring the accurate measurement of the time difference value and the total duration, and improving the accuracy and reliability of ultrasonic flowmeter measurement.
[0025] As Figure 2 shown, it is an example diagram of the sound path structure layout of the pipe-type ultrasonic flowmeter provided by the embodiment of the present application. Transducers A and B are a pair of ultrasonic transducers installed in the same sound path, and are respectively installed upstream and downstream of the measurement pipe section. The included angle between the center connection line of the two transducers and the central axis of the pipe section is (the central axis is parallel to the flow velocity direction V in the figure). Let the transmission speed of ultrasonic waves in a static fluid be c, and the flow velocity of the fluid along the axial direction of the pipeline be v. Then, when the ultrasonic wave is emitted by the upstream ultrasonic transducer A and received by the downstream transducer B (referred to as "forward"), according to the figure, the velocity component of the fluid flow velocity in the sound path direction is less than the flow velocity of the fluid along the axial direction of the pipeline, that is , then the actual propagation speed of the ultrasonic wave along the sound path direction (i.e., the center connection line of the two transducers) is the sum of the sound speed and the velocity component of the fluid flow velocity in the sound path direction , that is: ;
[0026] On the contrary, when the ultrasonic wave is emitted by the downstream ultrasonic transducer B and received by the upstream transducer A (referred to as "reverse"), then the actual propagation speed of the ultrasonic wave along the sound path direction is the difference between the sound speed and the velocity component of the fluid in the sound path direction , that is: ;
[0027] Let the distance between the two end faces of the ultrasonic transducers A and B, that is, the sound path length, be L. Then the reverse propagation time (upstream) and forward propagation time (downstream) of the ultrasonic signal in the fluid are respectively:
[0028] Forward duration: ;
[0029] Reverse duration: ;
[0030] Then the total duration (the sum of the forward and reverse durations) is: ;
[0031] Since the fluid velocity v in different flow meters is generally as follows: for gases, v is less than 25 m / s, and for liquids, v is less than 10 m / s, while the sound velocity of ultrasonic waves in different media is generally: in air greater than 300 m / s, in natural gas greater than 400 m / s, and in water greater than 1000 m / s, the fluid velocity is much lower than the propagation velocity of ultrasonic waves in different media, so v is much less than , and the formula can be simplified to: ;
[0032] Let the average value of the forward and reverse durations be , then: ;
[0033] Thus, it is obtained that under the condition of basically unchanged medium conditions, due to the fact that the medium velocity is much lower than the sound velocity of ultrasonic waves in the medium , the total forward and reverse duration or the reference value of the forward and reverse durations is basically only related to the sound path length L and the sound velocity of ultrasonic waves in the stationary medium, and is basically independent of the medium velocity v.
[0034] Secondly, the difference between the reverse duration and the reference value of the forward and reverse durations is: ; because v is much less than , then ;
[0035] Similarly, the difference between the reference value of the forward and reverse durations and the forward duration is: ; because v is much less than , then ;
[0036] Combining ; then there is: ;
[0037] Thus, it is obtained that under the condition of basically unchanged medium conditions, due to the fact that the medium velocity is much lower than the sound velocity of ultrasonic waves in the medium , the difference between the reference value of the forward and reverse durations and the forward duration ) and the difference between the reverse duration and the reference value of the forward and reverse durations ( ) are basically equal, that is, the forward and reverse durations ( ) are basically symmetric on both sides of the average value of the forward and reverse durations as the center point.
[0038] In summary, it can be considered that when the ultrasonic flowmeter measures the same medium and the medium conditions do not change significantly, the average value of the forward and reverse durations (or the total forward and reverse durations) is basically unchanged. Using this characteristic, it can be judged whether the total forward and reverse durations of each channel are correct after each measurement; it can be considered that when the ultrasonic flowmeter measures the same medium and the medium conditions do not change significantly, using the forward and reverse durations ( ), whether they are basically symmetric on both sides of the average value of the total duration as the center point to judge whether the measurement of the forward duration or the reverse duration is incorrect, so as to perform correction in combination with whether the total duration is correct, which is also recorded as the "reference value of forward and reverse durations" in the subsequent steps.
[0039] Furthermore, the actual ultrasonic sound speed of the gas pipeline is updated according to the collected gas pipeline state parameters, specifically including: the gas pressure, the absolute gas temperature, the gas component data and the average molar mass of the gas are respectively collected through the pressure sensor, the temperature sensor and the gas chromatograph deployed in the corresponding gas pipeline; the universal gas constant is directly extracted through the gas component database of the ultrasonic flowmeter; the corresponding adiabatic index, gas compressibility factor and pressure correction coefficient are obtained through the pre-stored data correlation table of the gas component database of the ultrasonic flowmeter; the actual ultrasonic sound speed of the gas pipeline is calculated through the actual ultrasonic sound speed correction model of the gas pipeline in combination with the gas pressure, the absolute gas temperature, the gas component data, the average molar mass of the gas, the adiabatic index, the gas compressibility factor and the pressure correction coefficient.
[0040] In this embodiment, as Figure 3 shown, it is the flowchart of collecting the gas pipeline state parameters to update the actual ultrasonic sound speed of the gas pipeline and the detection during processing. If in a specific application scenario, for example, in the pipeline monitoring of natural gas, the corresponding sensors meet the explosion-proof design, and the example selections are as follows: the sensor wiring uses an explosion-proof junction box, and the cable complies with the IEC60079-11 standard.
[0041] Pressure sensor: Installed 3D downstream of the pipeline sidewall (avoiding the turbulent zone), with an anti-seismic bracket installed, for collecting the gas pressure.
[0042] Temperature sensor: Adopts an insertable digital or analog probe, extending into the pipeline by 1 / 3 of the diameter to avoid the temperature lag of the pipe wall. The downstream flow pattern is more stable, reducing the interference of pressure pulsation; the insertable probe is in direct contact with the gas, improving the temperature measurement accuracy, for collecting the absolute gas temperature.
[0043] The actual ultrasonic sound speed correction model of the gas pipeline, the specific formula is as follows:
[0044] ;
[0045] Represents the actual ultrasonic sound speed of the gas pipeline.
[0046] Represents the adiabatic index, calculated based on the gas components. For example, when methane is dominant, γ≈1.31. The ultrasonic flowmeter provides a table of adiabatic indices for different gas components through its gas component database. By inputting the real-time gas component data of the gas pipeline, the adiabatic index of the corresponding component can be obtained.
[0047] Represents the gas compressibility factor, calculated based on the gas pressure and the absolute gas temperature. The ultrasonic flowmeter stores a table of the relationship between the gas compressibility factor, gas pressure, and absolute gas temperature in its gas component database. By inputting the real-time gas pressure and absolute gas temperature, the corresponding gas compressibility factor can be obtained.
[0048] Represents the universal gas constant, a fixed value: R = 8.314 J / (mol·K), which can be directly obtained from the ultrasonic flowmeter's gas component database.
[0049] Represents the absolute gas temperature, which is obtained by real-time measurement and acquisition using a temperature sensor.
[0050] Example of the installation and deployment of a gas chromatograph for natural gas pipelines: Explosion protection requirements: The chromatograph and the probe need to pass ATEX / IECEx Zone 1 certification, and the control cabinet adopts an explosion-proof design. Redundant configuration: Dual power supplies (24VDC + UPS), dual communication links (fiber optic + cellular network). Main path deployment: 10D downstream of the straight pipe section of the pipeline (avoiding turbulence), and the probe is inserted into the center line of the pipeline. Bypass design: An independent sampling bypass (pipe diameter 1 / 5 of the main pipe), with matching flow rates to avoid component stratification. The component concentration is output through 4 - 20mA / HART, and the chromatogram data is encrypted and uploaded via ModbusTCP / IP. The data is locally cached for 72 hours, and satellite communication (Iridium / Starlink) ensures transmission in remote areas. Online calibration: Standard gas (CH4 / C3H8 / CO2 / N2 mixture) is introduced daily to correct the response factor. The filter is replaced monthly (alarm when the pressure difference > 10kPa); the chromatographic column is backflushed and purified every 6 months.
[0051] Represents the average molar mass of the gas (kg / mol), which is obtained by calculating the weighted average of the volume fractions of the gas components in the corresponding gas pipeline measured in real-time by the gas chromatograph.
[0052] Represents the pressure correction coefficient. ; where Represents the gas pressure. Indicates the component-related constant. For example, when the pipeline is a natural gas pipeline, a table of component-related constants for different gas components is pre-stored in the gas component database of the ultrasonic flowmeter. By inputting the real-time gas component data of the gas pipeline, the component-related constant of the corresponding component can be obtained. Combining the real-time gas pressure and the absolute gas temperature, the real-time pressure correction coefficient can be calculated.
[0053] Based on the above parameters, the actual ultrasonic sound speed of the gas pipeline can be obtained. It should be noted that the actual ultrasonic sound speed of the gas pipeline is the theoretical value.
[0054] Furthermore, updating the actual ultrasonic sound speed of the gas pipeline according to the collected gas pipeline state parameters also includes: directly extracting from the gas component database of the ultrasonic flowmeter the standard value of the absolute gas temperature, the standard value of the gas pressure, the standard value of the average molar mass of the gas, the correction factor of the average liquid droplet content of the gas for the sound speed, the first proportional factor of the change in the evaluation characteristics of the mutation of the gas parameters inside the gas pipeline, the second proportional factor of the change in the evaluation characteristics of the mutation of the gas parameters inside the gas pipeline, and the third proportional factor of the change in the evaluation characteristics of the mutation of the gas parameters inside the gas pipeline; performing a ratio analysis of the absolute gas temperature and the standard value of the absolute gas temperature, and performing characteristic correction through the first proportional factor of the change in the evaluation characteristics of the mutation of the gas parameters inside the gas pipeline to obtain the proportion correction component of the absolute gas temperature; performing a ratio analysis of the gas pressure and the standard value of the gas pressure, and performing characteristic correction through the second proportional factor of the change in the evaluation characteristics of the mutation of the gas parameters inside the gas pipeline to obtain the proportion correction component of the gas pressure; performing a ratio analysis of the average molar mass of the gas and the standard value of the average molar mass of the gas, and performing characteristic correction through the third proportional factor of the change in the evaluation characteristics of the mutation of the gas parameters inside the gas pipeline to obtain the proportion correction component of the average molar mass of the gas; coupling the proportion correction component of the absolute gas temperature, the proportion correction component of the gas pressure, and the proportion correction component of the average molar mass of the gas, and performing correction through the correction factor of the average liquid droplet content of the gas for the sound speed to obtain the evaluation index of the mutation of the gas parameters inside the gas pipeline; performing a difference analysis on the evaluation index of the mutation of the gas parameters inside the gas pipeline at adjacent time monitoring points of the gas factors inside the gas pipeline to obtain the evaluation difference of the mutation of the gas parameters inside the gas pipeline; performing a comparative analysis based on the evaluation difference of the mutation of the gas parameters inside the gas pipeline, and updating the actual ultrasonic sound speed of the gas pipeline according to the results of the comparative analysis.
[0055] In this embodiment, the gas space monitoring points inside the gas pipeline are numbered. Indicates the numbering of the gas space monitoring points inside the gas pipeline. Indicates the total number of the numbering of the gas space monitoring points inside the gas pipeline.
[0056] The gas factor time monitoring points inside the gas pipeline are numbered. Represents the serial number of the time monitoring points of the gas factors inside the gas pipeline. Represents the total number of the time monitoring points of the gas factors inside the gas pipeline.
[0057] Represents the th gas parameter mutation evaluation index of the th time monitoring point of the gas factors inside the gas pipeline for the
[0058] In actual deployment, at least one time monitoring point of the gas factors inside the gas pipeline corresponds to each gas space monitoring point inside the gas pipeline.
[0059] ;
[0060] ;
[0061] ;
[0062] Represents the th gas parameter mutation evaluation difference of the th time monitoring point of the gas factors inside the gas pipeline for the
[0063] Represents the th absolute gas temperature of the th time monitoring point of the gas factors inside the gas pipeline for the
[0064] Represents the standard value of the absolute gas temperature, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0065] Represents the th gas pressure of the th time monitoring point of the gas factors inside the gas pipeline for the
[0066] Represents the standard value of the gas pressure, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0067] Represents the th average molar mass of the gas of the th time monitoring point of the gas factors inside the gas pipeline for the
[0068] It represents the standard value of the average molar mass of the gas, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0069] It represents the th correction factor of the average gas droplet content at the th gas factor time monitoring point inside the gas pipeline for the sound speed. The value range is from 0 to 1. The correction factor of the average gas droplet content for the sound speed is directly extracted from the gas component database of the ultrasonic flowmeter.
[0070] If the gas contains a certain amount of dispersed droplets, the droplets scatter sound waves and the particulate matter absorbs signals, resulting in a decrease in the actual sound speed of the ultrasonic waves in the gas pipeline.
[0071] Example of the method for obtaining the correction factor of the average gas droplet content for the sound speed: By simulating the wet gas environment with different droplet concentrations in the corresponding gas in the laboratory, measuring the actual propagation sound wave speed of the ultrasonic waves, comparing it with the theoretical sound speed, calculating the correction factor, and establishing a mapping table of the droplet concentration and the correction factor of the average gas droplet content for the sound speed, which is stored in the gas component database of the ultrasonic flowmeter. It is applicable to the ultrasonic flow measurement scenarios of multiphase flow pipelines such as natural gas and wet gas. Input the real-time average gas droplet content to obtain the corresponding correction factor of the average gas droplet content for the sound speed.
[0072] It represents the first proportionality factor of the change in the evaluation characteristics of the gas parameter mutation inside the gas pipeline, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0073] It represents the second proportionality factor of the change in the evaluation characteristics of the gas parameter mutation inside the gas pipeline, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0074] It represents the third proportionality factor of the change in the evaluation characteristics of the gas parameter mutation inside the gas pipeline, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0075] In a gas pipeline, the accumulation and scaling of deposits on the inner wall of the pipeline is a core factor that can simultaneously affect the three proportionality factors in the evaluation of gas parameter mutations. It can change the flow regime, thermodynamic properties, and component distribution, resulting in the co-variation of temperature, pressure, and the sound speed correction factor. The solid deposits (such as wax, hydrates, corrosion products, etc.) accumulated on the inner wall of the pipeline due to long-term operation lead to an increase in roughness, a reduction in the effective pipe diameter, and local flow field distortion. The deposits reduce the heat conduction efficiency of the pipe wall, hinder the heat exchange between the gas and the outside world, and increase the local temperature gradient. The deposits reduce the effective pipe diameter, increase the frictional pressure drop, and raise the local pressure. The deposits trigger eddies, resulting in an enhanced pressure pulsation. The deposits exfoliate to form solid particles or droplets, and the deposits adsorb light components, leading to an increase in the average molar mass of the gas.
[0076] For ultrasonic wall thickness detection, an external ultrasonic probe measures the remaining wall thickness, and the deposit thickness is calculated by subtracting the remaining thickness from the original wall thickness.
[0077] Through an experimental simulation example: the deposit thickness is 2 mm; temperature mutation: ΔT = 8 °C (normal range ±2 °C), the contribution of the first proportionality factor is 0.8; pressure mutation: ΔP = 0.3 MPa (normal ±0.1 MPa), the contribution of the second proportionality factor is 1.2; droplet correction factor mutation: α increases from 0.1 to 0.25 (normal ≤0.15), the contribution of the third proportionality factor is 1.0; after normalization, the first proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline is 0.27, the second proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline is 0.4, and the third proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline is 0.33. By constructing the mapping relationship between the deposit thickness of the gas pipeline and the first proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline, the second proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline, and the third proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline with multiple groups of experimental data, inputting the deposit thickness of the gas pipeline, the first proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline, the second proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline, and the third proportionality factor of the characteristic change in the evaluation of gas parameter mutations inside the gas pipeline can be obtained.
[0078] Further, update the actual ultrasonic sound speed of the gas pipeline according to the comparative analysis result, specifically including: if the evaluation difference of the gas parameter mutation inside the gas pipeline is less than or equal to the evaluation reference value of the gas parameter mutation inside the gas pipeline, update the actual ultrasonic sound speed of the gas pipeline at a predefined time interval; if the evaluation difference of the gas parameter mutation inside the gas pipeline is greater than the evaluation reference value of the gas parameter mutation inside the gas pipeline, suspend the subsequent initialization detection, record it as the flow rate mutation state, and perform the above comparative analysis again after a predefined detection time interval. If the evaluation difference of the gas parameter mutation inside the gas pipeline is less than or equal to the evaluation reference value of the gas parameter mutation inside the gas pipeline at this time, update the actual ultrasonic sound speed of the gas pipeline at a predefined time interval. If the evaluation difference of the gas parameter mutation inside the gas pipeline is still greater than the evaluation reference value of the gas parameter mutation inside the gas pipeline at this time, notify the relevant personnel to check the state of the gas pipeline and the ultrasonic flowmeter state.
[0079] In this embodiment, if the evaluation difference of the gas parameter mutation inside the gas pipeline is greater than the evaluation reference value of the gas parameter mutation inside the gas pipeline, there may be the following example scenarios: 1. The reference value fails due to the mutation of the medium conditions, and the gas sound speed is extremely sensitive to the changes in temperature T, pressure P, and components. For example, in natural gas it decreases with the increase of the carbon dioxide content. 2. The pressure / temperature mutations in the gas pipeline are more frequent. For example, the pressure reducing valve in the pressure regulating station operates or there is a day-night temperature difference. During the pressure regulating process, the sudden drop in pressure causes the sound speed to mutate, and the reference value updates lag, resulting in an increase in the misjudgment rate of the subsequent gas ultrasonic flowmeter. 3. The rapid release of high-pressure gas or emergency cut-off. For example, when the natural gas pipeline is emergently shut off and the valve is quickly closed, it causes the sound speed to mutate.
[0080] In the above cases, the detection method error of the forward and reverse duration of the ultrasonic flowmeter is relatively large, and it is necessary to suspend the monitoring.
[0081] Further, initialize the detection to obtain the initial correct value of the average forward and reverse duration measured in the gas pipeline, which specifically includes: after the actual ultrasonic sound speed in the gas pipeline is updated, perform continuous measurements predefined times through an ultrasonic flowmeter to obtain the reference values of the forward and reverse durations for the predefined times. Take the absolute value after analyzing the difference between two adjacent reference values of the forward and reverse durations to obtain the adjacent difference of the reference values of the forward and reverse durations. If the adjacent difference of the reference values of the forward and reverse durations is less than or equal to the threshold of the adjacent difference of the reference values of the forward and reverse durations, then retain the corresponding reference value of the forward and reverse duration. If the adjacent difference of the reference values of the forward and reverse durations is greater than the threshold of the adjacent difference of the reference values of the forward and reverse durations, then calculate the Pearson correlation coefficient between the received waveform of the corresponding ultrasonic flowmeter and the template waveform through predefined software to obtain the waveform similarity correlation coefficient. If the waveform similarity correlation coefficient is greater than the determination threshold of the waveform similarity correlation coefficient, then retain the corresponding reference value of the forward and reverse duration. If the waveform similarity correlation coefficient is less than or equal to the determination threshold of the waveform similarity correlation coefficient, then discard the corresponding reference value of the forward and reverse duration; sum and average the retained reference values of the forward and reverse durations to obtain the average value of the reference values of the forward and reverse durations; calculate the actual values of the forward and reverse durations corresponding to the actual ultrasonic sound speed in the gas pipeline. If the difference between the actual value of the forward and reverse duration and the average value of the reference values of the forward and reverse duration is analyzed and the absolute value is taken to obtain the ultrasonic sound speed difference in the gas pipeline. If the ultrasonic sound speed difference in the gas pipeline is less than the threshold of the ultrasonic sound speed difference in the gas pipeline, then determine that the initialization detection is successful, and record the average value of the reference forward and reverse durations as the initial correct value of the average forward and reverse duration. If the ultrasonic sound speed difference in the gas pipeline is equal to or greater than the threshold of the ultrasonic sound speed difference in the gas pipeline, then determine that the initialization detection fails, and re-initialize the detection to obtain the initial correct value of the average forward and reverse duration measured in the gas pipeline. If after the predefined initialization detection allowable time, it is still determined that the initialization detection fails, then notify the relevant personnel to check the status of the gas pipeline and the ultrasonic flowmeter.
[0082] In this embodiment, the actual values of the forward and reverse durations corresponding to the actual ultrasonic sound speed in the gas pipeline are calculated according to the above text ; under the condition that the medium conditions are basically unchanged, since the medium flow velocity is much lower than the sound speed of ultrasonic waves in the medium , the total forward and reverse duration of ultrasonic waves or the reference value of the forward and reverse duration is basically only related to the channel length L and the sound speed of ultrasonic waves in the stationary medium and is basically independent of the medium flow velocity v.
[0083] As Figure 4 shown, it is a flowchart for comparing and analyzing the average value of the forward and reverse durations of each time with the initial correct value of the average forward and reverse duration provided by the embodiment of the present application.
[0084] The number of times N = 20, and the single measurement period ≤ 100 ms (total duration ≤ 2 s to avoid interference from flow field changes). The excitation frequency is 200 kHz, and the received signal bandwidth ≥ 500 kHz (to capture the complete waveform).
[0085] The Pearson correlation coefficient can be calculated and directly obtained through Python calls. The example code is as follows:
[0086] import numpy as np
[0087] def align_and_compute_correlation(received_signal, template):
[0088] # Calculate the cross-correlation
[0089] cross_corr = np.correlate(received_signal, template, mode='full')
[0090] peak_index = np.argmax(cross_corr)
[0091] len_template = len(template)
[0092] # Determine the truncation position
[0093] start_index = peak_index - len_template + 1
[0094] start_index = max(0, min(start_index, len(received_signal) - len_template))
[0095] aligned_signal = received_signal[start_index : start_index + len_template]
[0096] # Calculate the correlation coefficient
[0097] r = np.corrcoef(aligned_signal, template)[0, 1]
[0098] return r
[0099] # Example usage
[0100] received_signal = np.array([]) # Received signal data
[0101] template = np.array([]) # Template waveform
[0102] correlation = align_and_compute_correlation(received_signal, template)
[0103] if correlation < 0.9:
[0104] print("Anomaly detection: The correlation coefficient is below the threshold, and the threshold value here is 0.9.")
[0105] else:
[0106] print("The signal is normal.")
[0107] When calculating that the correlation coefficient between the received signal and the template waveform is < 0.9, it is determined as an anomaly.
[0108] Example: Exclude 3 skipped waves from 20 measurements, and the weighted average of the remaining 17 data gives an initial average value of the forward and reverse duration reference values of 284.3 μs.
[0109] In each subsequent round of measurement, multiple measurements are taken to obtain the forward and reverse durations each time, and it is judged whether the measurement is correct. If it is correct, the average value of the forward and reverse durations of the new round of correct measurements is used to update the initial correct value of the average value of the forward and reverse durations, so as to meet the need for the initial correct value of the average value of the forward and reverse durations to adapt to environmental changes in practical applications.
[0110] Further, compare and analyze the average forward and reverse duration values of each measurement with the initial correct value of the average forward and reverse duration. Specifically, it includes: obtaining the average measurement difference of the forward and reverse durations for each measurement by taking the absolute value of the difference analysis between the average forward and reverse duration in each measurement and the initial correct value of the average forward and reverse duration; obtaining the difference between the forward duration in each measurement and the initial correct value of the average forward and reverse duration by performing a difference analysis on the forward duration in each measurement and the initial correct value of the average forward and reverse duration, and obtaining the difference between the reverse duration in each measurement and the initial correct value of the average forward and reverse duration by performing a difference analysis on the reverse duration in each measurement and the initial correct value of the average forward and reverse duration. Then, take the absolute value of the difference analysis between the difference between the forward duration in each measurement and the initial correct value of the average forward and reverse duration and the difference between the reverse duration in each measurement and the initial correct value of the average forward and reverse duration to obtain the symmetric difference value of the forward and reverse durations for each measurement. If the average measurement difference of the forward and reverse durations is less than the upper limit of the total duration tracking deviation and the symmetric difference value of the forward and reverse durations is less than the upper limit of the symmetric deviation of the forward and reverse durations, it is determined that the detection based on the ultrasonic flowmeter is correct, and this detection is ended. After the corresponding test ends, replace the initial correct value of the average forward and reverse duration with the average forward and reverse duration value measured this time. If the average measurement difference of the forward and reverse durations is equal to or greater than the upper limit of the total duration tracking deviation or the symmetric difference value of the forward and reverse durations is equal to or greater than the upper limit of the symmetric deviation of the forward and reverse durations, then perform a coupling evaluation of the gas parameter mutation inside the gas pipeline, and determine whether to perform a calibration adjustment of the ultrasonic flowmeter detection judgment based on the coupling evaluation result of the gas parameter mutation inside the gas pipeline.
[0111] In this embodiment, number the measurement times of the ultrasonic flowmeter for different times. represents the quantity number of the measurement times of the ultrasonic flowmeter. represents the total number of the quantity numbers of the measurement times of the ultrasonic flowmeter.
[0112] Record the initial correct value of the average forward and reverse duration as ;
[0113] Calculate the average forward and reverse duration in each measurement. ; represents the -th average forward and reverse duration of the ultrasonic flowmeter measurement. represents the -th average forward duration of the ultrasonic flowmeter measurement. represents the -th average reverse duration of the ultrasonic flowmeter measurement.
[0114] The measurement difference between the average forward and reverse duration of each measurement and the initial correct value of the average forward and reverse duration. ; represents the The difference between the average value of the forward and reverse durations for each time and the initial correct value of the average value of the forward and reverse durations;
[0115] Calculate the difference between the forward duration for each time and the initial correct value of the average value of the forward and reverse durations, Denote the difference between the forward duration of the ultrasonic flowmeter measurement for the -th time and the initial correct value of the average value of the forward and reverse durations;
[0116] Calculate the difference between the reverse duration for each time and the initial correct value of the average value of the forward and reverse durations, Denote the difference between the reverse duration of the ultrasonic flowmeter measurement for the -th time and the initial correct value of the average value of the forward and reverse durations;
[0117] Obtain the symmetric difference value of the forward and reverse durations for each time, ;
[0118] If the difference between the forward and reverse durations and the initial correct value of the average value of the forward and reverse durations is less than the upper limit of the total duration tracking value deviation and the symmetric difference value of the forward and reverse durations is less than the upper limit of the forward and reverse duration symmetric deviation, then after the corresponding test ends, replace the initial correct value of the average value of the newly measured forward and reverse durations with a new one, so as to ensure that the reference value of the forward and reverse durations can track the gradual change process of medium conditions such as temperature, pressure, and composition;
[0119] That is, if and , it is judged that the detection is correct, and the initial correct value of the average forward and reverse durations is iterated.
[0120] Where is the upper limit of the total duration tracking value deviation, generally set to 0.45 - 0.5 times of the excitation wave period. For example, for a gas ultrasonic flowmeter using a 200 kHz square wave excitation, the maximum deviation can generally be set to 2.25 us - 2.5 us. Where is the upper limit of the forward and reverse duration symmetric deviation, generally set to 0.9 - 1 times of the excitation wave period.
[0121] Further, the specific process of judging whether to perform ultrasonic flowmeter detection, judgment, calibration and adjustment according to the coupling evaluation result of gas parameter mutation inside the gas pipeline is as follows: Collect the signal data of the gas ultrasonic flowmeter through the signal conditioning circuit and analyze it through the software analysis tool to obtain the signal-to-noise ratio of the ultrasonic flowmeter and the signal amplitude of the ultrasonic flowmeter; directly extract the minimum allowable value of the signal-to-noise ratio of the ultrasonic flowmeter, the minimum allowable value of the signal amplitude of the ultrasonic flowmeter, the first component correction factor for the coupling evaluation of gas parameter mutation inside the gas pipeline, and the second component correction factor for the coupling evaluation of gas parameter mutation inside the gas pipeline from the gas component database of the ultrasonic flowmeter; perform a ratio analysis on the signal-to-noise ratio of the ultrasonic flowmeter and the minimum allowable value of the signal-to-noise ratio of the ultrasonic flowmeter, and correct it through the first component correction factor for the coupling evaluation of gas parameter mutation inside the gas pipeline to obtain the first component of the gas parameter mutation coupling inside the gas pipeline; perform a ratio analysis on the signal amplitude of the ultrasonic flowmeter and the minimum allowable value of the signal amplitude of the ultrasonic flowmeter, and correct it through the second component correction factor for the coupling evaluation of gas parameter mutation inside the gas pipeline to obtain the second component of the gas parameter mutation coupling inside the gas pipeline; perform a coupling analysis on the first component of the gas parameter mutation coupling inside the gas pipeline and the second component of the gas parameter mutation coupling inside the gas pipeline, and then perform a ratio analysis processing with the difference value of the gas parameter mutation evaluation inside the gas pipeline to obtain the coupling evaluation index of the gas parameter mutation inside the gas pipeline; if the coupling evaluation index of the gas parameter mutation inside the gas pipeline is less than or equal to the coupling evaluation index threshold of the gas parameter mutation inside the gas pipeline, then judge to re-perform the comparative analysis of the average value of the forward and reverse durations of each time with the initial correct value of the average value of the forward and reverse durations; if the coupling evaluation index of the gas parameter mutation inside the gas pipeline is greater than the coupling evaluation index threshold of the gas parameter mutation inside the gas pipeline, then judge to perform ultrasonic flowmeter detection, judgment, calibration and adjustment.
[0122] In this embodiment, the monitoring points in the gas space inside the gas pipeline are numbered, represents the serial number of the monitoring points in the gas space inside the gas pipeline, represents the total number of the serial numbers of the monitoring points in the gas space inside the gas pipeline.
[0123] The monitoring points of the gas factors over time inside the gas pipeline are numbered, represents the serial number of the monitoring points of the gas factors over time inside the gas pipeline, represents the total number of the serial numbers of the monitoring points of the gas factors over time inside the gas pipeline.
[0124] In an ultrasonic flowmeter, the signal-to-noise ratio (SNR) and the amplitude of the signal-to-noise ratio are important indicators for evaluating measurement accuracy. Software and hardware deployments for obtaining these parameters: Hardware deployment includes a signal conditioning circuit, an amplifier, a filter, and an analog-to-digital converter; Software deployment: A waveform analysis tool: used to display and edit the signal waveform. A noise analysis tool: used to calculate the SNR.
[0125] ;
[0126] ;
[0127] represents the th gas pipeline internal gas space monitoring point's th gas pipeline internal gas factor time monitoring point's gas pipeline internal gas parameter mutation coupling evaluation index; The gas pipeline internal gas parameter mutation coupling evaluation index is used to quantify the relative level of time detection accuracy of the ultrasonic flowmeter after being affected by the gas pipeline internal gas coupling factors. The larger the gas pipeline internal gas parameter mutation coupling evaluation index, the lower the relative environmental mutation influence level under the condition of relatively high time detection accuracy, and the higher the relative level of time detection accuracy of the ultrasonic flowmeter after being affected by the gas pipeline internal gas coupling factors, and the more reliable the initial correct value of the average forward and reverse duration obtained by the corresponding measurement.
[0128] In a gas ultrasonic flowmeter, the "signal" specifically refers to the electrical signal received by the ultrasonic transducer, and its essence is the voltage waveform converted after the ultrasonic mechanical wave propagates in the gas. The transmitting transducer: converts an electrical pulse, for example, a 200 kHz square wave, into an ultrasonic mechanical wave and propagates it through the gas medium. The receiving transducer: reconverts the arriving ultrasonic mechanical wave into an electrical signal. The signal-to-noise ratio is used to represent the amplitude ratio of the signal to the background noise and determines the time detection accuracy.
[0129] represents the th gas pipeline internal gas space monitoring point's th gas pipeline internal gas factor time monitoring point's signal-to-noise ratio of the ultrasonic flowmeter;
[0130] represents the minimum allowable value of the signal-to-noise ratio of the ultrasonic flowmeter, which is directly extracted through the gas component database of the ultrasonic flowmeter.
[0131] In a gas ultrasonic flowmeter, the relationship between the signal-to-noise ratio and the time detection accuracy is essentially the influence of noise on the zero-crossing detection error. The higher the signal-to-noise ratio, the higher the time detection accuracy.
[0132] Droplets (such as water droplets and oil droplets), as inhomogeneous media, cause ultrasonic scattering. For a quantitative example, in a wet gas pipeline, the signal amplitude fluctuation of an ultrasonic flowmeter caused by droplets is 2-5 times that of normal operating conditions.
[0133] The transducer sensitivity is the output voltage of the transducer under unit sound pressure. For a quantitative example, the sensitivity of a gas ultrasonic transducer is 5-30 mV / Pa (e.g., 10 mV / Pa corresponds to a 0 dB reference value). A 10 dB decrease in sensitivity causes the received amplitude to drop to 31.6%. At the same time, the aging effect also has an indirect impact. The sensitivity of the transducer may decrease by 3-5 dB after 5 years of use.
[0134] The signal amplitude of an ultrasonic flowmeter is positively correlated with the time detection accuracy, that is, the higher the amplitude, the higher the time detection accuracy.
[0135] Denote the th signal amplitude of the ultrasonic flowmeter at the th gas factor time monitoring point inside the gas pipeline for the
[0136] th gas space monitoring point inside the gas pipeline;
[0137] In a gas pipeline, the angle between the sound path of the ultrasonic flowmeter and the gas pipeline corresponds to different detection areas of the gas flow field. Therefore, when the corresponding flow field changes, the first component correction factor for the coupling evaluation of sudden changes in gas pipeline internal gas parameters and the second component correction factor for the coupling evaluation of sudden changes in gas pipeline internal gas parameters should change. In an ultrasonic flowmeter, the sound path, that is, the angle between the ultrasonic propagation path and the gas pipeline, determines the relative position between the ultrasonic propagation path and the fluid flow direction, thus affecting the flow field characteristics and the accuracy of measurement results. For example, when the sound path is parallel to the pipeline axis (angle is 0 degrees), the ultrasonic propagation path is consistent with the fluid flow direction, and the flow field is relatively uniform. When the sound path is perpendicular to the pipeline axis (angle is 90 degrees), the ultrasonic propagation path is perpendicular to the fluid flow direction, and the flow field may be more complex, with more turbulence and velocity gradients. The propagation speed of ultrasonic waves in a fluid is affected by the fluid velocity. When there is an angle between the sound path and the fluid flow direction, the velocity component of the fluid in the sound path direction will affect the actual propagation speed of the ultrasonic waves. Changes in the flow field will affect the propagation environment of the ultrasonic signal, possibly resulting in signal attenuation or increased noise, thereby affecting the signal-to-noise ratio. Angle changes may cause an increase in reflections and scattering on the signal propagation path, further affecting the signal-to-noise ratio.
[0138] To accurately evaluate the influence of the sound path angle on the measurement accuracy, it is necessary to introduce a correction factor to adjust the measurement results.
[0139] It represents the correction factor of the first component for the coupling evaluation of the gas parameter mutation inside the gas pipeline, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0140] It represents the correction factor of the second component for the coupling evaluation of the gas parameter mutation inside the gas pipeline, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[0141] The experiment can be carried out in a laboratory environment to simulate different flow field conditions and sound channel angles. By measuring the ultrasonic propagation time and signal-to-noise ratio at different angles through experiments, a mapping relationship between the angle and the correction factor is established. According to the experimental data, a mapping relationship is constructed to estimate the correction factor at different angles. The mapping relationship between the angle between the sound channel of the ultrasonic flowmeter and the gas pipeline and the correction factor of the first component for the coupling evaluation of the gas parameter mutation inside the gas pipeline and the correction factor of the second component for the coupling evaluation of the gas parameter mutation inside the gas pipeline is obtained. By inputting the actual angle between the sound channel of the ultrasonic flowmeter and the gas pipeline, the corresponding correction factor of the first component for the coupling evaluation of the gas parameter mutation inside the gas pipeline and the correction factor of the second component for the coupling evaluation of the gas parameter mutation inside the gas pipeline are obtained.
[0142] Furthermore, it is determined to perform detection and judgment correction adjustment on the ultrasonic flowmeter, specifically including: taking the absolute value of the difference analysis between the average reverse measurement duration of the ultrasonic flowmeter and the average forward measurement duration of the corresponding ultrasonic flowmeter to obtain the reverse and forward duration difference value for this time; taking the absolute value of the difference analysis between the average reverse measurement duration of the corresponding previous ultrasonic flowmeter and the average forward measurement duration of the corresponding ultrasonic flowmeter to obtain the reverse and forward duration difference value for the previous time; performing difference analysis between the reverse and forward duration difference value for this time and the reverse and forward duration difference value for the previous time to obtain the first mutation value of the reverse and forward duration difference value; performing difference analysis between the reverse and forward duration difference value for the previous time and the reverse and forward duration difference value for this time to obtain the second mutation value of the reverse and forward duration difference value; if the first mutation value of the reverse and forward duration difference value is equal to or greater than the maximum time difference change threshold, perform the first excitation wave period correction or the first forward and reverse time difference symmetry correction on the reverse duration according to the type of ultrasonic flowmeter detection method; if the second mutation value of the reverse and forward duration difference value is equal to or greater than the maximum time difference change threshold, perform the second excitation wave period correction or the second forward and reverse time difference symmetry correction on the forward duration according to the type of ultrasonic flowmeter detection method.
[0143] In this embodiment, as Figure 5 shown, it is a schematic flowchart of the detection and judgment correction adjustment for the ultrasonic flowmeter provided by the embodiment of the present application. If , then the newly measured average forward and reverse durations are larger than the initial correct value of the average forward and reverse durations Above; and then the deviation of the reverse duration from the initial correct value of the average of the forward and reverse durations is greater than the deviation of the initial correct value of the average of the forward and reverse durations from the forward duration Above, it indicates that there is an error in measuring the forward or reverse duration. For the zero-crossing method, one of them should jump backward, such as one of the forward and reverse durations may be measured incorrectly according to the relevant rules.
[0144] It should be noted that in the natural gas pipeline, the flow rate is a gradual change process, and the time interval between two adjacent measurements is very short. Under normal measurement conditions in general application scenarios, the change amount of the time difference between two consecutive measurements caused by normal flow rate changes is relatively small. The maximum time difference change threshold can be set to For different specifications Generally within half of the excitation wave period to one excitation wave period, different values can be set according to different specifications. Based on this characteristic, it can be judged and corrected.
[0145] Denote the average value of the forward duration measured by the ultrasonic flowmeter for the th time; Denote the average value of the reverse duration measured by the ultrasonic flowmeter for the th time.
[0146] If , it indicates that the newly measured time difference has increased significantly compared with the previous measurement time difference, and the change amount exceeds the maximum value. It can be shown that the forward duration is normal while the reverse duration measurement is incorrect; for the flowmeter using zero-crossing detection, it indicates that the reverse measurement jumps backward by one wave, then the reverse duration should be corrected by subtracting one excitation wave period, then ; where is the average period of the received wave signal, is the corrected reverse duration; if it is the correlation method, the reverse duration can be corrected according to the symmetry of the forward and reverse time difference changes, then calculate the correction according to .
[0147] If , it indicates that the newly measured time difference has decreased significantly compared with the previous measurement time difference, and the change amount exceeds the maximum value. It can be shown that the reverse duration is normal while the forward duration jumps backward by one wave; for the flowmeter using zero-crossing detection, the forward duration should be corrected by subtracting one excitation wave period, then , is the corrected forward duration; if it is the correlation method, the forward duration can be corrected according to the symmetry of the forward and reverse time difference changes, and can be calculated according to for correction. It should be noted that for the zero-crossing method, only the case of jumping one wave is considered, because the possibility of jumping two waves in actual detection is very low and can be ignored.
[0148] Further, for the judgment of ultrasonic flowmeter detection and calibration adjustment, it further includes: performing difference analysis on the difference value between the reverse and forward duration values of the previous time and the difference value between the reverse and forward duration values of this time to obtain the third mutation value of the difference value between the reverse and forward duration values; performing difference analysis on the difference value between the reverse and forward duration values of the previous time and the difference value between the reverse and forward duration values of this time to obtain the fourth mutation value of the difference value between the reverse and forward duration values; if the third mutation value of the difference value between the reverse and forward duration values is equal to or greater than the maximum time difference change threshold, then perform excitation wave period calibration or forward and reverse time difference symmetry calibration on the reverse duration according to the ultrasonic flowmeter detection method type; if the fourth mutation value of the difference value between the reverse and forward duration values is equal to or greater than the maximum time difference change threshold, then perform excitation wave period calibration or forward and reverse time difference symmetry calibration on the forward duration according to the ultrasonic flowmeter detection method type.
[0149] In this embodiment, if , then the average value of the newly measured forward and reverse durations is smaller than the reference value of the average value of the forward and reverse durations by more than ; and if
[0150] if , it indicates that the newly measured time difference is significantly smaller than the time difference measured last time, and the change amount exceeds the maximum value, which can indicate that the forward duration is normal while the reverse duration jumps forward by one wave; for the flowmeter using zero-crossing detection, the reverse duration should be corrected by adding an excitation wave period, then ; where is the average period of the received wave signal; if it is the correlation method, the reverse duration can be corrected according to the symmetry of the forward and reverse time difference changes, and the correction can be calculated according to . It should be noted that although it is the same as the judgment condition above, however, the preconditions, and are different, so different adjustment methods are adopted, and the same applies hereinafter.
[0151] if , it indicates that the newly measured time difference is significantly larger than the time difference measured last time, and the change amount exceeds the maximum value, which can indicate that the reverse duration is normal while the forward duration measurement is incorrect; for the flowmeter using zero-crossing detection, the forward duration jumps forward by one wave and should be corrected by adding an excitation wave period, then ; if it is the correlation method, the forward duration can be corrected according to the symmetry of the forward and reverse time difference changes, and the correction can be calculated according to .
[0152] For judgment situations other than the ultrasonic flowmeter detection, judgment, calibration, and adjustment described above, an abnormal detection alarm shall be issued uniformly to notify relevant personnel.
[0153] As Figure 6 shown, it is a schematic structural diagram of the detection and calibration system based on the forward and reverse durations of an ultrasonic flowmeter provided by an embodiment of the present application. The detection and calibration system based on the forward and reverse durations of an ultrasonic flowmeter provided by an embodiment of the present application includes: a gas pipeline ultrasonic sound velocity update module, an initialization detection initial correct value module, and a detection calibration adjustment module. The gas pipeline ultrasonic sound velocity update module is used to update the actual ultrasonic sound velocity of the gas pipeline according to the collected gas pipeline state parameters. The initialization detection initial correct value module is used to initialize the detection to obtain the initial correct value of the average forward and reverse durations measured for the gas pipeline. The detection calibration adjustment module is used to compare and analyze the average forward and reverse durations of each time with the initial correct value of the average forward and reverse durations, and judge whether the detection calibration is completed or whether adjustment is required according to the comparison and analysis results.
[0154] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0155] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a system for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0156] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction system that implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the functions specified in one process or multiple processes and / or one block or multiple blocks in the process Figure 1 one process or multiple processes and / or blocks Figure 1 steps for the functions specified in one block or multiple blocks.
[0158] Although the preferred embodiments of the present invention have been described, additional changes and modifications can be made by those skilled in the art once they learn of the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.
[0159] Obviously, those skilled in the art can make various changes and deformations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and deformations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and deformations.
Claims
1. A detection and correction method based on the forward and reverse time length of an ultrasonic flowmeter, characterized in that: The following steps are involved: Update the actual sound velocity of the gas pipeline ultrasonic wave according to the collected gas pipeline state parameters; Initialization detection obtains the initial correct value of the average forward and reverse time length of the gas pipeline measurement; The average value of each forward and reverse time is compared and analyzed with the initial correct value of the average value of the forward and reverse time, and whether the detection is correct or the correction is completed is determined based on the comparison and analysis results.
2. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 1 is characterized in that: The updating of the actual sound velocity of the gas pipeline ultrasonic wave according to the collected gas pipeline state parameters specifically includes: The gas pressure, gas absolute temperature, gas component data and gas average molar mass are collected by pressure sensors, temperature sensors and gas chromatographs deployed in the corresponding gas pipelines; The universal gas constant is obtained by directly extracting the ultrasonic flow meter gas composition database; The corresponding adiabatic index, gas compressibility factor and pressure correction coefficient are obtained through the pre-stored data association relationship table of the ultrasonic flow meter gas component database; The actual sound velocity of gas pipeline ultrasound is calculated by combining the gas pressure, gas absolute temperature, gas component data, gas average molar mass, adiabatic index, gas compressibility factor and pressure correction coefficient through the gas pipeline ultrasound actual sound velocity correction model.
3. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 1 is characterized in that: The updating of the actual sound velocity of the gas pipeline ultrasonic wave according to the collected gas pipeline state parameters also includes: The ultrasonic flow meter gas component database is directly extracted to obtain the standard value of gas absolute temperature, the standard value of gas pressure, the standard value of gas average molar mass, the correction factor of gas average droplet content for sound velocity, the first proportional factor of the characteristic change of gas parameter mutation assessment inside the gas pipeline, the second proportional factor of the characteristic change of gas parameter mutation assessment inside the gas pipeline, and the third proportional factor of the characteristic change of gas parameter mutation assessment inside the gas pipeline; The absolute temperature of the gas is analyzed in proportion to the standard value of the absolute temperature of the gas, and the first proportional factor of the characteristic change is evaluated by the sudden change of the gas parameters inside the gas pipeline to perform characteristic correction, and the correction component of the absolute temperature of the gas is obtained; The gas pressure and the standard value of gas pressure are analyzed for proportion, and the characteristic change second proportional factor is evaluated through the sudden change of gas parameters inside the gas pipeline to perform characteristic correction to obtain the gas pressure proportion correction component; The gas average molar mass and the gas average molar mass standard value are analyzed for proportion, and the characteristic change third proportional factor is evaluated by the sudden change of gas parameters inside the gas pipeline to perform characteristic correction, and the correction component of the gas average molar mass proportion is obtained; The correction component of the absolute temperature of the gas, the correction component of the pressure of the gas and the correction component of the average molar mass of the gas are coupled, and the correction factor of the speed of sound is corrected by the average droplet content of the gas to obtain the gas parameter mutation assessment index inside the gas pipeline; Perform difference analysis on gas pipeline internal gas parameter mutation assessment indexes of adjacent gas pipeline internal gas factor time monitoring points to obtain gas pipeline internal gas parameter mutation assessment difference values; A comparative analysis is performed based on the assessment differences of the sudden changes in gas parameters inside the gas pipeline, and the actual sound velocity of the gas pipeline ultrasound is updated based on the comparative analysis results.
4. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 3 is characterized in that: The updating of the actual sound velocity of the gas pipeline ultrasonic wave according to the comparative analysis result specifically includes: If the difference in the assessment of the sudden change of the gas parameters inside the gas pipeline is less than or equal to the reference value for the assessment of the sudden change of the gas parameters inside the gas pipeline, the actual sound velocity of the ultrasonic wave in the gas pipeline is updated at a predefined time interval; If the difference in the assessment of the sudden change in the gas parameters inside the gas pipeline is greater than the reference value for the assessment of the sudden change in the gas parameters inside the gas pipeline, the subsequent initialization detection is suspended and recorded as a flow rate mutation state. The above-mentioned comparative analysis is performed again after a predefined detection time interval. If the difference in the assessment of the sudden change in the gas parameters inside the gas pipeline is less than or equal to the reference value for the assessment of the sudden change in the gas parameters inside the gas pipeline at this time, the actual sound velocity of the gas pipeline ultrasound is updated at a predefined time interval. If the difference in the assessment of the sudden change in the gas parameters inside the gas pipeline is still greater than the reference value for the assessment of the sudden change in the gas parameters inside the gas pipeline at this time, the relevant personnel are notified to check the gas pipeline status and the ultrasonic flowmeter status.
5. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 1 is characterized in that: The initialization detection obtains the initial correct value of the average forward and reverse time length of the gas pipeline measurement, specifically including: After the actual sound velocity of the gas pipeline ultrasound is updated, the ultrasonic flowmeter is used to perform continuous measurements for a predefined number of times to obtain the forward and reverse time reference values for the predefined number of times. The two adjacent forward and reverse time reference values are analyzed for difference and then the absolute values are taken to obtain the adjacent differences of the forward and reverse time reference values. If the adjacent differences of the forward and reverse time reference values are less than or equal to the adjacent difference threshold of the forward and reverse time reference values, the corresponding forward and reverse time reference values are retained. If the adjacent differences of the forward and reverse time reference values are greater than the adjacent difference threshold of the forward and reverse time reference values, the Pearson correlation coefficient between the corresponding ultrasonic flowmeter received waveform and the template waveform is calculated by predefined software to obtain the waveform similarity correlation coefficient. If the waveform similarity correlation coefficient is greater than the waveform similarity correlation coefficient determination threshold, the corresponding forward and reverse time reference values are retained. If the waveform similarity correlation coefficient is less than or equal to the waveform similarity correlation coefficient determination threshold, the corresponding forward and reverse time reference values are discarded. The retained forward and reverse time length reference values are summed and averaged to obtain the forward and reverse time length reference value average value; The corresponding actual value of the forward and reverse time is calculated by the actual sound velocity of the gas pipeline ultrasonic. If the actual value of the forward and reverse time is analyzed with the average value of the forward and reverse time reference value and the absolute value is taken, the difference of the ultrasonic sound velocity of the gas pipeline is obtained. If the difference of the ultrasonic sound velocity of the gas pipeline is less than the difference threshold of the ultrasonic sound velocity of the gas pipeline, the initialization detection is judged to be successful, and the average value of the forward and reverse time reference value is recorded as the initial correct value of the average value of the forward and reverse time. If the difference of the ultrasonic sound velocity of the gas pipeline is equal to or greater than the difference threshold of the ultrasonic sound velocity of the gas pipeline, the initialization detection is judged to have failed, and the initialization detection is performed again to obtain the initial correct value of the average value of the forward and reverse time measured in the gas pipeline. If the initialization detection is still judged to have failed after the predefined initialization detection allowed time, the relevant personnel are notified to check the gas pipeline status and the ultrasonic flowmeter status.
6. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 1 is characterized in that: The comparison and analysis of the average value of each forward and reverse duration with the initial correct value of the average value of the forward and reverse duration specifically includes: The absolute value of the average forward and reverse duration in each measurement and the initial correct value of the average forward and reverse duration are analyzed to obtain the average measurement difference of the forward and reverse duration in each measurement; Perform difference analysis on the forward duration and the average value of the forward and reverse duration in each measurement to obtain the difference between the forward and forward and reverse durations at each time; perform difference analysis on the reverse duration and the average value of the forward and reverse duration in each measurement to obtain the difference between the reverse and forward and reverse durations at each time; perform difference analysis on the absolute values of the difference between the forward and forward and reverse durations at each time and the difference between the reverse and forward and reverse durations at each time to obtain the symmetrical difference between the forward and reverse durations at each time; If the average measurement difference of the forward and reverse duration is less than the upper limit of the total duration tracking value deviation and the symmetric difference of the forward and reverse duration is less than the upper limit of the symmetric deviation of the forward and reverse duration, it is judged that the detection based on the ultrasonic flow meter is correct, and the detection is ended. After the corresponding test is completed, the initial correct value of the average forward and reverse duration is replaced by the average forward and reverse duration measured this time; If the average measurement difference of the forward and reverse time is equal to or greater than the upper limit of the total time tracking value deviation, or the symmetric difference of the forward and reverse time is equal to or greater than the upper limit of the symmetric deviation of the forward and reverse time, a sudden change coupling assessment of the gas parameters inside the gas pipeline is performed, and based on the results of the sudden change coupling assessment of the gas parameters inside the gas pipeline, it is determined whether to perform ultrasonic flowmeter detection, correction and adjustment.
7. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 6 is characterized in that: The specific process of judging whether to perform ultrasonic flow meter detection correction adjustment according to the gas parameter mutation coupling evaluation result inside the gas pipeline is as follows: The signal data of the gas ultrasonic flowmeter is collected by a signal conditioning circuit and analyzed by a software analysis tool to obtain the signal-to-noise ratio and signal amplitude of the ultrasonic flowmeter; The minimum allowable signal-to-noise ratio of the ultrasonic flowmeter, the minimum allowable signal amplitude of the ultrasonic flowmeter, the first component correction factor of the sudden change coupling assessment of gas parameters inside the gas pipeline, and the second component correction factor of the sudden change coupling assessment of gas parameters inside the gas pipeline are directly extracted from the ultrasonic flowmeter gas component database; The signal-to-noise ratio of the ultrasonic flowmeter and the minimum allowable value of the signal-to-noise ratio of the ultrasonic flowmeter are analyzed, and the correction factor of the first component of the sudden coupling evaluation of the gas parameters inside the gas pipeline is corrected to obtain the first component of the sudden coupling of the gas parameters inside the gas pipeline; The signal amplitude of the ultrasonic flowmeter and the minimum allowable value of the signal amplitude of the ultrasonic flowmeter are analyzed for proportion, and the second component correction factor is evaluated by the sudden coupling of the gas parameters inside the gas pipeline to obtain the second component of the sudden coupling of the gas parameters inside the gas pipeline; The first component of the sudden change coupling of the gas parameters inside the gas pipeline is coupled with the second component of the sudden change coupling of the gas parameters inside the gas pipeline, and then the sudden change coupling assessment index of the gas parameters inside the gas pipeline is obtained by performing a proportion analysis on the difference between the sudden change assessment value of the gas parameters inside the gas pipeline; If the gas pipeline internal gas parameter mutation coupling assessment index is less than or equal to the gas pipeline internal gas parameter mutation coupling assessment index threshold, it is determined that the average value of each forward and reverse time length is compared and analyzed with the initial correct value of the average value of the forward and reverse time length; If the gas parameter mutation coupling assessment index inside the gas pipeline is greater than the gas parameter mutation coupling assessment index threshold value inside the gas pipeline, it is determined that an ultrasonic flow meter detection judgment correction adjustment is to be performed.
8. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 7 is characterized in that: The above-mentioned step of determining and correcting the ultrasonic flowmeter includes: The average value of the reverse time measured by the ultrasonic flowmeter and the average value of the forward time measured by the corresponding ultrasonic flowmeter are analyzed and the absolute value is taken to obtain the difference between the reverse and forward time. Perform difference analysis on the corresponding average value of the reverse time measured by the last ultrasonic flowmeter and the corresponding average value of the forward time measured by the ultrasonic flowmeter, and take the absolute value to obtain the difference value between the reverse and forward time of the last time; Perform a difference analysis on the current reverse and forward duration difference value and the previous reverse and forward duration difference value to obtain the first mutation value of the reverse and forward duration difference value; Perform difference analysis on the previous difference between the reverse and forward durations and the current difference between the reverse and forward durations to obtain a second mutation value of the difference between the reverse and forward durations; If the first mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the reverse time length is subjected to the first excitation wave period correction or the first forward and reverse time difference symmetry correction according to the ultrasonic flow meter detection method type; If the second mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, a second excitation wave period correction or a second forward and reverse time difference symmetry correction is performed on the forward time length according to the ultrasonic flow meter detection method type.
9. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter as claimed in claim 7, characterized in that: The step of determining and correcting the ultrasonic flowmeter also includes: Perform difference analysis on the previous reverse and forward duration difference value and the current reverse and forward duration difference value to obtain the third mutation value of the reverse and forward duration difference value; Perform difference analysis on the previous reverse and forward duration difference value and the current reverse and forward duration difference value to obtain a fourth mutation value of the reverse and forward duration difference value; If the third mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the reverse time length is corrected for the excitation wave period or the forward and reverse time difference symmetry according to the ultrasonic flowmeter detection method type; If the fourth mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the forward time length is corrected for the excitation wave period or the forward and reverse time difference symmetry according to the ultrasonic flow meter detection method type.
10. A detection and correction system based on the forward and reverse time length of an ultrasonic flow meter, characterized in that: include: Gas pipeline ultrasonic sound velocity update module, initialization detection initial correct value module and detection correction adjustment module: Gas pipeline ultrasonic sound velocity update module: used to update the actual sound velocity of gas pipeline ultrasonic waves according to the collected gas pipeline state parameters; Initialization detection initial correct value module: used for initialization detection to obtain the initial correct value of the average forward and reverse time length of gas pipeline measurement; Detection correction and adjustment module: used to compare and analyze the average value of each forward and reverse duration with the initial correct value of the average value of the forward and reverse duration, and determine whether the detection correction is completed or whether to make adjustments based on the comparison and analysis results.
Citation Information
Patent Citations
Ultrasonic time difference processing method of multi-channel ultrasonic water meter
CN117786362A
A method and system for optimizing measurement data of ultrasonic gas meter
CN119066598B
Cited By
On-line correction and metering method for ultrasonic natural gas flowmeter
CN122651065A