Ultrasonic reflected wave signal processing operation method, chip and storage medium

Through the multi-stage series programmable gain amplifier and threshold comparator dynamically adjusting the gain and trigger thresholds, the problems of poor signal attenuation adaptability and insufficient noise suppression in traditional ultrasonic reflected wave signal processing are solved, and higher signal processing accuracy and stability are achieved.

CN120334892AActive Publication Date: 2025-07-18BEIJING ZHONGRUIZHICHENG TECH CO LTD

Patent Information

Application Number
CN202510795887.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-07-18
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

Traditional ultrasonic reflected wave signal processing methods rely on software algorithms and ignore the key impact of hardware on signal quality, resulting in poor signal attenuation adaptability, insufficient signal saturation or amplification, insufficient noise suppression, affecting signal-to-noise ratio and recognition accuracy.

Method used

Multi-stage series programmable gain amplifier and threshold comparator are used to combine ambient temperature and noise conditions to dynamically adjust the gain and trigger thresholds, optimize the signal processing flow, and obtain real reflected waves and zero crossing time through an analog-to-digital converter.

Benefits of technology

It improves the adaptive ability of signal processing, reduces false alarm rate and interference, enhances stability and measurement accuracy in extreme environments, and optimizes the anti-interference ability of the signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334892A_ABST
    Figure CN120334892A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of signal processing, in particular to an ultrasonic reflected wave signal processing operation method, a chip and a storage medium, and the method comprises the steps: amplifying a collected ultrasonic reflected wave signal through a multi-stage series programmable gain amplifier, the amplified reflected wave signals are respectively distributed to a threshold comparator and an analog-to-digital converter; determining a target gain of the multi-stage series programmable gain amplifier; acquiring an attenuation coefficient of reflected wave signal propagation; obtaining a threshold control coefficient of current reflected wave signal acquisition; determining a trigger threshold value of the analog-to-digital converter for reflected wave signal acquisition; aiming at the transmitted single ultrasonic signal, acquiring each group of reflected wave signal sequences acquired under the condition that an analog-to-digital converter meets a trigger threshold value; and based on the distribution of all groups of reflected wave signal sequences, determining the real reflected wave of the single ultrasonic signal and the zero crossing point time corresponding to the real reflected wave. Therefore, the precision of ultrasonic reflected wave signal processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of signal processing, and particularly relates to an ultrasonic reflected wave signal processing operation method, a chip, and a storage medium. Background Art

[0002] Ultrasonic waves are mechanical waves with a frequency higher than 20 kHz. Their propagation depends on the elastic vibration of the medium and has characteristics such as strong directivity, concentrated energy, and strong penetration ability. When ultrasonic waves propagate in a medium and encounter an interface with acoustic impedance differences, reflection occurs. The time delay of the reflected wave is proportional to the propagation distance, and the amplitude of the reflected wave is related to the interface characteristics. This velocity difference and interface reflection characteristic constitute the physical basis of ultrasonic signal processing.

[0003] The processing operation of ultrasonic reflected wave signals directly affects the performance of the application system. Since actual signals often contain interference such as noise, multipath reflection, and signal attenuation, signal processing techniques are required to improve the signal-to-noise ratio and recognition accuracy. Traditional ultrasonic reflected wave signal processing methods only rely on software algorithms to process ultrasonic reflected wave signals, ignoring the key influence of hardware on signal quality. The hardware amplification circuit with a fixed gain cannot adapt to signal attenuation at different propagation distances, easily causing signal saturation or insufficient amplification, resulting in the amplitude of the signal collected by the analog-to-digital converter (ADC) exceeding the effective quantization interval and increasing quantization errors. Secondly, the lack of hardware-level noise suppression measures leads to the simultaneous amplification of high-frequency noise and effective signals, resulting in significant interference in ultrasonic reflected wave signals. Summary of the Invention

[0004] To solve the above technical problems, the purpose of this application is to provide an ultrasonic reflected wave signal processing operation method, a chip, and a storage medium. The specific technical solutions adopted are as follows: In the first aspect, an embodiment of this application provides an ultrasonic reflected wave signal processing operation method, which includes the following steps: Amplify the collected ultrasonic reflected wave signal using a multi-stage cascaded programmable gain amplifier, and distribute the amplified reflected wave signal to a threshold comparator and an analog-to-digital converter respectively; where the reflected wave signal is a voltage signal; The processing of the reflected wave signal in the threshold comparator includes: (1) First, by comparing the amplitude of the amplified reflected wave signal with a preset switching threshold range and combining the current gain of the multi-stage cascaded programmable gain amplifier, determine the target gain of the multi-stage cascaded programmable gain amplifier; (2) Analyze the relationship between the reflected wave signal and frequency and ambient temperature during the propagation process to determine the attenuation coefficient of the reflected wave signal propagation; based on the distribution of the reflected wave signal amplitude, combine the attenuation coefficient and the current ambient noise situation to determine the threshold control coefficient for the current reflected wave signal acquisition; (3) Using the threshold control coefficient and the reference voltage value of the analog-to-digital converter, obtain the trigger threshold for the analog-to-digital converter to collect reflected wave signals; For a single ultrasonic signal transmitted, obtain each group of reflected wave signal sequences collected under the condition that the analog-to-digital converter meets the trigger threshold; based on the distribution of all groups of reflected wave signal sequences, determine the true reflected wave of the single ultrasonic signal and the zero-crossing time corresponding to the true reflected wave.

