CN112147620A - System and method for measuring ultrasonic flight time in pipeline - Google Patents

System and method for measuring ultrasonic flight time in pipeline Download PDF

Info

Publication number
CN112147620A
CN112147620A CN202011014473.9A CN202011014473A CN112147620A CN 112147620 A CN112147620 A CN 112147620A CN 202011014473 A CN202011014473 A CN 202011014473A CN 112147620 A CN112147620 A CN 112147620A
Authority
CN
China
Prior art keywords
ultrasonic
ultrasonic wave
time
flight
analog front
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011014473.9A
Other languages
Chinese (zh)
Inventor
侯怀书
张毅
陆顶
方建飞
余晓东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Institute of Technology
Original Assignee
Shanghai Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Institute of Technology filed Critical Shanghai Institute of Technology
Priority to CN202011014473.9A priority Critical patent/CN112147620A/en
Publication of CN112147620A publication Critical patent/CN112147620A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S15/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/02Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems using reflection of acoustic waves
    • G01S15/50Systems of measurement, based on relative movement of the target
    • G01S15/58Velocity or trajectory determination systems; Sense-of-movement determination systems
    • G01S15/582Velocity or trajectory determination systems; Sense-of-movement determination systems using transmission of interrupted pulse-modulated waves and based upon the Doppler effect resulting from movement of targets
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F1/00Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow
    • G01F1/66Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow by measuring frequency, phase shift or propagation time of electromagnetic or other waves, e.g. using ultrasonic flowmeters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F1/00Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow
    • G01F1/66Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow by measuring frequency, phase shift or propagation time of electromagnetic or other waves, e.g. using ultrasonic flowmeters
    • G01F1/662Constructional details
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01LMEASURING FORCE, STRESS, TORQUE, WORK, MECHANICAL POWER, MECHANICAL EFFICIENCY, OR FLUID PRESSURE
    • G01L11/00Measuring steady or quasi-steady pressure of a fluid or a fluent solid material by means not provided for in group G01L7/00 or G01L9/00
    • G01L11/04Measuring steady or quasi-steady pressure of a fluid or a fluent solid material by means not provided for in group G01L7/00 or G01L9/00 by acoustic means
    • G01L11/06Ultrasonic means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P5/00Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft
    • G01P5/24Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft by measuring the direct influence of the streaming fluid on the properties of a detecting acoustical wave
    • G01P5/241Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft by measuring the direct influence of the streaming fluid on the properties of a detecting acoustical wave by using reflection of acoustical waves, i.e. Doppler-effect
    • G01P5/244Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft by measuring the direct influence of the streaming fluid on the properties of a detecting acoustical wave by using reflection of acoustical waves, i.e. Doppler-effect involving pulsed waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P5/00Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft
    • G01P5/24Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft by measuring the direct influence of the streaming fluid on the properties of a detecting acoustical wave
    • G01P5/245Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft by measuring the direct influence of the streaming fluid on the properties of a detecting acoustical wave by measuring transit time of acoustical waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/52Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S15/00
    • G01S7/523Details of pulse systems
    • G01S7/526Receivers
    • G01S7/527Extracting wanted echo signals

Abstract

The invention provides a system and a method for measuring the flight time of ultrasonic waves in a pipeline, wherein the system comprises the following steps: the ultrasonic wave time-of-flight measuring device comprises a microcontroller module, an ultrasonic wave time-of-flight measuring module, an ultrasonic wave driving boosting module, an echo signal A/D conversion module and an ultrasonic wave sensor, wherein the ultrasonic wave time-of-flight measuring module comprises an ultrasonic wave analog front end and a time-to-digital converter; a first measuring stage: adjusting amplification gain of the ultrasonic analog front end according to the echo signal until n peak values of the read digital signal after the ultrasonic is sent and received again are all larger than a preset threshold value, wherein n is a positive integer; and a second measuring stage: the time of flight of the ultrasonic waves is obtained by timing the sending of the ultrasonic waves and the reception of the echo waves by a time-to-digital converter. The system and the method can realize automatic gain adjustment, thereby being suitable for measuring the flight time of the ultrasonic waves in different pipeline fluids.

Description

