Water level measuring method and system based on ultrasonic waves

By using circuit combinations such as limiting circuits, bandpass filters and voltage-controlled amplifiers in ultrasonic water level measurement systems, combined with dynamic gain adjustment and redundant measurement, the noise and interference problems in long-distance water level measurement are solved, and high-precision water level measurement is achieved.

CN120293265APending Publication Date: 2025-07-11HANGZHOU ANLAN DIGITAL SENSING TECHNOLOGY CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510465499.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing ultrasonic water level measurement methods are susceptible to factors such as noise, echo signal attenuation, electromagnetic interference and other factors in long-distance measurement, resulting in low distance measurement accuracy and difficult to achieve accuracy within ±3mm.

Method used

The receiving circuit consisting of a limiting circuit, preamplifier, primary and secondary bandpass filter, voltage-controlled amplifier and analog-to-digital converter is adopted, combined with dynamic gain adjustment and redundant measurement and screening mechanism, through waveform fitting and temperature compensation, ensure that the amplitude of the echo signal is higher than the noise threshold and eliminate noise interference, thereby improving measurement accuracy.

Benefits of technology

It effectively suppresses noise interference, maintains the amplitude of the echo signal, eliminates occasional errors through redundant measurements, and achieves high-precision water level measurement within ±3mm within a range of 10 meters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120293265A_ABST
    Figure CN120293265A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water level online measurement, and discloses a water level measurement method and system based on ultrasonic waves. According to the invention, a variable time-sharing amplification circuit with a dynamic range is adopted, and the amplification times of echoes with different distances are automatically changed, so that the amplitude of an echo signal is kept to be more than five times of that of noise, and the influence of the noise on the measurement precision is effectively avoided; the method comprises the following steps of: receiving an echo signal, carrying out digital shaping on the echo signal according to a standard echo waveform near an echo peak value, and taking time corresponding to a waveform vertex after shaping as echo time, so that the influence of the measurement accuracy of echo waveform distortion is eliminated through the technology; meanwhile, the method that optimization is carried out after continuous three times of measurement is adopted, and the accidental phenomena of no echo and measurement value jumping can be effectively eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of on-line water level measurement, and specifically to a water level measurement method and system based on ultrasonic waves. Background Art

[0002] Technical principle of ultrasonic water level measurement: Drive an ultrasonic transducer to emit ultrasonic waves, and receive the echo reflected by the water surface through the same transducer. Calculate the distance by measuring the time difference between the moment t0 when the ultrasonic wave is emitted and the moment t1 when the echo is received.

[0003]

[0004] Where s is the distance between the transducer and the water surface, c is the speed of sound in air, and △t = t1 - t0 is the flight time of the ultrasonic wave.

[0005] According to the formula, to accurately measure the distance, the key is to accurately measure the flight time △t. If the received signal by the transducer is an ideal echo signal without noise and interference, it is easy to measure the flight time. However, when measuring the water level, since the measurement range is generally above 10m, the amplitude attenuation of the received echo signal can reach 50dB and is easily submerged by noise. Therefore, accurately detecting the flight time at long distances to make the ranging accuracy reach within ±3mm is a great challenge.

[0006] Existing flight time measurement schemes mainly include correlation detection method, peak envelope detection method, amplitude threshold detection method, etc.

[0007] The correlation detection method performs cross-correlation operation on the transmitted signal and the received echo signal. Since the transmitted signal and the noise signal have no correlation, the cross-correlation function R(m) is calculated through cross-correlation calculation and is related to the transmitted signal and the echo signal. Estimating the maximum value of R(m) can estimate the flight time △t. However, the correlation detection method has a large amount of computation and a long measurement response time, and is generally only used for short-distance measurements within 2m.

