Ultrasonic flowmeter error wave correction method, device and equipment
By obtaining and processing the measured time data in the ultrasonic flowmeter, calculating the wrong wave parameters and correcting it, the problem of complex and inaccurate error correction in the prior art is solved, and a more accurate flow metering is achieved.
Patent Information
- Application Number
- CN202411699852.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The existing ultrasonic flowmeter error wave correction implementation is relatively complex, and the correction results are not accurate enough.
By obtaining the measured uptime and downtime of the ultrasonic flowmeter, the measured flight time difference is calculated, and the uptime calculated value and downtime calculated value under zero flow are calculated based on the measured flight time difference, uptime and downtime. Then, the deviation of the uplink time calculated value and downlink time calculated value relative to the standard flight time is calculated separately, and the uplink error wave parameters and downlink error wave parameters are determined based on the deviation and excitation pulse period, and finally the error wave correction is performed on the actual measured time.
The calculation process of error wave correction is simplified, and the uplink and downlink error wave parameters are calculated separately, which improves the accuracy of error wave situation analysis, making the correction effect more accurate.
Smart Images

Figure CN119197670B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flow detection, and in particular to a method, device and equipment for correcting an ultrasonic flow meter error wave. Background Art
[0002] An ultrasonic flow meter is an instrument that measures flow by detecting the effect of fluid flow on an ultrasonic beam or ultrasonic pulse. The time difference method is the most widely used method, which calculates the flow rate of the fluid being measured by measuring the time difference caused by the different propagation speeds of ultrasonic waves when they propagate forward and backward.
[0003] Ultrasonic flowmeters are mainly composed of ultrasonic transducers and converters installed on the measuring pipe. When analyzing the transducer echo signal, the echo signal will cause characteristic wave identification errors due to deformation and other reasons, which will cause wrong waves and lead to serious deviations in measurement accuracy. At present, there are two main methods for identifying wrong waves: one is to insert excitation signals of different phases after the normal excitation signal from the transmission signal, and identify wrong waves according to the offset of the zero point of the echo signal near the phase insertion; the other is to identify wrong waves based on the echo information of the normal excitation signal, such as the flight time and its difference. These two methods are used to identify wrong waves and correct them. Due to the large number of wrong wave types, the code implementation is more complicated, and the correction results are not accurate enough. Summary of the invention
[0004] In view of this, the present invention provides an ultrasonic flowmeter error wave correction method, device and equipment to solve the technical problems that the existing error wave correction is relatively complicated to implement and the correction result is not accurate enough.
[0005] In a first aspect, the present invention provides a method for correcting an ultrasonic flowmeter error wave, comprising: obtaining a measured uplink time and a measured downlink time of the ultrasonic flowmeter, and calculating a measured flight time difference based on the measured uplink time and the measured downlink time; calculating an uplink time measurement value and a downlink time measurement value under zero flow based on the measured flight time difference, the measured uplink time and the measured downlink time; respectively calculating an uplink time deviation of the uplink time measurement value relative to a standard flight time, and a downlink time deviation of the downlink time measurement value relative to the standard flight time, wherein the standard flight time is a theoretical time for a sound wave to propagate from a transmitting end to a receiving end; respectively determining an uplink error wave parameter and a downlink error wave parameter based on the uplink time deviation, the downlink time deviation and an excitation pulse period of the ultrasonic flowmeter; performing error wave correction on the measured uplink time and the measured downlink time based on the uplink error wave parameter and the downlink error wave parameter to obtain a corrected uplink time, a corrected downlink time and a corrected flight time difference.
[0006] Optionally, the calculation of the uplink time measurement value and the downlink time measurement value under zero flow rate based on the measured flight time difference, the measured uplink time and the measured downlink time includes: preprocessing the measured flight time difference according to the fluid flow direction state to obtain an actual flight time difference; calculating the uplink time measurement value and the downlink time measurement value under zero flow rate based on the measured uplink time, the measured downlink time and the actual flight time difference.
[0007] Optionally, the measured flight time difference is preprocessed according to the fluid flow state to obtain the actual flight time difference, including: determining the fluid flow state, and when the fluid flow state is downstream, comparing the measured flight time difference with a forward starting flow flight time difference threshold; if the measured flight time difference is greater than the forward starting flow flight time difference threshold, then the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period; if the measured flight time difference is less than the forward starting flow flight time difference threshold, then the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period. The remainder obtained by the excitation pulse period is summed with the excitation pulse period; when the fluid flow direction state is countercurrent, the measured flight time difference and the reverse starting flow flight time difference threshold are compared. If the measured flight time difference is less than the reverse starting flow flight time difference threshold, the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period. If the measured flight time difference is greater than the reverse starting flow flight time difference threshold, the actual flight time difference is the difference between the remainder obtained by dividing the measured flight time difference by the excitation pulse period and the excitation pulse period.
[0008] Optionally, the calculating the uplink time measurement value and the downlink time measurement value under zero flow according to the measured uplink time, the measured downlink time and the actual flight time difference includes: combining the uplink time measurement formula, calculating the uplink time measurement value under zero flow according to the measured uplink time and the actual flight time difference, and the uplink time measurement formula is:
[0009]
[0010] In the formula, is the measured value of uplink time under zero traffic, is the measured uplink time, is the actual flight time difference; combined with the downlink time calculation formula, the downlink time calculation value under zero flow is calculated according to the measured downlink time and the actual flight time difference, and the downlink time calculation formula is:
[0011]
[0012] In the formula, is the estimated value of downlink time under zero traffic, is the measured downlink time.
[0013] Optionally, after respectively calculating the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, it also includes: dividing the uplink time deviation by the excitation pulse period to obtain a remainder as the uplink deviation within the cycle of the uplink time measurement value and the standard flight time; dividing the downlink time deviation by the excitation pulse period to obtain a remainder as the downlink deviation within the cycle of the downlink time measurement value and the standard flight time; when the uplink deviation within the cycle and the downlink deviation within the cycle meet ,and When , the output flow direction changes and ends the error wave correction, where: is the upward deviation within the period, is the downward deviation within the period, is the excitation pulse period; when the uplink deviation within the period satisfies , or the downward deviation within the period satisfies When the error wave is corrected, continue to correct the error wave.
[0014] Optionally, the determining of the uplink error wave parameter and the downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively comprises: determining the uplink error wave parameter according to the uplink time deviation and the excitation pulse period of the ultrasonic flowmeter, and the calculation formula of the uplink error wave parameter is:
[0015]
[0016] In the formula, is the uplink error wave parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the uplink time deviation, is the excitation pulse period, is the fault tolerance rate; the downlink error wave parameter is determined according to the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter, and the calculation formula of the downlink error wave parameter is:
[0017]
[0018] In the formula, is the downlink error parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the downlink time deviation.
[0019] Optionally, the measured uplink time and the measured downlink time are subjected to error correction according to the uplink error parameter and the downlink error parameter to obtain a corrected uplink time, a corrected downlink time and a corrected flight time difference, including: determining the number of uplink error waves and the direction of uplink error waves according to the uplink error parameter, determining a corresponding first correction value based on the number of uplink error waves and the uplink error direction, adding the first correction value to the measured uplink time to obtain a corrected uplink time; determining the number of downlink error waves and the direction of downlink error waves according to the downlink error parameter, determining a corresponding second correction value based on the number of downlink error waves and the downlink error direction, adding the second correction value to the measured downlink time to obtain a corrected downlink time; subtracting the corrected uplink time from the corrected downlink time to obtain a corrected flight time difference.
[0020] Optionally, before obtaining the measured uplink time and the measured downlink time of the ultrasonic flowmeter, the method includes: obtaining a number of zero-crossing points of the ultrasonic flowmeter in the uplink echo and a number of zero-crossing points of the downlink echo, and dividing the zero-crossing points of the ultrasonic flowmeter in the uplink echo and the zero-crossing points of the downlink echo into a number of current zero-crossing points, a number of front zero-crossing points before the current zero-crossing point, and a number of rear zero-crossing points after the current zero-crossing point; correspondingly, determining a corresponding first correction value based on the number of uplink wrong waves and the direction of the uplink wrong wave, including: if the direction of the uplink wrong wave is a front wrong wave, then the corresponding first correction value is:
[0021]
[0022] In the formula, , , , , and They represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo, is the number of uplink error waves, , is the number of current zero crossings, is the number of zero crossings before and after in the uplink echo, and the number of zero crossings before and after in the downlink echo, and are all positive integers; if the uplink wrong wave direction is the rear wrong wave, the corresponding first correction value is:
[0023]
[0024] In the formula, , , , , and Respectively represent the value of the zero-crossing point of the corresponding sequence number in the uplink echo; determine the corresponding second correction value based on the number of downlink wrong waves and the downlink wrong wave direction, including: if the downlink wrong wave direction is the front wrong wave, then the corresponding second correction value is:
[0025]
[0026] In the formula, , , , , and They represent the zero-crossing values of the corresponding serial numbers in the downlink echo. is the number of downlink error waves, ; If the downlink error wave direction is the rear error wave, the corresponding second correction value is:
[0027]
[0028] In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the downlink echo.
[0029] In a second aspect, the present invention provides an ultrasonic flowmeter error wave correction device, including: a measured data acquisition module, used to obtain the measured uplink time and the measured downlink time of the ultrasonic flowmeter, and calculate the measured flight time difference according to the measured uplink time and the measured downlink time; a time measurement module, used to calculate the uplink time measurement value and the downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time; a deviation calculation module, used to respectively calculate the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the The downlink time deviation of the measured downlink time value relative to the standard flight time, wherein the standard flight time is the theoretical time for the sound wave to propagate from the transmitting end to the receiving end; a wave error parameter calculation module, used to determine the uplink wave error parameter and the downlink wave error parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively; a time correction module, used to perform wave error correction on the measured uplink time and the measured downlink time according to the uplink wave error parameter and the downlink wave error parameter, so as to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference.
[0030] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the ultrasonic flowmeter error wave correction method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0031] It can be seen from the above technical solutions that the present invention has the following advantages:
[0032] The present invention provides an ultrasonic flowmeter error wave correction method, device and equipment. The method uses the measured flight time difference, the measured uptime time and the measured downtime time to reversely calculate the uptime time measurement value and the downtime measurement value under zero flow, and then calculates the uptime time deviation of the uptime time measurement value relative to the standard flight time, and the downtime deviation of the downtime measurement value relative to the standard flight time. The standard flight time is the theoretical time for the sound wave to propagate from the transmitting end to the receiving end. The uptime error wave parameter and the downtime error wave parameter are determined according to the uptime time deviation, the downtime deviation and the excitation pulse period of the ultrasonic flowmeter to obtain the error wave situation. The measured uptime and the measured downtime are corrected according to the uptime error wave parameter and the downtime error wave parameter to obtain the corrected uptime, the corrected downtime and the corrected flight time difference. The calculation process is simple, and the uptime error wave parameter and the downtime error wave parameter are calculated separately. The error wave situation analysis is more accurate, so that the subsequent correction effect is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 It is a flow chart of a method for correcting an ultrasonic flow meter error wave according to an embodiment of the present invention;
[0035] Figure 2 It is a flow chart of another ultrasonic flowmeter error wave correction method according to an embodiment of the present invention;
[0036] Figure 3 is a structural block diagram of an ultrasonic flowmeter error wave correction device according to an embodiment of the present invention;
[0037] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0039] In response to the wave error problem currently existing in ultrasonic flow meters, an embodiment of the present invention provides an ultrasonic flow meter wave error correction method, which can be applied to time-difference ultrasonic flow meters, including ultrasonic gas meters, water meters, heat meters and other fields. It can solve the error problem caused by wave error and improve the measurement accuracy.
[0040] According to an embodiment of the present invention, an embodiment of an ultrasonic flow meter error wave correction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] In this embodiment, a method for correcting an ultrasonic flow meter error wave is provided, which can be used for a control unit in an ultrasonic flow meter or for a mobile terminal, such as a mobile phone, a tablet computer, etc. Figure 1 and Figure 2 , the process includes the following steps:
[0042] Step S101, obtaining the measured uplink time and the measured downlink time of the ultrasonic flow meter, and calculating the measured flight time difference according to the measured uplink time and the measured downlink time.
[0043] Specifically, an ultrasonic flow meter usually has two transducers, namely a first transducer and a second transducer. The time from when the second transducer transmits an ultrasonic signal to when the first transducer receives the corresponding ultrasonic signal is the measured uplink time, and the time from when the first transducer transmits an ultrasonic signal to when the second transducer receives the corresponding ultrasonic signal is the measured downlink time.
[0044] The measured flight time difference is the value of the measured uplink time minus the measured downlink time.
[0045] Step S102, calculating the uplink time measurement value and the downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time.
[0046] Due to various errors in the measurement process, the actual measured uplink time and the measured downlink time may have errors. Therefore, it is necessary to pre-process the measured flight time difference, the measured uplink time and the measured downlink time to obtain the calculated uplink time and the calculated downlink time under zero traffic.
[0047] It should be understood that the calculated uplink time value and the calculated downlink time value under zero traffic are respectively the approximate value of the uplink flight time and the approximate value of the downlink flight time inferred from the measured flight time difference, the measured uplink time and the measured downlink time under the existing wrong wave condition when there is zero traffic. The calculated uplink time value and the calculated downlink time value under zero traffic are used for subsequent wrong wave judgment.
[0048] Step S103, respectively calculating the uplink time deviation of the measured uplink time value relative to the standard flight time, and the downlink time deviation of the measured downlink time value relative to the standard flight time, where the standard flight time is the theoretical time for sound waves to propagate from the transmitting end to the receiving end.
[0049] Specifically, the uplink time deviation and the downlink time deviation are calculated by the following formula:
[0050]
[0051]
[0052] In the formula, and are the uplink time deviation and the downlink time deviation respectively, and They are respectively the uplink time measurement value and the downlink time measurement value, Standard flight time.
[0053] The standard flight time is the theoretical time it takes for a sound wave to propagate from the transmitter to the receiver, that is, the standard flight time is:
[0054]
[0055] In the formula, is the propagation distance of the sound wave from the transmitter to the receiver, is the speed of sound in the fluid, which varies with temperature.
[0056] Step S104, determining an uplink error wave parameter and a downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively.
[0057] The uplink error wave parameter and the downlink error wave parameter respectively indicate the error wave situation of the uplink error wave and the error wave situation of the downlink error wave, and the error wave situation includes the number of error waves and the direction of the error wave.
[0058] Exemplarily, the uplink error parameter may be a quotient of the uplink time deviation divided by the excitation pulse period or a quotient of the uplink time deviation divided by a multiple of the excitation pulse period, where the multiple is between 0.8 and 0.95.
[0059] Similarly, the downlink error parameter may be a quotient of the downlink time deviation divided by the excitation pulse period or a quotient of the downlink time deviation divided by a multiple of the excitation pulse period, the multiple being between 0.8 and 0.95.
[0060] Step S105, performing error correction on the measured uplink time and the measured downlink time according to the uplink error parameter and the downlink error parameter to obtain a corrected uplink time, a corrected downlink time and a corrected flight time difference.
[0061] Specifically, the number of wrong waves and the direction of wrong waves of the uplink wrong waves are determined according to the uplink wrong wave parameters, and the wrong waves are corrected according to the number of wrong waves and the direction of wrong waves, and the corrected uplink time is obtained. The uplink time and the downlink time can be corrected by directly selecting the excitation pulse period as the compensation time period.
[0062] For example, when the wrong wave direction is positive, the corrected uplink time is the measured uplink time plus the product of the number of wrong waves and the excitation pulse period. When the wrong wave direction is negative, the corrected uplink time is the measured uplink time minus the product of the number of wrong waves and the excitation pulse period.
[0063] Similarly, when the wrong wave direction is positive, the corrected downlink time is the measured downlink time plus the product of the number of wrong waves and the excitation pulse period. When the wrong wave direction is negative, the corrected downlink time is the measured downlink time minus the product of the number of wrong waves and the excitation pulse period.
[0064] An ultrasonic flowmeter error wave correction method according to an embodiment of the present invention utilizes the measured flight time difference, the measured uplink time and the measured downlink time to reversely calculate the uplink time measurement value and the downlink time measurement value under zero flow, and then respectively calculate the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, wherein the standard flight time is the theoretical time for a sound wave to propagate from a transmitting end to a receiving end, and respectively determine the uplink error wave parameter and the downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter to obtain the error wave situation, and perform error wave correction on the measured uplink time and the measured downlink time according to the uplink error wave parameter and the downlink error wave parameter to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference, the calculation process is simple, and the uplink error wave parameter and the downlink error wave parameter are calculated separately, the error wave situation analysis is relatively accurate, and the subsequent correction effect is more precise.
[0065] In some embodiments, step S102, calculating the uplink time measurement value and the downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time, includes:
[0066] Step S1021, pre-processing the measured flight time difference according to the fluid flow state to obtain the actual flight time difference.
[0067] Specifically, the above step S1021 includes:
[0068] Step S10211, determine the fluid flow state. When the fluid flow state is downstream, compare the measured flight time difference and the forward starting flow flight time difference threshold. If the measured flight time difference is greater than the forward starting flow flight time difference threshold, the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period. If the measured flight time difference is less than the forward starting flow flight time difference threshold, the actual flight time difference is the sum of the remainder obtained by dividing the measured flight time difference by the excitation pulse period and the excitation pulse period.
[0069] Step S10212, when the fluid flow state is countercurrent, compare the measured flight time difference with the reverse starting flow flight time difference threshold. If the measured flight time difference is less than the reverse starting flow flight time difference threshold, the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period. If the measured flight time difference is greater than the reverse starting flow flight time difference threshold, the actual flight time difference is the difference between the remainder obtained by dividing the measured flight time difference by the excitation pulse period and the excitation pulse period.
[0070] The fluid flow state is obtained by obtaining the working state of the fluid in the measuring pipeline in advance.
[0071] In this embodiment, pre-processing is performed respectively according to the fluid flow state.
[0072] When the fluid flows in the downstream direction, the measured flight time difference For pre-processing, if ,but ,if ,but ,in, Indicates the measured flight time difference Divided by the excitation pulse period The remainder obtained is The positive starting flow flight time difference threshold is a threshold used to determine whether there is a positive flow. When it is greater than this value, the fluid is considered to be flowing forward. This is mainly to eliminate the flow misjudgment caused by the flight time difference fluctuation at zero flow. This value parameter can be set according to the actual situation. is the actual flight time difference.
[0073] When the fluid flow direction is countercurrent, the measured flight time difference For pre-processing, if ,but ,if ,but ,in, Indicates the measured flight time difference Divided by the excitation pulse period The remainder obtained is It is the flight time difference threshold of reverse starting flow, which is a threshold used to judge whether there is reverse flow. Because it is a negative number, when it is less than this value, the fluid is considered to be flowing in the reverse direction. This value parameter can be set according to the actual situation.
[0074] Step S1022, calculating the uplink time measurement value and the downlink time measurement value under zero traffic according to the measured uplink time, the measured downlink time and the actual flight time difference.
[0075] Specifically, combined with the uplink time calculation formula, the uplink time calculation value under zero traffic is calculated according to the difference between the measured uplink time and the actual flight time. The uplink time calculation formula is:
[0076]
[0077] In the formula, is the measured value of uplink time under zero traffic, To measure the uplink time, is the actual flight time difference.
[0078] Step S10222, in combination with the downlink time calculation formula, the downlink time calculation value under zero flow is calculated according to the difference between the measured downlink time and the actual flight time. The downlink time calculation formula is:
[0079]
[0080] In the formula, is the estimated value of downlink time under zero traffic, It is the measured downlink time.
[0081] The embodiment of the present invention uses the measured flight time difference, the measured uplink time and the measured downlink time to calculate the downlink time measurement value and the uplink time measurement value under zero flow, thereby providing a calculation basis for subsequent calculation steps.
[0082] In some embodiments, in step S103, after respectively calculating the uplink time deviation of the uplink time measurement value relative to the standard flight time and the downlink time deviation of the downlink time measurement value relative to the standard flight time, the method further includes:
[0083] Step a1, dividing the uplink time deviation by the excitation pulse period to obtain a remainder as the uplink time measurement value and the uplink deviation within the period of the standard flight time.
[0084] Specifically, , is the upward deviation within the period, is the uplink time deviation.
[0085] Step a2: dividing the downlink time deviation by the excitation pulse period to obtain a remainder as the downlink time measurement value and the downlink deviation within the period of the standard flight time.
[0086] Specifically, , is the downward deviation within the cycle, is the downlink time deviation.
[0087] The intra-cycle upward deviation and the intra-cycle downward deviation are used to determine the flow direction of the fluid.
[0088] Step a3: When the intra-cycle upward deviation and the intra-cycle downward deviation meet ,and When , the output flow direction changes and ends the error wave correction, where: is the upward deviation within the period, is the downward deviation within the cycle, is the excitation pulse period.
[0089] Step a4: When the upward deviation within the period satisfies , or the downward deviation within the cycle satisfies When the error wave is corrected, continue to correct the error wave.
[0090] Specifically, in the above step S1021, the flow state of the fluid is calculated respectively. ,and , it means that the flow direction of the measured result is inconsistent with the pre-obtained flow direction, and the flow direction needs to be confirmed and adjusted. If the subsequent correction steps are continued at this time, the correction result will be biased. Therefore, it is necessary to output the flow direction change prompt and end the wrong wave correction, and issue a flow direction change alarm. On the contrary, when the upward deviation in the cycle meets , or the downward deviation within the cycle satisfies , it indicates that the flow direction is correct and you can continue with the subsequent correction steps.
[0091] The embodiment of the present invention determines whether the flow direction state is correct by calculating the intra-cycle upward deviation and the intra-cycle downward deviation, thereby ensuring the accuracy of subsequent correction results.
[0092] In some embodiments, step S104, determining an uplink error wave parameter and a downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter, respectively, includes:
[0093] Step S1041, determining the uplink error wave parameter according to the uplink time deviation and the excitation pulse period of the ultrasonic flowmeter, and the calculation formula of the uplink error wave parameter is:
[0094]
[0095] In the formula, is the uplink error wave parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the uplink time deviation, is the excitation pulse period, is the fault tolerance rate.
[0096] Step S1042, determining the downlink error wave parameter according to the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter, and the calculation formula of the downlink error wave parameter is:
[0097]
[0098] In the formula, is the downlink error parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the downlink time deviation.
[0099] Specifically, The value is 0.85-0.95, by adding The error tolerance of the excitation pulse period can be increased. In one example The value of is 0.9.
[0100] In some embodiments, before obtaining the measured uplink time and the measured downlink time of the ultrasonic flowmeter, it includes: obtaining a number of zero-crossing points of the ultrasonic flowmeter in the uplink echo and a number of zero-crossing points in the downlink echo, and dividing the zero-crossing points of the ultrasonic flowmeter in the uplink echo and the zero-crossing points of the downlink echo into a number of current zero-crossing points, a number of front zero-crossing points before the current zero-crossing point, and a number of rear zero-crossing points after the current zero-crossing point.
[0101] Specifically, the ultrasonic flowmeter needs to measure and save the zero crossing point of the uplink echo before leaving the factory. ~ , the zero crossing point of the downlink echo ~ , before and after the zero crossing point of the uplink echo Zero crossing ~ and ~ The value of and the zero crossing point of the downlink echo Zero crossing ~ and ~ The value of the error wave can be obtained and the correction value corresponding to the different error wave types can be calculated. Subsequently, the corresponding correction value can be directly determined by the error wave direction and number.
[0102] The calculation method of the correction value of the uplink echo and the downlink echo is the same. The correction value corresponding to the wave is:
[0103]
[0104] In the formula, , , , , and They represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo, is the number of uplink error waves, , is the number of current zero crossings, is the number of zero crossings before and after in the uplink echo, and the number of zero crossings before and after in the downlink echo, and All are positive integers.
[0105] Back error The correction value corresponding to the wave is:
[0106]
[0107] In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo.
[0108] For example: When the previous error is one wave, the correction value is , when the previous two waves are wrong, the correction value is Similarly, the correction value when the next wave is missed is , when the error is two waves later, the correction value is , the maximum correction value for the measured uplink time is Wrong A wave.
[0109] Further, in step S105, error correction is performed on the measured uplink time and the measured downlink time according to the uplink error parameter and the downlink error parameter to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference, including:
[0110] Step S1051, determine the number of uplink error waves and the direction of uplink error waves according to the uplink error wave parameters, determine the corresponding first correction value based on the number of uplink error waves and the direction of uplink error waves, add the first correction value and the measured uplink time to obtain the corrected uplink time.
[0111] Specifically, the value of the uplink error wave parameter is the number of uplink error waves, and the positive or negative value indicates the direction of the uplink error wave.
[0112] If the direction of the upward wrong wave is the forward wrong wave, the corresponding first correction value is:
[0113]
[0114] In the formula, , , , , and They represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo, is the number of uplink error waves, , is the number of current zero crossings, is the number of zero crossings before and after in the uplink echo, and the number of zero crossings before and after in the downlink echo, and All are positive integers.
[0115] If the upgoing wrong wave direction is the rear wrong wave, the corresponding first correction value is:
[0116]
[0117] In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo.
[0118] After obtaining the first correction value, add the first correction value and the measured uplink time to obtain the corrected uplink time. , for example, the uplink error wave parameter , it means that the later one wave is missed, and the corrected upward time Similarly, the uplink error wave parameter , it means that the previous error is 1 wave. , the maximum correction value for the measured uplink time is Wrong A wave.
[0119] Step S1052, determine the number of downlink error waves and the direction of the downlink error waves according to the downlink error wave parameters, determine the corresponding second correction value based on the number of downlink error waves and the direction of the downlink error waves, add the second correction value and the measured downlink time to obtain the corrected downlink time.
[0120] Specifically, the value of the downlink error wave parameter is the number of downlink error waves, and the positive or negative value indicates the direction of the downlink error wave.
[0121] If the downlink wrong wave direction is the forward wrong wave, the corresponding second correction value is:
[0122]
[0123] In the formula, , , , , and They represent the zero-crossing values of the corresponding serial numbers in the downlink echo. is the number of downlink error waves, ;
[0124] If the downlink error wave direction is the rear error wave, the corresponding second correction value is:
[0125]
[0126] In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the downlink echo.
[0127] The calculation of the second correction value is similar to the first correction value. After obtaining the second correction value, add the second correction value to the measured downlink time to obtain the corrected downlink time. .
[0128] Step S1053, subtract the corrected uplink time from the corrected downlink time to obtain a corrected flight time difference.
[0129] Specifically, the corrected flight time difference for:
[0130]
[0131] By obtaining the values of the current zero-crossing point and multiple zero-crossing points before and after it required for measurement in advance, and calculating the first correction value and the second correction value of the error wave correction compensation based on them, the measurement error of a single data can be reduced and the correction result can be made more accurate.
[0132] The ultrasonic flowmeter error wave correction method of the embodiment of the present invention is described below in conjunction with a specific application scenario.
[0133] Example 1: In a normal test at a certain flow point, the measured uplink time and downlink time are 53.2µs and 52.8µs respectively (the flight time at zero flow is 53µs, and the excitation pulse period is The actual flight time difference is 1µs), and the actual flight time difference is 0.4µs. Taking the case where the uplink flight time is one wave late, the measured uplink time and downlink time are 54.2µs and 52.8µs respectively, and the flight time difference is 1.4µs. The logic of the error wave judgment and correction is as follows.
[0134] 1. Pre-process the flight time difference according to the current flow state. Due to physical limitations (fluid velocity of ultrasonic flow measurement is less than 10m / s), the flight time difference is within 1µs, positive for downstream and negative for upstream. The wrong wave occurs in an integer number of excitation cycles, so the actual flight time difference is about 0.4µs.
[0135] 2. Preprocess the uplink and downlink flight times. Based on the flight time difference in the first step, the uplink time and downlink time calculation values under zero traffic can be reversed. The uplink time calculation value is 54.2µs–0.4µs / 2=54µs, and the downlink time calculation value is 52.8µs+0.4µs / 2=53µs.
[0136] 3. Compare the calculated uplink time and downlink time with the standard flight time. For comparison, when its deviation is greater than the excitation pulse period When the remainder is between -0.25µs and 0.25µs, the deviation is greater than ( ) Indicates the magnitude and direction of the error wave (a positive number indicates a backward error).
[0137] 4. Make corrections based on the wrong wave flight time learned at the factory.
[0138] Example 2: In a normal test at a certain flow point, the measured uplink time and downlink time are 52.8µs and 53.2µs respectively (the flight time at zero flow is 53µs, and the excitation pulse period is The actual flight time difference is 1µs), and the actual flight time difference is -0.4µs (reverse flow). Taking the case where the uplink flight time is one wave behind, the measured uplink time and downlink time are 53.8µs and 53.2µs respectively, the flight time difference is 0.6µs, and the flow state is positive. Then the logic of the error wave judgment and correction is as follows.
[0139] The fluid flow direction is forward, and the measured flight time difference is 0.6µs. The corrected uplink and downlink flight times are 53.5µs and 53.5µs, and the residual deviation from the standard flight time difference is between 0.25µs and 0.75µs. It can be judged that the flow direction is reverse. At this time, the correction is ended and a flow direction warning is issued.
[0140] Example 3: This example is different from the above two examples in that it does not need to be corrected based on the wrong wave flight time learned at the factory, but directly compensates and corrects 1µs for each wrong wave.
[0141] The present invention also provides an ultrasonic flowmeter error correction device, such as Figure 3 As shown, including:
[0142] The measured data acquisition module 301 is used to obtain the measured uplink time and the measured downlink time of the ultrasonic flow meter, and calculate the measured flight time difference according to the measured uplink time and the measured downlink time;
[0143] The time calculation module 302 is used to calculate the uplink time measurement value and the downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time;
[0144] Deviation calculation module 303, used to calculate the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, respectively, where the standard flight time is the theoretical time for the sound wave to propagate from the transmitting end to the receiving end;
[0145] The error wave parameter calculation module 304 is used to determine the uplink error wave parameter and the downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively;
[0146] The time correction module 305 is used to perform error correction on the measured uplink time and the measured downlink time according to the uplink error parameter and the downlink error parameter to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference.
[0147] The ultrasonic flowmeter error correction device of the embodiment of the present invention uses the measured flight time difference, the measured uplink time and the measured downlink time to reversely calculate the uplink time measurement value and the downlink time measurement value under zero flow, and then calculates the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, respectively. The standard flight time is the theoretical time for the sound wave to propagate from the transmitting end to the receiving end. The uplink error wave parameter and the downlink error wave parameter are determined according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter to obtain the error wave situation. The measured uplink time and the measured downlink time are corrected according to the uplink error wave parameter and the downlink error wave parameter to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference. The calculation process is simple, and the uplink error wave parameter and the downlink error wave parameter are calculated separately. The error wave situation analysis is more accurate, so that the subsequent correction effect is more precise.
[0148] Furthermore, the time measurement module 302 includes:
[0149] A data preprocessing module, used to preprocess the measured flight time difference according to the fluid flow state to obtain the actual flight time difference;
[0150] The uplink and downlink time calculation module is used to calculate the uplink time measurement value and the downlink time measurement value under zero traffic based on the measured uplink time, the measured downlink time and the actual flight time difference.
[0151] Furthermore, the data preprocessing module includes:
[0152] A downstream preprocessing module is used to determine the flow state of the fluid. When the flow state of the fluid is downstream, the actual flight time difference is compared with the forward starting flow flight time difference threshold. If the actual flight time difference is greater than the forward starting flow flight time difference threshold, the actual flight time difference is the remainder obtained by dividing the actual flight time difference by the excitation pulse period. If the actual flight time difference is less than the forward starting flow flight time difference threshold, the actual flight time difference is the sum of the remainder obtained by dividing the actual flight time difference by the excitation pulse period and the excitation pulse period.
[0153] The countercurrent preprocessing module is used to compare the measured flight time difference and the reverse starting flow flight time difference threshold when the fluid flow direction state is countercurrent. If the measured flight time difference is less than the reverse starting flow flight time difference threshold, the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period. If the measured flight time difference is greater than the reverse starting flow flight time difference threshold, the actual flight time difference is the difference between the remainder obtained by dividing the measured flight time difference by the excitation pulse period and the excitation pulse period.
[0154] Furthermore, the uplink and downlink time calculation module includes:
[0155] The uplink time calculation module is used to calculate the uplink time measurement value under zero traffic according to the difference between the measured uplink time and the actual flight time in combination with the uplink time measurement formula. The uplink time measurement formula is:
[0156]
[0157] In the formula, is the measured value of uplink time under zero traffic, To measure the uplink time, is the actual flight time difference;
[0158] The downlink time calculation module is used to calculate the downlink time calculation value under zero flow according to the difference between the measured downlink time and the actual flight time in combination with the downlink time calculation formula. The downlink time calculation formula is:
[0159]
[0160] In the formula, is the estimated value of downlink time under zero traffic, It is the measured downlink time.
[0161] Furthermore, the ultrasonic flowmeter error wave correction device also includes:
[0162] An intra-cycle uplink deviation calculation module is used to obtain a remainder of the uplink time deviation divided by the excitation pulse period as the uplink time measurement value and the intra-cycle uplink deviation of the standard flight time;
[0163] The intra-cycle downlink deviation calculation module is used to obtain the remainder of the downlink time deviation divided by the excitation pulse period as the downlink time measurement value and the intra-cycle downlink deviation of the standard flight time;
[0164] The flow direction warning module is used when the upward deviation within the cycle and the downward deviation within the cycle meet ,and When , the output flow direction changes and ends the error wave correction, where: is the upward deviation within the period, is the downward deviation within the cycle, is the excitation pulse period;
[0165] Continue to correct the module, used when the upward deviation in the current period meets , or the downward deviation within the cycle satisfies When the error wave is corrected, continue to correct the error wave.
[0166] Further, the fault wave parameter calculation module 304 includes:
[0167] The uplink error wave parameter calculation module is used to determine the uplink error wave parameter according to the uplink time deviation and the excitation pulse period of the ultrasonic flowmeter. The calculation formula of the uplink error wave parameter is:
[0168]
[0169] In the formula, is the uplink error wave parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the uplink time deviation, is the excitation pulse period, is the fault tolerance rate;
[0170] The downlink error wave parameter calculation module is used to determine the downlink error wave parameter according to the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter. The calculation formula of the downlink error wave parameter is:
[0171]
[0172] In the formula, is the downlink error parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the downlink time deviation.
[0173] Furthermore, the time correction module 305 includes:
[0174] An uplink correction module, used to determine the number of uplink error waves and the direction of uplink error waves according to the uplink error wave parameter, determine the corresponding first correction value based on the number of uplink error waves and the direction of uplink error waves, add the first correction value and the measured uplink time to obtain the corrected uplink time;
[0175] A downlink correction module is used to determine the number of downlink error waves and the direction of the downlink error waves according to the downlink error wave parameter, determine the corresponding second correction value based on the number of downlink error waves and the direction of the downlink error waves, and add the second correction value to the measured downlink time to obtain the corrected downlink time;
[0176] The time difference correction module is used to subtract the corrected uplink time from the corrected downlink time to obtain a corrected flight time difference.
[0177] Furthermore, the ultrasonic flowmeter error wave correction device also includes:
[0178] A zero-crossing point acquisition module is used to acquire a number of zero-crossing points of the ultrasonic flowmeter in the uplink echo and a number of zero-crossing points in the downlink echo, and to divide the zero-crossing points of the ultrasonic flowmeter in the uplink echo and the zero-crossing points of the downlink echo into a number of current zero-crossing points, a number of front zero-crossing points before the current zero-crossing point, and a number of rear zero-crossing points after the current zero-crossing point;
[0179] Correspondingly, the uplink correction module is also used for:
[0180] If the direction of the upward wrong wave is the forward wrong wave, the corresponding first correction value is:
[0181]
[0182] In the formula, , , , , and They represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo, is the number of uplink error waves, , is the number of current zero crossings, is the number of zero crossings before and after in the uplink echo, and the number of zero crossings before and after in the downlink echo, and are all positive integers;
[0183] If the upgoing wrong wave direction is the rear wrong wave, the corresponding first correction value is:
[0184]
[0185] In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo;
[0186] The downside correction module is also used to:
[0187] If the downlink wrong wave direction is the forward wrong wave, the corresponding second correction value is:
[0188]
[0189] In the formula, , , , , and They represent the zero-crossing values of the corresponding serial numbers in the downlink echo. is the number of downlink error waves, ;
[0190] If the downlink error wave direction is the rear error wave, the corresponding second correction value is:
[0191]
[0192] In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the downlink echo.
[0193] The embodiment of the present invention also provides a schematic diagram of the structure of a computer device, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0194] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0195] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0196] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0197] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0198] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0199] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.
[0200] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0201] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0202] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope of protection.
Claims
1. A method for correcting an ultrasonic flowmeter error wave, characterized in that: include: Obtaining a measured uplink time and a measured downlink time of the ultrasonic flowmeter, and calculating a measured flight time difference according to the measured uplink time and the measured downlink time; Calculate the uplink time measurement value and the downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time; Respectively calculating the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, wherein the standard flight time is the theoretical time for the sound wave to propagate from the transmitting end to the receiving end; Determine an uplink error wave parameter and a downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively; The measured uplink time and the measured downlink time are corrected for wave errors according to the uplink wave error parameter and the downlink wave error parameter to obtain a corrected uplink time, a corrected downlink time and a corrected flight time difference.
2. The ultrasonic flowmeter error wave correction method according to claim 1 is characterized in that: The calculating of the uplink time measurement value and the downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time comprises: Preprocessing the measured flight time difference according to the fluid flow state to obtain the actual flight time difference; The uplink time measurement value and the downlink time measurement value under zero traffic are calculated according to the measured uplink time, the measured downlink time and the actual flight time difference.
3. The ultrasonic flowmeter error wave correction method according to claim 2 is characterized in that: The preprocessing of the measured flight time difference according to the fluid flow state to obtain the actual flight time difference includes: Determine the fluid flow state, when the fluid flow state is downstream, compare the measured flight time difference with the forward starting flow flight time difference threshold, if the measured flight time difference is greater than the forward starting flow flight time difference threshold, then the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period, if the measured flight time difference is less than the forward starting flow flight time difference threshold, then the actual flight time difference is the sum of the remainder obtained by dividing the measured flight time difference by the excitation pulse period and the excitation pulse period; When the fluid flow direction is countercurrent, compare the measured flight time difference with the reverse starting flow flight time difference threshold. If the measured flight time difference is smaller than the reverse starting flow flight time difference threshold, the actual flight time difference is the remainder obtained by dividing the measured flight time difference by the excitation pulse period. If the measured flight time difference is larger than the reverse starting flow flight time difference threshold, the actual flight time difference is the difference between the remainder obtained by dividing the measured flight time difference by the excitation pulse period and the excitation pulse period.
4. The ultrasonic flowmeter error wave correction method according to claim 2 is characterized in that: The calculating of the uplink time measurement value and the downlink time measurement value under zero flow according to the measured uplink time, the measured downlink time and the actual flight time difference comprises: Combined with the uplink time calculation formula, the uplink time calculation value under zero flow is calculated according to the measured uplink time and the actual flight time difference. The uplink time calculation formula is: In the formula, is the measured value of uplink time under zero traffic, is the measured uplink time, is the actual flight time difference; Combined with the downlink time calculation formula, the downlink time calculation value under zero flow is calculated according to the measured downlink time and the actual flight time difference. The downlink time calculation formula is: In the formula, is the estimated value of downlink time under zero traffic, is the measured downlink time.
5. The ultrasonic flowmeter error wave correction method according to claim 1 is characterized in that: After respectively calculating the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, the method further includes: The remainder obtained by dividing the uplink time deviation by the excitation pulse period is used as the uplink deviation within the period of the uplink time measurement value and the standard flight time; The remainder obtained by dividing the downlink time deviation by the excitation pulse period is used as the downlink deviation within the period of the downlink time measurement value and the standard flight time; When the upside deviation within the cycle and the downside deviation within the cycle meet ,and When , the output flow direction changes and ends the error wave correction, where: is the upward deviation within the period, is the downward deviation within the period, is the excitation pulse period; When the upward deviation within the period satisfies , or the downward deviation within the period satisfies When the error wave is corrected, continue to correct the error wave.
6. The ultrasonic flowmeter error wave correction method according to claim 1 is characterized in that: The method of determining an uplink error wave parameter and a downlink error wave parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively includes: The uplink error wave parameter is determined according to the uplink time deviation and the excitation pulse period of the ultrasonic flowmeter. The calculation formula of the uplink error wave parameter is: In the formula, is the uplink error wave parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the uplink time deviation, is the excitation pulse period, is the fault tolerance rate; The downlink error wave parameter is determined according to the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter. The calculation formula of the downlink error wave parameter is: In the formula, is the downlink error parameter, The value of indicates the number of wrong waves. The sign indicates the direction of the wrong wave, the negative sign indicates the front wrong wave, and the positive sign indicates the back wrong wave. is the downlink time deviation.
7. The ultrasonic flowmeter error wave correction method according to claim 1 is characterized in that: The step of performing error correction on the measured uplink time and the measured downlink time according to the uplink error parameter and the downlink error parameter to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference comprises: Determine the number of uplink error waves and the direction of uplink error waves according to the uplink error wave parameter, determine a corresponding first correction value based on the number of uplink error waves and the direction of uplink error waves, and add the first correction value to the measured uplink time to obtain a corrected uplink time; Determine the number of downlink error waves and the direction of downlink error waves according to the downlink error wave parameter, determine a corresponding second correction value based on the number of downlink error waves and the direction of downlink error waves, and add the second correction value to the measured downlink time to obtain a corrected downlink time; Subtract the corrected uplink time from the corrected downlink time to obtain the corrected flight time difference.
8. The ultrasonic flowmeter error wave correction method according to claim 7 is characterized in that: Before obtaining the measured uplink time and downlink time of the ultrasonic flow meter, including: Acquire a number of zero-crossing points of the ultrasonic flowmeter in the uplink echo and a number of zero-crossing points of the ultrasonic flowmeter in the downlink echo, and divide the zero-crossing points of the ultrasonic flowmeter in the uplink echo and the zero-crossing points of the ultrasonic flowmeter in the downlink echo into a number of current zero-crossing points, a number of front zero-crossing points before the current zero-crossing point, and a number of rear zero-crossing points after the current zero-crossing point; Correspondingly, determining a corresponding first correction value based on the number of uplink error waves and the uplink error wave direction includes: If the upward wrong wave direction is the forward wrong wave, the corresponding first correction value is: In the formula, , , , , and They represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo, is the number of uplink error waves, , is the number of current zero crossings, is the number of zero crossings before and after in the uplink echo, and the number of zero crossings before and after in the downlink echo, and All are positive integers; If the upgoing stray wave direction is a rear stray wave, the corresponding first correction value is: In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the uplink echo; Determining a corresponding second correction value based on the number of downlink error waves and the downlink error wave direction includes: If the downlink error wave direction is the forward error wave, the corresponding second correction value is: In the formula, , , , , and They represent the zero-crossing values of the corresponding serial numbers in the downlink echo. is the number of downlink error waves, ; If the downlink staggered wave direction is a rear staggered wave, the corresponding second correction value is: In the formula, , , , , and They respectively represent the values of the zero-crossing points of the corresponding serial numbers in the downlink echo.
9. An ultrasonic flowmeter error correction device, characterized in that: include: A measured data acquisition module, used to obtain the measured uplink time and the measured downlink time of the ultrasonic flow meter, and calculate the measured flight time difference according to the measured uplink time and the measured downlink time; A time calculation module, used to calculate an uplink time measurement value and a downlink time measurement value under zero flow according to the measured flight time difference, the measured uplink time and the measured downlink time; A deviation calculation module, used to calculate the uplink time deviation of the uplink time measurement value relative to the standard flight time, and the downlink time deviation of the downlink time measurement value relative to the standard flight time, respectively, wherein the standard flight time is the theoretical time for the sound wave to propagate from the transmitting end to the receiving end; A wave error parameter calculation module, used to determine an uplink wave error parameter and a downlink wave error parameter according to the uplink time deviation, the downlink time deviation and the excitation pulse period of the ultrasonic flowmeter respectively; The time correction module is used to perform error correction on the measured uplink time and the measured downlink time according to the uplink error parameter and the downlink error parameter to obtain the corrected uplink time, the corrected downlink time and the corrected flight time difference.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the ultrasonic flowmeter error wave correction method according to any one of claims 1 to 8 by executing the computer instructions.
Citation Information
Patent Citations
Flow rate measuring device and flow rate calculation method
CN104797908A
Parameter calibration and verification test method of time-difference method ultrasonic flowmeter
CN115900896A