System and method for measuring ultrasonic flight time in pipeline
Technical Field
The invention relates to the technical field of ultrasonic measurement, in particular to a system and a method for measuring the flight time of ultrasonic waves in a pipeline.
Background
Principle of ultrasonic wave sensor generation: the transmitting probe contains piezoelectric material, which will vibrate when receiving electric pulse excitation, and the vibration will generate ultrasonic wave, i.e. the transmitting probe converts electric energy into sound energy. The receiving principle of the ultrasonic wave is that when the piezoelectric material in the receiving probe receives the ultrasonic wave, voltage can be generated, namely, sound energy is converted into electric energy, and the received electric energy is very convenient to be processed next step. That is, the piezoelectric material generates ultrasonic waves when it is subjected to an electric signal, and conversely, generates an electric signal when it is subjected to ultrasonic waves.
The ultrasonic wave has the advantages of high precision, non-contact property, no damage to fluid and the like when being used for measuring the pressure and the flow of the fluid in the pipeline. The key of ultrasonic measurement of the pressure and flow of fluid in a pipeline is to measure the propagation velocity of ultrasonic waves in the fluid in the pipeline. As shown in fig. 1, the time of flight of the ultrasonic wave in the fluid in the pipe (pipe inner diameter is L) is measured in two cases, one is to measure the time of flight of the ultrasonic wave in the same direction as the fluid by the ultrasonic sensor I, II and the other is to measure the time of flight of the ultrasonic wave in the opposite direction to the fluid. The time of flight of the ultrasonic waves in the vertical path is measured by the ultrasonic sensor III.
The propagation of the ultrasonic wave is affected by the flow direction of the fluid in the fluid supply conduit, and if the propagation direction of the ultrasonic wave is the same as the direction of the fluid flow, the propagation speed is faster than when the propagation direction of the ultrasonic wave is opposite to the direction of the fluid flow. The flow velocity of the fluid can be calculated by utilizing the difference value of the two velocities and combining other physical parameters, and then the flow of the fluid is calculated.
The propagation of the ultrasonic wave is influenced by the pressure difference of the fluid in the pipeline, and researches prove that under the same condition, the higher the fluid pressure is, the higher the propagation speed of the ultrasonic wave in the fluid is, and in combination with other physical parameters, the fluid pressure in the pipeline can be calculated through the propagation speed of the ultrasonic wave in the fluid in the pipeline.
When ultrasonic waves propagate in a medium, the energy of the ultrasonic waves is weakened along with the increase of the propagation distance, the phenomenon is called attenuation of the ultrasonic waves, the attenuation of the ultrasonic waves includes scattering attenuation, diffusion attenuation, attenuation caused by medium absorption and the like, and no matter which attenuation is adopted, when ultrasonic signals propagate in the medium for a certain distance to reach a receiving sensor, electric signals generated by the receiving sensor are all extremely tiny, and the tiny electric signals need to be amplified for subsequent processing.
The diameter of the pipeline for transporting fluid is different between production and life, so that the propagation path and the attenuation generated by the propagation of the ultrasonic wave in the pipeline are different, and therefore, the mode of measuring the flight time of the ultrasonic wave by using the fixed gain is not scientific.
Disclosure of Invention
The invention aims to provide a system and a method for measuring the flight time of ultrasonic waves in a pipeline, which aim to solve the problem that the conventional measurement mode of the flight time of the ultrasonic waves cannot adapt to different ultrasonic attenuation propagated by different pipelines, so that the measurement process needs manual adjustment, and the measurement is difficult.
In order to achieve the above object, the present invention provides a system for measuring the flight time of ultrasonic waves in a pipe, comprising:
the ultrasonic wave time-of-flight measuring device comprises a microcontroller module, an ultrasonic wave time-of-flight measuring module, an ultrasonic wave driving boosting module, an echo signal A/D conversion module and an ultrasonic wave sensor, wherein the ultrasonic wave time-of-flight measuring module comprises an ultrasonic wave analog front end and a time-to-digital converter;
a first measuring stage: the microcontroller module sends an SPI instruction to the ultrasonic simulation front end to enable the ultrasonic simulation front end to send a first excitation pulse, and the ultrasonic driving boosting module boosts the first excitation pulse and then sends the first excitation pulse to the ultrasonic sensor to send first ultrasonic waves; when a first ultrasonic wave transmitted by a medium is received, an ultrasonic sensor converts the received ultrasonic wave into an electric signal, the electric signal is amplified by the ultrasonic wave analog front end and then sent to the echo signal A/D conversion module to obtain a digital signal, the microcontroller module reads the digital signal and extracts n peak values, if the peak value larger than a preset threshold value is smaller than n, the microcontroller module controls the ultrasonic wave analog front end to adjust amplification gain until the n peak values of the read digital signal after the ultrasonic wave is sent and received again are larger than the preset threshold value, and n is a positive integer;
and a second measuring stage: the microcontroller module sends an SPI instruction to the time-to-digital converter, the time-to-digital converter sends a trigger signal to the ultrasonic analog front end to send a second excitation pulse, the ultrasonic driving boosting module boosts the second excitation pulse and sends the second excitation pulse to the ultrasonic sensor to send a second ultrasonic wave, and meanwhile, the ultrasonic analog front end sends a starting signal to the time-to-digital converter to start timing; when the second ultrasonic wave transmitted by the medium is received, the ultrasonic sensor converts the received ultrasonic wave into an electric signal, and then sends the electric signal to the ultrasonic analog front end to enable the ultrasonic analog front end to send a stop signal to the time-to-digital converter to stop timing, and the time between the stop timing and the start timing is taken as the flight time of the ultrasonic wave.
Preferably, the microcontroller module comprises an STM32F103ZET6 microcontroller and peripheral circuits, and a preset threshold is preset in the STM32F103ZET6 microcontroller.
Preferably, the ultrasonic analog front end comprises a TDC1000 chip and peripheral circuits, and the time-to-digital converter comprises a TDC7200 chip and peripheral circuits.
Preferably, the communication mode between the STM32F103ZET6 microcontroller and the TDC1000 chip and the TDC7200 chip is SPI communication.
Preferably, the ultrasonic analog front end includes a fixed gain LNA amplifier and an adjustable gain PGA amplifier for amplifying the electrical signal twice when receiving the ultrasonic wave, the adjustable gain PGA amplifier has the smallest initial amplification gain, and the microcontroller module controls the ultrasonic analog front end to write a command for increasing the amplification gain when the amplification gain needs to be adjusted, so as to increase the amplification gain of the adjustable gain PGA amplifier.
Preferably, the ultrasonic drive boosting module is used for boosting the excitation pulse of 3.3V to 30V.
Preferably, the ultrasonic sensors include a first ultrasonic sensor, a second ultrasonic sensor and a third ultrasonic sensor which are arranged on the side wall of the pipeline, the first ultrasonic sensor and the second ultrasonic sensor are respectively arranged on two sides of the pipeline, and a connecting line between the first ultrasonic sensor and the second ultrasonic sensor forms an acute angle with the flow direction of a medium in the pipeline;
when the forward flow or reverse flow flight time is measured, the first ultrasonic sensor sends out the second ultrasonic wave and the second ultrasonic wave transmitted by the medium is received by the second ultrasonic sensor, or the second ultrasonic sensor sends out the second ultrasonic wave and the first ultrasonic sensor receives the second ultrasonic wave transmitted by the medium;
and when the time of flight of the ultrasonic wave required by the fluid pressure is measured, the third ultrasonic sensor is used for sending the second ultrasonic wave and receiving the reflected second ultrasonic wave.
The invention also provides a method for measuring the flight time of the ultrasonic waves in the pipeline, which comprises the following steps:
s1: the microcontroller module sends an SPI instruction to the ultrasonic simulation front end to enable the ultrasonic simulation front end to send a first excitation pulse, and the first excitation pulse is sent to the ultrasonic sensor after being boosted to send a first ultrasonic wave; when the first ultrasonic wave is received, the ultrasonic wave sensor converts the received ultrasonic wave into an electric signal, and the electric signal is amplified by the ultrasonic wave analog front end and then sent to an echo signal A/D conversion module to obtain a digital signal;
s2: the microcontroller module reads the digital signal and extracts n peak values, if the peak value larger than the preset threshold value is smaller than n, the microcontroller module controls the ultrasonic analog front end to adjust amplification gain and returns to execute the step S1, and the step S3 is executed until the n peak values of the digital signal which is read again are larger than the preset threshold value, wherein n is a positive integer;
s3: the microcontroller module sends an SPI instruction to the time-to-digital converter, the time-to-digital converter sends a trigger signal to the ultrasonic analog front end to send a second excitation pulse, the ultrasonic driving boosting module boosts the second excitation pulse and then sends the second excitation pulse to the ultrasonic sensor to send a second ultrasonic wave, and meanwhile, the ultrasonic analog front end sends a starting signal to the time-to-digital converter to start timing;
s4: when the second ultrasonic wave is received, the ultrasonic wave sensor converts the received ultrasonic wave into an electric signal, and then sends the electric signal to the ultrasonic wave analog front end to enable the ultrasonic wave analog front end to send a stop signal to the time-to-digital converter to stop timing, and the time between the stop timing and the start timing is used as the flight time of the ultrasonic wave.
The system and the method for measuring the ultrasonic flight time in the pipeline have the function of automatically setting the gain. The system and the method can calculate the pressure or the flow of the fluid in the pipeline by combining other physical variables on the basis of accurately obtaining the flight time of the ultrasonic wave, and the structure of the original pipeline is not damaged.
The system and the method solve the problem of measuring the pressure and the flow of the fluid in the pipeline by a non-intrusive method. The invention has automatic gain function, when the invention is arranged on the pipelines with different diameters, the gain can be automatically adjusted to proper gain without manually adjusting the gain.
Drawings
FIG. 1 is a schematic view of a measuring terminal in ultrasonic measurement;
FIG. 2 is a diagram of a system configuration provided by a preferred embodiment of the present invention;
FIG. 3 is a circuit diagram of a system implementation provided by the preferred embodiment of the present invention;
FIG. 4 is a schematic diagram of the comparison between the ultrasonic echo signal and Vcom provided by the preferred embodiment of the present invention;
FIG. 5 is a circuit diagram of a TDC1000 and a TDC7200 connection according to a preferred embodiment of the present invention;
fig. 6 is a circuit diagram of an a/D conversion module according to a preferred embodiment of the present invention.
Detailed Description
While the embodiments of the present invention will be described and illustrated in detail with reference to the accompanying drawings, it is to be understood that the invention is not limited to the specific embodiments disclosed, but is intended to cover various modifications, equivalents, and alternatives falling within the scope of the invention as defined by the appended claims.
For the convenience of understanding the embodiments of the present invention, the following description will be further explained by taking specific embodiments as examples with reference to the drawings, and the embodiments are not to be construed as limiting the embodiments of the present invention.
Referring to fig. 2, the present embodiment provides a system for measuring time of flight of ultrasonic waves in a pipe, the system comprising: the ultrasonic wave driving and voltage boosting system comprises a microcontroller module 10, an ultrasonic wave flight time measuring module 20, an ultrasonic wave driving and voltage boosting module 30, an echo signal A/D conversion module 40 and an ultrasonic wave sensor 50, wherein the ultrasonic wave flight time measuring module 20 comprises an ultrasonic wave analog front end 21 and a time-to-digital converter 22; the micro-controller module 10 is used to control the ultrasonic analog front end 21 to transmit, receive and amplify ultrasonic signals, and control the time-to-digital converter 22 to measure the ultrasonic flight time. The microcontroller module is internally preset with a preset threshold Vcom.
A first measuring stage: the microcontroller module 10 sends an SPI command to the ultrasonic analog front end 21 to enable the ultrasonic analog front end to send a first excitation pulse, and the ultrasonic drive boosting module 30 boosts the first excitation pulse and sends the boosted first excitation pulse to the ultrasonic sensor 50 to send a first ultrasonic wave; when the first ultrasonic wave transmitted for a period of time through the medium is received, the first ultrasonic wave reaches the ultrasonic sensor 50, the ultrasonic sensor 50 converts the received ultrasonic wave into an electric signal, the electric signal is amplified by the ultrasonic analog front end 21 and then sent to the echo signal A/D conversion module 40 to obtain a digital signal, the microcontroller module 10 reads the digital signal and extracts n peak values of the digital signal, if the number of the peak values larger than the preset threshold value Vcom is smaller than n, the microcontroller module 10 controls the ultrasonic analog front end 21 to adjust the amplification gain until the n peak values of the digital signal read after the ultrasonic wave is retransmitted and received are all larger than the preset threshold value Vcom, and n is a positive integer. The comparison process can refer to fig. 4, where the area signal greater than the preset threshold Vcom is used as the effective peak area, and the area signal less than the preset threshold Vcom is used as the ineffective peak area. And extracting the number of peaks from the effective peak area, if the number of peaks is greater than or equal to n, entering the next stage for a signal meeting the requirement, and otherwise, continuously adjusting the amplification gain to increase the amplification gain to a value which can enable the number of peaks to be greater than or equal to n. Here, if the n peak values are all greater than the threshold value Vcom, it indicates that the ultrasonic echo signal amplified by the ultrasonic analog front end is in a proper amplification range, otherwise, it indicates that the ultrasonic echo signal amplified by the ultrasonic analog front end is not amplified enough, and is easily interfered by noise, so that an error result is measured. At this moment, the microcontroller module needs to control and modify the amplification factor of the ultrasonic analog front end, so that the measurement of the flight time of the ultrasonic wave in the pipeline is stably measured.
And a second measuring stage: the microcontroller module 10 sends an SPI command to the time-to-digital converter 22, the time-to-digital converter 22 sends a trigger signal to the ultrasonic analog front end 21 to send a second excitation pulse, the ultrasonic drive boost module 30 boosts the second excitation pulse and sends the second excitation pulse to the ultrasonic sensor 50 to send a second ultrasonic wave, and the ultrasonic analog front end 21 sends a start signal to the time-to-digital converter 22 to start timing; when receiving the second ultrasonic wave transmitted through the medium, the ultrasonic sensor 50 converts the received ultrasonic wave into an electric signal, and then sends the electric signal to the ultrasonic analog front end 21 so that the ultrasonic analog front end sends a stop signal to the time-to-digital converter 22 to stop the timing, and the time between the stop timing and the start timing is taken as the flight time of the ultrasonic wave.
With further reference to FIG. 3, the microcontroller module in this embodiment employs a 32-bit STM32F103ZET6 microcontroller and configures its peripheral circuitry based on the ARM Cortex-M3 kernel STM32F103ZET6 series, manufactured by Italian semiconductor corporation. STM32F103ZET6 has abundant pin and can realize various control function and has abundant pin and can realize various control function, has preset threshold Vcom in the STM32F103ZET6 microcontroller. The ultrasonic wave analog front end comprises a TDC1000 chip and a peripheral circuit, and the time-to-digital converter comprises a TDC7200 chip and a peripheral circuit. The connection of TDC1000 to TDC7200 is illustrated with reference to fig. 5. The communication mode between the STM32F103ZET6 microcontroller and the TDC1000 chip and the TDC7200 chip is SPI communication.
Specifically, one pin of STM32F103ZET6 is connected to the TRIGGER pin of the ultrasonic analog front-end TDC 1000. The START and STOP pins of the ultrasonic analog front-end TDC1000 are connected to the START and STOP pins of the time-to-digital converter TDC7200, respectively. The TRIGGER pin of the ultrasonic analog front-end TDC1000 is also connected with the TRIGG pin of the time-to-digital converter TDC 7200. The LANOUT pin of the ultrasonic simulation front-end TDC1000 is sequentially connected with the capacitor C55 and the PGAIN pin. The PGAOUT pin of the ultrasonic simulation front-end TDC1000 is sequentially connected with a resistor R45, a capacitor C54, a capacitor C53, a resistor R46, a pin COMPIN and a pin VCOM. The PGAOUT pin of the ultrasonic analog front-end TDC1000 is also connected with a Non-InertI pin of the A/D conversion circuit.
The ultrasonic analog front end in this embodiment includes a fixed-gain LNA amplifier and an adjustable-gain PGA amplifier, and is configured to amplify an electrical signal twice when receiving an ultrasonic wave, where an initial amplification gain of the adjustable-gain PGA amplifier is initially set to a minimum value, and when the amplification gain needs to be adjusted, the microcontroller module controls the ultrasonic analog front end to write a command for increasing the amplification gain, so as to increase the amplification gain of the adjustable-gain PGA amplifier.
The ultrasonic driving boosting module is used for boosting the excitation pulse of 3.3V to 30V.
The ultrasonic sensor in the embodiment comprises a first ultrasonic sensor, a second ultrasonic sensor and a third ultrasonic sensor which are arranged on the side wall of the pipeline, wherein the first ultrasonic sensor and the second ultrasonic sensor are respectively arranged on two sides of the pipeline, and a connecting line between the first ultrasonic sensor and the second ultrasonic sensor forms an acute angle with the flow direction of a medium in the pipeline; when downstream or upstream flight time measurement is carried out, the first ultrasonic sensor sends out second ultrasonic waves and the second ultrasonic sensors receive the second ultrasonic waves transmitted by the medium, or the second ultrasonic sensors send out the second ultrasonic waves and the first ultrasonic sensors receive the second ultrasonic waves transmitted by the medium; and when the time of flight of the ultrasonic wave required by the fluid pressure is measured, the third ultrasonic sensor is used for sending the second ultrasonic wave and receiving the reflected second ultrasonic wave.
Corresponding to the above system for measuring the flight time of the ultrasonic wave in the pipeline, the present embodiment further provides a method for measuring the flight time of the ultrasonic wave in the pipeline, and the method specifically includes the following steps:
s1: the microcontroller module sends an SPI instruction to the ultrasonic simulation front end to enable the ultrasonic simulation front end to send a first excitation pulse, and the first excitation pulse is sent to the ultrasonic sensor after being boosted to send a first ultrasonic wave; when the first ultrasonic wave is received, the ultrasonic wave sensor converts the received ultrasonic wave into an electric signal, and the electric signal is amplified by the ultrasonic wave analog front end and then sent to an echo signal A/D conversion module to obtain a digital signal;
s2: the microcontroller module reads the digital signal and extracts n peak values, if the peak value larger than the preset threshold value is smaller than n, the microcontroller module controls the ultrasonic analog front end to adjust amplification gain and returns to execute the step S1, and the step S3 is executed until the n peak values of the digital signal which is read again are larger than the preset threshold value, wherein n is a positive integer;
s3: the microcontroller module sends an SPI instruction to the time-to-digital converter, the time-to-digital converter sends a trigger signal to the ultrasonic analog front end to send a second excitation pulse, the ultrasonic driving boosting module boosts the second excitation pulse and then sends the second excitation pulse to the ultrasonic sensor to send a second ultrasonic wave, and meanwhile, the ultrasonic analog front end sends a starting signal to the time-to-digital converter to start timing;
s4: when the second ultrasonic wave is received, the ultrasonic wave sensor converts the received ultrasonic wave into an electric signal, and then sends the electric signal to the ultrasonic wave analog front end to enable the ultrasonic wave analog front end to send a stop signal to the time-to-digital converter to stop timing, and the time between the stop timing and the start timing is used as the flight time of the ultrasonic wave.
To sum up, the system and the method for measuring the flight time of the ultrasonic wave in the pipeline with the automatic gain function provided by the embodiment have the following main functions:
1) and automatically setting the amplification gain of the ultrasonic echo signal.
2) And acquiring ultrasonic forward flow and reverse flow flight times T1 and T2 required for calculating the flow rate of the fluid in the pipeline.
3) The ultrasonic flight time T3 required to calculate the fluid pressure in the pipe is obtained.
The automatic gain setting step of the system provided in this embodiment is further described with reference to fig. 1-6:
1.1 stm32 microcontroller sets the PGA amplifier gain of the ultrasonic analog front-end TDC1000 to 0db through SPI communication;
1.2 stm32 microcontroller sends out a pulse signal to TRI pin of ultrasonic analog front-end TDC 1000;
1.3 the TX1 pin of the ultrasonic analog front-end TDC1000 sends out a 3.3V excitation pulse;
1.4 ultrasonic drive boost circuit converts 3.3V excitation pulse into 30V excitation pulse, acts on ultrasonic sensor I, and ultrasonic sensor I sends ultrasonic TX 1. Simultaneously, the TDC7200 of the time-to-digital converter starts to time;
1.5 TX1 becomes RX1 by propagation to reach ultrasonic sensor II, which transmits RX1 signal to ultrasonic analog front end TDC 1000;
1.6 the ultrasonic simulation front-end TDC1000 sends RX1 to the A/D conversion circuit through a PGAOUT pin;
1.7 the A/D conversion circuit converts RX1 into digital signals and buffers the digital signals;
the 1.8 stm32 microcontroller reads the digital signal buffered in the A/D conversion circuit and extracts 5 peak signals;
1.9 compares the 5 peak signals with the threshold Vcom, determines the gain of the PGA amplifier of the ultrasonic analog front-end TDC1000 if the five peak signals are all greater than the threshold Vcom, otherwise repeats steps 1.2 to 1.9 until the five peak signals are all greater than the threshold Vcom.
Further, with reference to the situations shown in fig. 1 to fig. 6, the following steps are described for the system to obtain the ultrasonic forward-flow and backward-flow flight times T1 and T2 required for calculating the fluid flow in the pipeline:
2.1 STM32F103ZET6 microprocessor issuing a start measurement instruction to time-to-digital converter TDC 7200;
2.2 the time-to-digital converter TDC7200 sends a Tri signal to the ultrasonic analog front-end TDC 1000;
2.3 the ultrasonic analog front end TDC1000 sends out a start signal to a time-to-digital converter TDC7200 and simultaneously sends out a 3.3V excitation pulse to the ultrasonic drive booster circuit module;
2.4 ultrasonic drive boost circuit module is converted 3.3V excitation pulse into 30V excitation pulse, acts on ultrasonic sensor I, and ultrasonic sensor I sends ultrasonic TX 1. Simultaneously, the TDC7200 of the time-to-digital converter starts to time;
2.5 TX1 becomes RX1 by propagation to ultrasonic sensor II, which passes RX1 signal to ultrasonic analog front end TDC 1000;
2.6 after receiving RX1, the ultrasonic analog front-end TDC1000 sends a stop signal to the time-to-digital converter TDC 7200;
after the 2.7 time-to-digital converter TDC7200 receives the stop signal, stopping timing, sending an INT signal, and informing an STM32F103ZET6 microcontroller to read a timing result;
2.8 STM32F103ZET6 microcontroller reads the timing result to obtain the ultrasonic propagation time T1 of the flowing direction of the fluid;
2.9 STM32F103ZET6 microprocessor issuing a start measurement instruction to time-to-digital converter TDC 7200;
2.10 time-to-digital converter TDC7200 sends Tri signal to ultrasonic analog front-end TDC 1000;
2.11 the ultrasonic analog front end TDC1000 sends out a start signal to a time-to-digital converter TDC7200 and simultaneously sends out a 3.3V excitation pulse to the ultrasonic drive booster circuit module;
2.12 ultrasonic drive boost circuit module is converted 3.3V excitation pulse into 30V excitation pulse, acts on ultrasonic sensor II, and ultrasonic sensor II sends ultrasonic TX 2. At the same time the time to digital converter TDC7200 starts timing.
2.13 TX2 becomes RX2 by propagation to ultrasonic sensor II, which passes the RX2 signal to the ultrasonic analog front end TDC 1000.
2.14 the ultrasonic analog front-end TDC1000, upon receiving RX2, sends a stop signal to the time-to-digital converter TDC 7200.
2.15 time-to-digital converter TDC7200 stops timing after receiving stop signal, and sends INT signal to inform STM32F103ZET6 microcontroller to read timing result
And the 2.16 STM32F103ZET6 microcontroller reads the timing result to obtain the ultrasonic propagation time T2 of the flow direction of the fluid.
Further, with reference to the situations shown in fig. 1 to fig. 6, the following steps are performed to obtain the ultrasonic flight time T3 required by the system to calculate the fluid pressure in the pipeline:
3.1 STM32F103ZET6 microprocessor issues a start measurement instruction to time-to-digital converter TDC 7200.
3.2 time-to-digital converter TDC7200 sends a Tri signal to the ultrasonic analog front end TDC 1000.
3.3 the ultrasonic analog front end TDC1000 sends a start signal to the time-to-digital converter TDC7200 and simultaneously sends a 3.3V excitation pulse to the ultrasonic drive boost circuit module.
The 3.4 ultrasonic drive booster circuit module converts the 3.3V excitation pulse into a 30V excitation pulse, acts on the ultrasonic sensor III, and the ultrasonic sensor III emits ultrasonic TX 3. At the same time the time to digital converter TDC7200 starts timing.
3.5 TX3 becomes RX3 by propagation to ultrasonic sensor III, which passes the RX3 signal to the ultrasonic analog front end TDC 1000.
3.6 after receiving R3, the ultrasonic analog front-end TDC1000 sends a stop signal to the time-to-digital converter TDC 7200.
And after the 3.7 time-to-digital converter TDC7200 receives the stop signal, stopping timing, sending an INT signal and informing an STM32F103ZET6 microcontroller to read the timing result.
And 3.8 STM32F103ZET6 microcontroller reads the timing result to obtain the ultrasonic propagation time T3 of the fluid flow direction.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to make modifications or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A system for measuring ultrasonic time of flight in a pipe, comprising:
the ultrasonic wave time-of-flight measuring device comprises a microcontroller module, an ultrasonic wave time-of-flight measuring module, an ultrasonic wave driving boosting module, an echo signal A/D conversion module and an ultrasonic wave sensor, wherein the ultrasonic wave time-of-flight measuring module comprises an ultrasonic wave analog front end and a time-to-digital converter;
a first measuring stage: the microcontroller module sends an SPI instruction to the ultrasonic simulation front end to enable the ultrasonic simulation front end to send a first excitation pulse, and the ultrasonic driving boosting module boosts the first excitation pulse and then sends the first excitation pulse to the ultrasonic sensor to send first ultrasonic waves; when a first ultrasonic wave transmitted by a medium is received, an ultrasonic sensor converts the received ultrasonic wave into an electric signal, the electric signal is amplified by the ultrasonic wave analog front end and then sent to the echo signal A/D conversion module to obtain a digital signal, the microcontroller module reads the digital signal and extracts n peak values, if the peak value larger than a preset threshold value is smaller than n, the microcontroller module controls the ultrasonic wave analog front end to adjust amplification gain until the n peak values of the read digital signal after the ultrasonic wave is sent and received again are larger than the preset threshold value, and n is a positive integer;
and a second measuring stage: the microcontroller module sends an SPI instruction to the time-to-digital converter, the time-to-digital converter sends a trigger signal to the ultrasonic analog front end, the ultrasonic analog front end sends a second excitation pulse, the ultrasonic drive boosting module boosts the second excitation pulse and sends the second excitation pulse to the ultrasonic sensor to send a second ultrasonic wave, and meanwhile, the ultrasonic analog front end sends a starting signal to the time-to-digital converter to start timing; when the second ultrasonic wave transmitted by the medium is received, the ultrasonic sensor converts the received ultrasonic wave into an electric signal, and then sends the electric signal to the ultrasonic analog front end to enable the ultrasonic analog front end to send a stop signal to the time-to-digital converter to stop timing, and the time between the stop timing and the start timing is taken as the flight time of the ultrasonic wave.
2. The system for measuring ultrasonic time-of-flight in a pipe of claim 1, wherein the microcontroller module comprises an STM32F103ZET6 microcontroller and peripheral circuitry, and a preset threshold is preset in the STM32F103ZET6 microcontroller.
3. The system for measuring ultrasonic time of flight in a pipe of claim 2, wherein the ultrasonic analog front end comprises a TDC1000 chip and peripheral circuitry, and the time-to-digital converter comprises a TDC7200 chip and peripheral circuitry.
4. The system for measuring ultrasonic time-of-flight in a pipe according to claim 3, wherein the STM32F103ZET6 microcontroller communicates with the TDC1000 chip and the TDC7200 chip by SPI communication.
5. The system for measuring ultrasonic time-of-flight in a pipe according to claim 1, 3 or 4, wherein the ultrasonic analog front end comprises a fixed-gain LNA amplifier and an adjustable-gain PGA amplifier for amplifying the electrical signal twice when receiving ultrasonic waves, the adjustable-gain PGA amplifier has the smallest initial amplification gain, and when the amplification gain needs to be adjusted, the microcontroller module controls the ultrasonic analog front end to write a command for increasing the amplification gain so as to increase the amplification gain of the adjustable-gain PGA amplifier.
6. The system for measuring ultrasonic time of flight in a pipe of claim 1, 3 or 4, wherein the ultrasonic drive boost module is configured to boost the excitation pulse of 3.3V to 30V.
7. The system for measuring the flight time of the ultrasonic waves in the pipeline according to claim 1, 3 or 4, wherein the ultrasonic sensors comprise a first ultrasonic sensor, a second ultrasonic sensor and a third ultrasonic sensor which are arranged on the side wall of the pipeline, the first ultrasonic sensor and the second ultrasonic sensor are respectively arranged on two sides of the pipeline, and a connecting line between the first ultrasonic sensor and the second ultrasonic sensor forms an acute angle with the flow direction of the medium in the pipeline;
when the forward flow or reverse flow flight time is measured, the first ultrasonic sensor sends out the second ultrasonic wave and the second ultrasonic wave transmitted by the medium is received by the second ultrasonic sensor, or the second ultrasonic sensor sends out the second ultrasonic wave and the first ultrasonic sensor receives the second ultrasonic wave transmitted by the medium;
and when the time of flight of the ultrasonic wave required by the fluid pressure is measured, the third ultrasonic sensor is used for sending the second ultrasonic wave and receiving the reflected second ultrasonic wave.
8. A method for measuring the flight time of ultrasonic waves in a pipeline is characterized by comprising the following steps:
s1: the microcontroller module sends an SPI instruction to the ultrasonic simulation front end to enable the ultrasonic simulation front end to send a first excitation pulse, and the first excitation pulse is sent to the ultrasonic sensor after being boosted to send a first ultrasonic wave; when the first ultrasonic wave is received, the ultrasonic wave sensor converts the received ultrasonic wave into an electric signal, and the electric signal is amplified by the ultrasonic wave analog front end and then sent to an echo signal A/D conversion module to obtain a digital signal;
s2: the microcontroller module reads the digital signal and extracts n peak values, if the peak value larger than the preset threshold value is smaller than n, the microcontroller module controls the ultrasonic analog front end to adjust amplification gain and returns to execute the step S1, and the step S3 is executed until the n peak values of the digital signal which is read again are larger than the preset threshold value, wherein n is a positive integer;
s3: the microcontroller module sends an SPI instruction to the time-to-digital converter, the time-to-digital converter sends a trigger signal to the ultrasonic analog front end to send a second excitation pulse, the ultrasonic driving boosting module boosts the second excitation pulse and then sends the second excitation pulse to the ultrasonic sensor to send a second ultrasonic wave, and meanwhile, the ultrasonic analog front end sends a starting signal to the time-to-digital converter to start timing;
s4: when the second ultrasonic wave is received, the ultrasonic wave sensor converts the received ultrasonic wave into an electric signal, and then sends the electric signal to the ultrasonic wave analog front end to enable the ultrasonic wave analog front end to send a stop signal to the time-to-digital converter to stop timing, and the time between the stop timing and the start timing is used as the flight time of the ultrasonic wave.
9. The method according to claim 8, wherein the ultrasonic sensors comprise a first ultrasonic sensor, a second ultrasonic sensor and a third ultrasonic sensor which are arranged on the side wall of the pipeline, the first ultrasonic sensor and the second ultrasonic sensor are respectively arranged on two sides of the pipeline, and a connecting line between the first ultrasonic sensor and the second ultrasonic sensor forms an acute angle with the flow direction of the medium in the pipeline;
when the forward flow or reverse flow flight time is measured, the first ultrasonic sensor sends out the second ultrasonic wave and the second ultrasonic wave transmitted by the medium is received by the second ultrasonic sensor, or the second ultrasonic sensor sends out the second ultrasonic wave and the first ultrasonic sensor receives the second ultrasonic wave transmitted by the medium;
and when the time of flight of the ultrasonic wave required by the fluid pressure is measured, the third ultrasonic sensor is used for sending the second ultrasonic wave and receiving the reflected second ultrasonic wave.
CN202011014473.9A 2020-09-25 2020-09-25 System and method for measuring ultrasonic flight time in pipeline Pending CN112147620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011014473.9A CN112147620A (en) 2020-09-25 2020-09-25 System and method for measuring ultrasonic flight time in pipeline

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011014473.9A CN112147620A (en) 2020-09-25 2020-09-25 System and method for measuring ultrasonic flight time in pipeline

