Ultrasonic ranging method and ultrasonic ranging system
By adaptively adjusting the dynamic threshold of the ultrasonic ranging system using a dynamic threshold algorithm, the problem of missed detections and false detections caused by fixed thresholds is solved, achieving object detection with higher accuracy and lower resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CRM ICBG (WUXI) CO LTD
- Filing Date
- 2024-12-02
- Publication Date
- 2026-06-02
AI Technical Summary
In existing ultrasonic ranging methods, using a fixed threshold may lead to missed or false detections of obstacles, and configuring multiple static thresholds will increase system resource consumption.
A dynamic threshold algorithm is used to generate a dynamic threshold curve. The dynamic threshold is adaptively adjusted by calculating the average value of the echo signal in the latest predetermined time window and adjusting the parameters, thus avoiding the defects of a fixed threshold.
It improves the accuracy of object detection, avoids missed detections and false detections, reduces the overhead of the upper-level control unit, and reduces system resource consumption.
Smart Images

Figure CN122131308A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal processing technology, and in particular to an ultrasonic ranging method and ultrasonic ranging system. Background Technology
[0002] Ultrasonic ranging, as a typical non-contact measurement method, has been widely used in many scenarios, such as vehicle obstacle detection, industrial automation control, and construction engineering surveying. Taking vehicle obstacle detection as an example, after emitting ultrasonic signals, the ultrasonic transducer can sense the ultrasonic echo signals reflected back from external obstacles, analyze the ultrasonic echo signals, and then detect the distance to the obstacle. Based on this detected distance, corresponding prompts can be provided to the user to assist in safe driving.
[0003] When an ultrasonic transducer receives ultrasonic waves reflected back from an obstacle, it indicates that an obstacle has been detected. Currently, a fixed threshold is typically set; when an echo signal exceeding this threshold is received, an obstacle is considered to have been detected. However, this fixed threshold, or static threshold method, may result in missed or false detections of obstacles during the ranging process. Furthermore, configuring multiple different static threshold settings for different measurement scenarios would increase the overhead of the upper-level control unit and the overall system resource consumption. Summary of the Invention
[0004] The purpose of this application is to provide an ultrasonic ranging method and ultrasonic ranging system that can solve at least one of the technical problems mentioned in the prior art.
[0005] One aspect of this application provides an ultrasonic ranging method. The method includes: transmitting an ultrasonic signal and receiving an echo signal reflected back from an object; generating a dynamic threshold curve based on the echo signal using a dynamic threshold algorithm, comprising: calculating a current dynamic threshold using the dynamic threshold algorithm when the echo signal at the current time point is less than or equal to a previous dynamic threshold; maintaining the previous dynamic threshold unchanged when the echo signal at the current time point is greater than the previous dynamic threshold; and comparing the echo signal with the dynamic threshold curve to determine the position information of the object.
[0006] Furthermore, the ultrasonic ranging method further includes: converting the received analog echo signal into a digital echo signal through analog-to-digital conversion; and processing the digital echo signal to obtain a processed digital echo signal, wherein the echo signal includes the processed digital echo signal.
[0007] Furthermore, the step of calculating the current dynamic threshold using the dynamic threshold algorithm includes: obtaining the echo signal of the latest predetermined time window; calculating the average value of the echo signal of the latest predetermined time window; and obtaining the current dynamic threshold based on the average value of the echo signal of the latest predetermined time window and the previous dynamic threshold.
[0008] Further, obtaining the current dynamic threshold based on the average value of the echo signal in the latest predetermined time window and the previous dynamic threshold includes: adding the average value of the echo signal in the latest predetermined time window to a first adjustment parameter; multiplying the resulting sum by a second adjustment parameter; and shifting the resulting binary number obtained by adding the product to the previous dynamic threshold to the right by a predetermined number of bits to obtain the current dynamic threshold.
[0009] Furthermore, the number of time points included in the latest scheduled time window is a multiple of 2.
[0010] Furthermore, the latest scheduled time window includes 2^N time points, and the number of scheduled bits includes M bits, where M... <N。
[0011] Furthermore, the first adjustment parameter includes a curve sensitivity adjustment parameter, and the second adjustment parameter includes a time adjustment parameter, wherein the curve sensitivity adjustment parameter is related to the overall amplitude of the echo signal, and the time adjustment parameter is related to the steepness of the envelope of the echo signal.
[0012] Furthermore, the method further includes: adjusting the value of at least one of the curve sensitivity adjustment parameter and the time adjustment parameter according to the echo signal, wherein the curve sensitivity adjustment parameter is positively correlated with the overall amplitude in the echo signal; and the time adjustment parameter is positively correlated with the steepness of the envelope of the echo signal.
[0013] Another aspect of this application provides an ultrasonic ranging system including an ultrasonic transducer, a dynamic threshold calculation module, and a comparator. The ultrasonic transducer is used to emit ultrasonic signals and receive echo signals reflected back from an object. The dynamic threshold calculation module is used to generate a dynamic threshold curve based on the echo signals using a dynamic threshold algorithm. Specifically, the dynamic threshold calculation module calculates the current dynamic threshold using the dynamic threshold algorithm when the echo signal at the current time point is less than or equal to the previous dynamic threshold; and keeps the current dynamic threshold unchanged when the echo signal at the current time point is greater than the previous dynamic threshold. The comparator is used to compare the echo signals with the dynamic threshold curve to determine the position information of the object.
[0014] Furthermore, the ultrasonic ranging system also includes an analog-to-digital converter (ADC) and a digital signal processor (DSP). The ADC is used to convert the analog echo signal received by the ultrasonic transducer into a digital echo signal; the DSP is used to process the digital echo signal to obtain a processed digital echo signal, wherein the echo signal includes the processed digital echo signal.
[0015] Furthermore, the ultrasonic ranging system also includes a memory. The memory is connected to the digital signal processor and the dynamic threshold calculation module, and the memory is used to store the digital echo signal processed by the digital signal processor and the dynamic threshold calculated by the dynamic threshold calculation module.
[0016] The ultrasonic ranging method and ultrasonic ranging system of one or more embodiments of this application do not require setting empirical threshold parameters at specific time points. Instead, they can adaptively generate corresponding dynamic threshold curves based on the actual received echo signals. Therefore, they can improve the accuracy of object detection and avoid the occurrence of missed or false detections of objects.
[0017] Furthermore, the ultrasonic ranging method and ultrasonic ranging system of one or more embodiments of this application can adaptively adjust the dynamic threshold according to the actual received echo signal, which makes it simpler, faster and more reliable for the upper-level control system, reduces the overhead of the upper-level control unit and reduces the resource consumption of the entire system. Attached Figure Description
[0018] Figure 1 This is a flowchart of an ultrasonic ranging method according to an embodiment of this application.
[0019] Figure 2 This is a comparison chart of the sensitivity adjustment parameters of the adjustment curve in one embodiment of this application.
[0020] Figure 3 This is a comparison diagram showing the adjustment time adjustment parameters according to one embodiment of this application.
[0021] Figure 4 This is a comparison chart showing one of the beneficial technical effects achieved by using the dynamic threshold curve of this application compared to existing static thresholds.
[0022] Figure 5 This is a comparison chart showing another beneficial technical effect achieved by using the dynamic threshold curve of this application compared to existing static thresholds.
[0023] Figure 6 This is a structural block diagram of an ultrasonic ranging system according to an embodiment of this application. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses consistent with some aspects of this application as detailed in the appended claims.
[0025] The ultrasonic ranging method and ultrasonic ranging system of this application will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the features in the following embodiments and implementations can be combined with each other.
[0026] Figure 1 A flowchart illustrating an embodiment of the ultrasonic ranging method of this application is provided. Figure 1 As shown, an ultrasonic ranging method according to one embodiment of this application may include steps S1 to S3.
[0027] In step S1, an ultrasonic signal is emitted and the echo signal reflected back from the object is received.
[0028] In step S2, a dynamic threshold curve can be generated based on the echo signal using a dynamic threshold algorithm.
[0029] In one embodiment, step S2 may further include steps S21 to S23.
[0030] In step S21, it is determined whether the echo signal at the current time point is greater than the previous dynamic threshold. If the result of the determination is "yes", the process proceeds to step S22. Otherwise, the process proceeds to step S23.
[0031] In step S22, if the echo signal at the current time point is greater than the previous dynamic threshold, then the current dynamic threshold remains unchanged from the previous dynamic threshold.
[0032] In step S23, if the echo signal at the current time point is less than or equal to the previous dynamic threshold, the current dynamic threshold is calculated using the dynamic threshold algorithm.
[0033] In step S3, the echo signal obtained in step S1 is compared with the dynamic threshold curve generated in step S2 to determine the position information of the object.
[0034] In some embodiments, the ultrasonic ranging method of this application may further include steps S4 and S5.
[0035] In step S4, the received analog echo signal is converted from analog to digital to obtain a digital echo signal.
[0036] In step S5, the digital echo signal obtained by analog-to-digital conversion in step S4 can be processed to obtain the processed digital echo signal.
[0037] Therefore, when the echo signal is converted from analog to digital and processed, the echo signal mentioned in steps S2 and S3 may include the processed digital echo signal.
[0038] Compared to existing methods of setting static thresholds, the ultrasonic ranging method of this application does not require setting empirical threshold parameters at specific time points. Instead, it can adaptively generate corresponding dynamic threshold curves based on the actual received echo signals. Therefore, it can improve the accuracy of object detection and avoid the occurrence of missed or false detections of objects.
[0039] In addition, the ultrasonic ranging method of this application can adaptively adjust the dynamic threshold according to the actual received echo signal, which makes it simpler, faster and more reliable for the upper control system, reduces the overhead of the upper control unit and reduces the resource consumption of the entire system.
[0040] The following section details how this application calculates the current dynamic threshold using a dynamic threshold algorithm when the echo signal at the current time point is less than or equal to the previous dynamic threshold.
[0041] In some embodiments, step S23, which calculates the current dynamic threshold using a dynamic threshold algorithm, may further include steps S231 to S233.
[0042] In step S231, the echo signal of the latest predetermined time window is acquired.
[0043] Optionally, the number of time points included in the latest booking time window is a multiple of 2. Specifically, the latest booking time window includes 2 N A specific point in time.
[0044] In step S232, the average value of the echo signal in the latest predetermined time window is calculated.
[0045] Specifically, for the latest 2 N The echo signals at each time point are summed and then averaged to obtain the average value of the echo signal for the latest predetermined time window.
[0046] In step S233, the current dynamic threshold can be obtained based on the average value of the echo signal of the latest predetermined time window calculated in step S232 and the previous dynamic threshold.
[0047] In one embodiment, obtaining the current dynamic threshold based on the average value of the echo signals in the latest predetermined time window and the previous dynamic threshold in step S233 may further include steps S2331 to S2333.
[0048] In step S2331, add the average value of the echo signals in the latest predetermined time window to the first adjustment parameter.
[0049] In one embodiment, the first adjustment parameter may, for example, include a curve sensitivity adjustment parameter alpha_atg, where the curve sensitivity adjustment parameter alpha_atg is related to the overall amplitude of the echo signals. For example, when the overall amplitude of the echo signals is relatively large, the value of the curve sensitivity adjustment parameter alpha_atg can be set a little larger; conversely, when the overall amplitude of the echo signals is relatively small, the value of the curve sensitivity adjustment parameter alpha_atg can be set a little smaller.
[0050] In step S2332, multiply the sum obtained in step S2331 by the second adjustment parameter.
[0051] In one embodiment, the second adjustment parameter may, for example, include a time adjustment parameter tau_atg, where the time adjustment parameter tau_atg is related to the steepness of the envelope of the echo signals. For example, when the shape of the envelope of the echo signals is relatively steep, the time adjustment parameter tau_atg can be set a little larger; conversely, when the shape of the envelope of the echo signals is relatively gentle, the time adjustment parameter tau_atg can be set a little smaller.
[0052] In step S2333, shift the binary number obtained by adding the product obtained in step S2332 and the previous dynamic threshold to the right by a predetermined number of bits to obtain the current dynamic threshold.
[0053] In one embodiment, the predetermined number of bits includes, for example, M bits, where M < N. Optionally, M = N - 1. For example, when the echo signal at the current time point received is greater than the previous dynamic threshold, first calculate the average value of the latest 32 (i.e., 2 5 ) echo signals and add it to the curve sensitivity adjustment parameter alpha_atg, then multiply it by the time adjustment parameter tau_atg, and finally, shift the result of adding the previous dynamic threshold to the right by 4 bits to obtain the current dynamic threshold.
[0054] In some embodiments, the ultrasonic ranging method of the present application may further include: adjusting the value of at least one of the curve sensitivity adjustment parameter alpha_atg and the time adjustment parameter tau_atg according to the received echo signals.
[0055] Figure 2 and Figure 3 A schematic diagram illustrating the effects of adjusting the curve sensitivity parameter alpha_atg and the time parameter tau_atg is provided. Figure 2 and Figure 3 In the diagram, the blue curve represents the envelope of the echo signal after analog-to-digital conversion and digital signal processing, the red curve represents the dynamic threshold curve, and the black line represents the output result after comparing the echo signal with the dynamic threshold curve.
[0056] Figure 2 A comparison chart showing the sensitivity adjustment parameter alpha_atg of the adjustment curve in one embodiment of this application is disclosed. For example... Figure 2 As shown, the left illustration depicts the curve with the sensitivity adjustment parameter alpha_atg set to 0 and the time adjustment parameter tau_atg set to 0, while the right illustration depicts the curve with the sensitivity adjustment parameter alpha_atg set to 1 and the time adjustment parameter tau_atg set to 0. From Figure 2 As can be seen from the comparison of the left and right images, the larger the curve sensitivity adjustment parameter alpha_atg is, the higher the overall amplitude of the dynamic threshold curve.
[0057] Figure 3 A comparison diagram illustrating the adjustment time parameter tau_atg of one embodiment of this application is shown. For example... Figure 3 As shown, the left illustration depicts the curve with the sensitivity adjustment parameter alpha_atg set to 0 and the time adjustment parameter tau_atg set to 0, while the right illustration depicts the curve with the sensitivity adjustment parameter alpha_atg set to 0 and the time adjustment parameter tau_atg set to 1. From Figure 3 As can be seen from the comparison of the left and right figures, the larger the time adjustment parameter tau_atg is, the faster the dynamic threshold curve responds to the echo signal.
[0058] Figure 4 and Figure 5 A comparative diagram is shown illustrating the beneficial technical effects achieved by employing the dynamic threshold curve of this application compared to existing static thresholds. Among them, in... Figure 4 and Figure 5 In the diagram, the blue curve represents the envelope of the received echo signal, the red curve represents the dynamic threshold curve, and the black line represents the output result after comparing the echo signal with the dynamic threshold curve. A black drop-down line indicates the presence of an obstacle. For example... Figure 4 As shown, the left image illustrates the use of a static threshold, while the right image illustrates the use of a dynamic threshold. A comparison of the two images clearly shows that using a static threshold can lead to false alarms, while using a dynamic threshold can improve the situation. Figure 5As shown, the left diagram illustrates the use of a static threshold, while the right diagram illustrates the use of a dynamic threshold curve. A comparison of the two diagrams clearly shows that using a static threshold can result in missed obstacle detections, while using a dynamic threshold curve can improve the situation. Therefore, this application, by employing a dynamic threshold curve, can reduce the occurrence of missed and false obstacle detections, thereby improving the accuracy of object detection.
[0059] This application also provides an ultrasonic ranging system 200. Figure 6 A schematic diagram of an ultrasonic ranging system 200 according to an embodiment of this application is shown. Figure 6 As shown, an ultrasonic ranging system 200 according to one embodiment of this application includes an ultrasonic transducer 201, a dynamic threshold calculation module 202, and a comparator 203.
[0060] The ultrasonic transducer 201 can be used to emit ultrasonic signals and receive echo signals reflected back from objects.
[0061] The dynamic threshold calculation module 202 can generate a dynamic threshold curve based on the received echo signal using a dynamic threshold algorithm. Specifically, when the received echo signal at the current time point is less than or equal to the previous dynamic threshold, the dynamic threshold calculation module 202 can calculate the current dynamic threshold using the dynamic threshold algorithm; when the received echo signal at the current time point is greater than the previous dynamic threshold, the dynamic threshold calculation module 202 will keep the current dynamic threshold unchanged from the previous dynamic threshold.
[0062] The two input terminals of comparator 203 are used to receive the echo signal and the dynamic threshold curve generated by the dynamic threshold calculation module 202, respectively. Comparator 203 can compare the echo signal with the dynamic threshold curve to determine the position information of the object.
[0063] In some embodiments, the ultrasonic ranging system 200 of this application may further include an analog-to-digital converter 204 and a digital signal processor 205.
[0064] The analog-to-digital converter 204 is connected to the ultrasonic transducer 201. The analog-to-digital converter 204 can convert the analog echo signal received by the ultrasonic transducer 201 into a digital echo signal.
[0065] The digital signal processor 205 is connected to the analog-to-digital converter 204. The digital signal processor 205 can process the digital echo signal obtained by the analog-to-digital converter 204, such as by filtering and amplifying, so as to obtain the processed digital echo signal.
[0066] In one embodiment, the non-inverting input of comparator 203 is connected to the output of dynamic threshold calculation module 202 to receive the dynamic threshold curve generated by dynamic threshold calculation module 202; the inverting input of comparator 203 is connected to the output of digital signal processor 205 to receive the digital echo signal processed by digital signal processor 205. Comparator 203 compares the processed digital echo signal with the dynamic threshold curve to obtain the position information of the object.
[0067] In some embodiments, the ultrasonic ranging system 200 of this application may further include a memory 206. The memory 206 is connected to the digital signal processor 205 and the dynamic threshold calculation module 202. The memory 206 can store the digital echo signal processed by the digital signal processor 205 and the dynamic threshold calculated by the dynamic threshold calculation module 202.
[0068] The ultrasonic ranging system 200 of this application, by adding a dynamic threshold calculation module 202, can adaptively generate a corresponding dynamic threshold curve based on the actual received echo signal. Therefore, it can improve the accuracy of object detection and avoid the occurrence of missed or false detections of objects. Moreover, it is easy to implement and consumes few resources.
[0069] The ultrasonic ranging method and ultrasonic ranging system provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the ultrasonic ranging method and ultrasonic ranging system of this application. The descriptions of the embodiments above are only for helping to understand the core ideas of this application and are not intended to limit this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the spirit and principles of this application, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. An ultrasonic ranging method, characterized in that, include: It emits ultrasonic signals and receives the echo signals reflected back from objects; A dynamic threshold curve is generated based on the echo signal using a dynamic threshold algorithm, which includes: If the echo signal at the current time point is less than or equal to the previous dynamic threshold, then the current dynamic threshold is calculated using the dynamic threshold algorithm. If the echo signal at the current time point is greater than the previous dynamic threshold, then the current dynamic threshold remains unchanged from the previous dynamic threshold. The echo signal is compared with the dynamic threshold curve to determine the position information of the object.
2. The ultrasonic ranging method as described in claim 1, characterized in that, Also includes: The received analog echo signal is converted into a digital echo signal through analog-to-digital conversion; The digital echo signal is processed to obtain a processed digital echo signal. The echo signal includes the processed digital echo signal.
3. The ultrasonic ranging method as described in claim 1 or 2, characterized in that, The calculation of the current dynamic threshold using the dynamic threshold algorithm includes: Obtain the echo signal for the latest scheduled time window; Calculate the average value of the echo signal within the latest predetermined time window; The current dynamic threshold is obtained based on the average value of the echo signal in the latest predetermined time window and the previous dynamic threshold.
4. The ultrasonic ranging method as described in claim 3, characterized in that, The process of obtaining the current dynamic threshold based on the average value of the echo signal within the latest predetermined time window and the previous dynamic threshold includes: The average value of the echo signal in the latest predetermined time window is added to the first adjustment parameter; The sum obtained is then multiplied by the second adjustment parameter; The resulting binary number is obtained by adding the product to the previous dynamic threshold and then shifting it to the right by a predetermined number of bits to obtain the current dynamic threshold.
5. The ultrasonic ranging method as described in claim 4, characterized in that, The number of time points included in the latest scheduled time window is a multiple of 2.
6. The ultrasonic ranging method as described in claim 5, characterized in that, The latest scheduled time window includes 2 N At a given time point, the predetermined number of bits includes M bits, where M... <N。 7. The ultrasonic ranging method as described in claim 4, characterized in that, The first adjustment parameter includes a curve sensitivity adjustment parameter, and the second adjustment parameter includes a time adjustment parameter. The curve sensitivity adjustment parameter is related to the overall amplitude of the echo signal, and the time adjustment parameter is related to the steepness of the envelope of the echo signal.
8. The ultrasonic ranging method as described in claim 7, characterized in that, The method further includes: The value of at least one of the curve sensitivity adjustment parameter and the time adjustment parameter is adjusted based on the echo signal, wherein the curve sensitivity adjustment parameter is positively correlated with the overall amplitude of the echo signal; and the time adjustment parameter is positively correlated with the steepness of the envelope of the echo signal.
9. An ultrasonic ranging system, characterized in that, include: An ultrasonic transducer is used to emit ultrasonic signals and receive the echo signals reflected back from an object. The dynamic threshold calculation module is used to generate a dynamic threshold curve based on the echo signal using a dynamic threshold algorithm. The dynamic threshold calculation module is used to calculate the current dynamic threshold using the dynamic threshold algorithm when the echo signal at the current time point is less than or equal to the previous dynamic threshold; and to keep the current dynamic threshold unchanged when the echo signal at the current time point is greater than the previous dynamic threshold. A comparator is used to compare the echo signal with the dynamic threshold curve to determine the position information of the object.
10. The ultrasonic ranging system as described in claim 9, characterized in that, Also includes: An analog-to-digital converter is used to convert the analog echo signal received by the ultrasonic transducer into a digital echo signal. A digital signal processor is used to process the digital echo signal to obtain a processed digital echo signal. The echo signal includes the processed digital echo signal.
11. The ultrasonic ranging system as described in claim 10, characterized in that, Also includes: A memory is connected to the digital signal processor and the dynamic threshold calculation module. The memory is used to store the digital echo signal processed by the digital signal processor and the dynamic threshold calculated by the dynamic threshold calculation module.