An intelligent water warning column

By using Doppler effect and ultrasonic flow measurement module in the intelligent water warning column and combining the water level measurement module, the problem of low water level monitoring accuracy in water conservancy projects is solved, and high-precision water flow monitoring and water level measurement are achieved.

CN118670365BActive Publication Date: 2025-03-21HANGZHOU HONGHU ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411162995.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-03-21
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the prior art, the water level monitoring accuracy in water conservancy projects is low, and is affected by various factors, resulting in noise and error.

Method used

An intelligent water warning column is designed, using Doppler effect to measure the flow rate and flow direction through the ultrasonic flow measurement module, combined with the water level measurement module, improve the measurement accuracy, and data processing and upload through MCU1 and MCU2.

Benefits of technology

High-precision monitoring of water flow velocity and direction is achieved, noise and error are reduced, and the accuracy and reliability of water level monitoring are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118670365B_ABST
    Figure CN118670365B_ABST
Patent Text Reader

Abstract

The present application discloses an intelligent water warning column, which relates to the field of ultrasonic measurement technology, and includes: an ultrasonic flow measurement module, which includes at least one pair of ultrasonic transmitting transducers and ultrasonic receiving transducers, and a transmitting switching circuit and a receiving switching circuit; the center frequency of the ultrasonic transmitting transducer and the ultrasonic receiving transducer is f1; a water level measurement module, which collects water level data and sends it to MCU1; MCU1, which includes a DDS circuit, and the DDS circuit generates a sinusoidal reference signal with a frequency of f2; MCU1 controls the ultrasonic transmitting transducer to transmit an ultrasonic wave with a frequency of f1 through the transmitting switching circuit, and receives an echo signal reflected by the fluid received by the ultrasonic receiving transducer through the receiving switching circuit; MCU1 mixes the echo signal with the sinusoidal reference signal, and performs A / D sampling and FFT analysis on the mixed model to obtain a Doppler frequency shift, and calculates the flow velocity and flow direction according to the Doppler frequency shift; in view of the low water level monitoring accuracy in the prior art, the present application improves the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of ultrasonic measurement technology, and in particular to an intelligent warning water column. Background Art

[0002] With the rapid development of social economy, the construction of water conservancy projects has continued to increase, and the importance of water conservancy project management such as flood control, waterlogging prevention, and water resources allocation has become increasingly prominent. Accurately monitoring the water level, flow rate, and flow direction of rivers, lakes, reservoirs, and other water bodies is the basis and prerequisite for water conservancy project management. Traditional manual monitoring methods are inefficient and difficult to meet the growing demand for water monitoring. In recent years, various online monitoring equipment has continued to emerge, providing strong technical support for water conservancy project management.

[0003] The monitoring of flow velocity and flow direction usually adopts paddle current meter, electromagnetic current meter and acoustic Doppler current meter, etc. Among them, paddle current meter and electromagnetic current meter need to place the sensor in the water body, which is easily affected by underwater debris and inconvenient to install and maintain; although acoustic Doppler current meter is non-contact measurement, the measurement accuracy is greatly affected by the installation angle of the transducer and the inclination angle of the fluid, and it is difficult to guarantee the measurement accuracy in practical applications.

[0004] In the related art, for example, Chinese patent document CN115639377A provides an underwater acoustic Doppler positive and negative flow measurement method and system. The main processor controls the first DDS signal generator to generate a signal with a frequency different from the center frequency of the ultrasonic transmitting transducer and sends it to the first up-down frequency conversion mixer; the center frequency of the first stopband notch filter is set to the difference between the frequency of the signal generated by the first DDS signal generator and the center frequency of the ultrasonic transmitting transducer; and the first mixed signal is sent to the first stopband notch filter to filter out the signal equal to the center frequency of the first stopband notch filter to obtain the first valid signal; only through the above operation can the real signal be demodulated, and then the main processor determines whether the first low-frequency signal obtained from the first valid signal is greater than the first preset threshold. If so, the current water flow direction is determined to be a positive flow direction; if not, the current water flow direction is determined to be a negative flow direction, thereby realizing the underwater acoustic Doppler positive and negative flow measurement function. Although this scheme uses the ultrasonic Doppler effect to measure the water flow velocity and direction, there is no direct correspondence between the water flow velocity and direction and the water level height. The speed and direction of water flow are affected by many factors, such as riverbed topography, water turbulence, wind speed and direction, etc. These factors will introduce errors and noise, reducing the accuracy of water level monitoring. Summary of the invention

[0005] In view of the problem of low water level monitoring accuracy in water conservancy projects existing in the prior art, the present application provides an intelligent warning water column that uses the Doppler effect to measure flow velocity and flow direction, etc., thereby improving measurement accuracy.

[0006] Technical solution, the purpose of this application is achieved through the following technical solution.

[0007] The present specification provides an intelligent water warning column, including: an ultrasonic flow measurement module, including at least one pair of ultrasonic transmitting transducers and ultrasonic receiving transducers, and a transmitting switching circuit connected to the ultrasonic transmitting transducer, and a receiving switching circuit connected to the ultrasonic receiving transducer; the center frequency of the ultrasonic transmitting transducer and the ultrasonic receiving transducer is f1; the transmitting switching circuit and the receiving switching circuit are respectively connected to MCU1; a water level measurement module, used to collect water level data and send it to MCU1; MCU1, including a DDS circuit, the DDS circuit generates a frequency of The sine wave reference signal; MCU1 controls the ultrasonic transmitting transducer transmitting frequency through the transmitting switching circuit. The ultrasonic wave is transmitted to the receiver, and the echo signal reflected by the fluid received by the ultrasonic receiving transducer is received through the receiving switching circuit; MCU1 mixes the echo signal with the sine wave reference signal, and performs A / D sampling and FFT analysis on the mixed signal to obtain the Doppler frequency shift, and calculates the flow velocity and flow direction according to the Doppler frequency shift; Less than ; MCU2, connected to MCU1 through the serial port, receives the flow rate, flow direction and water level data sent by MCU1; and uploads the received data to the cloud server through the wireless communication module; the power supply module includes a solar panel and a solar control circuit, which is used to power the intelligent water warning column.

[0008] Among them, the ultrasonic transmitting transducer is a device that converts electrical signals into ultrasonic signals and transmits them. It is usually made of piezoelectric ceramic materials and uses the piezoelectric effect to achieve electrical-to-acoustic conversion. In this scheme, the center frequency of the ultrasonic transmitting transducer is , used for transmitting frequency Ultrasonic receiving transducer: A device that converts the received ultrasonic signal into an electrical signal. It is also made of piezoelectric ceramic material and uses the piezoelectric effect to achieve sound-to-electric conversion. In this solution, the center frequency of the ultrasonic receiving transducer is also , used to receive ultrasonic echo signals reflected by the fluid. DDS circuit: Direct Digital Synthesis circuit, is a circuit that uses digital technology to generate programmable sine waves. By controlling the step of the phase accumulator and the content of the lookup table, precise modulation of the sine wave frequency and phase can be achieved. In this scheme, the DDS circuit is used to generate a frequency of A sine wave reference signal, where Less than .

[0009] Sine wave reference signal: The frequency generated by the DDS circuit is The sine wave signal is used as the local oscillator signal of the mixer to mix with the received ultrasonic echo signal, converting the high-frequency echo signal into a low-frequency Doppler frequency shift signal. Echo signal: The ultrasonic signal reflected by the fluid received by the ultrasonic receiving transducer contains the Doppler frequency shift information of the fluid flow rate and flow direction. The frequency of the echo signal is ,in Is the Doppler frequency shift, which is proportional to the flow velocity. The analog-to-digital conversion (Analog-to-Digital Conversion) process converts a continuous analog signal into a discrete digital signal. In this solution, MCU1 performs A / D sampling on the mixed signal and converts the analog signal into a digital sequence in preparation for subsequent FFT analysis. FFT analysis: Fast Fourier Transform analysis is an efficient frequency domain analysis method. By converting the time domain signal to the frequency domain, the spectral characteristics of the signal can be obtained. In this solution, MCU1 performs FFT analysis on the digital sequence obtained by A / D sampling to obtain the spectrum of the mixed signal and extract the Doppler frequency shift. Doppler shift: Due to the movement of the fluid, there is a difference between the frequency of the reflected echo signal and the frequency of the transmitted signal. This difference is called the Doppler shift. The magnitude of the Doppler shift is proportional to the flow velocity of the fluid, and the sign is related to the flow direction. In this solution, MCU1 obtains the Doppler shift through FFT analysis. , and calculate the flow velocity and direction based on the Doppler effect formula.