[0008] Peak envelope detection is to detect the amplitude peak envelope line of the echo signal, and calculate the zero-crossing point of the envelope line by fitting the envelope line. This zero-crossing point is used as the starting moment t1 of the echo signal. The peak envelope detection method theoretically has the advantages of small computation and high detection accuracy. In practical applications, it is easily affected by noise and changes in the echo waveform, resulting in fluctuations in the measured value. Generally, the farther the measurement distance, the more unstable the measured value. Therefore, the peak envelope detection method is also rarely used for long-distance measurements above 3m.

[0009] The amplitude threshold detection method sets a threshold A for the echo signal th , and this threshold is usually set to 3 - 5 times the noise. When the detected amplitude A of the echo signal echo ≥Ath At this moment, the echo time t1 is taken, and thus the flight time Δt is calculated. The amplitude threshold detection method has the advantages of simple hardware and small computational complexity, and is currently the most widely used technology in long-distance ultrasonic ranging;

[0010] Although the amplitude threshold detection method has the advantages of low cost, simple algorithm and convenient parameter adjustment, there are still many limitations and deficiencies in its practical application. Specifically, it is manifested in the following aspects

[0011] 1. When there is noise exceeding the amplitude threshold, there will be a large error in the discrimination of the echo time t1

[0012] As the distance increases, the amplitude of the echo signal decays rapidly. Taking the ultrasonic wave with a common frequency of 40KH as an example, the echo signal intensity at 10 meters is attenuated by 50dB (about 316 times) compared with that at 0.3 meters. In order to detect the echo threshold at 10 meters, the dynamic range of the logarithmic amplifier circuit in Figure (1) should reach more than 50dB. Therefore, noise is easily amplified beyond the threshold, resulting in the system misjudging the starting time t1 of the echo signal.

[0013] 2. When the echo waveform changes, there will also be a large error in the discrimination of the echo time t1

[0014] As the distance increases, due to factors such as external noise interference, abnormal sound sources, and suppression of high-frequency components, the echo waveform may show phenomena such as waveform distortion and broadening. Simply using the amplitude threshold to discriminate the echo time t1 will also cause errors.

[0015] 3. External electromagnetic interference will occasionally cause the transducer to be unable to generate ultrasonic waves

[0016] The transducer is driven by a narrow signal pulse sequence with a fixed frequency. When there is electromagnetic interference, the signal pulse will be interfered, so that the transducer cannot emit ultrasonic waves, and no echo will be detected in the receiving circuit

[0017] Therefore, a water level measurement method and system based on ultrasonic waves are proposed. Summary of the Invention

[0018] Aiming at the deficiencies of the prior art, the present invention provides a water level measurement method and system based on ultrasonic waves to solve the problems in the background technology.

[0019] In the first aspect, to achieve the above object, the present invention provides the following technical solution: A water level measurement system based on ultrasonic waves, comprising:

[0020] A transmitting circuit: used to generate a driving pulse sequence to drive a piezoelectric transducer to emit ultrasonic waves;

[0021] Receiving circuit: It includes a limiting circuit, a preamplifier, a first band-pass filter, a voltage-controlled amplifier, a second band-pass filter, and an analog-to-digital converter connected in sequence, where:

[0022] The limiting circuit is used to limit the amplitude of high-voltage pulses;

[0023] The amplification factor of the preamplifier is configured to avoid saturation of near-range echo signals and suppress noise;

[0024] The center frequencies of the first band-pass filter and the second band-pass filter are consistent with the ultrasonic echo frequency;

[0025] The gain of the voltage-controlled amplifier is dynamically adjusted by a time-sharing control voltage;

[0026] Microprocessor: It is used to perform the following operations:

[0027] Control the driving pulse timing of the transmitting circuit;

[0028] Generate a time-sharing control voltage according to the echo flight time, and dynamically adjust the gain of the voltage-controlled amplifier to maintain the echo signal amplitude above a preset threshold of noise;

[0029] Perform digital processing on the echo signal after analog-to-digital conversion, including:

[0030] Cache the echo sampling values that cover the round-trip propagation time of the maximum measurement distance;