[0005] In one embodiment, the determining the target gain of the multi-stage cascaded programmable gain amplifier includes: When the amplitude of the reflected wave signal input to the threshold comparator is greater than the upper limit of the preset switching threshold range or less than the lower limit of the preset switching threshold range, adjust the gain of the multi-stage cascaded programmable gain amplifier. Specifically: Calculate the ratio of half of the reference voltage of the analog-to-digital converter to the input voltage of the threshold comparator, and combine the ratio with the current gain of the multi-stage cascaded programmable gain amplifier to obtain the target gain of the multi-stage cascaded programmable gain amplifier.

[0006] In one embodiment, the target gain of the multi-stage cascaded programmable gain amplifier is the product of the ratio and the current gain of the multi-stage cascaded programmable gain amplifier.

[0007] In one embodiment, the determination of the attenuation coefficient includes: Calculate the product of the square root value of the current ambient temperature and the frequency of the ultrasonic reflected wave, denoted as the first product. Take the first product as the exponent of the exponential function with the natural constant as the base. The attenuation coefficient is the calculation result of the exponential function.

[0008] In one embodiment, the determination of the threshold control coefficient includes: Sample the ultrasonic reflected wave signal, calculate the mean value of the amplitudes of the ultrasonic reflected wave signals at a preset number of moments before the current moment, calculate the product of the mean value and the attenuation coefficient, denoted as the second product, and collect the noise signal within a preset time period before the transmission of the single ultrasonic signal; Calculate the root mean square value of the noise signal, and combine the second product to determine the threshold control coefficient.

[0009] In one embodiment, the calculation method of the threshold control coefficient is: ; where is the threshold control coefficient for the current reflected wave signal acquisition, is the attenuation coefficient of the reflected wave signal propagation, is the mean value, is the first preset constraint factor, is the second preset constraint factor, is the root mean square value; The trigger threshold is the product of the normalized value of the threshold control coefficient and the reference voltage value of the analog-to-digital converter.

[0010] In one embodiment, the process of obtaining each group of reflected wave signal sequences is as follows: When the input voltage of the threshold comparator is greater than the trigger threshold, the analog-to-digital converter is started to enter the continuous acquisition mode. When the input voltage of the threshold comparator is less than or equal to the trigger threshold, the analog-to-digital converter stops acquisition. For a single ultrasonic signal transmitted, the voltage data collected by the analog-to-digital converter each time is arranged in time sequence to form each group of reflected wave signal sequences.

[0011] In one embodiment, the true reflected wave is the reflected wave signal sequence with the largest peak value among all groups of reflected wave signal sequences. The zero-crossing time corresponding to the true reflected wave is obtained by interpolating and fitting the reflected wave signal sequence with the largest peak value.

[0012] In a second aspect, an ultrasonic reflected wave signal processing and operation chip is further provided in an embodiment of the present application. The chip includes: An ultrasonic reflected wave amplification unit: configured to amplify the collected ultrasonic reflected wave signal by using a multi-stage cascaded programmable gain amplifier, and distribute the amplified reflected wave signal to a threshold comparator and an analog-to-digital converter respectively; An ultrasonic reflected wave amplification correction unit: configured to determine the target gain of the multi-stage cascaded programmable gain amplifier by comparing the amplitude of the amplified reflected wave signal with a preset switching threshold range and combining the current gain of the multi-stage cascaded programmable gain amplifier; An analog-to-digital converter acquisition control unit: configured to analyze the relationship between the propagation of the reflected wave signal and frequency and ambient temperature to determine the attenuation coefficient of the reflected wave signal propagation; based on the distribution of the reflected wave signal amplitude, combine the attenuation coefficient and the current ambient noise situation to determine the threshold control coefficient for the current reflected wave signal acquisition; use the threshold control coefficient and the reference voltage value of the analog-to-digital converter to obtain the trigger threshold for the analog-to-digital converter to acquire the reflected wave signal; An ultrasonic reflected wave extraction unit: for a single ultrasonic signal transmitted, obtain each group of reflected wave signal sequences collected under the condition that the analog-to-digital converter meets the trigger threshold; based on the distribution of all groups of reflected wave signal sequences, determine the true reflected wave of the single ultrasonic signal and the zero-crossing time corresponding to the true reflected wave.

[0013] In a third aspect, an embodiment of the present application also provides an ultrasonic reflection wave signal processing operation storage medium, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.

