A detection and correction method and system based on the forward and reverse time length of an ultrasonic flowmeter
By real-time update of the sound speed and initialization detection of the ultrasonic flowmeter, combined with the characteristics of medium condition stability, the problem of insufficient adaptability of the calibration environment of the ultrasonic flowmeter forward and reverse time detection is solved, and more accurate and stable flow measurement is achieved.
Patent Information
- Application Number
- CN202510734001.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-20
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-15
- 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 unstable signal and easily lead to measurement errors or failures.
By updating the actual sound speed of ultrasonic waves in the gas pipeline in real time, the initial detection obtains the initial correct value of the average value of the forward and reverse time duration, and comparatively analyze and determine whether the detection and correction are completed or adjusted, and use the stability characteristics of the media condition for diagnosis and correction.
The environmental adaptability of the ultrasonic flowmeter forward and reverse time detection and correction is improved, the measurement accuracy and robustness are ensured, the flow measurement deviation caused by environmental changes is reduced, and the sudden change in media conditions is adapted to the media.
Smart Images

Figure CN120252878B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasonic flowmeter data processing, and in particular to a detection and correction method and system based on forward and reverse time lengths of an ultrasonic flowmeter. Background Art
[0002] With the development of industrial production, the requirements for accurate and reliable flow measurement continue to increase. Traditional flow measurement methods often require intrusion into pipelines, which not only increases the difficulty of installation and maintenance but also may disrupt the production process. Non-invasive ultrasonic flowmeters have emerged to meet the modern industrial demand for accurate and reliable flow measurement. Ultrasonic flowmeters are widely used in industries such as oil and gas, chemicals, pharmaceuticals, and food processing. In these industries, accurate and reliable flow measurement is crucial for production efficiency, product quality, safety, and environmental protection.
[0003] Ultrasonic flowmeters measure a wide variety of media types, pressures, and temperatures, and their operating conditions are extremely complex. Therefore, the signal received by the transducer at the receiving end of a gas ultrasonic flowmeter during measurement is only below the millivolt level and is highly unstable. After amplification by the amplifier, the output signal not only struggles to maintain its amplitude within the target range, but is also often mixed with various noise signals. Whether using zero-crossing detection technology or a time-of-day ultrasonic flowmeter using correlation measurement technology, the amplified received wave signal can easily lead to inaccurate forward and reverse time measurements due to unstable signal amplitude or noise interference, thus causing time-of-day measurement errors. This is even more pronounced when zero-crossing detection technology is used, resulting in inaccurate flow measurement at best and significant flow deviations or even failure to operate normally in severe cases.
[0004] For example, the invention patent with publication number CN117786362A discloses an ultrasonic time difference processing method for a multi-channel ultrasonic water meter, which includes: collecting the original ultrasonic time difference of each channel respectively; performing data filtering processing on the original ultrasonic time difference of each channel; performing multi-segment fitting processing on the original ultrasonic time difference of each channel after the data filtering processing; storing the data results of the filtering processing and the multi-segment fitting processing in a temporary array; and performing linear normalization processing on the ultrasonic time difference of each channel after the multi-segment fitting processing to obtain the ultrasonic time difference after the linear normalization processing of each channel and the correction coefficient and compensation coefficient of each channel.
[0005] For example, the invention patent with announcement number: CN119066598B discloses an ultrasonic gas meter measurement data optimization method and system, which includes: obtaining a gas meter distribution map from a database, and installing an ultrasonic gas meter according to the distribution map; determining whether the ultrasonic gas meter is installed in the forward direction; determining whether the ultrasonic gas meter passes the anti-dismantling detection; determining whether there is a small flow leakage in the gas meter; calculating the error value through the recorded value in the gas meter and the actual gas flow; correcting the gas meter according to the error value; determining whether the actual gas usage after the error correction meets the safe gas usage standard; if yes, completing the gas meter data optimization; if not, issuing a reminder signal.
[0006] However, in the process of implementing the technical solutions of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:
[0007] In the existing technology, most ultrasonic flowmeters currently in use on the market use the time difference method as their measurement principle. Zero-crossing detection or correlation methods are generally used to measure the forward and reverse transmission time of ultrasonic waves in closed pipes. However, due to complex operating conditions, factors such as disturbed flow, pipe noise, ambient electromagnetic radiation, low medium pressure or composition, etc., the amplified received wave signal may be very unstable. For example, the commonly used conventional zero-crossing detection method or correlation method may lead to errors in the measurement of duration and time difference. In particular, the use of the zero-crossing detection method is more prone to erroneous measurements or even measurement failures due to wave skipping. There is a problem that the detection and correction methods based on the forward and reverse time of ultrasonic flowmeters are not adaptable to the environment. Summary of the Invention
[0008] The embodiments of the present application solve the problem in the prior art of insufficient environmental adaptability of detection and correction based on the forward and reverse time lengths of ultrasonic flow meters by providing a detection and correction method and system based on the forward and reverse time lengths of ultrasonic flow meters, thereby achieving the effect of improving the environmental adaptability of detection and correction based on the forward and reverse time lengths of ultrasonic flow meters.
[0009] An embodiment of the present application provides a detection and correction method based on the forward and reverse time of an ultrasonic flow meter, comprising the following steps: updating the actual sound velocity of the ultrasonic wave in the gas pipeline according to the collected gas pipeline state parameters; initializing the detection to obtain the initial correct value of the average forward and reverse time value measured in the gas pipeline; comparing and analyzing the average forward and reverse time value of each time with the initial correct value of the average forward and reverse time value, and judging whether the detection and correction is completed or whether to make adjustments based on the comparison and analysis results.
[0010] The present application provides a detection and correction system based on the forward and reverse duration of an ultrasonic flowmeter, comprising: a gas pipeline ultrasonic sound velocity update module, an initial 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 gas pipeline ultrasonic sound velocity based on the collected gas pipeline state parameters; the initial detection initial correct value module is used to initialize the detection and obtain the initial correct value of the average forward and reverse duration measured in the gas pipeline; and the detection and correction adjustment module is 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 determine whether the detection and correction is complete or whether adjustments should be made based on the comparison and analysis results.
[0011] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0012] 1. The present invention enhances measurement accuracy by updating the actual sound velocity of ultrasound in the gas pipeline in real time, ensures the measurement accuracy of the forward and reverse time through initialization detection and comparative analysis, and performs correction when necessary. By analyzing and correcting the forward and reverse time, the flow measurement deviation caused by environmental changes and measurement errors is reduced; the effect of improving the environmental adaptability of the ultrasonic flowmeter in detecting and correcting the forward and reverse time is achieved, solving the problem of insufficient environmental adaptability of the ultrasonic flowmeter in detecting and correcting the forward and reverse time in the prior art.
[0013] 2. By evaluating the sudden changes in gas parameters inside the gas pipeline, it is determined whether correction adjustments are needed. This ensures that when the medium conditions suddenly change, the measurement results can be adjusted in time, thereby ensuring that the detection and correction of the forward and reverse time of the ultrasonic flowmeter remains accurate even when the environment suddenly changes.
[0014] 3. By collecting the state parameters of the gas pipeline in real time, the actual propagation speed of the ultrasonic wave under the current medium conditions is calculated. Through continuous measurement and data analysis, the initial correct value of the forward and reverse duration is obtained. This step ensures an accurate baseline value for subsequent measurements, facilitating subsequent comparative analysis. By comparing and analyzing the average forward and reverse duration values of each measurement with the initial correct value, corrections are made if the measurement results deviate significantly. This ensures that the detection and correction process can adapt to the ever-changing medium conditions and improves the robustness of the ultrasonic flowmeter's forward and reverse duration detection and correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flow chart of a detection and correction method based on the forward and reverse time length of an ultrasonic flow meter provided in an embodiment of the present application;
[0016] Figure 2 A schematic diagram of the acoustic channel structure layout of a pipe-type ultrasonic flowmeter provided in an embodiment of the present application;
[0017] Figure 3 A flow chart for collecting gas pipeline status parameters, updating the actual ultrasonic sound velocity in the gas pipeline, and detecting the process during processing provided in an embodiment of the present application;
[0018] Figure 4 A flowchart for comparing and analyzing the average forward and reverse durations of each time with the initial correct value of the average forward and reverse durations provided in an embodiment of the present application;
[0019] Figure 5 A schematic diagram of a process for determining and correcting an ultrasonic flowmeter according to an embodiment of the present application;
[0020] Figure 6 This is a structural diagram of a detection and correction system based on the forward and reverse time length of an ultrasonic flow meter provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The embodiments of the present application solve the problem of insufficient environmental adaptability of detection and correction based on the forward and reverse time of an ultrasonic flow meter in the prior art by providing a detection and correction method and system based on the forward and reverse time of an ultrasonic flow meter. By updating the sound velocity, setting an initial value, and performing comparative analysis to determine whether the correction is completed and whether adjustment is required, the effect of improving the environmental adaptability of detection and correction of the forward and reverse time of an ultrasonic flow meter is achieved.
[0022] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0023] like Figure 1 As shown, it is a flow chart of a detection and correction method based on the forward and reverse time of an ultrasonic flow meter provided in an embodiment of the present application. The method is applied to a detection and correction system based on the forward and reverse time of an ultrasonic flow meter. The method includes the following steps: updating the actual sound velocity of the ultrasonic wave in the gas pipeline according to the collected gas pipeline state parameters; initializing the detection to obtain the initial correct value of the average forward and reverse time value measured in the gas pipeline; comparing and analyzing the average forward and reverse time value of each time with the initial correct value of the average forward and reverse time value, 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 the accuracy of forward and reverse time measurements. Specifically, under normal measurement conditions, the medium is generally stable. Although the time difference between forward and reverse propagation is proportional to the medium flow rate, the sum of the forward and reverse time durations changes gradually and is generally stable over a short period of time. Furthermore, at different flow rates, the forward and reverse time durations are generally symmetrical about a reference point for the forward and reverse time durations. Furthermore, for high-precision, fast-measuring ultrasonic flowmeters, the time interval between two adjacent measurements is very short, and the change in the time difference between the two adjacent measurements is limited. By comprehensively utilizing these characteristics, the accuracy of the forward and reverse time duration measurements can be diagnosed and corrected, thereby ensuring accurate measurement of the time difference and total time duration, thereby improving the accuracy and reliability of the ultrasonic flowmeter.
[0025] like Figure 2 As shown in FIG. 1 , an example diagram of the acoustic channel structure layout of the pipe segment ultrasonic flowmeter provided in an embodiment of the present application is shown. Transducers A and B are a pair of ultrasonic transducers installed in the same acoustic channel, respectively installed upstream and downstream of the measuring pipe segment. The angle between the center line of the two transducers and the central axis of the pipe segment is (The central axis is parallel to the flow direction V in the figure.) Assuming that the transmission speed of ultrasonic waves in a stationary fluid is c, and the flow velocity of the fluid along the axial direction of the pipe is v, then when the ultrasonic wave is emitted by the upstream ultrasonic transducer A and received by the downstream transducer B (called "positive direction"), it can be seen from the figure that the velocity component of the fluid flow velocity in the direction of the sound channel is less than the flow velocity of the fluid along the axial direction of the pipe, which is , then the actual propagation speed of the ultrasonic wave along the sound channel direction (i.e. the connecting line of the two transducer centers) is the speed of sound and the velocity component of the fluid flow in the direction of the acoustic channel The sum is: ;
[0026] On the contrary, when the ultrasonic wave is emitted by the downstream ultrasonic transducer B and received by the upstream transducer A (called "reverse"), the actual propagation speed of the ultrasonic wave along the sound channel is the speed of sound. and the velocity component of the fluid in the direction of the acoustic channel The difference is: ;
[0027] Assuming that the distance between the two end surfaces of ultrasonic transducers A and B, i.e., the length of the sound channel, is L, the reverse propagation time (upstream) and forward propagation time (downstream) of the ultrasonic signal in the fluid are:
[0028] Forward duration: ;
[0029] Reverse duration: ;
[0030] The total duration (the sum of the forward and reverse durations) is: ;
[0031] Because the flow velocity v of the fluid in different flow meters is generally: gas v is less than 25m / s, liquid v is less than 10m / s, and the sound velocity of ultrasound in different media is generally: in air Greater than 300m / s, in natural gas More than 400m / s, underwater Greater than 1000m / s, so the fluid velocity is much smaller than the propagation speed of ultrasonic waves in different media, then v is much smaller than , the formula can be simplified to: ;
[0032] Let the average forward and reverse time be ,but: ;
[0033] It can be concluded that under the condition that the medium conditions remain basically unchanged, the medium flow velocity is much lower than the sound velocity of the ultrasonic wave in the medium. , the total duration of ultrasonic forward and reverse Or forward and reverse time reference value It is basically related to the length of the sound channel L and the speed of ultrasound in a stationary medium. It is related to the flow rate v of the medium, but has basically nothing to do with the flow rate v of the medium.
[0034] Secondly, the difference between the reverse duration and the forward and reverse duration reference value is: ; because v is much smaller than ,but ;
[0035] Similarly, the difference between the forward and reverse duration reference value and the forward duration is: ; because v is much smaller than ,but ;
[0036] Combine ; then: ;
[0037] It can be concluded that under the condition that the medium conditions remain basically unchanged, the medium flow velocity is much lower than the sound velocity of the ultrasonic wave in the medium. , the difference between the forward and reverse time reference value and the forward time ) and the difference between the reverse time and the forward and reverse time reference value ( ) are basically equal, that is, the forward and reverse durations ( ) is the average of the positive and negative time The two sides of the center point are basically symmetrical.
[0038] In summary, it can be considered that when the ultrasonic flowmeter is measuring the same medium and the medium conditions have not changed significantly, the average forward and reverse time (or the total forward and reverse time) is basically unchanged. This feature can be used to determine whether the total forward and reverse time of each channel after each measurement is correct. It can be considered that when the ultrasonic flowmeter is measuring the same medium and the medium conditions have not changed significantly, the average forward and reverse time ( ) Whether to use the average of the total duration The two sides of the center point are basically symmetrical to determine whether the error occurs in the forward or reverse duration measurement, so as to make corrections based on whether the total duration is correct. In the subsequent steps, it is also recorded as the "forward and reverse duration reference value".
[0039] Furthermore, the actual sound velocity of the ultrasonic wave in the gas pipeline is updated according to the collected gas pipeline state parameters, specifically including: respectively collecting the gas pressure, gas absolute temperature, gas component data and gas average molar mass through the pressure sensor, temperature sensor and gas chromatograph deployed in the corresponding gas pipeline; directly extracting the universal gas constant through the ultrasonic flowmeter gas component database; obtaining the corresponding adiabatic index, gas compressibility factor and pressure correction coefficient through the pre-stored data association relationship table of the ultrasonic flowmeter gas component database; and calculating the actual sound velocity of the ultrasonic wave in the gas pipeline through the gas pipeline ultrasonic actual sound velocity correction model in combination with the gas pressure, gas absolute temperature, gas component data, gas average molar mass, adiabatic index, gas compressibility factor and pressure correction coefficient.
[0040] In this embodiment, if Figure 3 As shown, this is a flowchart of collecting gas pipeline status parameters, updating the actual sound velocity of gas pipeline ultrasound, and detecting during processing provided by an embodiment of the present application. If in a specific application scenario, for example, in natural gas pipeline monitoring, the corresponding sensor meets the explosion-proof design, 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) and equipped with a seismic bracket to collect gas pressure.
[0042] Temperature sensor: Use an insertable digital or analog probe, inserted into the pipe at 1 / 3 of its diameter, to avoid wall temperature lag. This stabilizes downstream flow and reduces pressure pulsation interference. Direct contact with the gas improves temperature measurement accuracy and allows for accurate measurement of absolute gas temperature.
[0043] The actual sound velocity correction model of ultrasonic waves in gas pipelines is as follows:
[0044] ;
[0045] Indicates the actual sound velocity of ultrasonic waves in gas pipelines.
[0046] Represents the adiabatic index, calculated based on gas composition. For example, when methane dominates, γ≈1.31. The ultrasonic flowmeter gas composition database provides a table of adiabatic indices for different gas components. By inputting real-time pipeline gas composition data, the adiabatic index of the corresponding component is obtained.
[0047] Indicates the gas compressibility factor, which is calculated based on gas pressure and gas absolute temperature. The gas compressibility factor-gas pressure-gas absolute temperature relationship table is pre-stored in the ultrasonic flowmeter gas component database. The real-time gas pressure and gas absolute temperature are input to obtain the corresponding gas compressibility factor.
[0048] Represents the universal gas constant, with a fixed value of R=8.314 J / (mol\cdotpK), which is directly obtained from the ultrasonic flowmeter gas composition database.
[0049] Indicates the absolute temperature of the gas, which is measured and collected in real time by the temperature sensor.
[0050] Example of a natural gas pipeline gas chromatograph installation and deployment: Explosion-proof requirements: The chromatograph and probe must be ATEX / IECEx Zone 1 certified, and the control cabinet must be flameproof. Redundant configuration: Dual power supplies (24VDC + UPS) and dual communication links (fiber optic + cellular network). Main pipeline deployment: 10D downstream of the straight pipeline section (to avoid turbulence), with the probe inserted at the pipeline centerline. Bypass design: An independent sampling bypass (1 / 5 the main pipe diameter) is used to match the flow rate to prevent component stratification. Component concentrations are output via 4-20mA / HART, and spectral data is uploaded via Modbus TCP / IP encryption. 72 hours of data is cached locally, and satellite communication (Iridium / Starlink) ensures transmission to remote locations. Online calibration: Standard gas (a mixture of CH4 / C3H8 / CO2 / N2) is introduced daily to correct response factors. Filters are replaced monthly (alarm alarm for pressure differentials > 10kPa); the column is backflushed and purged every six months.
[0051] It represents the average molar mass of gas (kg / mol). The gas chromatograph measures the volume fractions of the gas components in the corresponding gas pipeline in real time, and calculates the weighted average to obtain the average molar mass of gas.
[0052] Indicates the pressure correction factor, ;in, Indicates gas pressure, Represents a component-related constant. For example, if the pipeline is a natural gas pipeline, the ultrasonic flowmeter's gas composition database stores a table of component-related constants for different gas components. By inputting real-time pipeline gas composition data, the corresponding component-related constants are obtained. Combined with the real-time gas pressure and absolute gas temperature, the real-time pressure correction coefficient is calculated.
[0053] The actual sound velocity of the gas pipeline ultrasonic wave is obtained based on the above parameters. It should be noted that the actual sound velocity of the gas pipeline ultrasonic wave is a theoretical value.
[0054] Furthermore, updating the actual sound velocity of the gas pipeline ultrasound according to the collected gas pipeline state parameters also includes: directly extracting the gas absolute temperature standard value, gas pressure standard value, gas average molar mass standard value, gas average droplet content correction factor for sound velocity, the first proportional factor for evaluating characteristic changes of gas parameter mutations inside the gas pipeline, the second proportional factor for evaluating characteristic changes of gas parameter mutations inside the gas pipeline, and the third proportional factor for evaluating characteristic changes of gas parameter mutations inside the gas pipeline; performing a ratio analysis on the absolute temperature of the gas and the standard value of the absolute temperature of the gas, performing characteristic correction by the first proportional factor for evaluating characteristic changes of gas parameter mutations inside the gas pipeline, and obtaining a correction component for the absolute temperature of the gas; performing a ratio analysis on the gas pressure and the standard value of the gas pressure, and performing a ratio analysis on the gas parameter mutations inside the gas pipeline by the second proportional factor for evaluating characteristic changes of gas parameter mutations inside the gas pipeline. Perform characteristic correction to obtain the gas pressure proportion correction component; perform ratio analysis on the gas average molar mass and the gas average molar mass standard value, perform characteristic correction through the third proportional factor of the gas parameter mutation assessment characteristic change inside the gas pipeline, and obtain the gas average molar mass proportion correction component; couple the gas absolute temperature proportion correction component, the gas pressure proportion correction component and the gas average molar mass proportion correction component, and correct the sound velocity correction factor of the gas average droplet content to obtain the gas parameter mutation assessment index inside the gas pipeline; perform difference analysis on the gas parameter mutation assessment index of the gas parameter mutation assessment points inside the gas pipeline at adjacent gas factor time monitoring points to obtain the gas parameter mutation assessment difference inside the gas pipeline; perform comparative analysis based on the gas parameter mutation assessment difference inside the gas pipeline, and update the actual sound velocity of the gas pipeline ultrasound according to the comparative analysis result.
[0055] In this embodiment, the gas space monitoring points inside the gas pipeline are numbered. Indicates the number of gas space monitoring points inside the gas pipeline. Indicates the total number of gas space monitoring points inside the gas pipeline.
[0056] Number the gas factor time monitoring points inside the gas pipeline. Indicates the number of gas factor time monitoring points inside the gas pipeline, Indicates the total number of gas factor time monitoring points inside the gas pipeline.
[0057] Indicates the The first monitoring point of the gas space inside the gas pipeline The gas parameter mutation assessment index of the gas pipeline internal gas factor time monitoring point is used to quantify the mutation degree level of the gas influencing factors inside the gas pipeline.
[0058] In actual deployment, a gas space monitoring point inside a gas pipeline corresponds to at least one gas factor time monitoring point inside the gas pipeline.
[0059] ;
[0060] ;
[0061] ;
[0062] Indicates the The first monitoring point of the gas space inside the gas pipeline The difference in the assessment of the sudden change of gas parameters inside the gas pipeline at each gas factor time monitoring point inside the gas pipeline.
[0063] Indicates the The first monitoring point of the gas space inside the gas pipeline The absolute temperature of the gas at each gas pipeline internal gas factor time monitoring point;
[0064] It represents the standard value of absolute temperature of gas, which is directly extracted from the ultrasonic flowmeter gas component database.
[0065] Indicates the The first monitoring point of the gas space inside the gas pipeline Gas pressure at each gas pipeline internal gas factor time monitoring point;
[0066] Indicates the standard value of gas pressure, which is directly extracted from the ultrasonic flowmeter gas component database.
[0067] Indicates the The first monitoring point of the gas space inside the gas pipeline The average molar mass of gas at each gas factor time monitoring point inside the gas pipeline;
[0068] It represents the standard value of the average molar mass of the gas, which is directly extracted from the ultrasonic flowmeter gas component database.
[0069] Indicates the The first monitoring point of the gas space inside the gas pipeline The correction factor of the average gas droplet content for the sound velocity at the gas factor time monitoring point inside the gas pipeline has a value range of 0 to 1. The correction factor of the average gas droplet content for the sound velocity is directly extracted from the ultrasonic flowmeter gas component database.
[0070] If the gas contains a certain amount of dispersed droplets, the droplets scatter the sound waves and the particles absorb the signals, resulting in a decrease in the actual sound velocity of the ultrasonic wave in the gas pipeline.
[0071] An example method for obtaining the correction factor for average gas droplet content to sound velocity is to simulate a wet gas environment with varying droplet concentrations in the laboratory. The actual propagation velocity of ultrasonic waves is measured and compared with the theoretical sound velocity to calculate the correction factor. A mapping table is then created between droplet concentration and average gas droplet content to sound velocity correction factor, which is stored in the ultrasonic flowmeter's gas composition database. This method is applicable to ultrasonic flow measurement scenarios in multiphase flow pipelines, such as natural gas and wet gas. By inputting the real-time average gas droplet content, the corresponding correction factor for average gas droplet content to sound velocity is obtained.
[0072] The first proportional factor representing the characteristic change of the sudden change assessment of gas parameters inside the gas pipeline is directly extracted from the ultrasonic flowmeter gas component database.
[0073] The second proportional factor representing the characteristic change of the sudden change assessment of gas parameters inside the gas pipeline is directly extracted from the ultrasonic flowmeter gas component database.
[0074] The third proportional factor representing the characteristic change of the sudden change assessment of gas parameters inside the gas pipeline is directly extracted from the ultrasonic flowmeter gas component database.
[0075] In gas pipelines, the accumulation of deposits and scaling on the inner walls of pipelines is a core factor that can simultaneously affect the three proportional factors used in gas parameter mutation assessments. This can alter the flow pattern, thermodynamic properties, and component distribution, leading to coordinated changes in temperature, pressure, and sonic velocity correction factors. Solid deposits (such as wax, hydrates, and corrosion products) accumulate on the inner walls of pipelines over long periods of operation, increasing roughness, reducing the effective pipe diameter, and distorting the local flow field. Deposits reduce the heat transfer efficiency of the pipe walls, hindering heat exchange between the gas and the outside world, and increasing local temperature gradients. Deposits reduce the effective pipe diameter, increasing frictional pressure drop, and raising local pressure. Deposits induce vortices, leading to increased pressure pulsations. Deposits flak off to form solid particles or droplets, which adsorb light components, increasing the average molar mass of the gas.
[0076] Ultrasonic wall thickness testing: an external ultrasonic probe measures the remaining thickness of the pipe wall, and the deposit thickness is calculated by subtracting the remaining thickness from the original wall thickness.
[0077] Through experimental simulation examples: the sediment thickness is 2mm; temperature mutation: ΔT=8℃ (normal range ±2℃), the first proportional factor contribution is 0.8; pressure mutation: ΔP=0.3MPa (normal ±0.1MPa), the second proportional factor contribution is 1.2; droplet correction factor mutation: α increases from 0.1 to 0.25 (normal ≤0.15), the third proportional factor contribution is 1.0; normalization processing is performed, and the corresponding gas pipeline internal gas parameter mutation assessment characteristic change first proportional factor is 0.27, the gas pipeline internal gas parameter mutation assessment characteristic change second proportional factor is 0.4, the gas pipeline internal gas parameter mutation assessment characteristic change The third proportional factor of the mutation assessment characteristic change is 0.33. Through multiple sets of experimental data, a mapping relationship between the thickness of gas pipeline deposits and the corresponding first proportional factor of the mutation assessment characteristic change of gas parameters inside gas pipelines, the second proportional factor of the mutation assessment characteristic change of gas parameters inside gas pipelines, and the third proportional factor of the mutation assessment characteristic change of gas parameters inside gas pipelines is constructed. The thickness of gas pipeline deposits is input to obtain the corresponding first proportional factor of the mutation assessment characteristic change of gas parameters inside gas pipelines, the second proportional factor of the mutation assessment characteristic change of gas parameters inside gas pipelines, and the third proportional factor of the mutation assessment characteristic change of gas parameters inside gas pipelines.
[0078] Furthermore, the actual sound velocity of the gas pipeline ultrasonic wave is updated according to the comparative analysis results, specifically including: if the difference in the gas parameter mutation assessment inside the gas pipeline is less than or equal to the gas parameter mutation assessment reference value inside the gas pipeline, then the actual sound velocity of the gas pipeline ultrasonic wave is updated at a predefined time interval; if the difference in the gas parameter mutation assessment inside the gas pipeline is greater than the gas parameter mutation assessment reference value inside the gas pipeline, then the subsequent initialization detection is suspended, recorded as a flow rate mutation state, and the above comparative analysis is performed again after a predefined detection time interval. If at this time the difference in the gas parameter mutation assessment inside the gas pipeline is less than or equal to the gas parameter mutation assessment reference value inside the gas pipeline, then the actual sound velocity of the gas pipeline ultrasonic wave is updated at a predefined time interval. If at this time the difference in the gas parameter mutation assessment inside the gas pipeline is still greater than the gas parameter mutation assessment reference value inside the gas pipeline, then the relevant personnel are notified to check the gas pipeline status and the ultrasonic flowmeter status.
[0079] In this embodiment, if the difference in the gas parameter mutation assessment inside the gas pipeline is greater than the reference value for the gas parameter mutation assessment inside the gas pipeline, the following example scenarios may occur: 1. The medium condition mutation causes the reference value to become invalid, and the gas sound velocity It is extremely sensitive to changes in temperature T, pressure P and composition. For example, 2. Pressure / temperature changes in gas pipelines are more frequent, for example, the operation of the pressure reducing valve at the pressure regulating station or the temperature difference between day and night. The sudden drop in pressure during the pressure regulation process causes a sudden change in the speed of sound. The update delay increases the misjudgment rate of subsequent gas ultrasonic flowmeters. 3. Rapid release or emergency shut-off of high-pressure gas, such as the emergency shut-off of a natural gas pipeline and the rapid closing of valves, causes a sudden change in the speed of sound.
[0080] In the above cases, the detection method of the forward and reverse time of the ultrasonic flowmeter has a large error and monitoring needs to be suspended.
[0081] Furthermore, the initialization detection obtains the initial correct value of the average forward and reverse time length of the gas pipeline measurement, specifically including: after the actual sound velocity of the gas pipeline ultrasound is updated, the ultrasonic flowmeter is used to perform a predefined number of consecutive measurements to obtain the forward and reverse time length reference values for the predefined number of times, and the two adjacent forward and reverse time length reference values are subjected to difference analysis and the absolute value is taken to obtain the adjacent difference of the forward and reverse time length reference values. If the adjacent difference of the forward and reverse time length reference values is less than or equal to the adjacent difference threshold of the forward and reverse time length reference values, the corresponding forward and reverse time length reference value is retained. If the adjacent difference of the forward and reverse time length reference values is greater than the adjacent difference threshold of the forward and reverse time length reference values, the Pearson correlation coefficient of the corresponding ultrasonic flowmeter receiving waveform and the template waveform is calculated by predefined software to obtain the waveform similarity correlation coefficient. If the waveform similarity correlation coefficient is greater than the waveform similarity correlation coefficient judgment threshold, the corresponding forward and reverse time length reference value is retained. If the threshold is determined, the corresponding forward and reverse time reference value is discarded; the retained forward and reverse time reference values are summed and averaged to obtain the forward and reverse time reference value average value; the corresponding forward and reverse time actual value is calculated by the actual sound velocity of the gas pipeline ultrasound, if the forward and reverse time actual value is analyzed with the average value of the forward and reverse time reference value and the absolute value is taken to obtain the gas pipeline ultrasound sound velocity difference, if the gas pipeline ultrasound sound velocity difference is less than the gas pipeline ultrasound sound velocity difference threshold, it is judged that the initialization detection is successful, and the forward and reverse time reference average value is recorded as the initial correct value of the forward and reverse time average value, if the gas pipeline ultrasound sound velocity difference is equal to or greater than the gas pipeline ultrasound sound velocity difference threshold, it is judged that the initialization detection has failed, and the initialization detection is performed again to obtain the initial correct value of the forward and reverse time average value measured in the gas pipeline, if the predefined initialization detection allowed time has passed and the initialization detection is still judged to have failed, the relevant personnel are notified to check the gas pipeline status and the ultrasonic flowmeter status.
[0082] In this embodiment, the actual value of the forward and reverse time is calculated by the actual sound velocity of the ultrasonic wave in the gas pipeline according to the above. Under the condition that the medium conditions remain basically unchanged, the medium flow velocity is much lower than the sound velocity of the ultrasonic wave in the medium. , the total duration of ultrasonic forward and reverse Or forward and reverse time reference value It is basically related to the length of the sound channel L and the speed of ultrasound in a stationary medium. It is related to the flow rate v of the medium, but has basically nothing to do with the flow rate v of the medium.
[0083] like Figure 4 As shown, it is a flow chart provided in an embodiment of the present application for comparing and analyzing the average value of each forward and reverse duration with the initial correct value of the average value of the forward and reverse duration.
[0084] Number N = 20, single measurement cycle ≤ 100ms (total duration ≤ 2 seconds to avoid interference from flow field changes). Excitation frequency 200kHz, receiving signal bandwidth ≥ 500kHz (to capture the complete waveform).
[0085] To calculate the Pearson correlation coefficient, you can directly call it through Python. The sample code is as follows:
[0086] import numpy as np
[0087] def align_and_compute_correlation(received_signal, template):
[0088] # Calculate 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 interception 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([]) # Receive 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 lower than the threshold, where the threshold 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 to be abnormal.
[0108] Example: After removing three wave jumps from 20 measurements, the weighted average of the remaining 17 measurements yields an initial forward and reverse time reference value of 284.3 μs.
[0109] In each subsequent round of measurement, multiple measurements are taken to obtain the reverse and forward durations of each time, and whether the measurement is correct is determined. If correct, the initial correct value of the average forward and reverse duration is updated with the average forward and reverse duration of the new round of correct measurements to meet the need for the initial correct value of the average forward and reverse duration to adapt to environmental changes in actual applications.
[0110] Furthermore, the average value of each forward and reverse duration is compared with the initial correct value of the average value of the forward and reverse duration, specifically including: performing difference analysis on the absolute value of the average value of the forward and reverse duration in each measurement and the initial correct value of the average value of the forward and reverse duration to obtain the average measurement difference of the forward and reverse duration at each time; performing difference analysis on the forward duration in each measurement and the initial correct value of the average value of the forward and reverse duration to obtain the difference between the forward duration and the initial correct value of the average value of the forward and reverse duration at each time; performing difference analysis on the reverse duration in each measurement and the average value of the forward and reverse duration to obtain the difference between the reverse duration and the initial correct value of the average value of the forward and reverse duration; comparing the difference between the initial correct value of the forward and reverse duration and the initial correct value of the average value of the reverse duration at each time The absolute value of the difference between the correct values is used for difference analysis to obtain the symmetrical difference value of the forward and reverse time for each time; if the average measured difference between the forward and reverse time is less than the upper limit of the total time tracking value deviation and the symmetrical difference between the forward and reverse time is less than the upper limit of the symmetrical deviation of the forward and reverse time, then it is judged that the detection based on the ultrasonic flowmeter is correct, and the detection is ended. After the corresponding test is completed, the initial correct value of the average forward and reverse time is replaced by the average forward and reverse time measured this time; if the average measured difference between the forward and reverse time is equal to or greater than the upper limit of the total time tracking value deviation or the symmetrical difference between the forward and reverse time is equal to or greater than the upper limit of the symmetrical deviation of the forward and reverse time, then a sudden change coupling assessment of the gas parameters inside the gas pipeline is performed, and it is determined whether to perform ultrasonic flowmeter detection, judgment, correction and adjustment based on the results of the sudden change coupling assessment of the gas parameters inside the gas pipeline.
[0111] In this embodiment, different ultrasonic flowmeter measurement times are numbered. Indicates the number of ultrasonic flowmeter measurements. The total number of measurement times of the ultrasonic flowmeter.
[0112] The initial correct value of the average forward and reverse duration is recorded as ;
[0113] Calculate the average forward and reverse duration in each measurement, ; Indicates the The average forward and reverse time of ultrasonic flowmeter measurement; Indicates the The average forward time of ultrasonic flowmeter measurement; Indicates the The average reverse time of ultrasonic flowmeter measurement;
[0114] The measured difference between the average forward and reverse duration of each time and the initial correct value of the average forward and reverse duration, ; Indicates the The difference between the average forward and reverse duration and the initial correct value of the average forward and reverse duration;
[0115] Calculate the difference between the initial correct value of the average forward and reverse time lengths for each time. Indicates the The ultrasonic flowmeter measures the difference between the initial correct values of the forward and reverse time averages;
[0116] Calculate the difference between the initial correct value of the average value of the reverse and forward and reverse time. Indicates the The ultrasonic flowmeter measures the difference between the initial correct values of the average values of the reverse and forward and reverse time;
[0117] Get the symmetrical difference value of the forward and reverse duration of each time, ;
[0118] If the difference between the forward and reverse duration and the initial correct value of the forward and reverse duration average value is less than the upper limit of the total duration tracking value deviation and the forward and reverse duration symmetry difference value is less than the upper limit of the forward and reverse duration symmetry deviation, then after the corresponding test is completed, the newly measured forward and reverse duration average value is replaced as the new initial correct value of the forward and reverse duration average value. This ensures that the forward and reverse duration reference value can track the gradual change process of medium conditions such as temperature, pressure and composition.
[0119] That is, if and , then it is judged that the detection is correct, and the average value of the positive and negative time lengths of the iteration is the initial correct value.
[0120] in The upper limit of the total time tracking value deviation is generally set to 0.45~0.5 times the excitation wave period. For example, if the gas ultrasonic flowmeter uses 200kHz square wave excitation, the maximum deviation is generally It can be set to 2.25us~2.5us. It is the upper limit of the symmetric deviation of the forward and reverse time lengths, and is generally set to 0.9~1 times the excitation wave period.
[0121] Furthermore, the specific process of judging whether to perform ultrasonic flowmeter detection, judgment, correction and adjustment based on the result of gas parameter mutation coupling assessment inside the gas pipeline is as follows: collecting signal data of the gas ultrasonic flowmeter through the signal conditioning circuit and analyzing through the software analysis tool to obtain the signal signal-to-noise ratio of the ultrasonic flowmeter and the signal amplitude of the ultrasonic flowmeter; directly extracting the minimum allowable value of the signal 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 of the gas parameter mutation coupling assessment inside the gas pipeline and the second component correction factor of the gas parameter mutation coupling assessment inside the gas pipeline through the ultrasonic flowmeter gas component database; performing a ratio analysis on the signal signal-to-noise ratio of the ultrasonic flowmeter and the minimum allowable value of the signal signal-to-noise ratio of the ultrasonic flowmeter, and correcting it through the first component correction factor of the gas parameter mutation coupling assessment inside the gas pipeline to obtain the first component of the gas parameter mutation coupling assessment inside the gas pipeline; comparing the signal amplitude of the ultrasonic flowmeter with the ultrasonic flowmeter The minimum allowable value of the signal amplitude of the acoustic flowmeter is subjected to a proportion analysis, and is corrected by the second component correction factor of the gas parameter mutation coupling assessment inside the gas pipeline to obtain the second component of the gas parameter mutation coupling inside the gas pipeline; 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 are coupled and analyzed, and then the difference with the gas parameter mutation assessment inside the gas pipeline is subjected to a proportion analysis to obtain the gas parameter mutation coupling assessment index inside the gas pipeline; if the gas parameter mutation coupling assessment index inside the gas pipeline is less than or equal to the gas parameter mutation coupling assessment index threshold value, it is determined that the average value of the forward and reverse time lengths of each time is compared with the initial correct value of the average value of the forward and reverse time lengths again; if the gas parameter mutation coupling assessment index inside the gas pipeline is greater than the gas parameter mutation coupling assessment index threshold value, it is determined that the ultrasonic flowmeter detection, judgment, and correction adjustment are performed.
[0122] In this embodiment, the gas space monitoring points inside the gas pipeline are numbered. Indicates the number of gas space monitoring points inside the gas pipeline. Indicates the total number of gas space monitoring points inside the gas pipeline.
[0123] Number the gas factor time monitoring points inside the gas pipeline. Indicates the number of gas factor time monitoring points inside the gas pipeline, Indicates the total number of gas factor time monitoring points inside the gas pipeline.
[0124] In ultrasonic flowmeters, the signal-to-noise ratio (SNR) and SNR amplitude are important indicators for evaluating measurement accuracy. The software and hardware required to obtain these parameters include signal conditioning circuits, amplifiers, filters, and analog-to-digital converters. Software includes waveform analysis tools for displaying and editing signal waveforms and noise analysis tools for calculating the SNR.
[0125] ;
[0126] ;
[0127] Indicates the The first monitoring point of the gas space inside the gas pipeline The gas pipeline internal gas parameter mutation coupling assessment index for each gas pipeline internal gas factor time monitoring point is used to quantify the relative level of time detection accuracy of the ultrasonic flowmeter after being affected by gas coupling factors within the gas pipeline. A larger gas pipeline internal gas parameter mutation coupling assessment index indicates that, while relative time detection accuracy is high, the relative level of environmental mutation impact is low. This indicates that the relative level of time detection accuracy of the ultrasonic flowmeter after being affected by gas coupling factors within the gas pipeline remains high, and the corresponding initial correct value of the average forward and reverse time lengths obtained by measurement is more reliable.
[0128] In a gas ultrasonic flowmeter, the "signal" specifically refers to the electrical signal received by the ultrasonic transducer. This signal is essentially the voltage waveform converted from ultrasonic mechanical waves propagating through the gas. The transmitting transducer converts electrical pulses, such as a 200kHz square wave, into ultrasonic mechanical waves, which propagate through the gas medium. The receiving transducer converts the incoming ultrasonic mechanical waves back into an electrical signal. The signal-to-noise ratio (SNR) represents the ratio of the signal amplitude to the background noise and determines the accuracy of time detection.
[0129] Indicates the The first monitoring point of the gas space inside the gas pipeline The signal-to-noise ratio of the ultrasonic flowmeter at each gas factor time monitoring point inside the gas pipeline;
[0130] It represents the minimum allowable signal-to-noise ratio of the ultrasonic flowmeter, which is directly extracted from the ultrasonic flowmeter gas composition database.
[0131] In a gas ultrasonic flowmeter, the relationship between signal-to-noise ratio and time detection accuracy is essentially the effect of noise on zero-crossing detection error. The higher the signal-to-noise ratio, the higher the time detection accuracy.
[0132] Liquid droplets (such as water and oil droplets) act as inhomogeneous media, causing ultrasonic scattering. For example, in a wet gas pipeline, droplets can cause ultrasonic flowmeter signal amplitude fluctuations that are 2-5 times greater than normal.
[0133] Transducer sensitivity is the transducer's output voltage per unit sound pressure. As a quantitative example, the sensitivity of a gas ultrasonic transducer is 5-30mV / Pa (e.g., 10mV / Pa corresponds to a reference value of 0dB). A 10dB decrease in sensitivity reduces the received amplitude to 31.6%. Aging also indirectly affects this; after five years of use, the transducer's sensitivity may decrease by 3-5dB.
[0134] The signal amplitude of the ultrasonic flowmeter is positively correlated with the time detection accuracy, that is, the higher the amplitude, the higher the time detection accuracy.
[0135] Indicates the The first monitoring point of the gas space inside the gas pipeline The signal amplitude of the ultrasonic flowmeter at each gas factor time monitoring point inside the gas pipeline;
[0136] Indicates the minimum allowable value of the ultrasonic flowmeter signal amplitude, which is directly extracted from the ultrasonic flowmeter gas component database.
[0137] In gas pipelines, the angle between the acoustic channel and the gas pipeline corresponds to different gas flow detection areas. Therefore, changes in the corresponding flow field should also affect the correction factors for the first and second components of the coupling assessment of gas parameter abrupt changes within the gas pipeline. In ultrasonic flowmeters, the angle between the acoustic channel (i.e., the ultrasonic wave propagation path) and the gas pipeline determines the relative position of the ultrasonic wave propagation path to the fluid flow direction, thereby affecting the flow field characteristics and the accuracy of measurement results. For example, when the acoustic channel is parallel to the pipeline axis (an angle of 0 degrees), the ultrasonic wave propagation path aligns with the fluid flow direction, resulting in a relatively uniform flow field. When the acoustic channel is perpendicular to the pipeline axis (an angle of 90 degrees), the ultrasonic wave propagation path is perpendicular to the fluid flow direction, and the flow field may become more complex, with increased turbulence and velocity gradients. The propagation velocity of ultrasonic waves in a fluid is affected by the fluid velocity. When the acoustic channel is at an angle to the fluid flow direction, the fluid velocity component in the direction of the acoustic channel affects the actual propagation velocity of the ultrasonic wave. Changes in the flow field affect the propagation environment of the ultrasonic signal, potentially causing signal attenuation or increased noise, thereby affecting the signal-to-noise ratio. Changes in the angle may lead to increased reflection and scattering on the signal propagation path, further affecting the signal-to-noise ratio.
[0138] In order to accurately evaluate the impact of the sound channel angle on the measurement accuracy, a correction factor needs to be introduced to adjust the measurement results.
[0139] It represents the first component correction factor of the coupled assessment of gas parameter mutations inside the gas pipeline, which is directly extracted from the ultrasonic flowmeter gas component database.
[0140] It represents the second component correction factor of the coupled assessment of gas parameter mutations inside the gas pipeline, and is directly extracted from the ultrasonic flowmeter gas component database.
[0141] The experiment can be carried out in a laboratory environment to simulate different flow field conditions and sound channel angles. By experimentally measuring the ultrasonic propagation time and signal-to-noise ratio at different angles, a mapping relationship between the angle and the correction factor is established. A 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 corresponding first component correction factor for the sudden change coupling assessment of the gas parameters inside the gas pipeline and the second component correction factor for the sudden change coupling assessment of the gas parameters inside the gas pipeline are obtained. The actual angle between the sound channel of the ultrasonic flowmeter and the gas pipeline is input to obtain the corresponding first component correction factor for the sudden change coupling assessment of the gas parameters inside the gas pipeline and the second component correction factor for the sudden change coupling assessment of the gas parameters inside the gas pipeline.
[0142] Furthermore, it is determined that the ultrasonic flowmeter detection, judgment, correction and adjustment are to be performed, specifically including: performing a difference analysis on the average value of the reverse time measured by the ultrasonic flowmeter and the corresponding average value of the forward time measured by the ultrasonic flowmeter, taking the absolute value, and obtaining the difference value of the reverse and forward time this time; performing a difference analysis on the corresponding average value of the reverse time measured by the previous ultrasonic flowmeter and the corresponding average value of the forward time measured by the ultrasonic flowmeter, taking the absolute value, and obtaining the difference value of the reverse and forward time last time; performing a difference analysis on the difference value of the reverse and forward time this time and the difference value of the reverse and forward time last time, and obtaining the difference value of the reverse and forward time. a mutation value; performing a difference analysis on the previous difference between the reverse and forward time lengths and the current difference between the reverse and forward time lengths to obtain a second mutation value of the difference between the reverse and forward time lengths; if the first mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, then performing a first excitation wave period correction or a first positive and negative time difference symmetry correction on the reverse time length according to the ultrasonic flowmeter detection method type; if the second mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, then performing a second excitation wave period correction or a second positive and negative time difference symmetry correction on the forward time length according to the ultrasonic flowmeter detection method type.
[0143] In this embodiment, if Figure 5 As shown, it is a flow chart of the process of judging and correcting the ultrasonic flowmeter according to the embodiment of the present application. , then the newly measured average value of the forward and reverse duration is greater than the initial correct value of the average value of the forward and reverse duration. above; and , then the deviation between the reverse duration and the initial correct value of the average forward and reverse duration is greater than the deviation between the initial correct value of the average forward and reverse duration and the forward duration. If the above is true, it means that the forward or reverse time measurement is incorrect. For the zero-crossing method, it should be one of the backward jump waves. For the correlation method, it may be that one of the forward and reverse time measurements is incorrect.
[0144] It should be noted that in natural gas pipelines, the flow rate is a gradual process, and the time between two adjacent measurements is very short. In general applications, the time difference between two measurements caused by normal flow changes is relatively small under normal measurement conditions. The maximum time difference change threshold can be set to , for different specifications Generally speaking, the value is within half an excitation wave cycle to one excitation wave cycle, and different values can be set according to different specifications. This feature can be used for judgment and correction.
[0145] Indicates the The average forward time of ultrasonic flowmeter measurement; Indicates the The average reverse time measured by the ultrasonic flowmeter.
[0146] like , it means that the time difference of the new measurement is much larger than that of the last measurement, and the change exceeds the maximum value, which means that the forward time is normal, but the reverse time is incorrect. For the flow meter using zero-crossing detection, it means that the reverse measurement jumps back one wave, so the reverse time should be corrected by subtracting one excitation wave cycle. Where is the average period of the received wave signal, is the reverse time length after correction; if it is the correlation method, the reverse time length can be corrected according to the symmetry of the positive and negative time difference changes, then according to Calculate the correction.
[0147] like , it means that the time difference of the new measurement is significantly smaller than that of the last measurement, and the change exceeds the maximum value, which means that the reverse time is normal, while the forward time jumps back one wave; for the flow meter using zero-crossing detection, the forward time should be corrected by subtracting one excitation wave cycle, then , is the corrected forward time length; if the correlation method is used, the forward time length can be corrected according to the symmetry of the positive and negative time differences, which can be calculated as follows: Calculate the correction. It should be noted that for the zero-crossing method, only the case of one wave jump is considered, because the possibility of two waves jumping in actual detection is very low and can be ignored.
[0148] Furthermore, the ultrasonic flowmeter detection judgment correction adjustment is determined, which also includes: performing a difference analysis on the difference between the previous reverse and forward time lengths and the current reverse and forward time lengths to obtain a third mutation value of the reverse and forward time length difference; performing a difference analysis on the previous reverse and forward time lengths and the current reverse and forward time lengths to obtain a fourth mutation value of the reverse and forward time length difference; if the third mutation value of the reverse and forward time length difference is equal to or greater than the maximum time difference change threshold, then the reverse time length is corrected for the excitation wave period or the positive and negative time difference symmetry is corrected according to the ultrasonic flowmeter detection method type; if the fourth mutation value of the reverse and forward time length difference is equal to or greater than the maximum time difference change threshold, then the forward time length is corrected for the excitation wave period or the positive and negative time difference symmetry is corrected according to the ultrasonic flowmeter detection method type.
[0149] In this embodiment, if , then the new measured average value of the forward and reverse duration is smaller than the reference value of the average value of the forward and reverse duration. above; and , then the deviation between the average value of the forward and reverse duration and the forward duration is greater than the deviation between the reverse duration and the reference value of the forward and reverse duration. If the above is true, it means that the forward or reverse time measurement is incorrect. For one of the zero-crossing methods, the forward jump wave may be caused by the correlation method, which may be a measurement error of one of the forward and reverse time lengths.
[0150] like , it means that the time difference of the new measurement is much smaller than that of the last measurement, and the change exceeds the maximum value, which means that the forward time is normal, while the reverse time jumps forward by one wave; for the flow meter using zero-crossing detection, the reverse time should be corrected by adding one excitation wave cycle, then Where is the average period of the received wave signal; if the correlation method is used, the reverse time length can be corrected according to the symmetry of the positive and negative time difference, which can be calculated as follows: Calculate the correction. It should be noted that Although the judgment conditions are the same as above, the premise is, and They are different, so different adjustment methods are adopted. The same applies to the following.
[0151] like , it means that the time difference of the new measurement is much larger than that of the last measurement, and the change exceeds the maximum value, which means that the reverse time is normal, but the forward time is wrong. For the flow meter using zero-crossing detection, the forward time jumps forward by one wave, and an excitation wave cycle should be added for correction. If the correlation method is used, the forward time can be corrected according to the symmetry of the forward and reverse time differences. Calculate the correction.
[0152] Except for the above-mentioned ultrasonic flowmeter detection, judgment, correction and adjustment, all judgments shall be treated as abnormal detection alarms and relevant personnel shall be notified.
[0153] like Figure 6 As shown, it is a structural schematic diagram of the detection and correction system based on the forward and reverse time of the ultrasonic flow meter provided in an embodiment of the present application. The detection and correction system based on the forward and reverse time of the ultrasonic flow meter provided in 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 correction adjustment module: Gas pipeline ultrasonic sound velocity update module: used to update the gas pipeline ultrasonic actual sound velocity according to the collected gas pipeline state parameters; Initialization detection initial correct value module: used to initialize the detection and obtain the initial correct value of the average forward and reverse time measured in the gas pipeline; Detection correction adjustment module: used to compare and analyze the average forward and reverse time of each time with the initial correct value of the average forward and reverse time, and judge whether the detection correction is completed or whether to adjust according to the comparison and analysis results.
[0154] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0155] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.
[0156] These computer program instructions may 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 produce an article of manufacture including an instruction system that is implemented in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0158] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0159] Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if such modifications and variations fall within the scope of the claims and their equivalents, the present invention is intended to include such modifications and variations.
Claims
1. A detection and correction method based on the forward and reverse time length of an ultrasonic flowmeter, characterized in that: The following steps are involved: The method further includes: updating the actual sound velocity of the ultrasonic wave in the gas pipeline according to the collected gas pipeline state parameters; and updating the actual sound velocity of the ultrasonic wave in the gas pipeline according to the collected gas pipeline state parameters. The ultrasonic flowmeter gas component database is directly extracted to obtain the standard value of gas absolute temperature, the standard value of gas pressure, the standard value of gas average molar mass, the correction factor of gas average droplet content for sound velocity, the first proportional factor for the characteristic change of gas parameter mutation assessment inside the gas pipeline, the second proportional factor for the characteristic change of gas parameter mutation assessment inside the gas pipeline, and the third proportional factor for the characteristic change of gas parameter mutation assessment inside the gas pipeline; The absolute temperature of the gas is analyzed in proportion to the standard value of the absolute temperature of the gas. The first proportional factor of the characteristic change is evaluated by the sudden change of the gas parameters inside the gas pipeline to perform characteristic correction, and the correction component of the absolute temperature of the gas is obtained. The gas pressure is analyzed in proportion to the standard value of gas pressure, and the characteristic change second proportional factor is evaluated by the sudden change of gas parameters inside the gas pipeline to perform characteristic correction, and the gas pressure proportion correction component is obtained; The gas average molar mass and the gas average molar mass standard value are analyzed for their proportion, and the characteristic change third proportional factor is evaluated by the sudden change of gas parameters inside the gas pipeline to perform characteristic correction, and the correction component of the gas average molar mass proportion is obtained; The gas absolute temperature correction component, gas pressure correction component, and gas average molar mass correction component are coupled, and the correction factor of the sound velocity is corrected by the average gas droplet content to obtain the gas parameter mutation assessment index inside the gas pipeline; Performing difference analysis on the gas parameter mutation assessment indexes of adjacent gas pipeline internal gas factor time monitoring points to obtain the gas parameter mutation assessment difference values; Perform comparative analysis based on the difference in the sudden change assessment of gas parameters inside the gas pipeline, and update the actual sound velocity of the gas pipeline ultrasound according to the comparative analysis results; Initialization detection obtains the initial correct value of the average forward and reverse time length of gas pipeline measurement; Compare and analyze the average value of the forward and reverse durations for each time with the initial correct value of the average value of the forward and reverse durations, and judge whether the detection is correct or whether the correction is completed based on the comparative analysis results.
2. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 1, characterized in that: The updating of the actual sound velocity of the ultrasonic wave in the gas pipeline according to the collected gas pipeline state parameters specifically includes: Gas pressure, absolute gas temperature, gas composition data and average gas molar mass are collected and obtained through pressure sensors, temperature sensors and gas chromatographs deployed in the corresponding gas pipelines; The universal gas constant is directly extracted from the ultrasonic flowmeter gas composition database; The corresponding adiabatic index, gas compressibility factor and pressure correction coefficient are obtained through the pre-stored data association relationship table of the ultrasonic flowmeter gas component database; The actual sound velocity of gas pipeline ultrasound is calculated by combining the gas pressure, gas absolute temperature, gas component data, gas average molar mass, adiabatic index, gas compressibility factor and pressure correction coefficient with the gas pipeline ultrasound actual sound velocity correction model.
3. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 1, characterized in that: The updating of the actual sound velocity of the ultrasonic wave in the gas pipeline according to the comparative analysis results specifically includes: If the difference in the assessment of the sudden change of the gas parameters inside the gas pipeline is less than or equal to the reference value for the assessment of the sudden change of the gas parameters inside the gas pipeline, the actual sound velocity of the ultrasonic wave in the gas pipeline is updated at a predefined time interval; If the difference in the assessment of the sudden change in the gas parameters inside the gas pipeline is greater than the reference value for the assessment of the sudden change in the gas parameters inside the gas pipeline, the subsequent initialization detection is suspended and recorded as a flow rate sudden change state. The above comparative analysis is performed again after a predefined detection time interval. If the difference in the assessment of the sudden change in the gas parameters inside the gas pipeline is less than or equal to the reference value for the assessment of the sudden change in the gas parameters inside the gas pipeline at this time, the actual sound velocity of the gas pipeline ultrasound is updated according to the predefined time interval. If the difference in the assessment of the sudden change in the gas parameters inside the gas pipeline is still greater than the reference value for the assessment of the sudden change in the gas parameters inside the gas pipeline at this time, the relevant personnel are notified to check the gas pipeline status and the ultrasonic flowmeter status.
4. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 1, characterized in that: The initialization detection obtains the initial correct value of the average forward and reverse time lengths measured in the gas pipeline, specifically including: After the actual sound velocity of the gas pipeline ultrasound is updated, the ultrasonic flowmeter is used to perform continuous measurements for a predefined number of times to obtain the forward and reverse time reference values for the predefined number of times. The two adjacent forward and reverse time reference values are subjected to difference analysis and the absolute values are taken to obtain the adjacent differences of the forward and reverse time reference values. If the adjacent differences of the forward and reverse time reference values are less than or equal to the adjacent difference threshold of the forward and reverse time reference values, the corresponding forward and reverse time reference values are retained. If the adjacent differences of the forward and reverse time reference values are greater than the adjacent difference threshold of the forward and reverse time reference values, the Pearson correlation coefficient between the corresponding ultrasonic flowmeter received waveform and the template waveform is calculated by predefined software to obtain the waveform similarity correlation coefficient. If the waveform similarity correlation coefficient is greater than the waveform similarity correlation coefficient judgment threshold, the corresponding forward and reverse time reference values are retained. If the waveform similarity correlation coefficient is less than or equal to the waveform similarity correlation coefficient judgment threshold, the corresponding forward and reverse time reference values are discarded. The retained forward and reverse duration reference values are summed and averaged to obtain the forward and reverse duration reference value average value; The corresponding actual value of the forward and reverse time is calculated by calculating the actual sound velocity of the gas pipeline ultrasonic. If the actual value of the forward and reverse time is analyzed with the average value of the forward and reverse time reference value and the absolute value is taken, the gas pipeline ultrasonic sound velocity difference is obtained. If the gas pipeline ultrasonic sound velocity difference is less than the gas pipeline ultrasonic sound velocity difference threshold, the initialization detection is judged to be successful, and the average value of the forward and reverse time reference value is recorded as the initial correct value of the forward and reverse time average value. If the gas pipeline ultrasonic sound velocity difference is equal to or greater than the gas pipeline ultrasonic sound velocity difference threshold, the initialization detection is judged to have failed, and the initialization detection is performed again to obtain the initial correct value of the forward and reverse time average value measured in the gas pipeline. If the predefined initialization detection allowed time has passed and the initialization detection is still judged to have failed, the relevant personnel are notified to check the gas pipeline status and the ultrasonic flowmeter status.
5. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 1, characterized in that: The comparison and analysis of the average forward and reverse durations of each time with the initial correct value of the average forward and reverse durations specifically includes: The absolute value of the difference analysis between the average forward and reverse duration in each measurement and the initial correct value of the average forward and reverse duration is used to obtain the average measurement difference of the forward and reverse duration in each measurement; Perform difference analysis on the forward duration and the average value of the forward and reverse duration in each measurement to obtain the difference between the forward and forward and reverse durations at each time; perform difference analysis on the reverse duration and the average value of the forward and reverse duration in each measurement to obtain the difference between the reverse and forward and reverse durations at each time; perform difference analysis on the absolute values of the difference between the forward and forward and reverse durations at each time and the difference between the reverse and forward and reverse durations at each time to obtain the symmetrical difference between the forward and reverse durations at each time; If the average measurement difference of the forward and reverse duration is less than the upper limit of the total duration tracking value deviation and the symmetric difference of the forward and reverse duration is less than the upper limit of the symmetric deviation of the forward and reverse duration, then it is judged that the detection based on the ultrasonic flow meter is correct and the detection is ended. After the corresponding test is completed, the initial correct value of the average forward and reverse duration is replaced by the average forward and reverse duration measured this time; If the average measurement difference of the forward and reverse time is equal to or greater than the upper limit of the total time tracking value deviation, or the symmetric difference of the forward and reverse time is equal to or greater than the upper limit of the symmetric deviation of the forward and reverse time, a sudden change coupling assessment of the gas parameters inside the gas pipeline is performed, and based on the results of the sudden change coupling assessment of the gas parameters inside the gas pipeline, it is determined whether to perform ultrasonic flowmeter detection, correction and adjustment.
6. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 5, characterized in that: The specific process of determining whether to perform ultrasonic flowmeter detection, correction and adjustment based on the gas parameter mutation coupling evaluation result inside the gas pipeline is as follows: The signal data of the gas ultrasonic flowmeter is collected by the signal conditioning circuit and analyzed by the software analysis tool to obtain the signal-to-noise ratio and signal amplitude of the ultrasonic flowmeter; The minimum allowable value of the ultrasonic flowmeter's signal-to-noise ratio, the minimum allowable value of the ultrasonic flowmeter's signal amplitude, the first component correction factor for the sudden change coupling assessment of gas parameters inside the gas pipeline, and the second component correction factor for the sudden change coupling assessment of gas parameters inside the gas pipeline are directly extracted from the ultrasonic flowmeter gas component database; The signal-to-noise ratio of the ultrasonic flowmeter is analyzed with respect to the minimum allowable value of the signal-to-noise ratio of the ultrasonic flowmeter, and the correction factor of the first component of the sudden coupling of the gas parameters inside the gas pipeline is evaluated and corrected to obtain the first component of the sudden coupling of the gas parameters inside the gas pipeline; The signal amplitude of the ultrasonic flowmeter is proportional to the minimum allowable value of the signal amplitude of the ultrasonic flowmeter, and the second component correction factor is evaluated by the sudden coupling of the gas parameters inside the gas pipeline to obtain the second component of the sudden coupling of the gas parameters inside the gas pipeline; The first component of the sudden change coupling of the gas parameters inside the gas pipeline is coupled with the second component of the sudden change coupling of the gas parameters inside the gas pipeline, and then the difference between the sudden change coupling and the sudden change evaluation value of the gas parameters inside the gas pipeline is processed for proportion analysis to obtain the sudden change coupling evaluation index of the gas parameters inside the gas pipeline; If the gas parameter mutation coupling assessment index inside the gas pipeline is less than or equal to the gas parameter mutation coupling assessment index threshold inside the gas pipeline, it is determined that the average value of the forward and reverse time lengths of each time is compared and analyzed with the initial correct value of the average value of the forward and reverse time lengths; If the gas parameter mutation coupling assessment index inside the gas pipeline is greater than the gas parameter mutation coupling assessment index threshold inside the gas pipeline, it is determined that an ultrasonic flowmeter detection judgment correction adjustment is to be performed.
7. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 6, characterized in that: The above-mentioned determination and correction adjustment of the ultrasonic flowmeter specifically includes: The average value of the reverse time measured by the ultrasonic flowmeter is compared with the average value of the forward time measured by the ultrasonic flowmeter, and the absolute value is obtained to obtain the difference between the reverse and forward time values. Perform difference analysis on the corresponding average value of the reverse time measured by the ultrasonic flowmeter last time and the average value of the forward time measured by the ultrasonic flowmeter last time, and take the absolute value to obtain the difference between the reverse and forward time values last time; Perform a difference analysis on the current reverse and forward duration difference value and the previous reverse and forward duration difference value to obtain the first mutation value of the reverse and forward duration difference value; Perform a difference analysis on the previous difference between the reverse and forward durations and the current difference between the reverse and forward durations to obtain a second mutation value of the difference between the reverse and forward durations; If the first mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the reverse time length is subjected to a first excitation wave period correction or a first forward and reverse time difference symmetry correction according to the ultrasonic flowmeter detection method type; If the second mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the forward time length is subjected to a second excitation wave period correction or a second forward and reverse time difference symmetry correction according to the ultrasonic flowmeter detection method type.
8. The detection and correction method based on the forward and reverse time length of the ultrasonic flowmeter according to claim 7, characterized in that: The step of determining and correcting the ultrasonic flowmeter further includes: Perform a difference analysis on the previous difference between the reverse and forward durations and the current difference between the reverse and forward durations to obtain the third mutation value of the difference between the reverse and forward durations; Perform a difference analysis on the previous difference between the reverse and forward durations and the current difference between the reverse and forward durations to obtain a fourth mutation value of the difference between the reverse and forward durations; If the third mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the reverse time length is corrected for the excitation wave period or the forward and reverse time difference symmetry according to the ultrasonic flowmeter detection method type; If the fourth mutation value of the difference between the reverse and forward time lengths is equal to or greater than the maximum time difference change threshold, the forward time length is corrected for the excitation wave period or the forward and reverse time difference symmetry according to the ultrasonic flowmeter detection method type.
9. A detection and correction system based on the forward and reverse time length of an ultrasonic flowmeter, applying the detection and correction method based on the forward and reverse time length of an ultrasonic flowmeter according to any one of claims 1 to 8, characterized in that: include: Gas pipeline ultrasonic sound velocity update module, initialization detection initial correct value module and detection correction adjustment module: Gas pipeline ultrasonic sound velocity update module: used to update the actual sound velocity of gas pipeline ultrasonic waves according to the collected gas pipeline state parameters; Initialization detection initial correct value module: used for initial detection to obtain the initial correct value of the average forward and reverse time length of gas pipeline measurement; Detection, correction and adjustment module: used to compare and analyze the average value of each forward and reverse duration with the initial correct value of the average value of the forward and reverse duration, and determine whether the detection and correction is completed or whether to make adjustments based on the comparison and analysis results.
Citation Information
Patent Citations
Ultrasonic time difference processing method of multi-channel ultrasonic water meter
CN117786362A
A method and system for optimizing measurement data of ultrasonic gas meter
CN119066598B
Method, system and equipment for correcting wave hopping phenomenon of gas ultrasonic flowmeter and medium
CN117782271A