Self-adaptive measurement method of ultrasonic flowmeter in unknown liquid flow
By using π-type tube and TDC-GP30 chip in ultrasonic flowmeter, combined with the main control chip and support vector machine classifier, the sound speed of liquid is identified, and the accuracy of unknown liquid flow measurement is solved, and the accurate measurement of different liquids is achieved. .
Patent Information
- Application Number
- CN202411350619.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing ultrasonic flowmeters cannot accurately measure unknown liquid flow, and traditional methods cannot effectively solve the measurement accuracy and accuracy problems caused by differences in sound speed and acoustic impedance of different liquids.
Two ultrasonic transducers and TDC-GP30 chips are installed using π-type tubes, combined with the main control chip and support vector machine classifier, the sound speed of the liquid is calculated through the temperature compensation table and the time of flight difference, and the parameters are dynamically adjusted to achieve accurate measurement of different liquids. .
High-precision measurement of unknown liquid flow is realized. Through high-precision time measurement and data preprocessing, combined with the support vector machine classifier to identify the characteristics of liquid types, dynamically adjust the ultrasonic flowmeter parameters to ensure the accuracy and accuracy of measurement.
Smart Images

Figure CN119124285A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of fluid measurement, in particular to a method for measuring liquid flow by using an ultrasonic flowmeter. Background Art
[0002] In the field of fluid measurement, ultrasonic flow meters are widely used in various industrial and commercial scenarios to accurately measure the flow rate of fluids. Traditional ultrasonic flow meters are usually measured based on the time-of-flight principle, which uses the time difference of the propagation time of ultrasonic waves in the liquid to calculate the flow rate. However, there are large differences in the sound velocity and acoustic impedance of different liquids, so the precision and accuracy of the same ultrasonic flow meter in different liquids will be affected. In practical applications, unknown liquids are often encountered. For example, in industrial production, the type of fluid may change due to changes in the production process. In this case, if the same ultrasonic flow meter and the usual time-of-flight principle are used to measure the flow of unknown liquids, the measurement results will definitely be inaccurate, so an adaptive method is needed to achieve accurate flow measurement.
[0003] The ultrasonic flowmeter disclosed in the document with Chinese patent publication number CN109323730A and titled "A dual-channel gas ultrasonic flowmeter based on TDC-GP30 and method of use" respectively selects two groups of transducers through electronic switches, the time chip transmits pulses, the echo signal of the ultrasonic flow returns to the time chip, and the calculation result is passed to the single-chip microcomputer MCU for storage; the time chip measures the medium temperature of the pipeline in real time, the single-chip microcomputer MCU calculates the current temperature, the single-chip microcomputer MCU collects pressure from the pressure sensor and calculates the pipeline pressure value, and uses a dual-channel transducer to measure the instantaneous flow of the medium in the pipeline, thereby reducing the measurement error caused by uneven distribution of the fluid in the pipeline. According to the method disclosed in the document with Chinese patent publication number CN106996811A and the name of the measurement method of a high-accuracy intelligent liquid ultrasonic flowmeter, the signal is collected through the TDC-GP30 chip produced by the German ACAM company. The flow rate S1 of the ultrasonic flowmeter is S = K1 * S, K1 is the correction coefficient, which is used to correct the error caused by the inconsistency of each ultrasonic pipeline, and S is the original flow rate of the ultrasonic flowmeter; the K1 coefficient of 20 stages is obtained according to the difference of the upstream and downstream flight time. The flight time is the propagation time of the upstream transducer and the downstream transducer of the ultrasonic instrument pipe section in the medium. It is judged which stage the flight time is in and the coefficient K1 of the stage value is obtained. According to the position of the flight time in the stage, K1 = K2 * K1 is obtained, and K2 is calculated according to the distance of the probe and the flight time. The above two methods of measuring flow rate using ultrasonic flowmeter are both based on the measurement of the same known liquid. They can only solve the measurement error caused by uneven fluid distribution or the error caused by the inconsistency of ultrasonic pipelines, but still cannot solve the measurement of unknown liquid flow. Therefore, this field urgently needs an adaptive method to realize accurate measurement of unknown liquid flow. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the existing ultrasonic flowmeter cannot accurately measure the flow of unknown liquids and to propose an ultrasonic flowmeter for adaptively measuring the flow of unknown liquids, thereby identifying the characteristics of the liquid type and realizing accurate measurement of different liquids.
[0005] To achieve the above object, the technical solution adopted by the present invention comprises the following steps:
[0006] Step 1): Use a π-shaped tube, install the first ultrasonic transducer upstream of the π-shaped tube, and install the second ultrasonic transducer downstream of the π-shaped tube. Two ultrasonic transducers, a TDC-GP30 chip, and a main control chip together form an ultrasonic flow meter;
[0007] Step 2): Preset a temperature compensation table in the PC. The temperature compensation table contains fitting formulas for different liquid types and corresponding sound velocities. The specific value of the sound velocity c of the liquid at the temperature T is obtained from the known liquid type.
[0008] Step 3): The temperature sensor measures the temperature T of the liquid in the π-tube and transmits it to the TDC-GP30 chip. The TDC-GP30 chip measures the upstream flight time t1 and the downstream flight time t2 of the ultrasonic wave passing through the π-tube liquid, calculates the time difference △t=t1-t2, and sends the temperature T, time difference △t, flight time t1, t2 to the main control chip; if the type of liquid is unknown, the main control chip sends the liquid temperature T, flight time t1, t2 to the PC;
[0009] Step 4): PC according to the formula Calculate the characteristic parameters of the liquid type in the π-shaped pipe section c is the speed of sound, l is the distance between the two ultrasonic transducers, and p is the length of the intersection between the liquid streamline and the ultrasonic wave when the liquid flows through the π-shaped tube;
[0010] Step 5): The temperature T and the spacing l are input into the trained support vector machine classifier to obtain the current liquid type;
[0011] Step 6): Obtain the sound velocity corresponding to the current liquid type according to the temperature compensation table, and calculate the flow rate and flow rate based on the sound velocity.
[0012] The beneficial effects of the present invention after adopting the above technical solution are:
[0013] (1) The present invention adopts a high-precision time measurement chip TDC-GP30, reads the time difference in the time conversion mode, adopts the time difference method to measure the liquid flow rate, and adopts a filtering algorithm to perform data preprocessing to ensure the measurement accuracy.
[0014] (2) The present invention adopts the support vector classifier (SVC) method to associate the flight time measured by TDC-GP30 with the characteristic parameters of the liquid type, and explores the relationship between the potential factors of the flight time and the characteristic parameters of the liquid type, so that the measurement is accurate.
[0015] (3) The present invention dynamically adjusts the parameters and calibration model of the ultrasonic flow meter according to the identified liquid type characteristics to achieve accurate measurement of different liquids. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is the structure diagram of π-type tube;
[0017] Figure 2 This is the structural principle diagram of the ultrasonic flow meter;
[0018] Figure 3 Flow chart of the measurement method of the present invention. DETAILED DESCRIPTION
[0019] See also Figure 1 , Figure 2 and Figure 3 As shown, the present invention first installs two ultrasonic transducers T1 and T2 on a π-shaped tube. The two ultrasonic transducers T1, T2, a TDC-GP30 chip, and a main control chip together form an ultrasonic flowmeter. Then the STM32F407VET6 main control chip in the ultrasonic flowmeter is bidirectionally connected to the PC, and a temperature compensation table is preset in the PC. The temperature compensation table provides the corresponding sound velocity c information of different types of liquids at temperature T. The measurement is restarted, and the ultrasonic flowmeter measures the ultrasonic flight time of the liquid passing through the π-shaped tube, and pre-processes the flight time. At the same time, the liquid temperature T is transmitted to the STM32F407VET6 main control chip. For unknown liquid types, the liquid temperature T and the flight time are sent to the PC, and the characteristic parameters of the liquid type are calculated in the PC. The temperature T and the spacing l are input into the trained support vector machine classifier, and the trained support vector machine classifier is used to associate the liquid types. Finally, the sound velocity fitting formula is selected according to the temperature compensation table to calculate the flow rate and flow rate at the current liquid temperature. The details are as follows:
[0020] Step 1: Install the ultrasonic flow meter
[0021] like Figure 1 and Figure 3 As shown, a π-shaped tube is used, and the liquid flows through the π-shaped tube. The inner diameter of the π-shaped tube is r = 20mm, and two ultrasonic transducers T1 and T2 are installed on both sides of the π-shaped tube. The selected ultrasonic transducer is a 1MHZ transducer. The first ultrasonic transducer T1 is installed upstream of the π-shaped tube, and the second ultrasonic transducer T2 is installed downstream of the π-shaped tube. The distance between the two ultrasonic transducers T1 and T2 is l, and the liquid streamline and ultrasonic intersection length when the liquid flows through the π-shaped tube is p.
[0022] like Figure 2 and Figure 3As shown, the two ultrasonic transducers T1 and T2 are bidirectionally connected to the high-precision time measurement chip, namely the TDC-GP30 chip. The TDC-GP30 chip is bidirectionally connected to the STM32F407VET6 main control chip. The STM32F407VET6 main control chip is used for data preprocessing and processing to calculate the liquid flow rate. The TDC-GP30 chip is also connected to a temperature sensor, which is connected to the π-shaped tube. The temperature sensor uses a PT1000 sensor to measure the temperature T of the liquid in the π-shaped tube and transmit the temperature T to the TDC-GP30 chip. The ultrasonic flowmeter is composed of two ultrasonic transducers T1 and T2, the TDC-GP30 chip, and the main control chip, so that the ultrasonic flowmeter is installed on the π-shaped tube.
[0023] Step 2: Preset temperature compensation table
[0024] The STM32F407VET6 main control chip is connected to the PC in a bidirectional manner. The temperature compensation table is preset in the PC, as shown in Table 1 below:
[0025] Table 1 Temperature compensation table
[0026] Liquid type <![CDATA[Sound velocity fitting formula (c = c0 + λ1T + λ2T 2 + λ3T 3 +...)]]> water <![CDATA[c=1403.7+4.796T-0.0462T 2 +0.0001T 3 ]]> Ethylene glycol <![CDATA[c=1658.0+25.97T-0.9441T 2 +0.01135T 3 ]]> … …
[0027] Different liquid types set in the temperature compensation table and the corresponding sound velocity fitting formula (c = c0 + λ1T + λ2T 2 +λ3T 3 +...), where c0 represents the sound velocity of the liquid at a temperature of 0 degrees Celsius, λ1, λ2, and λ3 represent coefficients in the fitting formula, and the specific value of the sound velocity c at the temperature T can be obtained from the known type of liquid.
[0028] Step 3: Measure flight time and temperature
[0029] The TDC-GP30 chip uses the time difference method to measure the ultrasonic flight time of the liquid passing through the π-type tube. The calculation formula for obtaining the flight time (time up, time down) in the time conversion mode is as follows:
[0030]
[0031] Where t1 is the upstream flight time, t2 is the downstream flight time, v is the flow velocity, and c is the speed of sound. At this time, the speed of sound c is unknown. The purpose of calculating the flight time using the formula (1) is to obtain the liquid type characteristic parameters in the following formula (2): δ is the disturbance term, which is mainly caused by the liquid flow in the lp segment.
[0032] Then, the time difference △t=t1-t2 is calculated, and the TDC-GP30 chip sends the time difference △t, t1, and t2 to the STM32F407VET6 main control chip via SPI.
[0033] At the same time, a temperature sensor is used to measure the liquid temperature, obtain the liquid temperature T, and send the liquid temperature T to the STM32F407VET6 main control chip through SPI.
[0034] Step 4: Time of Flight Preprocessing
[0035] The STM32F407VET6 main control chip preprocesses the data of the flight time t1 and t2, and uses the first-order Kalman filter to preprocess the acquired flight time t1 and t2 to reduce the interference of Gaussian noise on the signal.
[0036] Step 5: Associate liquid types
[0037] The main control chip determines whether the liquid type is known. If the liquid type is known, it can be directly searched and the association is skipped. The PC directly obtains the sound velocity corresponding to the current liquid type according to the temperature compensation table 1 and calculates the flow rate and flow rate. If the liquid type is unknown, the liquid temperature T and flight time t1, t2 are sent to the PC, and the liquid type characteristic parameters are calculated in the PC. Ignoring the disturbance term in equation (1), the following equation can be obtained:
[0038]
[0039] From this, we can get the characteristic parameters of the liquid type in the π-shaped pipe section Because of the disturbance term, the sound speed is biased. The temperature T and the transducer spacing l are matched to the liquid type using a trained support vector machine classifier (SVC). Therefore, once the liquid type is obtained, the accurate sound velocity c of the current liquid can be obtained by looking up Table 1.
[0040] After the association is completed, return to step 3 to perform flight time and temperature measurements.
[0041] Step 6: Calculate the flow rate
[0042] After obtaining the current liquid category, start the ultrasonic flow meter to measure the flight time and temperature.
[0043] Based on the pre-designed temperature compensation table 1, the PC selects the sound velocity c fitting formula, calculates the sound velocity c at the current liquid temperature T, and then calculates the flow velocity v based on the sound velocity c:
[0044]
[0045] Substituting the time difference △t=t1-t2, the sound velocity c, and the liquid streamline and ultrasonic wave intersection length when the liquid flows through the π-shaped tube into formula (3) to obtain the liquid flow velocity v.
[0046] Finally, the flow rate Q is calculated based on the flow velocity v:
[0047] Q=KvA (4)
[0048] K is the correction coefficient K, which converts the linear flow velocity into the surface flow velocity. A is the cross-sectional area of the π-shaped pipe. Substituting the coefficient K, flow velocity v, and cross-sectional area A into formula (4), the ultrasonic flowmeter can measure the flow rate in the unknown liquid.
[0049] Step 7: Return to step 3 and perform flight time and temperature measurements until step 6 is reached, and the measurement cycle is repeated.
Claims
1. A method for adaptively measuring the flow rate of an unknown liquid using an ultrasonic flowmeter, characterized in that The following steps are involved: Step 1): Use a π-shaped tube, install the first ultrasonic transducer upstream of the π-shaped tube, and install the second ultrasonic transducer downstream of the π-shaped tube. Two ultrasonic transducers, a TDC-GP30 chip, and a main control chip together form an ultrasonic flow meter; Step 2): Preset a temperature compensation table in the PC. The temperature compensation table contains fitting formulas for different liquid types and corresponding sound velocities. The specific value of the sound velocity c of the liquid at the temperature T is obtained from the known liquid type. Step 3): The temperature sensor measures the temperature T of the liquid in the π-tube and transmits it to the TDC-GP30 chip. The TDC-GP30 chip measures the upstream flight time t1 and the downstream flight time t2 of the ultrasonic wave passing through the π-tube liquid, calculates the time difference △t=t1-t2, and sends the temperature T, time difference △t, flight time t1, t2 to the main control chip; if the type of liquid is unknown, the main control chip sends the liquid temperature T, flight time t1, t2 to the PC; Step 4): PC according to the formula Calculate the characteristic parameters of the liquid type in the π-shaped pipe section c is the speed of sound, l is the distance between the two ultrasonic transducers, and p is the length of the intersection between the liquid streamline and the ultrasonic wave when the liquid flows through the π-shaped tube; Step 5): The temperature T and the spacing l are input into the trained support vector machine classifier to obtain the current liquid type; Step 6): Obtain the sound velocity corresponding to the current liquid type according to the temperature compensation table, and calculate the flow rate and flow rate based on the sound velocity.
2. The method for adaptively measuring the flow rate of an unknown liquid using an ultrasonic flowmeter according to claim 1, characterized in that: The temperature compensation table is:
3. The method for adaptively measuring the flow rate of an unknown liquid using an ultrasonic flowmeter according to claim 1, characterized in that: Said upstream flight time Flight time v is the flow velocity, c is the speed of sound, and δ is the disturbance term caused by the liquid flow in the lp section.
4. The method for adaptively measuring the flow rate of an unknown liquid using an ultrasonic flowmeter according to claim 1, characterized in that: The main control chip uses a first-order Kalman filter to pre-process the flight times t1 and t2.
5. The method for adaptively measuring the flow rate of an unknown liquid using an ultrasonic flowmeter according to claim 1, characterized in that: The main control chip first determines whether the type of liquid is known. If it is known, the PC directly executes step 6).
6. The method for adaptively measuring unknown liquid flow rate using an ultrasonic flowmeter according to claim 1, characterized in that: According to the formula Calculate the flow velocity v.
7. The method for adaptively measuring unknown liquid flow rate using an ultrasonic flowmeter according to claim 6, characterized in that: The flow rate Q is calculated according to the formula Q=KvA, K is the correction coefficient K, which converts the linear flow velocity into the surface flow velocity, and A is the cross-sectional area inside the π-shaped pipe.
8. The method for adaptively measuring unknown liquid flow rate using an ultrasonic flowmeter according to claim 1, characterized in that: The inner diameter of the π-type tube is r=20mm, a 1MHZ ultrasonic transducer is selected, and a PT1000 temperature sensor is used.
Citation Information
Patent Citations
Metering method of high-accuracy intelligent liquid ultrasonic flowmeter
CN106996811A
Gas ultrasonic flowmeter based on TDC-GP30 and dual-channel and using method thereof
CN109323730A
Ultrasonic flowmeter with fluid medium identification function and identification method
CN114812713A
Flow measuring and calculating method, device and equipment of ultrasonic water meter and readable storage medium
CN118050062A
Ultrasonic flow meter unit for detecting mixing ratio of liquid components
EP2369305A1