Publications (1)

Publication Number Publication Date
CN112147620A true CN112147620A (en) 2020-12-29

Family

ID=73896496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011014473.9A Pending CN112147620A (en) 2020-09-25 2020-09-25 System and method for measuring ultrasonic flight time in pipeline

Country Status (1)

Country Link
CN (1) CN112147620A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151958A (en) * 1996-03-11 2000-11-28 Daniel Industries, Inc. Ultrasonic fraction and flow rate apparatus and method
JP2011085500A (en) * 2009-10-16 2011-04-28 Tokyo Gas Co Ltd Ultrasonic flowmeter
WO2016150385A1 (en) * 2015-03-24 2016-09-29 合肥工业大学 Fpga- and dsp-based gas ultrasonic flowmeter and metering method therefor
CN106840290A (en) * 2017-01-10 2017-06-13 合肥工业大学 A kind of high accuracy quadraphonic gas ultrasound wave current transmitter
CN108896122A (en) * 2018-06-25 2018-11-27 重庆大学 A kind of high precision ultrasonic flowmeter system and method based on TDC1000
CN109579950A (en) * 2018-12-07 2019-04-05 天津商业大学 A kind of mistake proofing wave detection device of Ultrasonic Wave Flowmeter
CN111121894A (en) * 2019-12-25 2020-05-08 金卡智能集团股份有限公司 Flow calibration method for ultrasonic gas meter

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151958A (en) * 1996-03-11 2000-11-28 Daniel Industries, Inc. Ultrasonic fraction and flow rate apparatus and method
JP2011085500A (en) * 2009-10-16 2011-04-28 Tokyo Gas Co Ltd Ultrasonic flowmeter
WO2016150385A1 (en) * 2015-03-24 2016-09-29 合肥工业大学 Fpga- and dsp-based gas ultrasonic flowmeter and metering method therefor
CN106840290A (en) * 2017-01-10 2017-06-13 合肥工业大学 A kind of high accuracy quadraphonic gas ultrasound wave current transmitter
CN108896122A (en) * 2018-06-25 2018-11-27 重庆大学 A kind of high precision ultrasonic flowmeter system and method based on TDC1000
CN109579950A (en) * 2018-12-07 2019-04-05 天津商业大学 A kind of mistake proofing wave detection device of Ultrasonic Wave Flowmeter
CN111121894A (en) * 2019-12-25 2020-05-08 金卡智能集团股份有限公司 Flow calibration method for ultrasonic gas meter

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
侯怀书等: "燃煤锅炉中煤粉流量的超声波在线检测", vol. 53, no. 2 *
成俊;张金;王伯雄;: "时差式超声测量回波信号处理研究", vol. 31, no. 12 *
朱克亮;张天忠;石雪梅;徐宁;万磊;: "一种基于超声波的桩基成孔检测电路设计", no. 03 *
纪建英等: "液压系统非介入式监测技术", 31 July 2014, 国防工业出版社, pages: 70 - 15 *
纪建英等: "热量表", 中国质检出版社, pages: 70 - 76 *