[0031] Identify the echo peak, and select a sampling window near the peak for waveform fitting to determine the echo time;

[0032] Output the best echo time through a redundant measurement screening mechanism;

[0033] Temperature detection circuit: It detects the ambient temperature in real time and corrects the sound speed parameter based on the temperature;

[0034] Output interface circuit: Output the corrected water level measurement result.

[0035] Preferably, the method for generating the time-sharing control voltage includes:

[0036] The pre-calibrated amplitude attenuation model of the echo signal is in the form of an exponential function:

[0037] A(d) = A0·e -kd

[0038] where, A0 is the initial amplitude, d is the distance, and k is the attenuation coefficient;

[0039] Calculate the distance according to the flight time Δt c is the speed of sound in the current environment (in m / s), and the gain of the voltage-controlled amplifier is dynamically adjusted so that the amplitude of the echo signal satisfies:

[0040] A(d) ≥ 5·A noise

[0041] where A noise is the noise amplitude.

[0042] Preferably, the waveform fitting adopts a Gaussian function model:

[0043]

[0044] where A is the amplitude coefficient, μ is the peak time, σ is the standard deviation, and the parameters A, μ, σ are solved by the least squares method to minimize the error between the fitting curve and the sampling values.

[0045] Preferably, the redundant measurement screening mechanism includes:

[0046] The echo times t1′, t1″, t1″′ are measured continuously three times. If the following condition is satisfied:

[0047] max(t1′, t1″, t1″′) - min(t1′, t1″, t1″′) ≤ Δt th

[0048] where Δt th is the preset time tolerance, then the middle value is taken as the final echo time; otherwise, an exception handling process is triggered.

[0049] Preferably, the sound speed correction formula of the temperature detection circuit is:

[0050] c = 331.4 + 0.6T (m / s)

[0051] where T is the current ambient temperature, and the reference sound speed of 331.4 m / s corresponds to the condition of dry air at 0°C.

[0052] Preferably, the dynamic gain adjustment range of the voltage-controlled amplifier is 0 to 80 dB, and its gain G and the time-sharing control voltage V ctrl satisfy a linear relationship:

[0053] G = K·V ctrl

[0054] where K is the gain coefficient, which is determined by the resolution of the digital-to-analog converter.

[0055] Preferably, the cache coverage in the digital processing of the echo signal measures the maximum round-trip propagation time t buffer According to the maximum measurement distance d max and the current sound speed c, it is calculated as:

[0056]

[0057] wherein, t margin is a preset safety margin.

[0058] In a second aspect, an ultrasonic-based water level measurement method includes implementing this method based on the ultrasonic-based water level measurement system described in the first aspect. The method includes:

[0059] Step 1, signal emission stage:

[0060] Generate a driving pulse sequence consistent with the resonant frequency of the piezoelectric transducer through a microcontroller to drive the transducer to emit ultrasonic waves;

[0061] Step 2, signal reception and conditioning stage:

[0062] Suppress the amplitude of high-voltage pulses through a limiting circuit to protect the receiving circuit;

[0063] Preliminarily amplify the echo signal using a preamplifier, and configure the amplification factor to suppress noise and avoid signal saturation;

[0064] Filter out non-echo frequency components through a first-stage band-pass filter;

[0065] Dynamically adjust the gain of the voltage-controlled amplifier according to the echo flight time to keep the echo signal amplitude above a preset signal-to-noise ratio threshold;

[0066] Further suppress noise through a second-stage band-pass filter;

[0067] Step 3, signal processing and time calculation:

[0068] Collect and cache the echo signal sampling values covering the round-trip propagation time of the maximum measurement distance;

[0069] Identify the echo peak, select the sampling points within a preset window near the peak for waveform fitting to determine the precise echo moment;

[0070] Independently measure the echo time three times continuously, and select the intermediate value as the best echo time;

[0071] Step 4, temperature compensation and output:

[0072] Correct the sound speed parameter based on the real-time detected ambient temperature;

[0073] Calculate and output the corrected water level measurement value

[0074] Preferably, the gain value G of the dynamic gain adjustment described in step 2 satisfies:

[0075]

[0076] Among them, A target is the target echo amplitude, and A0 and k are pre-calibrated parameters.

[0077] Compared with the prior art, the present invention has the following beneficial effects:

[0078] The present invention adopts a variable time-sharing amplification circuit with a dynamic range, which automatically changes the amplification factor for echoes at different distances, so that the amplitude of the echo signal remains more than 5 times that of the noise, effectively avoiding the influence of noise on the measurement accuracy; and near the peak of the echo, according to the standard echo waveform, the echo signal is digitally shaped, and the time corresponding to the vertex of the shaped waveform is used as the echo time, eliminating the influence of the echo waveform distortion on the measurement accuracy through this technology; at the same time, the present invention adopts a method of selecting the optimal value after three consecutive measurements, which can effectively eliminate the occasional phenomenon of no echo and measurement value jump.

[0079] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures pointed out in the specification, claims, and drawings. Brief Description of the Drawings

[0080] Figure 1 is the schematic diagram of the echo receiving circuit of the present invention;

[0081] Figure 2 is the relationship diagram between the echo signal intensity and the distance of the present invention;

[0082] Figure 3 is the relationship diagram between the echo distance and the time-sharing variable control voltage of the present invention;

[0083] Figure 4 is the flowchart of the signal processing method of the present invention. Detailed Embodiments

[0084] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection scope of the present invention.

[0085] I. System Composition and Connection Relationship

[0086] A water level measurement system based on ultrasonic waves in the present invention, as shown in the attached Figure 1 figure, the receiving circuit is composed of the following modules connected in sequence:

[0087] 1) Piezoelectric transducer: It is used to receive echo signals and convert the acoustic signals of the echoes into weak voltage signals. The amplitude of this voltage signal can vary between 0.1 uV and 100 mV according to the distance and the emission surface of the target object.

[0088] 2) Limiting circuit: Since the transmitting circuit uses high-voltage pulses of 300 - 1000 V to drive the piezoelectric transducer to emit ultrasonic waves, in order to prevent the high voltage from breaking down the amplifier circuit, two fast-recovery diodes are used to limit the voltage below 1 V.

[0089] 3) Preamplifier: It preliminarily amplifies the weak echo signals. The amplification factor of the preamplifier should neither be too large, as this will cause the echo signals at close range to saturate, nor too small, as this will increase the noise. In the present invention, the amplification factor of the preamplifier is between 30 and 50 times.

[0090] 4) First-stage band-pass filter: The function of the first-stage band-pass filter is to suppress frequencies outside the echo frequency to suppress noise and improve the signal-to-noise ratio. The center frequency of the first-stage band-pass filter is set to the echo frequency.

[0091] 5) Voltage-controlled amplifier: The voltage-controlled amplifier is an amplifier whose amplification factor changes linearly with the control voltage. The amplification factor can vary between 0 - 80 dB (i.e., 0 - 10000 times); its gain value is dynamically adjusted according to the distance and satisfies the formula:

[0092]

[0093] where A target is the amplitude of the target echo, and A0 and k are pre-calibrated parameters.

[0094] Its gain G and the time-sharing control voltage V in 8) below ctrl satisfy a linear relationship:

[0095] G = K · V ctrl

[0096] where K is the gain coefficient, which is determined by the resolution of the digital-to-analog converter.

[0097] 6) Second-stage band-pass filter: Its function is the same as that of the 4) first-stage band-pass filter, and it further reduces noise before analog-to-digital conversion.

[0098] 7) 14-bit analog-to-digital converter: It samples the amplified echo signals and converts the echo signals into digital quantities for further digital signal processing by the microprocessor.

[0099] 8) Microprocessor: The control core of the entire circuit performs the following operations:

[0100] Process to generate a driving pulse signal for a piezoelectric transducer;

[0101] Calculate the distance based on the time of flight Δt c is the speed of sound in the current environment (in m / s). Calculate the time-sharing gain control voltage of the voltage-controlled amplifier, and generate this control voltage through a 9-bit digital-to-analog converter, as shown in the appendix Figure 3 shown;

[0102] The control signal processing flow includes peak detection, Gaussian fitting, redundancy screening, and temperature compensation.

[0103] The method for generating the time-sharing gain control voltage is as follows:

[0104] First, keep the amplification factor of the 5 voltage-controlled amplifiers fixed; then, with a step of 0.5 meters, gradually increase the distance between the transducer and the target object from 0 to 10, record the amplitudes of the echo signals at different distances, and generate an attenuation curve, as shown in the appendix Figure 2 shown, expressed as:

[0105] A(d) = A0 · e -kd

[0106] Design the time-sharing control voltage curve, as shown in the appendix Figure 3 shown, to ensure that the echo amplitude always satisfies A(d) ≥ 5 · A noise , so that the echo signal always remains above 5 times the noise voltage within a distance of 0 - 10 meters;

[0107] Calculate the distance d based on the time of flight Δt, look up the gain value G(d) in a table, and output the control voltage through the DAC.

[0108] 9) 10-bit digital-to-analog converter: Used to output the time-sharing gain control voltage to the 5 voltage-controlled amplifiers, so that the 5 voltage-controlled amplifiers generate a time-sharing varying amplification factor.

[0109] 10) NTC and temperature detection circuit: Used to detect changes in the ambient temperature. The 9-bit microcontroller collects the temperature in real time and calculates the magnitude of the current speed of sound based on the current temperature.

[0110] 11) Output interface circuit: The microcontroller converts the calculated distance into a floating-point number and sends it out to the host computer or display through the output interface circuit.

[0111] The signal processing method of the present invention, as shown in the appendix Figure 4 shown, specifically includes the following steps:

[0112] Step 1, transmit a pulse sequence to drive the transducer: The timer of the microcontroller generates a pulse sequence with a certain duty cycle, and the frequency of the pulse is the same as the transducer frequency.

[0113] Step 2, collect and cache all the sampled values of the echo signals within the maximum measurement distance d max :

[0114] The caching time t buffer Calculate: Based on the maximum measurement distance d max and the current speed of sound c, calculate the caching time through the formula:

[0115]

[0116] where, t margin is the preset safety margin;

[0117] Implementation example: When d max = 10m, c = 343m / s (speed of sound at 20°C), the theoretical round-trip time is After adding the safety margin, assume t margin = 3ms, and the actual caching time is set to 63.7ms. The echo signals are collected through a 7-channel analog-to-digital converter and converted into sampled values of the echo signals.

[0118] Step 3, search for the sampled values greater than the amplitude threshold A th : The software of the microprocessor compares the sampled values cached in 13 with the amplitude threshold A th and searches for all the sampled values greater than A th , denoted as s i .

[0119] Step 4, search for the echo peak: Compare the size of s i with the adjacent sampled values. If it satisfies s i > s i―1 >..> s i―m , and satisfies s i > s i+1 >..> s i+m , where m is the window width, then s i is the peak of the echo, denoted as s p .

[0120] Step 5, perform digital shaping near the echo peak: Digital shaping can eliminate the influence of the distortion or broadening of the echo waveform on the measurement accuracy. The method is to take several sampled values around s p and perform Gaussian function fitting. The number of sampled values participating in the Gaussian fitting is generally preset through the standard echo waveform, specifically including:

[0121] Select 5 sampling points before and after (a total of 11 points) near the peak s p and fit the Gaussian function through the least squares method:

[0122]

[0123] Among them, A is the amplitude coefficient, μ is the peak time, σ is the standard deviation, and the parameters A, μ, and σ are solved by the least squares method to minimize the error between the fitting curve and the sampling value;