[0014] The present application has at least the following beneficial effects: In the present application, the collected ultrasonic reflection wave signal is amplified by a multi-stage cascaded programmable gain amplifier, and the amplified reflection wave signal is respectively distributed to a threshold comparator and an analog-to-digital converter; wherein, the reflection wave signal is a voltage signal; the multi-stage programmable gain amplifier is used to perform hierarchical amplification on the reflection wave signal, improving the adaptive ability to signal intensity fluctuations. During the propagation of ultrasonic signals, the long-distance reflection signal may be weak due to attenuation, while the short-distance reflection signal may be saturated. The multi-stage gain can automatically switch the amplification factor according to the current signal amplitude to ensure that reflection waves at different distances can be effectively processed; the processing of the reflection wave signal in the threshold comparator includes: (1) First, by comparing the amplitude of the amplified reflection wave signal with a preset switching threshold range and combining the current gain of the multi-stage cascaded programmable gain amplifier, the target gain of the multi-stage cascaded programmable gain amplifier is determined; based on the real-time comparison of the reflection wave amplitude with the preset switching threshold, the real-time performance and accuracy of gain adjustment are optimized. By combining the matching logic of the current gain state and the target gain, it is possible to quickly respond to the dynamic change of the signal intensity and avoid signal distortion caused by gain lag; (2) Analyze the relationship between the reflection wave signal and frequency and ambient temperature during the propagation process to determine the attenuation coefficient of the reflection wave signal propagation; based on the distribution of the reflection wave signal amplitude, combined with the attenuation coefficient and the current ambient noise situation, determine the threshold control coefficient for the current reflection wave signal acquisition; the threshold control coefficient enhances the adaptability to complex physical environments, so that stable detection can still be maintained in high-temperature or high-noise scenarios; using the threshold control coefficient and the reference voltage value of the analog-to-digital converter, obtain the trigger threshold for the analog-to-digital converter to collect the reflection wave signal; improve the environmental robustness of the trigger threshold, which can significantly reduce the false alarm rate; for a single ultrasonic signal transmitted, obtain each group of reflection wave signal sequences collected under the condition that the analog-to-digital converter meets the trigger threshold; based on the distribution of all groups of reflection wave signal sequences, determine the true reflection wave of the single ultrasonic signal and the zero-crossing time corresponding to the true reflection wave, improving the discrimination accuracy of the true reflection wave, optimizing the anti-interference ability of ultrasonic reflection wave measurement, and enhancing the stability under extreme working conditions. Description of the Drawings

[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0016] Figure 1 It is a flowchart of the steps of a method for processing and calculating ultrasonic reflection wave signals provided by an embodiment of the present application; Figure 2 It is a schematic diagram of the hardware processing connection of ultrasonic reflection wave signals; Figure 3 It is a flowchart for determining the trigger threshold in a threshold comparator. Detailed Embodiments

[0017] To further elaborate on the technical means and effects adopted by the present application to achieve the intended invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific embodiments, structures, features, and effects of a method for processing and calculating ultrasonic reflection wave signals, a chip, and a storage medium proposed according to the present application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.

[0019] The following specifically describes the specific solutions of a method for processing and calculating ultrasonic reflection wave signals, a chip, and a storage medium provided by the present application with reference to the accompanying drawings.

[0020] Please refer to Figure 1 , which shows a flowchart of the steps of a method for processing and calculating ultrasonic reflection wave signals provided by an embodiment of the present application. The method includes the following steps: S1, amplify the collected ultrasonic reflection wave signals using a multi-stage cascaded programmable gain amplifier, and distribute the amplified reflection wave signals to a threshold comparator and an analog-to-digital converter respectively; wherein, the reflection wave signal is a voltage signal.

[0021] In this embodiment, an STM32 single-chip microcomputer is used as the acquisition device for ultrasonic reflection waves. At the same time, a temperature sensor is used to collect the ambient temperature at the current position. It is defaulted in this embodiment that the ambient temperature remains unchanged in a short time at the current position. The STM32 single-chip microcomputer is a 32-bit microcontroller (MCU) based on the ARM Cortex-M series core launched by STMicroelectronics, featuring high performance, low power consumption, rich peripherals, and a flexible development environment. It supports ADC (Analog-to-Digital Converter), DMA (Direct Memory Access), GPIO (General-Purpose Input / Output), and timers, and can generate precise sampling clocks, trigger ADC acquisition, and flexibly control gain switching.

[0022] Since the amplitude of the ultrasonic reflection wave signal varies greatly due to factors such as distance and medium attenuation during propagation, a single-stage fixed-gain amplifier cannot simultaneously meet the requirements of non-distortion for strong signals and detectability for weak signals. Therefore, in this embodiment, three-stage PGA (Programmable Gain Amplifier) is adopted to expand the dynamic amplification range in a series connection manner, and combined with real-time monitoring and gain switching of the STM32 single-chip microcomputer, the amplitude of the reflection wave signal is always adapted to the ADC input range, thus avoiding quantization errors when the signal is too weak and saturation distortion when the signal is too strong.