[0010] in, The center frequency of the ultrasonic transmitting transducer and the ultrasonic receiving transducer needs to be selected according to the requirements of the flow measurement range, accuracy and resolution. The value range is 20kHz~1MHz. The frequency of the sine wave reference signal generated by the DDS circuit is used to mix with the echo signal and convert the high-frequency echo signal into a low-frequency Doppler shift signal. According to the solution requirements, Should be less than .

[0011] Furthermore, it also includes: an audible and visual alarm module, connected to MCU2; MCU2 stores a preset flow rate threshold and a water level threshold; MCU2 compares the received flow rate data with the flow rate threshold, and compares the received water level data with the water level threshold; when the flow rate data is greater than the flow rate threshold, or the water level data is greater than the water level threshold, MCU2 controls the audible and visual alarm module to send out an audible and visual alarm signal.

[0012] Among them, the setting of the flow rate threshold should refer to the historical data of the annual average flow rate and maximum flow rate of the monitored river, and be determined in combination with factors such as the water-passing capacity and flood control standards of the river. For example, for a river with a design flow rate of 2m / s and a 100-year flood flow rate of 5m / s, the flow rate threshold can be set to 3.5m / s. In this way, when the measured flow rate exceeds 3.5m / s, an alarm can be issued in time to remind relevant departments to take flood control measures. The flow rate threshold can also be dynamically adjusted according to factors such as season and weather. For example, in the flood season or rainy season, the flow rate threshold can be appropriately lowered to increase the warning level; while in the dry season, the flow rate threshold can be appropriately increased to reduce false alarms. The setting of the water level threshold should refer to the historical water level data of the monitored river, the design flood level, the warning water level and other indicators, and take into account the flood control capacity of the river and the safety needs of the surrounding environment. For example, for a river with a design flood level of 50m and a warning water level of 45m, the water level threshold can be set to 48m. In this way, when the measured water level exceeds 48m, an alarm can be issued in time to remind coastal residents to prepare for flood control. At the same time, in order to achieve graded alarms, multiple water level thresholds can be set. For example, two water level thresholds can be set: warning water level and dangerous water level. When the measured water level exceeds the warning water level, a yellow warning signal is issued; when the measured water level exceeds the dangerous water level, a red alarm signal is issued. The setting of water level thresholds also needs to consider the influence of factors such as tides and ship lock scheduling. For example, in river sections affected by tides, the water level threshold can be dynamically adjusted according to tidal laws; in river sections with ship lock scheduling, it can be coordinated with the ship lock management department to adjust the water level threshold in a timely manner according to the scheduling situation.

[0013] Furthermore, the ultrasonic flow measurement module also includes: an ultrasonic driving circuit and an impedance matching and amplifying and filtering circuit; the ultrasonic driving circuit is connected to MCU1 and the transmitting switching circuit, receives the pulse signal output by MCU1, and amplifies the pulse signal; outputs the amplified pulse signal to the corresponding ultrasonic transmitting transducer through the transmitting switching circuit to transmit ultrasonic waves; the impedance matching and amplifying and filtering circuit is connected to MCU1, and is used to receive the echo signal output by the ultrasonic receiving transducer selected by the receiving switching circuit, and performs impedance matching, amplification and filtering on the echo signal.

[0014] Among them, MCU is the abbreviation of Micro controller Unit. In this solution, MCU1 is the core control and data processing unit of the ultrasonic flow measurement module. The main functions of MCU1 include: generating and controlling the pulse signal of ultrasonic emission; controlling the operation of the ultrasonic transmitting transducer through the transmitting switching circuit; receiving the echo signal of the ultrasonic receiving transducer through the receiving switching circuit; mixing, filtering, sampling and other processing of the echo signal to obtain the Doppler frequency shift; calculating the flow velocity and flow direction according to the Doppler frequency shift; and interacting with other modules (such as water level measurement module, MCU2, etc.). MCU1 usually adopts high-performance microcontrollers, such as ARM, DSP, etc., to meet the requirements of real-time and computing performance. At the same time, MCU1 also integrates various interface circuits, such as ADC, DAC, PWM, etc., for connection and control with other modules.

[0015] Among them, the ultrasonic drive circuit is a circuit unit for driving the ultrasonic transmitting transducer. Its main function is to amplify the pulse signal output by MCU1 and load it onto the ultrasonic transmitting transducer to generate a high-intensity ultrasonic signal. The ultrasonic drive circuit usually adopts a power amplifier circuit, such as Push-Pull, Bridge and other topologies. In order to improve the driving efficiency and reduce power consumption, resonant drive and other technologies can also be used. The impedance matching and amplification filter circuit is a circuit unit for processing the output signal of the ultrasonic receiving transducer. Its main functions include: impedance matching: converting the high-impedance output signal of the ultrasonic receiving transducer into a low-impedance signal for subsequent circuit processing; amplification: amplifying the weak echo signal to a sufficient amplitude for subsequent filtering and sampling processing; filtering: filtering out the noise and interference components in the echo signal and extracting the Doppler frequency shift signal of the target. Impedance matching is usually implemented by passive components such as transformers and capacitors, amplification is usually implemented by low-noise amplifiers (LNA), and filtering is usually implemented by active or passive bandpass filters.

[0016] Furthermore, the impedance matching and amplifying and filtering circuit includes an impedance matching unit, an amplifying unit and a filtering unit; the impedance matching unit includes a capacitor and an inductor connected in series, which are used to match the output impedance of the ultrasonic receiving transducer with the input impedance of the amplifying unit; the amplifying unit uses an amplifier to amplify the echo signal processed by the impedance matching unit; the filtering unit uses a bandpass filter, and the center frequency of the bandpass filter is The same is used to filter the echo signal output by the amplification unit.

[0017] Among them, the band-pass filter is a frequency selection circuit that allows signals within a specific frequency range to pass through, while attenuating or filtering out signals outside the range. In this solution, the filtering unit uses a band-pass filter, whose main function is to extract the Doppler frequency shift signal of the target from the echo signal output by the amplification unit and filter out the noise and interference of other frequency components. Center frequency: corresponds to the maximum transmittance point of the filter, usually set to the same as the target signal frequency, in this solution is . Bandpass filters can be implemented using passive circuits (such as RLC) or active circuits (such as operational amplifiers). In order to obtain good frequency selection characteristics and stopband attenuation, high-order filter structures are usually used, such as Butterworth, Chebyshev, Elliptic, etc. Center frequency refers to the frequency corresponding to the maximum transmittance point of the bandpass filter, also known as the intermediate frequency. In this scheme, the center frequency of the bandpass filter is the same as the operating frequency of the ultrasonic transmitting and receiving transducers. This is because, after the echo signal is mixed and amplified, the frequency of its Doppler shift signal will fall below Set the center frequency of the bandpass filter to , which can ensure that the filter has maximum transmittance to the target Doppler frequency shift signal and sufficient attenuation to other frequency components, thereby effectively extracting the target signal and suppressing noise and interference.

[0018] Preferably, the impedance matching unit includes a first capacitor and a first inductor connected in parallel, and a second capacitor connected in series; after the first capacitor and the first inductor are connected in parallel, one end is connected to the output end of the ultrasonic receiving transducer, and the other end is grounded; one end of the second capacitor is connected to the output end of the ultrasonic receiving transducer, and the other end is connected to the input end of the amplification unit; the first capacitor and the first inductor are used to offset the capacitive reactance of the ultrasonic receiving transducer, and the second capacitor is used to block the DC signal generated by the ultrasonic receiving transducer.

[0019] Preferably, the amplification unit includes a first amplifier and a second amplifier connected in cascade; the input end of the first amplifier is connected to the output end of the impedance matching unit, the output end of the first amplifier is connected to the input end of the second amplifier, and the output end of the second amplifier is connected to the input end of the filtering unit; the first amplifier adopts a common source and common gate structure to provide low noise and high gain; the second amplifier adopts a common source and common drain structure to provide low output impedance to reduce the insertion loss of the filtering unit.

[0020] Preferably, the filtering unit adopts an active bandpass filter, including an operational amplifier, a resistor and a capacitor composed of an RC feedback network; the in-phase input terminal of the operational amplifier is grounded, and the inverting input terminal of the operational amplifier is connected to the output terminal of the operational amplifier through the RC feedback network; the RC feedback network includes two series resistors and two parallel capacitors, which are used to selectively amplify the echo signal amplified by the amplification unit to filter out the echo signal below and above the center frequency of the ultrasonic receiving transducer. frequency components.

[0021] Furthermore, the wireless communication module includes: a LORA wireless communication unit for wireless communication with a distance less than a threshold; a 5G communication unit for wireless communication with a distance greater than a threshold; wherein LORA (Long Range) is a low-power long-range wireless communication solution based on spread spectrum technology, which adopts unlicensed Sub-GHz frequency bands (such as 433MHz, 868MHz, 915MHz, etc.) and can achieve a communication distance of several kilometers to tens of kilometers. In this solution, the LORA wireless communication unit is mainly used for wireless communication with a short distance (less than the distance threshold), such as short-distance data transmission, equipment control, status monitoring, etc.

[0022] Furthermore, MCU1 mixes the echo signal with the sine wave reference signal, performs A / D sampling and FFT analysis on the mixed signal to obtain the Doppler frequency shift, and calculates the flow velocity and flow direction according to the Doppler frequency shift, including: a mixing circuit is provided in MCU1, and the mixing circuit includes two input terminals and one output terminal; one input terminal is connected to the receiving switching circuit for receiving the echo signal, and the other input terminal is connected to the DDS circuit for receiving the frequency The sine wave reference signal is a sine wave reference signal; the mixer circuit multiplies the received echo signal and the sine wave reference signal to output a mixed signal; a filter is provided in MCU1, and the input end of the filter is connected to the output end of the mixer circuit to receive the mixed signal; the filter performs filtering on the mixed signal to filter out the frequency greater than The output center frequency is MCU1 is provided with a digital-to-analog converter, the input end of which is connected to the output end of the filter, and is used to receive the intermediate frequency signal of The IF signal of the digital-to-analog converter is The received intermediate frequency signal is sampled by A / D at a sampling frequency, and the sampled digital quantity is stored in the memory built into MCU1; wherein, Greater than , M is an integer; MCU1 performs fast Fourier transform on the sampled data in the memory to obtain a spectrum diagram; MCU1 obtains the frequency component with the largest amplitude in the spectrum diagram , calculate the frequency components The offset from the intermediate frequency signal is the Doppler shift MCU1 according to Doppler frequency shift The positive or negative value of the Doppler frequency shift is used to determine the flow direction; MCU1 uses the improved Doppler frequency shift formula and the Doppler frequency shift , calculate the flow velocity v.

[0023] in, It is the cutoff frequency of the mixed intermediate frequency signal after filtering, which is used to filter out high-frequency noise and interference. According to the range of Doppler frequency shift and sampling theorem, Should be greater than the maximum Doppler shift and less than the sampling frequency For example, if the maximum flow velocity is 5 m / s, the corresponding Doppler frequency shift △f_max=2v / λ≈1.33kHz, then f3=5kHz can be selected to ensure that the Doppler frequency shift signal is fully retained while filtering out high-frequency noise. is the center frequency of the intermediate frequency signal after mixing, which is given by and Determined jointly. According to the mixing principle, . is the frequency at which the DAC samples the intermediate frequency signal, which needs to satisfy the sampling theorem, that is, Should be greater than 2 times At the same time, in order to reduce the amount of calculation and reduce high-frequency interference, Not too high. Greater than , M is an integer. An appropriate value between 2 and 10 can be selected.

[0024] Furthermore, the mixing circuit multiplies the received echo signal and the sine wave reference signal to output a mixed signal, including: the mixing circuit includes two input terminals and an output terminal, one of which receives the echo signal and the other receives the sine wave reference signal; the echo signal has a frequency of A sinusoidal signal, where is the center frequency of the ultrasonic transmitting transducer, is the echo signal relative to The Doppler frequency shift of the sine wave reference signal is A sinusoidal signal, where and satisfy: ,in, is the intermediate frequency, is the offset frequency; the mixing circuit includes a multiplier and a low-pass filter, the two input ends of the multiplier are respectively connected to the two input ends of the mixing circuit, for receiving the echo signal and the sine wave reference signal; the multiplier multiplies the echo signal with the sine wave reference signal to obtain a product signal; the product signal includes two frequency components and , respectively: , ,in, Represents the high-frequency component in the product signal; Represents the low-frequency component in the product signal; the input end of the low-pass filter is connected to the output end of the multiplier to receive the product signal; the low-pass filter performs low-pass filtering on the product signal to filter out The frequency components are frequency components and are output as mixed signals.

[0025] Preferably, the mixing circuit further comprises an intermediate frequency amplifier, the input end of the intermediate frequency amplifier is connected to the output end of the low-pass filter, and is used to receive the mixing signal; the intermediate frequency amplifier amplifies the mixing signal and outputs the amplified mixing signal; wherein, by adjusting the frequency of the sine wave reference signal Introducing offset frequency , so that the frequency after mixing Deviation from the intermediate frequency , avoiding the influence of DC component and low-frequency interference on signal quality and improving the signal-to-noise ratio of the mixed signal. Reasonable setting of offset frequency The size of The frequency components still fall within the intermediate frequency bandwidth, ensuring the integrity of the mixed signal. Not too large, so as not to Deviating from the intermediate frequency center affects the filtering and amplification effects. Adding an intermediate frequency amplifier after the multiplier and low-pass filter to amplify the mixed signal increases the amplitude and power of the signal, which is beneficial to subsequent signal processing and feature extraction.

[0026] Further, MCU1 performs fast Fourier transform on the sampled data in the memory to obtain a spectrum diagram, including: MCU1 obtains sampled data of length L from the memory ; Where L is an integer power of 2, n is the index of the sampling point, ranging from 0 to L-1; MCU1 acquires the sampled data Perform windowing processing to obtain the windowed sampling data ; Among them, the windowing processing sampling Hanning window function : , MCU1 samples the windowed data Perform fast Fourier transform to obtain frequency domain signal , k is the sampling point index in the frequency domain, ranging from 0 to L-1; Contains L frequency components, and the frequency interval between two adjacent frequency components satisfy: ,in, is the sampling frequency of the digital-to-analog converter; frequency domain signal The amplitude-frequency characteristic contains L / 2+1 points, and the corresponding frequency range is 0 to , the scale of the frequency axis is , the scale of the amplitude axis is ; MCU1 calculates the frequency domain signal The amplitude , get the amplitude-frequency curve, that is, the spectrum diagram; MCU1 Search for the frequency component with the largest amplitude in the frequency domain, and its corresponding frequency domain index is ,according to Calculate the frequency corresponding to the maximum amplitude : MCU1 will With IF By comparison, we get Relative to The offset :like ,but ,like ,but ;like If it is greater than or equal to 0, the fluid flow direction is judged to be the same as the ultrasonic emission direction; if If it is less than 0, the fluid flow direction is judged to be opposite to the ultrasonic emission direction.

[0027] Among them, by windowing the sampled data, the spectrum leakage phenomenon can be reduced, and the quality of the spectrum graph and the main lobe concentration can be improved. The Hanning window function can suppress spectrum leakage while ensuring the frequency resolution of the main lobe. According to the position index k_max of the frequency component f_max with the largest amplitude in the spectrum graph, the frequency value of f_max can be directly calculated, avoiding the frequency search process and improving the calculation efficiency. Since the spectrum graph obtained by the FFT algorithm is periodic, it is necessary to determine whether f_max falls within the base frequency range or the high frequency range based on the relationship between k_max and the sampling data length N, so as to correctly calculate the frequency shift deviation △f. This can expand the measurement range and improve the adaptability of the system.

[0028] Furthermore, MCU1 determines the flow direction and calculates the flow velocity according to the positive and negative frequency shift deviation, including: an improved Doppler frequency shift formula: , where c is the propagation speed of ultrasound in water, is the center frequency of the ultrasonic transmitting transducer and the ultrasonic receiving transducer. The installation angle α refers to the angle between the projection of the ultrasonic transducer axis on the horizontal plane and the projection of the water flow direction on the horizontal plane, where 0°<α<90°; the tilt angle β refers to the angle between the ultrasonic transducer axis and the horizontal plane, where -90°<β<90°, and a positive value of β indicates that the ultrasonic wave is tilted downward, while a negative value indicates that the ultrasonic wave is tilted upward; the water flow tilt angle γ refers to the angle between the water flow direction and the horizontal plane, where -90°<γ<90°, and a positive value of γ indicates that the water flow is tilted downward, while a negative value of γ indicates that the water flow is tilted upward; by introducing the water flow tilt angle γ into the Doppler frequency shift formula, the measurement error caused by the water flow tilt can be compensated, thereby further improving the accuracy of flow velocity measurement.

[0029] Compared with the prior art, the advantages of this application are:

[0030] The setting of multiple pairs of transducers expands the measurement range and improves the measurement accuracy. The transmitting transducer emits ultrasonic waves of a specific frequency, which are received by the receiving transducer after being reflected by the fluid. According to the Doppler effect, the faster the fluid speed, the greater the frequency offset of the reflected wave. By calculating the frequency offset, the flow velocity can be obtained.

[0031] The transmitting and receiving transducers are set independently to optimize the layout angle, reduce fluid turbulence interference, and ensure measurement accuracy.

[0032] The mixing circuit multiplies the echo signal with the reference signal to generate sum and difference frequency signals, filter out high-frequency interference, obtain a pure Doppler frequency shift signal, and improve the signal-to-noise ratio. The frequency of the mixed signal is greatly reduced, which is convenient for subsequent amplification, filtering and A / D sampling.

[0033] FFT analysis can extract frequency characteristics from the sampled data of the time domain signal. Through FFT transformation, the mixed signal is converted into a discrete spectrum. The Doppler shift corresponds to the frequency component with the largest amplitude in the spectrum. The Doppler shift amount can be accurately extracted through spectrum analysis.

[0034] The improved Doppler frequency shift formula takes into account the influence of the transducer installation angle and the fluid inclination angle, and improves the flow velocity calculation accuracy through the angle correction coefficient, which is suitable for different working conditions.

[0035] MCU1 and MCU2 implement data acquisition and processing and data upload respectively, and exchange data through serial communication protocol, which simplifies circuit design and reduces power consumption.

[0036] The wireless communication method that combines LORA and 5G takes into account both short-distance and long-distance communication needs, realizes low-power operation of the module through power control, and extends the battery working time.

[0037] The flow rate and water level thresholds are preset. When the actual value exceeds the threshold, the sound and light alarm is triggered in time to remind the staff on duty and passers-by through sound and flash to prevent danger.

[0038] The power supply module uses solar panels, and the solar control circuit performs voltage regulation and charge and discharge management to provide continuous and stable power for the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a schematic diagram of an exemplary application scenario of an intelligent warning water column according to some embodiments of this specification;

[0040] Figure 2 is an exemplary module diagram of an intelligent water warning column according to some embodiments of this specification;

[0041] Figure 3 is a schematic diagram of flow measurement by a Doppler ultrasonic flowmeter according to some embodiments of this specification;

[0042] Figure 4 It is a schematic diagram of the working process of MCU1 shown in some embodiments of this specification. DETAILED DESCRIPTION

[0043] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0044] Figure 1 is a schematic diagram of an exemplary application scenario of an intelligent warning water column according to some embodiments of this specification, Figure 2 This is an exemplary module diagram of an intelligent water warning column according to some embodiments of this specification. An intelligent water warning column includes: an ultrasonic flow measurement module, a water level measurement module, MCU1, MCU2, a power supply module and an acoustic and visual alarm module. The ultrasonic flow measurement module includes at least one pair of ultrasonic transmitting transducers and ultrasonic receiving transducers, as well as a transmitting switching circuit, a receiving switching circuit, an ultrasonic driving circuit and an impedance matching and amplifying filter circuit connected thereto. The center frequencies of the ultrasonic transmitting transducer and the receiving transducer are both In this embodiment, four pairs of ultrasonic transmitting transducers and ultrasonic receiving transducers are selected.

[0045] MCU1 controls the ultrasonic transmitting transducer transmitting frequency through the ultrasonic driving circuit and the transmitting switching circuit. The ultrasonic wave propagates and reflects in the measured fluid, and the reflected echo is received by the ultrasonic receiving transducer. After being selected by the receiving switching circuit, it is sent to the impedance matching and amplifying filter circuit for signal conditioning, and outputs an echo signal with amplitude and frequency adaptation.

[0046] The impedance matching and amplification and filtering circuit includes an impedance matching unit, an amplification unit and a filtering unit. The impedance matching unit uses a capacitor and an inductor connected in series to match the output impedance of the ultrasonic receiving transducer with the input impedance of the amplification unit. The amplification unit uses an amplifier to amplify the echo signal after impedance matching. The filtering unit uses a central frequency of The bandpass filter is used to filter the amplified echo signal to remove noise and interference.

[0047] MCU1 has a built-in DDS circuit that generates a frequency of A sine wave reference signal, where Slightly less than The conditioned echo signal and reference signal are sent to the mixer circuit of MCU1 for mixing. The mixer circuit outputs two frequency signals: one is , the other way is , corresponding to the Doppler frequency shift. The A / D sampling circuit of MCU1 The signal is sampled at high speed, and the sampled data is stored in MCU1 RAM. When the number of sampling points reaches the FFT length, MCU1 uses the FFT algorithm to perform spectrum analysis on the sampled data to obtain the spectrum of the Doppler shift signal. MCU1 searches for the frequency component with the largest spectrum amplitude, calculates its offset relative to the intermediate frequency, and obtains the Doppler shift.

[0048] The flow direction is determined by the positive or negative Doppler frequency shift, and then substituted into the flow velocity calculation formula. The fluid flow velocity is calculated by combining the sound velocity, transducer installation angle, tilt angle and other parameters. The flow velocity and flow direction can be measured in real time and sent to MCU2 through the serial port. The water level measurement module collects water level data and transmits it to MCU1 through a cable. MCU1 sends the flow velocity, flow direction and water level data to MCU2 through the serial port. MCU2 uploads the received data to the cloud server through the wireless communication module. The wireless communication module includes a LORA wireless communication unit and a 5G communication unit. When the data upload distance is less than the set threshold, LORA communication is used; when the distance is greater than the threshold, 5G communication is used. MCU2 has preset flow velocity thresholds and water level thresholds stored inside. MCU2 compares the received flow velocity and water level data with the thresholds respectively. When the actual value exceeds the threshold, MCU2 controls the sound and light alarm module to issue a sound and light alarm to indicate that the water level is abnormal.

[0049] The entire system is powered by a power supply module, which includes a solar panel and a solar control circuit. The solar panel converts solar energy into electrical energy, and the control circuit performs voltage regulation and charge and discharge management to provide a stable and reliable power supply for each module.

[0050] Figure 3This is a schematic diagram of Doppler ultrasonic flow meter flow measurement according to some embodiments of this specification. Under the control of MCU1, the ultrasonic transmitting transducer in the ultrasonic flow measurement module transmits ultrasonic pulses with a frequency of f1 through the transmitting switching circuit. MCU1 generates periodic control pulses through a timer, and the pulse frequency is calculated according to the set transmission interval time. The control pulse is sent to the ultrasonic drive circuit. After receiving the control pulse of MCU1, the ultrasonic drive circuit generates a square wave pulse with a duration of several cycles, and the frequency of the square wave pulse is , with an amplitude of tens of volts, which matches the operating frequency and excitation voltage of the ultrasonic transmitting transducer. The square wave pulse is switched to the corresponding ultrasonic transmitting transducer through the transmitting switching circuit. The transmitting switching circuit usually uses a multi-way selection switch, such as a relay, a solid-state switch, etc. According to the selection signal of MCU1, the square wave pulse is conducted to the specified transmitting transducer, and other transmitting transducers are disconnected to avoid mutual interference.

[0051] The ultrasonic transmitting transducer generates a frequency of Ultrasonic waves are transmitted toward the measured fluid. Ultrasonic transmitting transducers usually use piezoelectric ceramic materials, such as PZT, to convert electrical signals into acoustic signals through the inverse piezoelectric effect. The radiating surface of the transducer is treated with an acoustic matching layer and a protective layer to improve the acoustic energy conversion efficiency and corrosion resistance. When ultrasonic waves propagate in the fluid, they are affected by the movement of the fluid and produce the Doppler effect. When there is an angle between the fluid flow direction and the ultrasonic propagation direction, the frequency of the reflected echo is relative to the transmitting frequency. There will be an offset, and the offset is proportional to the flow rate. When the fluid flow direction is the same as the ultrasonic direction, the echo frequency increases; when the flow direction is opposite, the echo frequency decreases. The reflected echo is received by the ultrasonic receiving transducer, and the receiving transducer converts the acoustic signal into a weak electrical signal. In order to avoid interference of the transmitted echo on the reception, the receiving transducer is arranged at a certain angle with the transmitting transducer and isolated by acoustic isolation materials.

[0052] The weak electrical signal output by the receiving transducer is selected by the receiving switching circuit and then sent to the impedance matching and amplifying filtering circuit. The receiving switching circuit is similar to the transmitting switching circuit. According to the control signal of MCU1, the output signal of the corresponding receiving transducer is conducted to the impedance matching and amplifying filtering circuit, and other receiving transducers are disconnected at the same time to avoid mutual interference. The impedance matching and amplifying filtering circuit conditions the weak echo signal. First, an impedance matching unit is used for impedance matching to convert the high-impedance transducer output signal into a low-impedance signal to maximize the transmission of signal power. The impedance matching unit is usually composed of passive components such as inductors and capacitors connected in series or in parallel, and the operating frequency is related to the output frequency of the inductor. The echo signal after impedance matching is sent to the amplifier unit for amplification. A multi-stage amplifier circuit is used to amplify the signal amplitude to a level suitable for subsequent circuit processing, while ensuring the linearity and dynamic range of the signal. The amplified echo signal is sent to the filter unit for filtering. A bandpass filter is used with a center frequency of The bandwidth is slightly larger than the Doppler frequency shift range. The low-frequency and high-frequency noise and interference in the echo signal are filtered out to improve the signal-to-noise ratio. The filtered echo signal is sent to MCU1 as the output of the impedance matching and amplification filter circuit for subsequent mixing and spectrum analysis processing to extract the Doppler frequency shift information. The amplitude and frequency of the output signal are compatible with the ADC and processing circuit of MCU1.

[0053] Figure 4 is a schematic diagram of the MCU1 working process shown in some embodiments of this specification. At the same time, the DDS circuit in the MCU1 generates a frequency of A sine wave reference signal, where Slightly less than MCU1 has a built-in DDS (direct digital frequency synthesis) circuit, which is used to generate a sine wave reference signal with stable frequency and pure waveform. The DDS circuit controls the frequency and phase of the sine wave digitally, and has the advantages of high frequency resolution, fast conversion speed, and easy regulation. The frequency control word of the DDS circuit is preset by the program of MCU1, and the frequency is set to ,in Slightly smaller than the ultrasonic emission frequency , the difference is typically a few thousand Hertz, which is comparable to the range of the Doppler shift. The setting takes into account factors such as flow velocity measurement range and spectrum resolution. The sine wave reference signal output by the DDS circuit is sent to the local oscillator end of the mixer circuit after digital-to-analog conversion (DAC). The other input end of the mixer circuit receives the echo signal conditioned by the impedance matching and amplification filter circuit, with a frequency of ,in The frequency mixer circuit uses analog multiplication devices, such as double-balanced mixer tubes, ring mixers, etc. Under the action of two input signals, the mixer circuit outputs two frequency signals: one is the sum of the input signal frequencies. , the other is the difference in input signal frequency The sum frequency signal has a higher frequency, and the difference frequency signal has a lower frequency.

[0054] The output of the mixer circuit is filtered out by a low-pass filter to remove the high-frequency components, and the frequency is The difference frequency signal. and The preset is very close, so It is a low-frequency signal with a frequency equal to the Doppler frequency shift △f, usually in the range of several kilohertz, carrying information about the flow velocity and direction of the fluid. The difference frequency signal is sent to the A / D sampling circuit of MCU1 for sampling. Sampling frequency It is set by the program of MCU1 and is generally several dozen times the frequency of the difference frequency signal to meet the requirements of the Nyquist sampling theorem. The selection of the A / D sampling circuit also takes into account factors such as the processing speed and storage capacity of MCU1. The A / D sampling circuit converts the continuous analog difference frequency signal into a discrete digital sample sequence. The sampling circuit is usually integrated inside MCU1 and adopts a high-speed sampling architecture such as successive approximation and Sigma-Delta, which has the characteristics of high bit number, good linearity and low noise.

[0055] The sampled digital samples are stored in the memory of MCU1 in turn, waiting for further spectrum analysis and processing. The memory uses high-speed static RAM (SRAM) or on-chip Flash, and the capacity is sufficient to store the number of sample points required for a complete FFT (Fast Fourier Transform) operation. When the number of sampling points accumulates to the set FFT length (such as 1024 points, 2048 points, etc.), MCU1 uses the FFT algorithm to perform spectrum analysis on the sample data, converts the time domain signal into a frequency domain signal, and obtains the spectrum of the Doppler shift signal. MCU1 searches for the frequency component with the largest amplitude in the spectrum and calculates its relative to the intermediate frequency. The Doppler frequency shift △f is obtained by the offset. The flow direction is determined by the positive or negative value of △f, and then △f is substituted into the Doppler frequency shift formula. The fluid flow velocity is calculated by combining the sound speed, incident angle and other parameters.

[0056] MCU1's FFT operation and spectrum analysis, when the A / D sampling circuit accumulates sample points of the preset FFT length, MCU1 is triggered to perform FFT operation. The FFT length is generally selected as an integer power of 2, such as 1024, 2048, 4096, etc., to facilitate the rapid implementation of the FFT algorithm. The selection of FFT length comprehensively considers factors such as spectrum resolution, amount of calculation and real-time performance. MCU1 reads the sampled data in the memory into the internal RAM and organizes it into the form of a complex sequence, that is, each sample point is represented as a real part and an imaginary part. This is because the FFT operation is performed in the complex domain. MCU1 uses the FFT algorithm to perform a fast Fourier transform on the complex sequence and convert the time domain signal into a frequency domain signal. The FFT algorithm greatly reduces the amount of calculation and time complexity through recursive decomposition and butterfly operation, and is an efficient spectrum analysis tool.

[0057] The result of the FFT operation is a set of complex number sequences, representing the amplitude and phase of the signal at each frequency component. MCU1 calculates the square of the amplitude of each frequency component to obtain the power spectrum density. The power spectrum reflects the distribution of signal energy at each frequency. Search for the frequency component with the largest amplitude in the power spectrum, which corresponds to the Doppler shift signal. Since the spectrum is discrete, the Doppler shift may fall between two frequency components. To improve the accuracy of frequency estimation, spectrum correction algorithms such as linear interpolation and parabola fitting can be used. Calculate the offset of the Doppler shift relative to the intermediate frequency. The intermediate frequency is ,in is the ultrasonic emission frequency, is the DDS reference signal frequency, and the difference between the two is known and The positive and negative values ​​of Doppler frequency shift represent the relationship between the fluid flow direction and the ultrasonic direction. Positive frequency shift indicates the same direction, and negative frequency shift indicates the opposite direction.

[0058] Substitute the Doppler frequency shift into the formula to calculate the flow velocity. MCU1 sends the calculated flow velocity and flow direction data to other modules or external devices, such as display screens, data recorders, etc., through digital interfaces (such as UART, SPI, etc.) to display, store and transmit the measurement results. In order to improve the reliability and stability of the measurement, MCU1 can average or median filter the results of multiple measurements to remove the influence of random noise and interference. It is also possible to set thresholds for flow velocity and flow direction, and give an alarm or fault indication when the measured value exceeds the normal range. The entire measurement process can be repeated periodically to achieve continuous flow velocity and flow direction monitoring. The measurement cycle is controlled by the program of MCU1, generally from a few seconds to a few minutes, depending on the specific application requirements.

[0059] In addition, MCU1 mixes the echo signal with the reference signal generated by DDS, and then performs A / D sampling and FFT analysis on the mixed signal. The specific circuit implementation is as follows: MCU1 is equipped with a mixing circuit for multiplying the echo signal and the reference signal to generate an intermediate frequency signal whose frequency difference corresponds to the Doppler frequency shift. The mixing circuit includes two input terminals and one output terminal. One of the input terminals receives the echo signal generated by the ultrasonic receiving transducer through the receiving switching circuit. The frequency of the echo signal is ,in is the ultrasonic emission frequency, is the Doppler frequency shift, which is determined by the fluid velocity and the angle of incidence. The other input terminal is connected to the output of the DDS circuit and receives a sine wave reference signal with a frequency of f2. Slightly less than , the difference between the two is the intermediate frequency, which is usually set in the range of tens to hundreds of kHz. The mixer circuit uses analog multiplication devices, such as double-balanced mixers, current-type mixers, etc. Under the action of two input signals, the mixer outputs two frequency components: and . The former is the sum frequency signal, and the latter is the difference frequency signal, corresponding to the Doppler frequency shift. The output of the mixer circuit is processed by amplification, filtering, etc., and then sent to the A / D sampling circuit for digitization. The sampling frequency should be high enough to meet the requirements of the Nyquist sampling theorem, generally several dozen times the intermediate frequency. The digital signal obtained by A / D sampling is sent to the FFT module of MCU1 for spectrum analysis, and the peak corresponding to the Doppler frequency shift is searched in the spectrum, and its offset relative to the intermediate frequency is calculated, and then the flow velocity and flow direction are calculated according to the formula.

[0060] Specifically, the working process and parameter settings of the mixing circuit: the center frequency of the ultrasonic transmitting transducer Set to 1MHz, that is, 1,000,000Hz. This is a commonly used ultrasonic frequency. The wavelength in water is about 1.5mm, which can ensure good directivity and obtain sufficient penetration depth. The flow rate range of the measured liquid is -5m / s to +5m / s, and the ultrasonic incident angle is 45°. According to the Doppler frequency shift formula , where c is the speed of sound, which is 1500 m / s. We can calculate that the range of Doppler frequency shift is from -4714 Hz to +4714 Hz. Therefore, the frequency range of the echo signal is from 995286 Hz to 1004714 Hz. Set to 50kHz, or 50,000Hz. This is a commonly used intermediate frequency, which is both above the audio range and below the radio frequency range, making it easier to sample and process. Set to 10kHz, i.e. 10000Hz, to avoid the influence of DC components and low-frequency noise. The frequency of the sine wave reference signal can be calculated by It is 960kHz, or 960000Hz. Slightly lower than , the difference between the two is equal to the intermediate frequency plus the offset frequency.

[0061] The echo signal and the sine wave reference signal are connected to the two input ends of the mixing circuit through wires or coaxial cables. In order to prevent signal reflection and attenuation caused by impedance mismatch, the impedance of the input end should match the output impedance of the signal source, generally 50Ω or 75Ω. The multiplier can use analog multiplier chips, such as AD734, MC1496, etc. These chips have the characteristics of broadband, low distortion, high linearity, etc., and are suitable for mixing circuits. The output voltage of the multiplier is proportional to the product of the two input signals, and the amplitude needs to be adjusted through an external resistor. Doppler shift of the echo signal is 2,000 Hz, then the two frequency components of the product signal are: , The cutoff frequency of the low-pass filter should be slightly higher than the maximum value of f_diff to avoid introducing amplitude and phase distortion. The maximum value is 50000+4714-10000=44714Hz. Therefore, the cutoff frequency of the low-pass filter can be set to 50kHz, that is, 50000Hz.

[0062] The second-order Butterworth low-pass filter has a flat passband response and good roll-off characteristics and is a commonly used low-pass filter. It can be implemented using an operational amplifier, resistors, and capacitors to form a Sallen-Key topology. The specific circuit parameters can be calculated and optimized based on the cutoff frequency and impedance matching requirements. The output signal of the mixer circuit is The frequency component is the Doppler shift signal. Its frequency is equal to the intermediate frequency plus the Doppler shift minus the offset frequency. In this case, =50000+2000-10000=42000Hz. AD7606 is an 8-channel, 16-bit parallel sampling ADC chip with high speed, low noise, and low power consumption. Its maximum sampling rate is 200kSPS, which meets the requirements of Nyquist sampling theorem. In this example, the output signal of the mixer circuit can be connected to one channel of AD7606 to The AD7606 output data is connected to the I / O port of MCU1 through a parallel bus, triggering MCU1 to perform FFT calculation and spectrum analysis. The FFT length can be set to 1024 points, and the spectrum resolution is By searching for the frequency component with the largest amplitude in the FFT result, we can get The Doppler shift frequency can be obtained by adding the offset frequency and subtracting the intermediate frequency. .

[0063] The signal processing process inside MCU1, MCU1 is equipped with a digital low-pass filter, which is used to filter the intermediate frequency signal output by the mixer circuit. The input end of the filter is connected to the output end of the mixer circuit to receive the mixed signal. The main function of the filter is to filter out the mixed signal with a frequency greater than The high frequency components of The intermediate frequency signal. The choice of needs to be determined according to the bandwidth and noise characteristics of the intermediate frequency signal. 1.5 to 2 times of the input signal. The filter can be implemented using a FIR (finite impulse response) or IIR (infinite impulse response) structure. FIR filters have the advantages of linear phase and good stability, but the amount of calculation is large. IIR filters are more efficient in calculation, but the phase characteristics are not ideal. Different filter types and orders can be selected according to specific application requirements. For example, the commonly used Butterworth low-pass filter and Chebyshev low-pass filter. The core of the filter is a set of filter coefficients, which are weighted and accumulated by the input signal to obtain the output signal. The filter coefficients can be designed and optimized through tools such as MATLAB, and then implemented in MCU1 by table lookup. In order to reduce the amount of calculation, fixed-point arithmetic can be used to quantize the filter coefficients into integers or fixed-point decimals. At the same time, in order to avoid overflow, the intermediate results need to be amplitude limited and rounded.

[0064] MCU1 has a digital-to-analog converter (ADC) for A / D sampling of the intermediate frequency signal output by the filter. The input of the ADC is connected to the output of the filter. The receiving frequency is The ADC uses the intermediate frequency signal The intermediate frequency signal is sampled at equal intervals at a sampling rate, and the sampled digital quantity is stored in the memory built into MCU1. According to the Nyquist sampling theorem, the sampling frequency Need to be greater than the highest frequency of the intermediate frequency signal twice, that is In order to leave a certain margin, the actual design usually takes , where M is an integer between 2 and 4. The selection of fs also needs to consider factors such as the processing speed and storage capacity of MCU1. The number of bits of ADC determines the accuracy and dynamic range of sampling. Common specifications include 8 bits, 12 bits, and 16 bits. The higher the number of bits, the higher the accuracy, but the greater the circuit complexity and power consumption. According to actual needs, select the appropriate number of ADC bits. For example, for occasions with small Doppler shift, a 12-bit ADC can meet the requirements; for occasions with a large dynamic range, a 16-bit or higher ADC is required. The sampling results of the ADC are stored in the memory of MCU1 in the form of binary complement, and each sample occupies 1 or more bytes. The type of memory can be on-chip RAM, off-chip SRAM or FLASH, etc., and the capacity must be sufficient to store an FFT data block. At the same time, in order to improve the data throughput, DMA (direct memory access) can be used to automatically transfer the sampling results of the ADC to the memory without CPU intervention.

[0065] When the sampled data accumulates to a certain length (such as 1024 points, 2048 points, etc.), MCU1 performs FFT calculation on the data in the memory to obtain the frequency domain representation of the signal, that is, the spectrum diagram. FFT is an efficient discrete Fourier transform algorithm that converts time domain signals into frequency domain signals through butterfly operations and bit reversal rearrangement. The input of FFT is a set of complex numbers, consisting of the real and imaginary parts of the sampled data. For real signals, the imaginary part can be padded with zeros. The output of FFT is also a set of complex numbers, representing the amplitude and phase of the signal at each frequency component. By calculating the square of the modulus of the complex number, the power spectrum of the signal can be obtained. MCU1 searches for the frequency component with the largest amplitude in the spectrum diagram , which corresponds to the Doppler frequency shift signal. Due to the limited frequency resolution of the spectrum, It may not be the actual Doppler frequency shift, but the FFT frequency component closest to it. In order to improve the accuracy of frequency estimation, interpolation algorithms such as parabolic interpolation and maximum likelihood estimation can be used. After that, MCU1 calculates its difference with the intermediate frequency The difference between . The positive and negative values ​​represent the flow direction. A positive value indicates that the fluid flow direction is the same as the ultrasonic direction, and a negative value indicates that the fluid flow direction is opposite to the ultrasonic direction. In order to suppress noise and interference, the results of multiple FFTs can be averaged or median filtered. You can also set an amplitude threshold to select only frequency components that exceed the threshold for analysis. In addition, you can also combine other algorithms, such as the MUSIC (Multiple Signal Classification) algorithm and the ESPRIT (Rotational Invariant Subspace Estimation) algorithm, to further improve the accuracy and resolution of frequency estimation.

[0066] According to Doppler shift MCU1 can determine the flow direction of the fluid by the positive or negative value of the ultrasonic wave. Combining the parameters such as the transmission frequency, sound speed and incident angle of the ultrasonic wave, and substituting them into the Doppler frequency shift formula, the flow velocity of the fluid can be calculated. In practical applications, the flow velocity and flow direction also need to be filtered and smoothed to reduce measurement errors and fluctuations. Algorithms such as sliding average and Kalman filtering can be used to select appropriate filtering parameters according to the characteristics and working conditions of the fluid. MCU1 sends the calculated flow velocity, flow direction and other information to the host computer or other control units through the communication interface (such as UART, CAN, etc.) to realize flow monitoring, control and display. At the same time, MCU1 can also perform some fault diagnosis and self-testing, such as checking circuit connections, evaluating signal quality, etc., to ensure the reliability and stability of the measurement.

[0067] FFT calculation and spectrum analysis of MCU1, acquisition of sampling data: sampling frequency of digital-to-analog converter The sampling frequency is 100kHz, and the length of the sampling data is 1024 points. MCU1 reads the latest 1024 sampling points from the memory to form an array with a length of 1024. , where n is the index of the sampling point, ranging from 0 to 1023. Windowing: In order to reduce spectrum leakage and sidelobe interference, MCU1 processes the sampled data. Perform windowing. Commonly used window functions include rectangular window, Hanning window, Hamming window, Blackman window, etc. Here we choose Hanning window, and its expression is: MCU1 calculates 1024 Hanning window coefficients according to the above formula to form an array with a length of 1024 Then, MCU1 will sample the data and Hanning window coefficient Multiply point by point to get the windowed sampling data : Fast Fourier transform: MCU1 performs windowed sampling on the data Perform fast Fourier transform (FFT) to obtain the frequency domain signal X(k). The calculation process of FFT is as follows: Perform bit reversal and rearrangement to adjust the order of time domain data to the order suitable for butterfly operation. Perform log2 (L) level butterfly operation, with L / 2 butterfly units in each level. The calculation formula of the butterfly unit is: , , where p and q are the input indexes of the butterfly unit, and r is the index of the rotation factor. is the rotation factor, satisfying: , the calculation result Stored in the memory, where k is the sampling point index in the frequency domain, ranging from 0 to 1023. The result of FFT It is a set of complex numbers, containing 1024 frequency components. The frequency interval between two adjacent frequency components satisfy: Frequency domain signal The amplitude-frequency characteristic of contains 512+1=513 points, the corresponding frequency range is 0 to 50kHz, the scale of the frequency axis is k*97.66Hz, and the scale of the amplitude axis is .

[0068] Amplitude calculation and spectrum plotting: MCU1 calculates frequency domain signals The amplitude , which is the modulus of the complex number: ,in, and Plural MCU1 converts 513 The values ​​are stored in the memory to form an amplitude-frequency curve, i.e., a spectrum. The horizontal axis of the spectrum is the frequency, and the vertical axis is the amplitude. Maximum amplitude search and frequency estimation:

[0069] MCU1 Search for the frequency component with the largest amplitude and record its corresponding frequency domain index . The search results here are: .according to MCU1 calculates the frequency corresponding to the maximum amplitude : ; The center frequency of the ultrasonic transmitting transducer is 1MHz, so the intermediate frequency can be calculated : MCU1 will and By comparison, we get Relative to The offset :because ,therefore Flow direction judgment: according to MCU1 determines the flow direction of the fluid: , so it is judged that the fluid flow direction is the same as the ultrasonic emission direction.

[0070] Flow velocity calculation: MCU1 calculates the flow velocity v of the fluid according to the improved Doppler frequency shift formula: , the propagation speed of ultrasound in water c is 1500m / s, the installation angle α of the ultrasonic transducer is 30°, the inclination angle β is 45°, and the inclination angle γ of the water flow is 0°. Substituting the above parameters, we can get: Therefore, under the given conditions, the fluid flow velocity calculated by MCU1 is about 1.03 m / s, and the flow direction is the same as the ultrasonic emission direction.

[0071] The water level measurement module collects water level data through the water level sensor and transmits the collected water level data to MCU1 through the cable. MCU1 sends the flow rate, flow direction and water level data to MCU2 through the serial port. MCU2 compares the received data with the preset flow rate threshold and water level threshold. When it detects that the actual value exceeds the threshold, it triggers the sound and light alarm module to issue a sound and light alarm, and uploads the alarm data to the cloud server through the wireless communication module. The wireless communication module includes two communication modes: LORA and 5G. MCU2 automatically switches according to the data upload distance. The entire system is powered by solar energy. The solar panel converts light energy into electrical energy. After the solar control circuit performs voltage regulation and charge and discharge management, it powers each functional module.

[0072] Among them, the LORA wireless communication unit usually includes the following components: LORA wireless transceiver: It is implemented using LORA dedicated chips (such as SemtechSX1278, SX1301, etc.), responsible for the modulation, demodulation, transmission and reception of LORA signals. Antenna: Sub-GHz frequency band antennas (such as spring antennas, PCB antennas, etc.) are used to transmit and receive LORA signals. Microcontroller: Low-power MCU (such as STM32L series, Arduino, etc.) is used to be responsible for the configuration, data processing, protocol stack and other functions of the LORA wireless transceiver. Power management: Low-power power management chips (such as TPS62740, etc.) are used to be responsible for the power supply, sleep, wake-up and other functions of the LORA wireless communication unit. Among them, in this solution, the 5G communication unit is mainly used for wireless communications at a long distance (greater than the distance threshold), such as remote data transmission, video surveillance, voice calls, etc. 5G communication units usually include the following components: 5G wireless transceiver: It uses 5G dedicated chips (such as Qualcomm Snapdragon X55, Huawei Balong 5000, etc.), which is responsible for the modulation, demodulation, transmission and reception of 5G signals. Antenna: It uses high-frequency antenna arrays (such as Sub-6GHz antennas, mmWave antennas, etc.), which are responsible for the transmission and reception of 5G signals. Baseband processor: It uses high-performance baseband chips (such as Qualcomm Snapdragon 765G, Huawei Kirin 990, etc.), which is responsible for the configuration, data processing, protocol stack and other functions of the 5G wireless transceiver.

Claims

1. An intelligent warning water column, comprising: The ultrasonic flow measurement module includes at least one pair of ultrasonic transmitting transducers and ultrasonic receiving transducers, a transmitting switching circuit connected to the ultrasonic transmitting transducer, and a receiving switching circuit connected to the ultrasonic receiving transducer; the center frequencies of the ultrasonic transmitting transducer and the ultrasonic receiving transducer are ; The transmitting switching circuit and the receiving switching circuit are respectively connected to MCU1; Water level measurement module, used to collect water level data and send it to MCU1; MCU1, including DDS circuit, DDS circuit generates frequency The sine wave reference signal; MCU1 controls the ultrasonic transmitting transducer transmitting frequency through the transmitting switching circuit. The ultrasonic wave is transmitted to the receiver, and the echo signal reflected by the fluid received by the ultrasonic receiving transducer is received through the receiving switching circuit; MCU1 mixes the echo signal with the sine wave reference signal, and performs A / D sampling and FFT analysis on the mixed signal to obtain the Doppler frequency shift, and calculates the flow velocity and flow direction according to the Doppler frequency shift; Less than ; MCU2 is connected to MCU1 through the serial port to receive the flow rate, flow direction and water level data sent by MCU1; and uploads the received data to the cloud server through the wireless communication module; A power supply module, including a solar panel and a solar control circuit, for supplying power to the smart water warning column; MCU1 mixes the echo signal with the sine wave reference signal, performs A / D sampling and FFT analysis on the mixed signal to obtain the Doppler frequency shift, and calculates the flow velocity and flow direction based on the Doppler frequency shift, including: MCU1 is provided with a mixing circuit, which includes two input terminals and one output terminal; one input terminal is connected to the receiving switching circuit for receiving the echo signal, and the other input terminal is connected to the DDS circuit for receiving the frequency The mixing circuit multiplies the received echo signal and the sine wave reference signal to output a mixing signal; A filter is provided in MCU1, and the input end of the filter is connected to the output end of the mixer circuit for receiving the mixed signal; the filter performs filtering on the mixed signal and removes the frequency greater than The output center frequency is The intermediate frequency signal; MCU1 is provided with a digital-to-analog converter, the input end of which is connected to the output end of the filter, and is used to receive a signal with a frequency of The IF signal of the digital-to-analog converter is The received intermediate frequency signal is sampled by A / D at a sampling frequency, and the sampled digital quantity is stored in the memory built into MCU1; wherein, Greater than , M is an integer; It is the cutoff frequency of the mixed intermediate frequency signal after filtering, which is used to filter out high-frequency noise and interference; MCU1 performs fast Fourier transform on the sampled data in the memory to obtain a spectrum diagram; MCU1 obtains the frequency component with the largest amplitude in the spectrum diagram , calculate the frequency components The offset from the intermediate frequency signal is the Doppler shift ; MCU1 based on Doppler frequency shift The positive or negative value determines the flow direction; MCU1 uses the improved Doppler frequency shift formula and Doppler frequency shift , calculate the flow velocity v; The mixer circuit multiplies the received echo signal and the sine wave reference signal and outputs a mixed signal, including: The mixer circuit includes two input terminals and an output terminal, wherein one input terminal receives an echo signal and the other input terminal receives a sine wave reference signal; The echo signal has a frequency of A sinusoidal signal, where is the center frequency of the ultrasonic transmitting transducer, is the echo signal relative to Doppler shift of The sine wave reference signal has a frequency of A sinusoidal signal, where and satisfy: ,in, is the intermediate frequency, is the offset frequency; The frequency mixing circuit includes a multiplier and a low-pass filter. Two input ends of the multiplier are respectively connected to two input ends of the frequency mixing circuit to receive the echo signal and the sine wave reference signal. The multiplier multiplies the echo signal and the sine wave reference signal to obtain a product signal. The product signal contains two frequency components and , respectively: in, Represents the high-frequency component in the product signal; Represents the low-frequency component in the product signal; The input end of the low-pass filter is connected to the output end of the multiplier to receive the product signal; the low-pass filter performs low-pass filtering on the product signal to filter out The frequency components are frequency components, which are output as mixed signals; MCU1 performs fast Fourier transform on the sampled data in the memory to obtain a spectrum diagram, including: MCU1 obtains the sampled data of length L from the memory ; Wherein, L is an integer power of 2, n is the index of the sampling point, and its value range is 0 to L-1; MCU1 obtains the sampled data Perform windowing processing to obtain the windowed sampling data ; Among them, the windowing processing sampling Hanning window function : MCU1 samples the windowed data Perform fast Fourier transform to obtain frequency domain signal , k is the sampling point index in the frequency domain, ranging from 0 to L-1; Contains L frequency components, and the frequency interval between two adjacent frequency components satisfy: in, is the sampling frequency of the digital-to-analog converter; Frequency domain signal The amplitude-frequency characteristic contains L / 2+1 points, and the corresponding frequency range is 0 to , the scale of the frequency axis is , the scale of the amplitude axis is ; MCU1 calculates the frequency domain signal The amplitude , and obtain the amplitude-frequency curve, i.e., the spectrum diagram; MCU1 Search for the frequency component with the largest amplitude in the frequency domain, and its corresponding frequency domain index is ,according to Calculate the frequency corresponding to the maximum amplitude : MCU1 will With IF By comparison, we get Relative to The offset : like ,but like ,but like If it is greater than or equal to 0, the fluid flow direction is judged to be the same as the ultrasonic emission direction; like If it is less than 0, the fluid flow direction is judged to be opposite to the ultrasonic emission direction; MCU1 determines the flow direction and calculates the flow velocity based on the positive and negative frequency shift, including: Improved Doppler frequency shift formula: Where c is the propagation speed of ultrasound in water, is the center frequency of the ultrasonic transmitting transducer and the ultrasonic receiving transducer, α is the installation angle of the ultrasonic transducer, which refers to the angle between the axis of the ultrasonic transducer and the flow direction of the fluid; β is the inclination angle of the ultrasonic transducer, which refers to the angle between the axis of the ultrasonic transducer and the normal of the fluid surface; γ is the inclination angle of the water flow, which refers to the angle between the fluid surface and the horizontal plane.

2. The intelligent water warning column according to claim 1 is characterized in that: Also includes: Sound and light alarm module, connected to MCU2; MCU2 stores the preset flow rate threshold and water level threshold; MCU2 compares the received flow rate data with the flow rate threshold, and compares the received water level data with the water level threshold; When the flow rate data is greater than the flow rate threshold, or the water level data is greater than the water level threshold, MCU2 controls the sound and light alarm module to send out a sound and light alarm signal.

3. The intelligent water warning column according to claim 2 is characterized in that: The ultrasonic flow measurement module also includes: an ultrasonic drive circuit and an impedance matching and amplification filter circuit; The ultrasonic driving circuit is connected to the MCU1 and the transmitting switching circuit, receives the pulse signal output by the MCU1, and amplifies the pulse signal; outputs the amplified pulse signal to the corresponding ultrasonic transmitting transducer through the transmitting switching circuit to transmit ultrasonic waves; The impedance matching and amplifying and filtering circuit is connected to the MCU1, and is used to receive the echo signal output by the ultrasonic receiving transducer selected by the receiving switching circuit, and perform impedance matching, amplification and filtering on the echo signal.

4. The intelligent water warning column according to claim 3 is characterized in that: An impedance matching and amplifying and filtering circuit, comprising an impedance matching unit, an amplifying unit and a filtering unit; The impedance matching unit includes a capacitor and an inductor connected in series, and is used to match the output impedance of the ultrasonic receiving transducer with the input impedance of the amplifying unit; The amplification unit uses an amplifier to amplify the echo signal processed by the impedance matching unit; The filter unit uses a bandpass filter, and the center frequency of the bandpass filter is The same is used to filter the echo signal output by the amplification unit.

5. The intelligent water warning column according to claim 2 is characterized in that: Wireless communication module, including: LORA wireless communication unit, used for wireless communication at a distance less than a threshold; 5G communication unit, used for wireless communication at a distance greater than a threshold.

Citation Information

Patent Citations

  • Underwater acoustic Doppler positive and negative flow measurement method and system

    CN115639377A

  • Multichannel ultrasonic wave doppler flow measuring device

    CN205719134U