Detection and correction method and system based on forward and reverse durations of ultrasonic flowmeter
By updating the sound speed and initial detection and correction methods of the ultrasonic flowmeter, the detection adaptability problem of the ultrasonic flowmeter under complex operating conditions is solved, and more accurate and stable flow measurement is achieved.
Patent Information
- Application Number
- CN202510734001.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-20
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-04
AI Technical Summary
In the complex operating conditions, the existing ultrasonic flowmeter has insufficient adaptability to the calibration environment for the front and reverse duration detection, resulting in inaccurate measurement or failure.
By updating the actual sound speed of ultrasonic waves in the gas pipeline, initializing detection to obtain the average value of the forward and reverse duration, using comparative analysis to determine whether the correction is completed, and adjust the measurement results in real time.
It improves the environmental adaptability of the forward and reverse time detection of ultrasonic flowmeters, ensures measurement accuracy and robustness, and reduces measurement deviations caused by environmental changes.
Smart Images

Figure CN120252878A_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 pipeline intrusion, which not only increases the difficulty of installation and maintenance, but also may interfere with the production process. Non-invasive 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 engineering, pharmaceuticals, 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 working 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 time-difference measurement. If zero-crossing detection technology is used, this phenomenon is more obvious. In mild cases, 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 abnormal operation.
[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: 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 publication 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 yes, the data optimization of the gas meter is completed; if not, a reminder signal is sent.
[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 flow meters 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 amplified signal of the received wave to be very unstable. For example, the common conventional zero-crossing detection method or the correlation method may lead to incorrect measurement of the time length and time difference, especially when the zero-crossing detection method is used, it is more likely to cause mismeasurement or even measurement failure due to wave skipping. There is a problem of insufficient environmental adaptability of the detection and correction based on the positive and negative time lengths of the ultrasonic flow meter. Summary of the Invention
[0008] By providing a method and system for detecting and correcting the positive and negative time lengths of an ultrasonic flow meter, 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 flow meter 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 flow meter.
[0009] The embodiments of the present application provide a method for detecting and correcting the positive and negative time lengths of an ultrasonic flow meter, 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 in 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 required according to the comparison and analysis results.
[0010] The embodiment of the present application provides a detection and correction 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 correction 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 correction 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 correction is completed or whether adjustment is required 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 correction when necessary. By analyzing and correcting 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 correction of the forward and reverse durations of the ultrasonic flowmeter, and solving the problem of insufficient environmental adaptability of the detection and correction 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 is judged whether correction adjustment is required. Thus, it ensures that when the medium conditions mutate, the measurement results can be adjusted in time, and further realizes that the detection and correction of the forward and reverse durations of the ultrasonic flowmeter still maintain accuracy during environmental mutations.
[0014] 3. By collecting the state parameters of the gas pipeline in real time, the actual propagation speed of ultrasonic waves under the current medium conditions is calculated; through continuous measurement and data analysis, the initial correct value of the forward and reverse durations is obtained. 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, correction is performed, and further realizes that the detection and correction process can adapt to the continuously changing medium conditions, improving the robustness of the detection and correction 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 correction 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 segment 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 status parameters, updating the actual ultrasonic sound speed of the gas pipeline, and detecting during processing provided by an embodiment of the present 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 value of the forward and reverse durations provided by an embodiment of the present application;
[0019] Figure 5 It is a schematic flowchart for judging and correcting and adjusting during ultrasonic flowmeter detection provided by an embodiment of the present application;
[0020] Figure 6 It is a schematic structural diagram of a detection and correction system based on the forward and reverse durations of an ultrasonic flowmeter provided by an embodiment of the present application. Specific embodiments
[0021] Through an embodiment of the present application, by providing a detection and correction method and system based on the forward and reverse durations of an ultrasonic flowmeter, the problem of insufficient environmental adaptability of the detection and correction 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 correction is completed and whether to adjust, the effect of improving the environmental adaptability of the detection and correction of the forward and reverse durations of an ultrasonic flowmeter is achieved.
[0022] To better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings of the specification and specific embodiments.
[0023] As Figure 1 shown, it is a flowchart of a detection and correction method based on the forward and reverse durations of an ultrasonic flowmeter provided by an embodiment of the present application. This method is applied to a detection and correction 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 status parameters; initializing the detection to obtain the initial correct value of the average value of the forward and reverse durations measured by the gas pipeline; comparing and analyzing the average values of the forward and reverse durations of each time with the initial correct value of the average value of the forward and reverse durations, and judging whether the detection and correction 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 the forward and reverse propagations 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 the 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 the ultrasonic flowmeter measurement.
[0025] As Figure 2 shown, it is a schematic diagram of the sound channel 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 channel, and are respectively installed at the 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 stationary 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 channel 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 channel 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 channel direction , that is: ;
[0026] Conversely, 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 channel direction is the difference between the sound speed and the velocity component of the fluid in the sound channel direction , that is: ;
[0027] Let the distance between the two end faces of the ultrasonic transducers A and B, that is, the sound channel length, be L. Then, the reverse propagation time (upstream) and the 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 gas, v < 25 m / s, and for liquid, v < 10 m / s, while the sound velocity of ultrasonic waves in different media is generally: in air > 300 m / s, in natural gas > 400 m / s, and in water > 1000 m / s, the fluid velocity is much lower than the propagation velocity of ultrasonic waves in different media. Thus, 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] It can be 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 of ultrasonic waves 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] It can be 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 "forward and reverse duration reference value" in the subsequent steps.
[0039] Furthermore, update the actual ultrasonic sound speed of the gas pipeline according to the collected gas pipeline state parameters, specifically including: respectively collect the gas pressure, the absolute gas temperature, the gas component data and the average molar mass of the gas through the pressure sensor, the temperature sensor and the gas chromatograph deployed in the corresponding gas pipeline; directly extract the universal gas constant through the gas component database of the ultrasonic flowmeter; obtain the corresponding adiabatic index, gas compressibility factor and pressure correction coefficient through the pre-stored data correlation table of the gas component database of the ultrasonic flowmeter; calculate the actual ultrasonic sound speed of the gas pipeline 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 in the embodiment of the present application. 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 selection is 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 side wall (avoiding the turbulent area), equipped with an anti-seismic bracket, used to collect the gas pressure.
[0042] Temperature sensor: Adopt an insertable digital or analog probe, penetrate into the pipeline at 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 directly contacts the gas, improving the temperature measurement accuracy, used to collect 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, which is calculated based on the gas composition. For example, when methane is dominant, γ≈1.31. The ultrasonic flowmeter provides a table of adiabatic indices for different gas compositions through its gas composition database. By inputting the real-time gas composition data of the gas pipeline, the adiabatic index of the corresponding composition can be obtained.
[0047] Represents the gas compressibility factor, which is 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 composition 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 composition 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-proof requirements: The chromatograph and the probe need to be certified by ATEX / IECEx Zone 1, and the control cabinet is designed with flameproof type. 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 to the center line of the pipeline. Bypass design: Independent sampling bypass (pipe diameter 1 / 5 of the main pipe), matching the flow rate 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 local cache stores 72 hours of data, 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, It represents the component-related constant. For example, when the pipeline is a natural gas pipeline, a component-related constant table 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 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 gas parameter mutation inside the gas pipeline, the second proportional factor of the change in the evaluation characteristics of the gas parameter mutation inside the gas pipeline, and the third proportional factor of the change in the evaluation characteristics of the gas parameter mutation inside the gas pipeline from the gas component database of the ultrasonic flowmeter; 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 gas parameter mutation inside the gas pipeline to obtain the ratio 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 gas parameter mutation inside the gas pipeline to obtain the ratio 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 gas parameter mutation inside the gas pipeline to obtain the ratio correction component of the average molar mass of the gas; coupling the ratio correction component of the absolute gas temperature, the ratio correction component of the gas pressure, and the ratio 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 gas parameter mutation inside the gas pipeline; performing a difference analysis on the evaluation index of the gas parameter mutation inside the gas pipeline at adjacent gas pipeline internal gas factor time monitoring points to obtain the evaluation difference of the gas parameter mutation inside the gas pipeline; performing a comparative analysis based on the evaluation difference of the gas parameter mutation inside the gas pipeline, and updating the actual ultrasonic sound speed of the gas pipeline according to the comparative analysis result.
[0055] In this embodiment, the gas pipeline internal gas space monitoring points are numbered. It represents the numbering of the gas pipeline internal gas space monitoring points. It represents the total number of the numbering of the gas pipeline internal gas space monitoring points.
[0056] The gas pipeline internal gas factor time monitoring points 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] th gas space monitoring point inside the gas pipeline. The gas parameter mutation evaluation index inside the gas pipeline is used to quantify the mutation degree level of the gas influencing factors 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] th gas space monitoring point inside the gas pipeline;
[0065] Represents the th gas pressure of the th time monitoring point of the gas factors inside the gas pipeline for the
[0066] th gas space monitoring point inside the gas pipeline;
[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 speed of sound. The value range is from 0 to 1, and the correction factor of the average gas droplet content for the speed of sound 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 speed of sound 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 speed of sound: By simulating the wet gas environment with different droplet concentrations in the corresponding gas in the laboratory, measuring the actual propagation speed of the ultrasonic waves, comparing it with the theoretical speed of sound, 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 speed of sound, 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 speed of sound.
[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 pattern, thermodynamic properties, and component distribution, resulting in a coordinated change in the temperature, pressure, and sound speed correction factors. 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, impeding the heat exchange between the gas and the outside world, and increasing 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 peeling of the deposits forms 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 sets 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] Furthermore, update the actual ultrasonic sound speed of the gas pipeline according to the comparative analysis results, specifically including: if the evaluation difference of the gas parameter mutation inside the gas pipeline is less than or equal to the reference value of the gas parameter mutation evaluation 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 reference value of the gas parameter mutation evaluation inside the gas pipeline, suspend the subsequent initialization detection, record it as the flow velocity mutation state, and conduct 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 reference value of the gas parameter mutation evaluation 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 reference value of the gas parameter mutation evaluation inside the gas pipeline at this time, notify the relevant personnel to check the state of the gas pipeline and the ultrasonic flowmeter.
[0079] In this embodiment, if the evaluation difference of the gas parameter mutation inside the gas pipeline is greater than the reference value of the gas parameter mutation evaluation 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 a mutation in the sound speed, 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 a mutation in the sound speed.
[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 for a predefined number of times through an ultrasonic flowmeter to obtain the forward and reverse duration reference values for the predefined number of times. Take the absolute value after analyzing the difference between adjacent forward and reverse duration reference values to obtain the adjacent difference of the forward and reverse duration reference values. If the adjacent difference of the forward and reverse duration reference values is less than or equal to the threshold of the adjacent difference of the forward and reverse duration reference values, retain the corresponding forward and reverse duration reference value. If the adjacent difference of the forward and reverse duration reference values is greater than the threshold of the adjacent difference of the forward and reverse duration reference values, 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, retain the corresponding forward and reverse duration reference value. If the waveform similarity correlation coefficient is less than or equal to the determination threshold of the waveform similarity correlation coefficient, discard the corresponding forward and reverse duration reference value; sum and average the retained forward and reverse duration reference values to obtain the average value of the forward and reverse duration reference values; calculate the corresponding actual forward and reverse duration values through the actual ultrasonic sound speed in the gas pipeline. If the difference between the actual forward and reverse duration value and the average value of the forward and reverse duration reference values 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, it is determined that the initialization detection is successful, and record the average forward and reverse duration reference value 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, it is determined 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 it is still determined that the initialization detection fails after the predefined initialization detection allowable time, notify the relevant personnel to check the status of the gas pipeline and the ultrasonic flowmeter.
[0082] In this embodiment, the corresponding actual forward and reverse duration values calculated through the actual ultrasonic sound speed in the gas pipeline are based on, as described above, ; 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 forward and reverse duration reference value is basically only related to the sound path length L and the sound speed of ultrasonic waves in the static 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 forward and reverse duration 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 seconds 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 by calling in Python. 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 the correlation coefficient between the received signal and the template waveform is less than 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 backward duration values of each measurement with the initial correct value of the average forward and backward duration. Specifically, it includes: obtaining the average measurement difference of the forward and backward duration for each measurement by taking the absolute value of the difference analysis between the average forward and backward duration in each measurement and the initial correct value of the average forward and backward duration; obtaining the difference between the forward duration in each measurement and the initial correct value of the average forward and backward duration by performing a difference analysis between the forward duration in each measurement and the initial correct value of the average forward and backward duration; obtaining the difference between the backward duration in each measurement and the initial correct value of the average forward and backward duration by performing a difference analysis between the backward duration in each measurement and the initial correct value of the average forward and backward duration; taking 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 backward duration and the difference between the backward duration in each measurement and the initial correct value of the average forward and backward duration to obtain the symmetric difference value of the forward and backward duration for each measurement; if the average measurement difference of the forward and backward duration is less than the upper limit of the total duration tracking deviation and the symmetric difference value of the forward and backward duration is less than the upper limit of the symmetric deviation of the forward and backward duration, 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 backward duration with the average forward and backward duration value measured in this measurement; if the average measurement difference of the forward and backward duration is equal to or greater than the upper limit of the total duration tracking deviation or the symmetric difference value of the forward and backward duration is equal to or greater than the upper limit of the symmetric deviation of the forward and backward duration, 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 according to 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 serial number of the measurement times of the ultrasonic flowmeter. Represents the total number of the quantity serial numbers of the measurement times of the ultrasonic flowmeter.
[0112] Record the initial correct value of the average forward and backward duration as ;
[0113] Calculate the average forward and backward duration in each measurement. ; Represents the th average forward and backward duration of the ultrasonic flowmeter measurement. Represents the th average forward duration of the ultrasonic flowmeter measurement. Represents the th average backward duration of the ultrasonic flowmeter measurement.
[0114] The measurement difference between the average forward and backward duration of each measurement and the initial correct value of the average forward and backward 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 average value of the forward duration for each time and the initial correct value of the average value of the forward and reverse durations, Denote the th difference between the average value of the forward and reverse durations measured by the ultrasonic flowmeter and the initial correct value;
[0116] Calculate the difference between the average value of the reverse duration for each time and the initial correct value of the average value of the forward and reverse durations, Denote the th difference between the average value of the reverse and forward durations measured by the ultrasonic flowmeter and the initial correct value;
[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 symmetry deviation, then after the corresponding test is completed, 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 symmetry 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 in 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 time monitoring points of the gas factors 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 serial numbers of the time monitoring points of the gas factors 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] denotes 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 relative 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 of the forward and reverse durations 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] denotes 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] denotes the minimum allowable value of the signal-to-noise ratio of the ultrasonic flowmeter, which is directly extracted from the ultrasonic flowmeter gas component database.
[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. Regarding 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. Regarding a quantitative example, the sensitivity of a gas ultrasonic transducer is 5 - 30 mV / Pa (for example, 10 mV / Pa corresponds to a 0 dB reference value). A 10 dB reduction 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] Denotes the th signal amplitude of the ultrasonic flowmeter at the th time monitoring point of the gas factors inside the gas pipeline for the
[0136] Denotes the minimum allowable value of the signal amplitude of the ultrasonic flowmeter, which is directly extracted from the gas component database of the ultrasonic flowmeter.
[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 gas parameter mutations inside the gas pipeline and the second component correction factor for the coupling evaluation of gas parameter mutations inside the gas pipeline 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 of the ultrasonic propagation path and the fluid flow direction, thus affecting the flow field characteristics and the accuracy of the measurement results. For example, when the sound path is parallel to the pipeline axis (the 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 (the 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 affects the actual propagation speed of the ultrasonic waves. The change in the flow field affects the propagation environment of the ultrasonic signal, which may cause signal attenuation or noise increase, thereby affecting the signal-to-noise ratio. The change in the angle may cause an increase in reflection 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. The mapping relationship is constructed based on the experimental data 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 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 corresponding thereto can be obtained.
[0142] Furthermore, it is determined to perform detection and judgment correction adjustment on the ultrasonic flowmeter, which specifically includes: taking the absolute value of the difference analysis between the average reverse measurement duration of the ultrasonic flowmeter and the average forward measurement duration corresponding thereto 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 ultrasonic flowmeter corresponding to the previous time and the average forward measurement duration corresponding thereto to obtain the reverse and forward duration difference value for the previous time; performing difference analysis on 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 on 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 flow diagram of determining to perform detection and judgment correction adjustment on the ultrasonic flowmeter provided by the embodiment of the present application. If , then the average value of the newly measured forward and reverse durations is larger than the initial correct value of the average value of the 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 have a backward wave jump. For example, according to the relevant rules, one of the forward and reverse durations may be measured incorrectly.
[0144] It should be noted that in a natural gas pipeline, the flow rate is a gradual change process, and the time interval between two adjacent measurements is very short. In normal measurement conditions of 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, it is within half a excitation wave period to one excitation wave period, and different values can be set according to different specifications. Based on this characteristic, it can be judged and corrected.
[0145] Denote the average forward duration measured by the ultrasonic flowmeter for the th time; Denote the average 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, 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 has a backward wave jump, 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, and the change amount exceeds the maximum value. It can be shown that the reverse duration is normal while the forward duration has a backward wave jump; 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 and corrected according to It should be noted that for the zero-crossing method, only the case of one wave jump is considered because the possibility of two wave jumps in actual detection is very low and can be ignored.
[0148] Further, for ultrasonic flowmeter detection and judgment correction adjustment, it further includes: performing difference analysis on the difference value between the previous reverse and forward duration values and the current reverse and forward duration values to obtain the third mutation value of the reverse and forward duration difference value; performing difference analysis on the difference value between the previous reverse and forward duration values and the current reverse and forward duration values to obtain the fourth mutation value of the reverse and forward duration difference value; if the third mutation value of the reverse and forward duration difference value is equal to or greater than the maximum time difference change threshold, perform excitation wave period correction or positive and negative time difference symmetry correction on the reverse duration according to the ultrasonic flowmeter detection method type; if the fourth mutation value of the reverse and forward duration difference value is equal to or greater than the maximum time difference change threshold, perform excitation wave period correction or positive and negative time difference symmetry correction on the forward duration according to the ultrasonic flowmeter detection method type.
[0149] In this embodiment, if , 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 previous measured time difference, 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 a 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 positive and negative time difference changes, and can be corrected according to calculation. It should be noted that although it is the same as the judgment condition above, however, the prerequisite conditions and are different, so different adjustment methods are adopted, and the same applies to the following text.
[0151] if , it indicates that the newly measured time difference is significantly larger than the previous measured time difference, 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 a 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 positive and negative time difference changes, and can be corrected according to calculation.
[0152] For judgment situations other than the ultrasonic flowmeter detection, judgment, calibration, and adjustment described above, an abnormal detection alarm shall be given uniformly to notify relevant personnel.
[0153] As Figure 6 shown, it is a schematic structural diagram of a 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 by 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 an entirely hardware embodiment, an entirely 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 flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized 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 realizing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more 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 realizes the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0157] These computer program instructions may 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 blocks Figure 1 one process or multiple processes and / or blocks Figure 1 in the steps of 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 the basic creative concept. Therefore, the appended claims are intended to be construed to cover 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 duration of an ultrasonic flowmeter, characterized in that Including the following steps: Updating the actual ultrasonic sound velocity 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 backward duration measured in the gas pipeline; Comparing and analyzing the average forward and backward duration of each time with the initial correct value of the average forward and backward duration, and judging whether the detection is correct or the calibration is completed according to the comparison and analysis results.
2. The detection and correction method based on the forward and reverse duration of an ultrasonic flowmeter according to claim 1, wherein The updating of the actual ultrasonic sound velocity of the gas pipeline according to the collected gas pipeline state parameters specifically includes: Collecting gas pressure, absolute gas temperature, gas component data, and average gas molar mass respectively through pressure sensors, temperature sensors, and gas chromatographs deployed in the corresponding gas pipeline; Directly extracting the universal gas constant from the gas component database of the ultrasonic flowmeter; Obtaining the corresponding adiabatic index, gas compressibility factor, and pressure correction coefficient through the pre-stored data correlation table in the gas component database of the ultrasonic flowmeter; Calculating the actual ultrasonic sound velocity of the gas pipeline through the actual ultrasonic sound velocity correction model of the gas pipeline in combination with gas pressure, absolute gas temperature, gas component data, average gas molar mass, adiabatic index, gas compressibility factor, and pressure correction coefficient.
3. The detection and correction method based on the forward and reverse duration of the ultrasonic flowmeter according to claim 1, characterized in that, The updating of the actual ultrasonic sound velocity of the gas pipeline according to the collected gas pipeline state parameters further includes: Directly extracting from the gas component database of the ultrasonic flowmeter the standard value of absolute gas temperature, the standard value of gas pressure, the standard value of average gas molar mass, the correction factor of average gas droplet content for sound velocity, the first proportional factor of the change in the evaluation characteristics of the mutation of internal gas parameters in the gas pipeline, the second proportional factor of the change in the evaluation characteristics of the mutation of internal gas parameters in the gas pipeline, and the third proportional factor of the change in the evaluation characteristics of the mutation of internal gas parameters in the gas pipeline; Performing a ratio analysis of the absolute gas temperature and the standard value of absolute gas temperature, and performing characteristic correction through the first proportional factor of the change in the evaluation characteristics of the mutation of internal gas parameters in the gas pipeline to obtain the ratio correction component of the absolute gas temperature; Performing a ratio analysis of the gas pressure and the standard value of gas pressure, and performing characteristic correction through the second proportional factor of the change in the evaluation characteristics of the mutation of internal gas parameters in the gas pipeline to obtain the ratio correction component of the gas pressure; Performing a ratio analysis of the average gas molar mass and the standard value of average gas molar mass, and performing characteristic correction through the third proportional factor of the change in the evaluation characteristics of the mutation of internal gas parameters in the gas pipeline to obtain the ratio correction component of the average gas molar mass; Coupling the ratio correction component of the absolute gas temperature, the ratio correction component of the gas pressure, and the ratio correction component of the average gas molar mass, and performing correction through the correction factor of the average gas droplet content for sound velocity to obtain the evaluation index of the mutation of internal gas parameters in the gas pipeline; Performing a difference analysis on the evaluation index of the mutation of internal gas parameters in the gas pipeline at adjacent time monitoring points of internal gas factors in the gas pipeline to obtain the evaluation difference of the mutation of internal gas parameters in the gas pipeline; Performing a comparison and analysis according to the evaluation difference of the mutation of internal gas parameters in the gas pipeline, and updating the actual ultrasonic sound velocity of the gas pipeline according to the comparison and analysis results.
4. The detection and correction method based on the forward and reverse duration of the ultrasonic flowmeter according to claim 3, characterized in that, The updating of the actual ultrasonic sound velocity of the gas pipeline according to the comparison and analysis results specifically includes: If the evaluation difference of the gas parameter mutation inside the gas pipeline is less than or equal to the reference value of the gas parameter mutation evaluation 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 reference value of the gas parameter mutation evaluation 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 reference value of the gas parameter mutation evaluation 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 reference value of the gas parameter mutation evaluation inside the gas pipeline at this time, notify the relevant personnel to check the state of the gas pipeline and the ultrasonic flowmeter.
5. The detection and correction method based on the forward and reverse duration of an ultrasonic flowmeter according to claim 1, characterized in that The initialization detection obtains the initial correct value of the average of the forward and reverse duration measured by the gas pipeline, specifically including: After the actual ultrasonic sound speed of the gas pipeline is updated, perform continuous predefined measurements through the ultrasonic flowmeter to obtain the forward and reverse duration reference values for the predefined number of times. Take the absolute value after analyzing the difference between two adjacent forward and reverse duration reference values to obtain the adjacent difference of the forward and reverse duration reference values. If the adjacent difference of the forward and reverse duration reference values is less than or equal to the threshold of the adjacent difference of the forward and reverse duration reference values, retain the corresponding forward and reverse duration reference values. If the adjacent difference of the forward and reverse duration reference values is greater than the threshold of the adjacent difference of the forward and reverse duration reference values, 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 waveform similarity correlation coefficient determination threshold, retain the corresponding forward and reverse duration reference values. If the waveform similarity correlation coefficient is less than or equal to the waveform similarity correlation coefficient determination threshold, discard the corresponding forward and reverse duration reference values; Sum and average the retained forward and reverse duration reference values to obtain the average value of the forward and reverse duration reference values; Calculate the corresponding actual forward and reverse duration values through the actual ultrasonic sound speed of the gas pipeline. If the difference between the actual forward and reverse duration values and the average value of the forward and reverse duration reference values is analyzed and the absolute value is taken to obtain the ultrasonic sound speed difference of the gas pipeline. If the ultrasonic sound speed difference of the gas pipeline is less than the ultrasonic sound speed difference threshold of the gas pipeline, determine that the initialization detection is successful, and record the average value of the forward and reverse duration reference values as the initial correct value of the average of the forward and reverse duration. If the ultrasonic sound speed difference of the gas pipeline is equal to or greater than the ultrasonic sound speed difference threshold of the gas pipeline, determine that the initialization detection fails, and re-perform the initialization detection to obtain the initial correct value of the average of the forward and reverse duration measured by the gas pipeline. If it is still determined that the initialization detection fails after the predefined initialization detection allowable time, notify the relevant personnel to check the state of the gas pipeline and the ultrasonic flowmeter.
6. The detection and correction method based on the forward and reverse duration of an ultrasonic flowmeter according to claim 1, characterized in that The comparative analysis of the average values of the forward and reverse durations for each time with the initial correct value of the average of the forward and reverse durations specifically includes: The absolute value of the difference analysis between the average forward and backward duration in each measurement and the initial correct value of the average forward and backward duration is obtained to get the average measurement difference of the forward and backward duration for each time. The difference analysis is performed between the forward duration in each measurement and the average forward and backward duration to obtain the difference between the forward and the average forward and backward duration for each time. The difference analysis is performed between the backward duration in each measurement and the average forward and backward duration to obtain the difference between the backward and the average forward and backward duration for each time. The absolute value of the difference analysis between the difference between the forward and the average forward and backward duration for each time and the difference between the backward and the average forward and backward duration for each time is obtained to get the symmetric difference value of the forward and backward duration for each time. If the average measurement difference of the forward and backward duration is less than the upper limit of the total duration tracking value deviation and the symmetric difference value of the forward and backward duration is less than the upper limit of the symmetric deviation of the forward and backward duration, it is determined that the detection based on the ultrasonic flowmeter is correct, and this detection is ended. After the corresponding test is completed, the average forward and backward duration of this measurement is used to replace the initial correct value of the average forward and backward duration. If the average measurement difference of the forward and backward duration is equal to or greater than the upper limit of the total duration tracking value deviation or the symmetric difference value of the forward and backward duration is equal to or greater than the upper limit of the symmetric deviation of the forward and backward duration, the coupling evaluation of the gas parameter mutation inside the gas pipeline is carried out, and it is judged whether to perform the detection correction adjustment of the ultrasonic flowmeter according to the coupling evaluation result of the gas parameter mutation inside the gas pipeline.
7. The detection and correction method based on the forward and reverse duration of the ultrasonic flowmeter according to claim 6, characterized in that, The specific process of judging whether to perform the detection correction adjustment of the ultrasonic flowmeter according to the coupling evaluation result of the gas parameter mutation inside the gas pipeline is as follows: The signal data of the gas ultrasonic flowmeter is collected through the signal conditioning circuit and the signal-to-noise ratio of the ultrasonic flowmeter and the signal amplitude of the ultrasonic flowmeter are obtained through the software analysis tool. 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 the gas parameter mutation inside the gas pipeline, and the second component correction factor for the coupling evaluation of the gas parameter mutation inside the gas pipeline are directly extracted through the gas component database of the ultrasonic flowmeter. The ratio analysis is performed between 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 it is corrected through the first component correction factor for the coupling evaluation of the gas parameter mutation inside the gas pipeline to obtain the first component of the gas parameter mutation coupling inside the gas pipeline. The ratio analysis is performed between the signal amplitude of the ultrasonic flowmeter and the minimum allowable value of the signal amplitude of the ultrasonic flowmeter, and it is corrected through the second component correction factor for the coupling evaluation of the gas parameter mutation inside the gas pipeline to obtain the second component of the gas parameter mutation coupling inside the gas pipeline. The coupling analysis is performed between 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 through the processing of the ratio analysis with the difference value of the gas parameter mutation evaluation inside the gas pipeline, the coupling evaluation index of the gas parameter mutation inside the gas pipeline is obtained. If the coupling evaluation index of the gas parameter mutation inside the gas pipeline is less than or equal to the threshold value of the coupling evaluation index of the gas parameter mutation inside the gas pipeline, it is judged to re-perform the comparative analysis between the average forward and backward duration for each time and the initial correct value of the average forward and backward duration. If the coupling evaluation index of the gas parameter mutation inside the gas pipeline is greater than the threshold value of the coupling evaluation index of the gas parameter mutation inside the gas pipeline, it is determined to perform the detection, judgment, correction and adjustment of the ultrasonic flowmeter.
8. The detection and correction method based on the forward and reverse duration of the ultrasonic flowmeter according to claim 7, wherein The determination to perform the detection, judgment, correction and adjustment of the ultrasonic flowmeter specifically includes: Performing difference analysis on the average value of the reverse measurement duration of the ultrasonic flowmeter and the average value of the corresponding forward measurement duration of the ultrasonic flowmeter and taking the absolute value to obtain the reverse and forward duration difference value for this time; Performing difference analysis on the average value of the reverse measurement duration of the ultrasonic flowmeter for the previous time and the average value of the corresponding forward measurement duration of the ultrasonic flowmeter and taking the absolute value to obtain the reverse and forward duration difference value for the previous time; Performing difference analysis on 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 on 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.
9. The detection and correction method based on the forward and reverse duration of the ultrasonic flowmeter according to claim 7, wherein The determination to perform the detection, judgment, correction and adjustment of the ultrasonic flowmeter further includes: Performing difference analysis on 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 third mutation value of the reverse and forward duration difference value; Performing difference analysis on 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 fourth mutation value of the reverse and forward duration difference value; If the third mutation value of the reverse and forward duration difference value is equal to or greater than the maximum time difference change threshold, perform the excitation wave period correction or the forward and reverse time difference symmetry correction on the reverse duration according to the type of ultrasonic flowmeter detection method; If the fourth mutation value of the reverse and forward duration difference value is equal to or greater than the maximum time difference change threshold, perform the excitation wave period correction or the forward and reverse time difference symmetry correction on the forward duration according to the type of ultrasonic flowmeter detection method.
10. A detection and correction system based on the forward and reverse duration of an ultrasonic flowmeter, characterized in that, It includes: The ultrasonic sound velocity update module of the gas pipeline, the initialization detection initial correct value module and the detection correction adjustment module: The ultrasonic sound velocity update module of the gas pipeline: 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: used to initialize the detection to obtain the initial correct value of the average forward and reverse duration of the gas pipeline measurement; The detection correction adjustment module: used to compare and analyze the average forward and reverse duration of each time with the initial correct value of the average forward and reverse duration, and judge whether the detection correction is completed or whether adjustment is needed according to the comparison and analysis results.
Citation Information
Patent Citations
Gas ultrasonic flowmeter self-diagnosis method based on sound velocity comparison
CN115371750A
Method, system and equipment for correcting wave hopping phenomenon of gas ultrasonic flowmeter and medium
CN117782271A
Ultrasonic gas meter and gas component analysis method
CN117804558A
Self-diagnosis method of gas ultrasonic flowmeter
CN119984455A
The calibration method, applied in operating conditions, for ultrasonic flow meters used for measuring volume and flow rate of single-phase liquid media
WO2013006090A1
Cited By
Ultrasonic water meter flow measurement and correction system based on Internet of Things
CN120869278A