[0023] After the ultrasonic sensor in this embodiment receives the ultrasonic reflection wave signal, it is first amplified to the recognizable range of the ADC through three-stage PGA. The reflected wave signal after three-stage amplification is connected to the ADC inside the STM32 single-chip microcomputer for acquisition on one hand, and input to the threshold comparator on the other hand. Among them, the reflected wave signal amplified by the PGA is an analog signal. During the process of threshold comparison of the reflected wave signal in the threshold comparator, the ultrasonic reflection wave signal is sampled, and the sampling frequency is 1MHz, which can be set by the implementer according to the actual situation and is not limited in this embodiment. The schematic diagram of the hardware processing connection of the ultrasonic reflection wave signal is as Figure 2 shown.

[0024] It should be noted that in this embodiment, the ultrasonic reflection wave signal is converted into a voltage signal, that is, the voltage signal is analyzed subsequently.

[0025] S2. Process the ultrasonic reflection wave signal in the threshold comparator, specifically including: (1) First, determine the target gain of the multi-stage series programmable gain amplifier by comparing the amplitude of the amplified reflected wave signal with the preset switching threshold range and combining the current gain of the multi-stage series programmable gain amplifier.

[0026] PGA is a circuit that dynamically adjusts the amplification factor through control signals. In this embodiment, a 3-stage cascaded PGA circuit is adopted. Each stage can achieve a gain switching from 1 to 10 times, and the total amplification range is 1 - 1000 times. Each stage of the PGA circuit includes an analog switch and a feedback resistor network, and the gain mode is switched through the GPIO control signal of STM32. The 3-stage circuits are combined in series, and the total gain is the product of the gains of each stage. STM32 monitors the amplitude of the reflected wave signal in real time. When the amplitude of the reflected wave signal exceeds the preset switching threshold range, it triggers the PGA gain switching instruction to adjust the amplification factor of each stage and achieve the dynamic optimization of the signal amplitude.

[0027] In this embodiment, the preset switching threshold range is , which represents the reference voltage value of the ADC, that is, the voltage range of the ADC input signal. When the amplitude of the reflected wave signal is lower than the lower limit of the switching threshold, it triggers an increase in the PGA gain. When the amplitude of the reflected wave signal is higher than the upper limit of the switching threshold, it triggers a decrease in the PGA gain. The ideal input range of the ADC is usually . The switching threshold set in this embodiment covers 90% of the ADC input range, leaving room for signal fluctuations and reducing frequent gain switching. By avoiding the non-linear regions at both ends, it not only prevents the quantization noise from accounting for too high a proportion due to too weak a signal but also prevents the ADC from saturation due to too strong a signal.

[0028] The gain switching of the 3-stage cascaded PGA is realized by comparing the switching threshold with the reflected wave signal input to the threshold comparator. The specific steps are as follows: First, determine the gain adjustment direction according to the input voltage of the threshold comparator. Increase the gain when , and decrease the gain when . When the gain needs to be adjusted, calculate the target gain of the 3-stage cascaded PGA. The expression is: , where represents the target gain of the 3-stage cascaded PGA, represents the current gain of the 3-stage cascaded PGA, that is, the product of the amplification factors of the 3-stage cascaded PGA circuit, represents half of the ADC reference voltage. To balance the anti-saturation and anti-noise capabilities, choosing half of the ADC reference voltage can avoid frequent adjustments and at the same time leave room for the fluctuations of the reflected wave signal.

[0029] It should be noted that when adjusting the gain, the gain of the last stage, that is, the gain of the 3rd stage PGA, is adjusted first. If the gain of the last stage has reached the limit, that is, 10 times or 1 time, then adjust forward in turn. STM32 outputs a control level signal through GPIO to drive the analog switch inside the PGA to switch the feedback resistor network, realizing the fast switching of 1-fold or 10-fold gain for each stage. After switching, re-collect If it still exceeds the switching threshold range, readjustment is repeated.

[0030] By dynamically adjusting the gain, it is ensured that the ultrasonic reflected wave signal is amplified to the optimal range before ADC acquisition, thereby maximizing the signal-to-noise ratio (SNR) and acquisition accuracy. At the same time, the three-stage cascade design reduces the noise accumulation problem caused by too high single-stage gain while ensuring the amplification ability, improves the anti-interference ability, and ensures the accuracy and robustness of the measurement results.

[0031] (2) Analyze the relationship between the propagation of the reflected wave signal and frequency and ambient temperature to determine the attenuation coefficient of the reflected wave signal propagation; based on the distribution of the reflected wave signal amplitude, combined with the attenuation coefficient and the noise situation of the current environment, determine the threshold control coefficient for the current reflected wave signal acquisition.

[0032] If the ADC uses a fixed trigger or continuous acquisition mode for ultrasonic reflected wave signal acquisition, a large amount of redundant data will be generated when there is no effective reflected wave, occupying storage resources and increasing the CPU processing burden. By using a threshold comparator to monitor the signal intensity in real time and triggering ADC acquisition only when the reflected wave signal amplitude reaches the set acquisition threshold, it can ensure that only effective signals are sampled and avoid interference from invalid data. At the same time, using DMA to transfer data can bypass the CPU and directly write the ADC conversion result into memory, reducing the data transfer time, enabling efficient operation even in high-frequency acquisition scenarios, and being applicable to complex working conditions with rapid alternation of multiple reflected waves.

[0033] During ADC acquisition, if a fixed acquisition threshold is used, since in the acquisition of reflected wave signals, the signal intensity fluctuates greatly due to factors such as propagation distance and medium characteristics. The fixed threshold cannot be dynamically adjusted according to the actual situation of the reflected wave signal. If the threshold is set too high, weak signals may be missed; if set too low, a large amount of noise is easily acquired, and it is impossible to effectively distinguish between effective signals and interference signals. And the threshold requirements are different in different application environments. In this embodiment, by collecting ambient temperature and historical reflected wave signal data in real time, obtaining a signal intensity reference value suitable for the current environment, and then determining the acquisition threshold based on the noise level, it is possible to dynamically adjust the trigger acquisition according to the actual scenario. This can more accurately capture effective reflected wave signals, reduce the acquisition of invalid signals, and improve the accuracy and reliability of the measurement.

[0034] Since ultrasonic reflected waves will attenuate during the process of propagation and collection, the absorption of ultrasonic waves by air is related to the frequency f of ultrasonic reflected waves and the ambient temperature T. When ultrasonic reflected waves propagate in the air, due to the viscosity, heat conduction and molecular relaxation between air molecules, the higher the frequency, the more violent the vibration of air molecules, the faster the energy loss, and the more ultrasonic reflected waves are absorbed. In terms of temperature, the increase in temperature will intensify the thermal motion of air molecules and make the collisions between molecules more frequent, thus affecting the propagation of ultrasonic reflected waves. Generally, as the temperature increases, the absorption of ultrasonic waves by air will increase, but this enhancement is not a linear relationship, because the increased activity of molecules at high temperatures makes the absorption effect show a specific trend of change.

[0035] Based on the above analysis, this embodiment calculates the attenuation coefficient of the reflected wave signal propagation, and the specific expression is: , where e is a natural constant, is the attenuation coefficient of the reflected wave signal propagation, f is the frequency of the ultrasonic reflected wave, and T is the current ambient temperature. The attenuation coefficient takes into account the environmental impact, making the threshold setting more in line with the actual situation. The use of exponential form to calculate the attenuation coefficient reflects the exponential growth trend of the attenuation of the ultrasonic reflected wave propagation process with the increase of frequency and temperature, which is consistent with the characteristic that the energy of the ultrasonic reflected wave decays exponentially when propagating in the air. Recorded as the first product.

[0036] Furthermore, the mean value of the ultrasonic reflected wave signal amplitude at a preset number of moments before the current moment is calculated and recorded as the signal strength mean value. The signal strength mean value is used as the reference amplitude to compensate for the attenuation of the signal caused by environmental factors. When there is no ultrasonic emission, that is, before the ultrasonic signal is emitted, the background noise signal within a preset time period is collected using a noise monitoring device with a collection frequency of 1MHz. The root mean square value of all the collected background noise signals is calculated. , in order to quantify the current environmental noise level and avoid noise triggering false acquisition. In this embodiment, the preset number is set to 100, and the preset time period is set to 1ms. The implementer can set them according to the actual situation, and this embodiment does not limit it here.

[0037] Environmental noise, such as circuit thermal noise, electromagnetic interference, and dynamic noise characteristics, such as sudden interference, will seriously affect the accuracy of signal triggering. If you only rely on the fixed threshold after attenuation compensation of the ultrasonic reflected wave signal, when the noise amplitude is close to or exceeds the effective signal, it may cause false triggering, that is, the noise is misjudged as a signal, or missed triggering, that is, the signal is submerged by noise. Combined with the noise level, by monitoring the noise level in real time and adjusting the trigger conditions, ensure that the acquisition threshold is always higher than the current noise, thereby isolating noise interference and improving the anti-interference ability of signal processing.

[0038] Based on the above analysis, the threshold control coefficient for collecting reflected wave signals in this embodiment is calculated, and the expression is: ; where is the threshold control coefficient for collecting the current reflected wave signal, is the attenuation coefficient of the reflected wave signal propagation, is the mean value, is the first preset constraint factor, is the second preset constraint factor, is the root mean square value, where has a value range of (0.2 - 0.4), has a value range of (1.2 - 1.8), and in this embodiment takes the value of 0.3, indicating that an effective reflected wave signal with an amplitude 30% lower than the compensated reference value is still allowed to be triggered, balancing the attenuation compensation of the reflected wave signal and noise interference, and avoiding missed triggers due to a short - term decrease in the amplitude of the reflected wave signal caused by mutations; takes the value of 1.5, indicating that the noise level is amplified by 1.5 times to ensure that the amplitude of the real signal is significantly higher than the noise and avoid false triggers caused by noise signals. Denote as the second product.

[0039] (3) Using the threshold control coefficient and the reference voltage value of the analog - to - digital converter, obtain the trigger threshold for the analog - to - digital converter to collect reflected wave signals.

[0040] The calculation method for the trigger threshold of the analog - to - digital converter to collect reflected wave signals is: , where is the current trigger threshold for the analog - to - digital converter to collect reflected wave signals, norm() is the normalization function, represents the reference voltage value of the ADC.

[0041] Determine the trigger threshold for ADC acquisition by combining signal attenuation compensation and dynamic noise suppression. Ensure that the ADC acquisition signal trigger condition is always higher than the ambient noise through the noise level to avoid false triggers and missed detections; adapt to high - noise or weak - signal scenarios by tracking noise changes in real - time and enhance the robustness of signal processing; trigger the acquisition only when the ultrasonic reflected wave signal satisfies both signal validity and noise immunity, reducing invalid data and hardware losses; ensure the accuracy and stability of measurement in complex environments through double constraints. The flow chart for determining the trigger threshold in the threshold comparator is as shown in Figure 3 Figure.

[0042] S3. For a single ultrasonic signal transmitted, obtain each group of reflected wave signal sequences collected under the condition that the analog - to - digital converter meets the trigger threshold; based on the distribution of all groups of reflected wave signal sequences, determine the true reflected wave of the single ultrasonic signal and the zero - crossing time corresponding to the true reflected wave.

[0043] The trigger threshold is compared through the ultrasonic reflection wave signal input to the threshold comparator, thereby realizing the trigger of ADC acquisition. The specific steps are as follows: For a single ultrasonic signal emitted, its reflection wave signal is analyzed. When the input voltage of the threshold comparator is greater than the trigger threshold, a capture interrupt signal is sent to the CPU of STM32. After the CPU responds to the interrupt, the ADC acquisition is immediately started through hardware configuration and transmitted through the DMA method. At this time, the ADC enters the continuous acquisition mode and samples the ultrasonic reflection wave signal at the time interval of . The DMA controller directly transports the digital signal converted by the ADC from the register to the internal RAM without the intervention of the CPU.

[0044] If the amplitudes of the ultrasonic reflection wave signals are all less than or equal to the trigger threshold continuously , it indicates that there is no effective reflection wave signal currently, and the trigger stop mechanism is triggered. In addition, when a complete acquisition of the reflection wave signal is completed, that is, all the reflection wave signals of the single ultrasonic signal are acquired under the condition of meeting the trigger threshold, the trigger stop mechanism is also triggered to terminate the acquisition of the ADC and the DMA transmission, reduce the storage of invalid data, and save memory resources. And the STM32 records the time when the ADC acquisition is started, providing a reference for calculating the propagation time of the reflection wave subsequently. By combining the acquisition start time and the "zero-crossing" time of the ultrasonic reflection wave, the time difference between the ultrasonic wave emission and reception can be accurately calculated.

[0045] It should be noted that 、 are both embodiments of this application. The implementer can adjust according to the actual situation, and this embodiment is not limited here.

[0046] In an actual ultrasonic measurement scenario, the ultrasonic wave will encounter various obstacles and reflection interfaces during propagation. In addition to the reflection wave from the measured surface, interference reflection waves such as multiple reflections and sidelobe reflections will also be generated. These interference reflection waves are received by the acquisition device together with the real reflection wave, resulting in multiple sets of sampling data in a single measurement process. If no effective distinction is made, the interference reflection wave will seriously affect the measurement accuracy.

[0047] Therefore, for a single ultrasonic signal emitted, the voltage data collected by the analog-to-digital converter each time is arranged in time sequence to form sequences of each group of reflection wave signals.

[0048] Generally, due to the relatively short propagation path and small energy loss of the real reflection wave from the measured surface, its amplitude will be larger than that of other interference reflection waves. Therefore, the amplitude can be an important feature for distinguishing the real reflection wave and the interference reflection wave.

[0049] Thus, based on the principle that the real reflected wave energy is relatively large and is manifested as a higher amplitude on the waveform, for all groups of reflected wave signal sequences collected, the peak value, i.e., the maximum value, of each group of reflected wave signal sequences is obtained respectively. Then, these peak values are compared, and the reflected wave corresponding to the group of reflected wave signal sequences with the largest peak value is selected as the real reflected wave.

[0050] After determining the reflected wave signal sequence of the real reflected wave, it is necessary to further determine the time of the reflected wave. Since the ultrasonic reflected wave is a periodic signal, its waveform alternates between positive and negative, and the points where it intersects the time axis are called "zero-crossing points". In this embodiment, interpolation fitting is performed on the reflected wave signal sequence with the largest peak value to obtain the zero-crossing time corresponding to the real reflected wave.

[0051] The zero-crossing time can more accurately reflect the arrival time of the ultrasonic reflected wave because it avoids the errors that may be caused by simply using the peak value as the arrival time. For example, different slopes of the rising or falling edges of the reflected wave waveform may lead to deviations in the peak time.

[0052] By selecting the reflected wave with the largest amplitude as the real reflected wave and using the zero-crossing time as the time of the reflected wave, the influence of interfering reflected waves can be effectively excluded, and the time for the ultrasonic wave to be reflected from the surface and return to the receiving device after being emitted can be determined more accurately. According to the propagation speed of the ultrasonic wave in the medium and combined with this accurate time, the measurement accuracy can be improved. This embodiment can stably identify the real reflected wave in the case of multiple reflected waves, enabling reliable operation under different working conditions, reducing measurement errors and fluctuations caused by interference, and enhancing the stability and reliability of signal processing.

[0053] Based on the same inventive concept as the above method, an embodiment of the present application also provides an ultrasonic reflected wave signal processing operation chip, which includes: An ultrasonic reflected wave amplification unit: used to amplify the collected ultrasonic reflected wave signal by using a multi-stage cascaded programmable gain amplifier, and distribute the amplified reflected wave signal to a threshold comparator and an analog-to-digital converter respectively; An ultrasonic reflected wave amplification correction unit: used to determine the target gain of the multi-stage cascaded programmable gain amplifier by comparing the amplitude of the amplified reflected wave signal with a preset switching threshold range and combining the current gain of the multi-stage cascaded programmable gain amplifier; Analog-to-digital converter acquisition control unit: used to analyze the relationship between the reflected wave signal during propagation and frequency and ambient temperature, determine the attenuation coefficient of the reflected wave signal propagation; based on the distribution of the reflected wave signal amplitude, combine the attenuation coefficient and the noise situation of the current environment to determine the threshold control coefficient for the current reflected wave signal acquisition; use the threshold control coefficient and the reference voltage value of the analog-to-digital converter to obtain the trigger threshold for the analog-to-digital converter to acquire the reflected wave signal. Ultrasonic reflected wave extraction unit: for a single ultrasonic signal transmitted, obtain each group of reflected wave signal sequences collected when the analog-to-digital converter meets the trigger threshold; based on the distribution of all groups of reflected wave signal sequences, determine the true reflected wave of the single ultrasonic signal and the zero-crossing time corresponding to the true reflected wave.

[0054] Based on the same inventive concept as the above method, an embodiment of the present application also provides an ultrasonic reflected wave signal processing operation storage medium, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above ultrasonic reflected wave signal processing operation methods are implemented.

[0055] It should be noted that: the above sequence of embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of this specification have been described. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0056] Each embodiment in this specification is described in a progressive manner. The same or similar parts between each embodiment can be referred to each other. Each embodiment focuses on the differences from other embodiments.

[0057] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.

Claims

1. An ultrasonic reflection wave signal processing operation method, characterized in that, The method includes the following steps: Amplify the collected ultrasonic reflection wave signals using a multi-stage cascaded programmable gain amplifier, and distribute the amplified reflection wave signals to a threshold comparator and an analog-to-digital converter respectively; wherein, the reflection wave signals are voltage signals. The processing of the reflection wave signals in the threshold comparator includes: (1) First, by comparing the amplitude of the amplified reflection wave signals with a preset switching threshold range and combining the current gain of the multi-stage cascaded programmable gain amplifier, determine the target gain of the multi-stage cascaded programmable gain amplifier. (2) Analyze the relationship between the frequency and ambient temperature during the propagation of the reflection wave signals, and determine the attenuation coefficient of the propagation of the reflection wave signals; based on the distribution of the amplitudes of the reflection wave signals, combine the attenuation coefficient and the noise situation of the current environment to determine the threshold control coefficient for the current collection of the reflection wave signals. (3) Use the threshold control coefficient and the reference voltage value of the analog-to-digital converter to obtain the trigger threshold for the analog-to-digital converter to collect the reflection wave signals. For a single ultrasonic signal transmitted, obtain each group of reflection wave signal sequences collected under the condition that the analog-to-digital converter meets the trigger threshold; based on the distribution of all groups of reflection wave signal sequences, determine the true reflection wave of the single ultrasonic signal and the zero-crossing time corresponding to the true reflection wave.

2. The ultrasonic reflection wave signal processing operation method according to claim 1, wherein The determination of the target gain of the multi-stage cascaded programmable gain amplifier includes: When the amplitude of the reflection wave signals input to the threshold comparator is greater than the upper limit of the preset switching threshold range or less than the lower limit of the preset switching threshold range, adjust the gain of the multi-stage cascaded programmable gain amplifier. Specifically: Calculate the ratio of half of the reference voltage of the analog-to-digital converter to the input voltage of the threshold comparator, and combine the ratio with the current gain of the multi-stage cascaded programmable gain amplifier to obtain the target gain of the multi-stage cascaded programmable gain amplifier.

3. The ultrasonic reflection wave signal processing operation method according to claim 2, characterized in that, The target gain of the multi-stage cascaded programmable gain amplifier is the product of the ratio and the current gain of the multi-stage cascaded programmable gain amplifier.

4. The ultrasonic reflection wave signal processing and operation method according to claim 1, characterized in that The determination of the attenuation coefficient includes: Calculate the product of the square root value of the current ambient temperature and the frequency of the ultrasonic reflection wave, denoted as the first product. Take the first product as the exponent of the exponential function with the natural constant as the base, and the attenuation coefficient is the calculation result of the exponential function.

5. The ultrasonic reflection wave signal processing and operation method according to claim 1, characterized in that The determination of the threshold control coefficient includes: Sample the ultrasonic reflection wave signals, calculate the mean value of the amplitudes of the ultrasonic reflection wave signals at a preset number of moments before the current moment, calculate the product of the mean value and the attenuation coefficient, denoted as the second product, and collect the noise signals within a preset time period before the transmission of the single ultrasonic signal. Calculate the root mean square value of the noise signals, and combine the second product to determine the threshold control coefficient.

6. The ultrasonic reflection wave signal processing and operation method according to claim 5, characterized in that, The calculation method of the threshold control coefficient is: ; where, is the threshold control coefficient for the acquisition of the current reflected wave signal, is the attenuation coefficient for the propagation of the reflected wave signal, is the said mean value, is the first preset constraint factor, is the second preset constraint factor, is the said root mean square value; The trigger threshold is the product of the normalized value of the threshold control coefficient and the reference voltage value of the analog-to-digital converter.

7. The ultrasonic reflection wave signal processing operation method according to claim 1, characterized in that The process of obtaining each group of reflection wave signal sequences is: When the input voltage of the threshold comparator is greater than the trigger threshold, the analog-to-digital converter is started to enter the continuous acquisition mode. When the input voltage of the threshold comparator is less than or equal to the trigger threshold, the analog-to-digital converter stops acquiring. For a single ultrasonic signal transmitted, the voltage data acquired by the analog-to-digital converter each time is arranged in time sequence to form each group of reflected wave signal sequences.

8. The ultrasonic reflection wave signal processing operation method according to claim 1, characterized in that The true reflected wave is the reflected wave signal sequence with the largest peak value among all groups of reflected wave signal sequences. Interpolation fitting is performed on the reflected wave signal sequence with the largest peak value to obtain the zero-crossing time corresponding to the true reflected wave.

9. An ultrasonic reflected wave signal processing operation chip, which applies the ultrasonic reflected wave signal processing operation method described in claim 1, and is characterized in that, The chip includes: An ultrasonic reflected wave amplification unit: used to amplify the acquired ultrasonic reflected wave signal by using a multi-stage cascaded programmable gain amplifier, and distribute the amplified reflected wave signal to the threshold comparator and the analog-to-digital converter respectively; An ultrasonic reflected wave amplification correction unit: used to determine the target gain of the multi-stage cascaded programmable gain amplifier by comparing the amplitude of the amplified reflected wave signal with a preset switching threshold range and combining the current gain of the multi-stage cascaded programmable gain amplifier; An analog-to-digital converter acquisition control unit: used to analyze the relationship between the propagation of the reflected wave signal and frequency and ambient temperature, determine the attenuation coefficient of the reflected wave signal propagation; based on the distribution of the reflected wave signal amplitude, combine the attenuation coefficient and the current ambient noise situation to determine the threshold control coefficient for the current reflected wave signal acquisition; use the threshold control coefficient and the reference voltage value of the analog-to-digital converter to obtain the trigger threshold for the analog-to-digital converter to acquire the reflected wave signal; An ultrasonic reflected wave extraction unit: for a single ultrasonic signal transmitted, obtain each group of reflected wave signal sequences acquired under the condition that the analog-to-digital converter meets the trigger threshold; based on the distribution of all groups of reflected wave signal sequences, determine the true reflected wave of the single ultrasonic signal and the zero-crossing time corresponding to the true reflected wave.

10. An ultrasonic reflection wave signal processing operation storage medium, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • High-precision ultrasonic level meter and measuring method

    CN106404128A

  • Signal processing method and device, and computer readable storage medium

    CN110531361A

  • Single-bit broadband radar system with arbitrarily variable threshold

    CN118311503A

  • Automatic gain control method and circuit for ultrasonic flow metering device

    CN119642912A

  • Ultrasonic flow metering device and method

    CN119666093A

Cited By

  • Ultrasonic distance measuring method, chip, ultrasonic distance measuring device and electronic equipment

    CN121432442A

  • Ultrasonic ranging method, chip, ultrasonic ranging device and electronic equipment

    CN121432442B