[0124] Step 6, calculate the echo time t'1 of the first measurement: Calculate the time corresponding to the vertex of the Gaussian function after 16-bit digital shaping through the interpolation method, and use it as the echo time t'1 of the first measurement. The specific steps are as follows:

[0125] According to the Gaussian function parameter μ obtained by fitting, directly determine the vertex time t'1 = μ;

[0126] If higher precision is required, quadratic interpolation can be performed near μ. For example, use the cubic spline interpolation method or the Lagrange interpolation method to calculate the time corresponding to the vertex;

[0127] Take t'1 as the echo time of the first measurement.

[0128] Step 7, measure continuously two more times, and calculate the echo times t”1 and t”'1 of the second and third measurements: To eliminate the situation where the transducer occasionally does not emit ultrasonic waves caused by external electromagnetic interference, it is necessary to measure three times continuously to avoid the occasional silent wave phenomenon. The method is to repeat the steps of Step 1 to Step 6, and then perform two consecutive measurements to obtain the echo time t”1 of the second measurement and the echo time t”'1 of the third measurement.

[0129] Step 8, select the best echo time: If the difference between the three times satisfies max(t1′, t1″, t1″′) - min(t1′, t1″, t1″″) ≤ 1 ms, then take the middle value as the best echo time t1; otherwise, discard the data and re-measure.

[0130] Step 9, collect the current temperature and perform temperature compensation on t1: Since the speed of sound changes with the ambient temperature, it is necessary to measure the ambient temperature and calculate the distance according to the speed of sound at this time; the specific operation is as follows:

[0131] Obtain the current temperature T through the NTC thermistor, and correct the speed of sound to:

[0132] c = 331.4 + 0.6T (m / s)

[0133] Among them, T is the current ambient temperature, and the reference speed of sound 331.4 m / s corresponds to the condition of dry air at 0 °C;

[0134] The final distance is calculated as:

[0135]

[0136] Among them, t0 is the emission moment.

[0137] Step 10, calculate and output the distance, convert the distance value to a floating point number and output it through the interface circuit.

Claims

1. An ultrasonic-based water level measurement system, characterized in that, Comprising: Transmitting circuit: configured to generate a driving pulse sequence for driving a piezoelectric transducer to emit ultrasonic waves; Receiving circuit: including a limiting circuit, a preamplifier, a first band-pass filter, a voltage-controlled amplifier, a second band-pass filter, and an analog-to-digital converter connected in sequence, wherein: The limiting circuit is used to limit the amplitude of high-voltage pulses; The amplification factor of the preamplifier is configured to avoid saturation of near-range echo signals and suppress noise; The center frequencies of the first band-pass filter and the second band-pass filter are consistent with the ultrasonic echo frequency; The gain of the voltage-controlled amplifier is dynamically adjusted by a time-sharing control voltage; Microprocessor: configured to perform the following operations: Control the driving pulse timing of the transmitting circuit; Generate a time-sharing control voltage according to the echo flight time, and dynamically adjust the gain of the voltage-controlled amplifier to maintain the echo signal amplitude above a preset threshold value of noise; Perform digital processing on the echo signal after analog-to-digital conversion, including: Caching echo sampling values covering the round-trip propagation time of the maximum measurement distance; Identifying the echo peak, and selecting a sampling window near the peak for waveform fitting to determine the echo time; Outputting the optimal echo time through a redundant measurement screening mechanism; Temperature detection circuit: real-time detecting the ambient temperature and correcting the sound speed parameter based on the temperature; Output interface circuit: outputting the corrected water level measurement result.