Similar Documents

Publication Publication Date Title
US11112495B2 (en) Method for acoustic distance time of flight compensation
CN209894972U (en) Acoustic distance measuring circuit
US11885874B2 (en) Acoustic distance measuring circuit and method for low frequency modulated (LFM) chirp signals
CN102073040A (en) Control method of ultrasonic wave sensor
CN112304375B (en) Ultrasonic flow sensor and flow measurement method thereof
US6515487B1 (en) Low voltage low current bubble detection circuit
US20190049277A1 (en) Signal processing apparatus and system including the same
KR20050075936A (en) Ultrasonic distance measuring method and device by frequency measurement with comparator
CN106483526B (en) Non-blind area ultrasonic ranging probe and ranging method
CN112147620A (en) System and method for measuring ultrasonic flight time in pipeline
JP3596528B2 (en) Flow measurement device
CN112362119B (en) Ultrasonic flowmeter
KR101790888B1 (en) Distance Measuring Method Using Ultrasonic Wave And Apparatus Using The Same
JP3624743B2 (en) Ultrasonic flow meter
Wobschall et al. An ultrasonic/optical pulse sensor for precise distance measurements
CN110596711A (en) High-precision ultrasonic ranging system and method
JPS6044626B2 (en) Ultrasonic measuring device
CN219162375U (en) Ultrasonic detection circuit, ultrasonic sensor chip and automobile radar device
CN215261913U (en) Echo acquisition circuit, flow measurement circuit and metering device
Xiang et al. Design of Millimeter Range High Precision Ultrasonic Distance Measurement System
WO2022088189A1 (en) Ultrasonic flowmeter
CN207799075U (en) A kind of ultrasonic ranging circuit and supersonic sounding equipment
KR101280563B1 (en) Transmitting /Receiving Integrated Chip for Mobile robot and Mobile robot using the same
CN115235582A (en) Method for measuring small blind area and large measuring range ultrasonic liquid level
CN115112190A (en) Echo acquisition, flow measurement system and method for ultrasonic metering instrument

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination