An echo signal processing method and circuit
By setting a three-point comparison method and a time window method, combined with a zero-crossing comparison point, the problem of inaccurate echo judgment of ultrasonic flow meters under noise interference was solved, and the correct judgment of echo signals and the accuracy of flow measurement were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG WEIXING INTELLIGENT METER STOCK
- Filing Date
- 2022-07-29
- Publication Date
- 2026-07-03
AI Technical Summary
Existing ultrasonic flow meters are difficult to accurately determine echo time due to interference from pipeline noise and circuit noise, resulting in inaccurate flow detection.
The three-point comparison method and the time window method are set up. By combining the first comparison point, the second comparison point, the third comparison point and the time window with the zero-crossing comparison point, the normality of the echo signal is judged, and the correct judgment of the signal is achieved by the echo signal processing circuit.
It effectively eliminates abnormal signal interference, improves the metering accuracy of the flow meter, and ensures the correct reception of echo signals and the accuracy of flow measurement.
Smart Images

Figure CN115855180B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of signal processing technology, specifically relating to an echo signal processing method and circuit. Background Technology
[0002] Ultrasonic flow meters calculate the fluid velocity in a pipe by emitting ultrasonic waves and then calculating the echo time. However, in practical use, due to various factors such as pipe noise and circuit noise, the judgment of the echo can be interfered with by abnormal signals, leading to incorrect judgment of the echo arrival time and thus inaccurate flow detection.
[0003] Therefore, methods are needed to detect and eliminate abnormal signals so that the flow meter can accurately receive the correct echo, thereby improving measurement accuracy. Summary of the Invention
[0004] Based on the aforementioned shortcomings and deficiencies in the prior art, one of the objectives of this invention is to at least solve one or more of the aforementioned problems in the prior art. In other words, one of the objectives of this invention is to provide an echo signal processing method and circuit that meets one or more of the aforementioned requirements.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0006] An echo signal processing method includes setting a first comparison point, a second comparison point, and a third comparison point for the echo signal, wherein the potentials of the first comparison point, the second comparison point, and the third comparison point increase sequentially; setting a first time window and a second time window, wherein the second time window is longer than the first time window; and processing the echo signal upon receipt using the following method:
[0007] When the signal is higher than the first comparison point, the following judgment is made within the first and second time windows:
[0008] Within the first time window, determine whether the signal is lower than the second comparison point; if so, the first judgment condition is met.
[0009] Within the first time window, determine whether the signal is lower than the third comparison point; if so, the second judgment condition is met.
[0010] Within the second time window, determine whether the signal is higher than the third comparison point; if so, the third judgment condition is met.
[0011] If the first, second, and third judgment conditions are all met, then the judgment signal is a normal echo.
[0012] As a preferred option, the method also includes:
[0013] If neither the first nor the second condition is met, but only the third condition is met, then the signal is a jumping wave.
[0014] If the first and third judgment conditions are met, but the first judgment condition is not met, then the judgment signal waveform is too large.
[0015] As a preferred option, the method also includes:
[0016] Set the zero-crossing comparison point for the echo signal. If the signal is determined to be a normal echo, the signal will start receiving echoes after triggering the zero-crossing comparison point.
[0017] As a preferred option, the method also includes:
[0018] Set the zero-crossing comparison point and echo period range for the echo signal. When the signal is higher than the first comparison point, perform the following additional judgment:
[0019] The time interval between two consecutive triggers at the zero-crossing comparison point is one echo cycle. Determine whether the Nth echo cycle is within the echo cycle range. If so, the fourth judgment condition is satisfied.
[0020] If the first, second, third, and fourth judgment conditions are all met, then the judgment signal is a normal echo.
[0021] As a preferred embodiment, the reference voltage for the first comparison point is 100mV, the reference voltage for the second comparison point is 200mV, and the reference voltage for the third comparison point is 400mV.
[0022] As a preferred option, the first time window is 2.5us and the second time window is 8us.
[0023] On the other hand, the present invention also provides an echo signal processing circuit, the circuit comprising:
[0024] The echo signal port is connected to the input terminals of the first comparator, the second comparator, and the third comparator in three separate ways. The reference voltages of the first comparator, the second comparator, and the third comparator are increased sequentially. The output terminal of the first comparator is connected to the first pulse trigger and the second pulse trigger in two separate ways. The pulse width of the second pulse trigger is greater than that of the first pulse trigger.
[0025] The first AND gate, the input of the first AND gate is connected to the output of the first pulse flip-flop and the second comparator;
[0026] The second AND gate has its input connected to the output of the first pulse flip-flop and the third comparator.
[0027] The input of the third AND gate is connected to the output of the second pulse flip-flop and the third comparator;
[0028] The input terminals of the MCU are connected to the output terminals of the first AND gate, the second AND gate, and the third AND gate.
[0029] As a preferred embodiment, the circuit also includes:
[0030] Zero-crossing comparator, the input of the zero-crossing comparator is connected to the echo signal port;
[0031] The fourth AND gate has its input connected to a zero-crossing comparator and the first comparator, and its output connected to the MCU.
[0032] As a preferred embodiment, the reference voltage of the first comparator is 100mV, the reference voltage of the second comparator is 200mV, and the reference voltage of the third comparator is 400mV.
[0033] As a preferred embodiment, the pulse width of the first pulse trigger is 2.5µs, and the pulse width of the second pulse trigger is 8µs.
[0034] Compared with the prior art, the beneficial effects of this invention are:
[0035] The echo signal processing method and circuit of the present invention can effectively eliminate abnormal signals, thereby correctly judge the echo signal, and apply the echo signal that has eliminated the interference of abnormal signals to obtain more accurate flow measurement and other application results. Attached Figure Description
[0036] Figure 1 This is a signal timing diagram according to an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the echo processing circuit according to an embodiment of the present invention;
[0038] Figure 3 This is a circuit diagram of the echo processing circuit according to an embodiment of the present invention. Detailed Implementation
[0039] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0040] Example: This example provides an echo signal processing method, specifically including:
[0041] The first comparison point, second comparison point, and third comparison point of the echo signal are preset, and a first time window and a second time window are set. The potentials of the first comparison point, second comparison point, and third comparison point increase sequentially, and the second time window is longer than the first time window.
[0042] The system continuously receives the signal to be judged and continuously compares the magnitude of the signal with the first comparison point. The first comparison point is used to filter out small signal noise. Since the signal noise is generally small, it cannot trigger the first comparison point, thus preventing continuous signal noise from falsely triggering the reception of the echo signal.
[0043] When the signal is greater than the first comparison point, the signal has a certain strength and may be an echo signal. Therefore, the following judgment is made:
[0044] Starting from a signal value greater than the first comparison point, within the first time window, it is determined whether the signal voltage is consistently lower than the reference voltage of the second comparison point. If so, the first determination condition is met. Additionally, within the first time window, it is also determined whether the signal voltage is consistently lower than the reference voltage of the third comparison point. If so, the second determination condition is met.
[0045] Starting from the signal being greater than the first comparison point, within the second time window, it is determined whether the voltage of the signal is greater than the reference voltage of the third comparison point at any time. If so, the third judgment condition is met.
[0046] The reference voltages for the first, second, and third comparison points are carefully selected. The reference voltage at the first comparison point should be lower than the peak value of the first wave under normal conditions, the reference voltage at the second comparison point should be higher than the peak value of the first wave, and the reference voltage at the third comparison point should be higher than the reference voltage at the second comparison point. More specifically, the reference voltages at the three comparison points are distributed exponentially; for example, the reference voltage at the first comparison point is set to 100mV, the reference voltage at the second comparison point is set to 200mV, and the reference voltage at the third comparison point is set to 400mV.
[0047] In addition, the first time window is set to the length of the first wave, and the second time window is set to approximately the length of time from the first wave to the third wave. More specifically, the first time window is set to 2.5µs, and the second time window is set to 8µs.
[0048] If either the first or second condition is not met, meaning the signal is greater than the peak value of the first wave under normal circumstances within the time window of the first wave, then the signal is not the first wave. Therefore, when both the first and second conditions are met, it indicates that the signal is not excessively large and may be the first wave.
[0049] Since the echo voltage gradually increases with each wave, the third judgment condition is applied in the second time window to determine whether the signal exhibits the characteristic of the echo signal gradually increasing with each wave. If the signal is less than the first and second comparison points in the first time window, but greater than the third comparison point in the second time window (which is longer than the duration of the first wave), it indicates that the magnitude of the first wave is moderate and that the echo signal exhibits the characteristic of gradually increasing with each wave.
[0050] Therefore, when a signal is higher than the first comparison point, triggering a judgment, and the first, second, and third judgment conditions are all met, the signal can be determined to be a normal echo signal.
[0051] The above method can not only be used to determine normal echo signals, but also to distinguish abnormal echoes and their types. If the third condition is not met regardless of the first and second conditions, it indicates that the signal does not have a normal waveform amplitude and is therefore determined to be an abnormal echo.
[0052] If the first and second judgment conditions are not met, but the third judgment condition is met, that is, the signal is greater than the second and third comparison points within the first time window, and is greater than the third comparison point within the second time window, it indicates that the voltage of the signal is high in the initial time, while the first wave generally does not have such a voltage, and it is judged as a jumping wave.
[0053] If both the second and third judgment conditions are met, but only the first judgment condition is not met, it means that the signal is greater than the second comparison point and less than the third comparison point within the first time window, and greater than the third comparison point within the second time window. Therefore, it is judged that the waveform is too large.
[0054] Furthermore, in order to determine the start time of the echo signal, the method of this embodiment also includes setting a zero-crossing comparison point for the echo signal. If the signal is a normal echo signal, the echo is received when the signal triggers the zero-crossing comparison point, thereby receiving the complete waveform.
[0055] Furthermore, the period of an echo is generally within a certain range, so the period of the signal can be used to assist in determining whether it is an echo, further improving the accuracy of the determination. Therefore, the method of this embodiment also includes the following:
[0056] Set the zero-crossing comparison point for the echo signal and a predicted echo period range. Each two consecutive triggers of the zero-crossing comparison point constitute one echo period. After the signal is above the first comparison point and the detection is triggered, check whether the duration of the Nth echo period begins within the predicted echo period range. If so, the fourth judgment condition is met.
[0057] The signal is considered a normal echo signal only if all four conditions are met.
[0058] On the other hand, this embodiment also provides an echo signal processing circuit that can be used to perform the above-described method. A schematic diagram of the circuit is shown below. Figure 2 As shown, the circuit diagram is as follows: Figure 3 As shown, the system includes an analog switch, whose output terminals are an echo signal port, a first comparator, a second comparator, a third comparator, a first pulse trigger, a second pulse trigger, a first AND gate, a second AND gate, a third AND gate, and an MCU. The echo signal port receives signals, and its output is divided into three paths, each connected to the input terminals of the first, second, and third comparators. The first, second, and third comparators respectively perform comparisons between the signal and the reference voltages of the first, second, and third comparison points. The reference voltages of the three comparators are respectively set to the reference voltages of the first, second, and third comparison points. The output of the first comparator is connected in two paths to the first and second pulse triggers, respectively, to open the first and second time windows in the above method. The pulse width of the second pulse trigger is greater than that of the first pulse trigger, making the second time window longer than the first time window.
[0059] Three AND gates are used to coordinate the pulse trigger's control over the time window with the comparator's comparison result of the voltage, thereby executing the first to third decision conditions in the above method. The input of the first AND gate is connected to the output of the first pulse trigger and the second comparator; the input of the second AND gate is connected to the output of the first pulse trigger and the third comparator; and the input of the third AND gate is connected to the output of the second pulse trigger and the third comparator.
[0060] It also includes an MCU, whose input terminals are connected to the output terminals of the first AND gate, the second AND gate, and the third AND gate. It can receive the outputs of the three AND gates and determine whether the current signal is a normal echo signal based on the outputs of the AND gates.
[0061] Furthermore, similar to the method described above, in this circuit, the reference voltage of the first comparator is 100mV, the reference voltage of the second comparator is 200mV, and the reference voltage of the third comparator is 400mV. The pulse width of the first pulse trigger is 2.5µs, and the pulse width of the second pulse trigger is 8µs.
[0062] The operation of the above circuit is as follows:
[0063] When the analog switch is turned on, the echo signal port continuously sends a signal to three comparators, which continuously compare the signal with their respective reference voltages. When the signal is greater than the first reference voltage, the first comparator triggers the first pulse trigger and the second pulse trigger.
[0064] The first pulse trigger outputs a pulse signal with a duration of 2.5µs, which is divided into two paths and input to the first AND gate and the second AND gate respectively.
[0065] In the first AND gate, a 2.5µs pulse signal is ANDed with the comparison result output of the second comparator, such that within 2.5µs of the first pulse trigger, when the comparison signal of the second comparator is greater than its reference voltage, the first AND gate outputs a high-level signal.
[0066] In the second AND gate, the 2.5µs pulse signal is ANDed with the comparison result output of the third comparator, so that within 2.5µs triggered by the first pulse trigger, when the comparison signal of the third comparator is greater than its reference voltage, the second AND gate outputs a high-level signal.
[0067] In the second AND gate, the 8µs pulse signal is ANDed with the comparison result output of the third comparator, so that within 8µs triggered by the second pulse trigger, when the comparison signal of the third comparator is greater than its reference voltage, the third AND gate outputs a high-level signal.
[0068] The MCU detects the output signals of three AND gates. When the first AND gate and the second AND gate output low-level signals, and the third AND gate outputs high-level signals, that is, when the first to third judgment conditions in the above method are met, the signal is judged to be a normal echo signal.
[0069] Furthermore, in order to perform the above method of determining the echo and receiving the echo based on the zero-crossing comparison, the circuit also includes a zero-crossing comparator and a fourth AND gate. The output of the echo signal port is connected to the input of the zero-crossing comparator. The output of the first comparator is additionally connected to the input of the fourth AND gate. At the same time, the output of the zero-crossing comparator is also connected to the input of the fourth AND gate. The output of the fourth AND gate is connected to the MCU.
[0070] It should be noted that the above embodiments are merely detailed descriptions of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A method for processing echo signals from an ultrasonic flowmeter, characterized in that, Set a first comparison point, a second comparison point, and a third comparison point for the echo signal, with the potentials of the first comparison point, the second comparison point, and the third comparison point increasing sequentially; set a first time window and a second time window, with the second time window being longer than the first time window; upon receiving the echo signal, process the echo signal as follows: When the signal is higher than the first comparison point, the following judgment is made within the first time window and the second time window: Within the first time window, determine whether the signal is lower than the second comparison point; if so, the first determination condition is met. Within the first time window, determine whether the signal is lower than the third comparison point; if so, the second determination condition is met. Within the second time window, determine whether the signal is higher than the third comparison point; if so, the third determination condition is met. Set the zero-crossing comparison point of the echo signal and the expected echo period range. When the signal is higher than the first comparison point, perform the following additional judgment: The time interval between two consecutive triggers of the zero-crossing comparison point is one echo cycle. It is determined whether the duration of the Nth echo cycle is within the expected echo cycle range. If so, the fourth determination condition is met. If the first determination condition, the second determination condition, the third determination condition, and the fourth determination condition are all satisfied, then the signal is determined to be a normal echo.
2. The ultrasonic flowmeter echo signal processing method as described in claim 1, characterized in that, The reference voltage for the first comparison point is 100mV, the reference voltage for the second comparison point is 200mV, and the reference voltage for the third comparison point is 400mV.
3. The ultrasonic flowmeter echo signal processing method as described in claim 1, characterized in that, The first time window is 2.5us, and the second time window is 8us.
4. An ultrasonic flowmeter echo signal processing circuit, wherein the processing circuit is controlled by the ultrasonic flowmeter echo signal processing method as described in claim 1, characterized in that, The circuit includes: The echo signal port is connected to the input terminals of a first comparator, a second comparator, and a third comparator via three separate paths. The reference voltages of the first comparator, the second comparator, and the third comparator are sequentially increased. The output terminal of the first comparator is connected to a first pulse trigger and a second pulse trigger via two separate paths. The pulse width of the second pulse trigger is greater than that of the first pulse trigger. The first AND gate has its input connected to the output of the first pulse flip-flop and the second comparator. The second AND gate, the input of which is connected to the output of the first pulse flip-flop and the third comparator; The third AND gate, the input of which is connected to the output of the second pulse flip-flop and the third comparator; The MCU has its input terminals connected to the output terminals of the first AND gate, the second AND gate, and the third AND gate.
5. The ultrasonic flowmeter echo signal processing circuit as described in claim 4, characterized in that, The circuit also includes: A zero-crossing comparator, the input of which is connected to the echo signal port; The fourth AND gate has its input connected to the zero-crossing comparator and the first comparator, and its output connected to the MCU.
6. The ultrasonic flowmeter echo signal processing circuit as described in claim 4, characterized in that, The reference voltage of the first comparator is 100mV, the reference voltage of the second comparator is 200mV, and the reference voltage of the third comparator is 400mV.
7. The ultrasonic flowmeter echo signal processing circuit as described in claim 4, characterized in that, The pulse width of the first pulse trigger is 2.5µs, and the pulse width of the second pulse trigger is 8µs.