2. The ultrasonic-based water level measurement system according to claim 1, characterized in that The method for generating the time-sharing control voltage includes: Pre-calibrating the amplitude attenuation model of the echo signal as an exponential function form: A(d) = A0·e -kd wherein, A0 is the initial amplitude, d is the distance, and k is the attenuation coefficient; Calculate the distance based on the time of flight Δt c is the speed of sound in the current environment (unit: m / s), and the gain of the voltage-controlled amplifier is dynamically adjusted so that the amplitude of the echo signal satisfies: A(d) ≥ 5·A noise Among them, A noise is the noise amplitude.

3. The water level measurement system based on ultrasonic according to claim 1, characterized in that, The waveform fitting adopts a Gaussian function model: wherein, A is the amplitude coefficient, μ is the peak time, σ is the standard deviation, and the parameters A, μ, σ are solved by the least squares method to minimize the error between the fitting curve and the sampling values.

4. The water level measurement system based on ultrasonic according to claim 1, characterized in that, The redundant measurement screening mechanism includes: Continuously measuring the echo times t1′, t1″, t1″′ three times, if satisfying: max(t1′, t1″, t1″′) - min(t1′, t1″, t1″′) ≤ Δt th where, Δt th is the preset time tolerance, then the intermediate value is taken as the final echo time; otherwise, an exception handling process is triggered.

5. A water level measurement system based on ultrasonic waves according to claim 1, characterized in that, The sound speed correction formula of the temperature detection circuit is: c = 331.4 + 0.6T (m / s) wherein, T is the current ambient temperature, and the reference sound speed of 331.4 m / s corresponds to the condition of dry air at 0 °C.

6. The ultrasonic-based water level measurement system according to claim 1, wherein The dynamic gain adjustment range of the voltage-controlled amplifier is from 0 to 80 dB, and its gain G and the time-sharing control voltage V ctrl satisfy a linear relationship: G = K·V ctrl wherein, K is the gain coefficient, which is determined by the resolution of the digital-to-analog converter.

7. The ultrasonic-based water level measurement system according to claim 1, characterized in that, Cache coverage in the digital processing of the echo signal, maximum measured distance round-trip propagation time t buffer According to the maximum measured distance d max And the current speed of sound c is calculated as: where t margin is a preset safety margin.

8. An ultrasonic-based water level measurement method, characterized in that, Including implementing the method by the ultrasonic-based water level measurement system according to any one of claims 1-7, the method including: Step one, signal transmission stage: Generating a driving pulse sequence consistent with the resonance frequency of the piezoelectric transducer through a microcontroller to drive the transducer to emit ultrasonic waves; Step two, signal reception and conditioning stage: Suppressing the amplitude of high-voltage pulses through a limiting circuit to protect the receiving circuit; Preliminarily amplifying the echo signal by using a preamplifier, and configuring the amplification factor to suppress noise and avoid signal saturation; Filtering out non-echo frequency components through a first band-pass filter; Dynamically adjusting the gain of the voltage-controlled amplifier according to the echo flight time to keep the echo signal amplitude above a preset signal-to-noise ratio threshold; Further suppressing noise through a second band-pass filter; Step three, signal processing and time calculation: Collecting and caching echo signal sampling values covering the round-trip propagation time of the maximum measurement distance; Identifying the echo peak, selecting sampling points within a preset window near the peak for waveform fitting, and determining the accurate echo time; Measure the echo time independently three times in a row, and select the median value as the optimal echo time; Step 4, temperature compensation and output: Correct the sound speed parameter based on the ambient temperature detected in real time; Calculate and output the corrected water level measurement value.

9. The method for measuring water level based on ultrasonic wave according to claim 8, characterized in that, The gain value G of the dynamic gain adjustment described in Step 2 satisfies: Among them, A target is the target echo amplitude, and A0 and k are pre-calibrated parameters.

Citation Information

Cited By

  • Oil cylinder displacement real-time calculation method and system based on sonar

    CN120990960A

  • Echo signal intensity self-adaption method for mining large-span ultrasonic wind speed sensor

    CN121499847A

  • Off-line echo detection method for ultrasonic liquid level measurement and control instrument

    CN122085257A