An ultrasonic anti-interference ranging method and system based on dynamic weighting

By alternating the transmission of short and long pulse sequences, combined with multi-feature fusion and dynamic weighting methods, the problem of poor accuracy and stability of ultrasonic ranging in complex environments is solved, and accurate identification of target echoes and stable output of ranging values ​​are achieved.

CN123029534APending Publication Date: 2026-11-03FUZHOU DAYU ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611180691.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing ultrasonic ranging methods struggle to simultaneously identify weak echoes and suppress interference echoes in complex environments, resulting in poor ranging accuracy and stability.

Method used

Alternating transmission of short and long pulse sequences is employed, combined with multi-feature fusion and dynamic weighting. Through filtering, decompression, peak detection, and candidate echo feature extraction, the weight coefficients of echo features are dynamically determined. Finally, weighted scoring and filtering are performed to determine the target echo.

Benefits of technology

It improves the accuracy and stability of ultrasonic ranging in complex environments, can adapt to close-range targets and long-range weak echoes, reduces misjudgments due to noise and false reflections, and suppresses measurement jumps caused by transient interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123029534A_ABST
    Figure CN123029534A_ABST
Patent Text Reader

Abstract

The application discloses an ultrasonic anti-interference ranging method and system based on multi-feature fusion and dynamic weighting. The method alternately transmits short pulse sequence signals and long pulse sequence signals, and collects corresponding echo signals; the echo signals are filtered and value-compressed to obtain echo waveforms; peak detection is performed on the echo waveforms, and echo features of candidate echoes are extracted; based on the pulse sequence types corresponding to the candidate echoes, historical measurement results and the echo features, weight coefficients of the echo features are determined, weighted scoring is performed, the candidate echo with the highest score is determined as a target echo; an original distance value is calculated according to a time difference between a transmission time and a receiving time of the target echo, and a target distance value is obtained through filtering and abnormal value elimination. The application can improve the accuracy of target echo recognition and the stability of ranging in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultrasonic ranging, specifically to an ultrasonic anti-interference ranging method and system based on dynamic weighting. Background Technology

[0002] Ultrasonic ranging typically involves transmitting ultrasonic signals to the target using an ultrasonic transducer, receiving the echo signals reflected by the target, and calculating the distance between the target and the ultrasonic transducer based on the time difference between the transmission and reception of the ultrasonic signal.

[0003] In industrial storage tanks, silos, reaction vessels, and measurement environments with stirring mechanisms, pipelines, or stepped structures, ultrasonic signals may be affected by dust, steam, liquid level fluctuations, container walls, agitators, and other internal components during propagation, resulting in multiple echoes. These multiple echoes include both the true echo generated by the measured target and interference echoes generated by noise, side lobes, near-field reverberations, and other reflecting structures.

[0004] Existing ultrasonic ranging methods typically use a fixed amplitude threshold or the first peak exceeding the threshold to determine the target echo. However, due to significant differences in echo amplitude across different measurement distances, measured media, and environments, a fixed amplitude threshold is insufficient to simultaneously address weak echo identification and interference echo suppression. When the threshold is high, weak echoes at long distances are easily missed; when the threshold is low, noise peaks or false echoes are easily misidentified as target echoes. Summary of the Invention

[0005] In view of the above problems, this application provides a dynamic weighted ultrasonic anti-interference ranging method and system to improve the accuracy and stability of ultrasonic ranging in complex environments.

[0006] To achieve the above objectives, the inventors provide an ultrasonic anti-interference ranging method based on multi-feature fusion and dynamic weighting, comprising:

[0007] Short pulse sequence signals and long pulse sequence signals are transmitted alternately, and the corresponding echo signals are acquired respectively;

[0008] The echo signal is filtered and de-valued and compressed to obtain the echo waveform;

[0009] Peak detection is performed on the echo waveform, and echo features of candidate echoes are extracted based on the detection results;

[0010] Based on the pulse sequence type, historical measurement results, and echo characteristics of each candidate echo, the weight coefficients corresponding to each echo characteristic are determined and weighted scores are performed. The candidate echo with the highest score is determined as the target echo.

[0011] Based on the time difference between the transmission and reception times corresponding to the target echo, the original distance value is calculated, and the original distance value is filtered and outlier is removed to obtain the target distance value.

[0012] This invention also provides an ultrasonic anti-interference ranging system based on multi-feature fusion and dynamic weighting, comprising:

[0013] The pulse transmission and acquisition module is used to alternately transmit short pulse sequences and long pulse sequences, and acquire the corresponding echo signals respectively;

[0014] The echo preprocessing module is used to filter and de-value compress the echo signal to obtain the echo waveform;

[0015] The candidate echo extraction module is used to perform peak detection on the echo waveform, and determine candidate echoes and extract echo features of each candidate echo based on the detection results.

[0016] The dynamic weighted decision module is used to determine the weight coefficients corresponding to each echo feature based on the pulse sequence type, historical measurement results and echo features of each candidate echo, to perform weighted scoring on each candidate echo, and to determine the candidate echo with the highest score as the target echo.

[0017] The ranging processing module is used to calculate the original distance value based on the time difference between the transmission time and the reception time corresponding to the target echo, and to filter and remove outliers from the original distance value to obtain the target distance value.

[0018] Unlike existing technologies, the above-mentioned technical solution alternately transmits short-pulse and long-pulse sequences, balancing the high temporal resolution of short-pulse sequences with the high transmission energy of long-pulse sequences. This allows ultrasonic ranging to adapt to both near-range targets and weak echoes at long range. By filtering and decompressing the echo signals, the main characteristics of the echo waveform are preserved while suppressing noise and reducing data processing. By extracting the echo features of candidate echoes and dynamically determining the weight coefficients of each echo feature in conjunction with the pulse sequence type corresponding to the candidate echo and historical measurement results, the determination of target echoes no longer depends on a single amplitude threshold. It can adjust the influence of different echo features on the scoring results according to the current measurement state, thereby reducing misjudgments caused by noise spikes, false reflections, and multipath echoes. Furthermore, by filtering and removing outliers from the original distance values, measurement jumps caused by transient interference can be suppressed, improving the accuracy, stability, and adaptability of ultrasonic ranging in complex environments.

[0019] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0020] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on this application.

[0021] In the accompanying drawings of the instruction manual:

[0022] Figure 1 This is a flowchart of an ultrasonic anti-interference ranging method based on dynamic weighting in an embodiment of the present invention. Detailed Implementation

[0023] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0024] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0025] In this embodiment, a short pulse sequence signal refers to an ultrasonic transmission signal with a relatively short pulse duration or a relatively small number of pulse cycles; a long pulse sequence signal refers to an ultrasonic transmission signal with a longer pulse duration or a larger number of pulse cycles than a short pulse sequence signal.

[0026] Short pulse sequence signals and long pulse sequence signals can have the same center frequency, or they can be set to different center frequencies according to the operating characteristics of the ultrasonic transducer. In one embodiment, both use the same center frequency, and the short pulse sequence signal and long pulse sequence signal are formed by changing the number of consecutive transmission cycles, so that they can share the same ultrasonic transducer and signal processing channel. For example, both have a center frequency of 40 kHz and a single carrier period of 25 μs; the short pulse sequence signal includes 4 carrier periods and a duration of 100 μs; the long pulse sequence signal includes 12 carrier periods and a duration of 300 μs.

[0027] The historical measurement results may include the target distance value of the previous measurement period, or at least one of the following: target distance values ​​of multiple consecutive historical measurement periods, corresponding target echo time, target echo characteristics, scoring results, and signal-to-noise ratio.

[0028] The echo features are not a single scalar, but rather a multi-dimensional echo feature composed of the echo amplitude, echo time, echo energy, echo width, and optional temporal continuity features of the candidate echoes. Echo feature fusion refers to forming a feature set or feature vector corresponding to the candidate echoes from multiple feature dimensions, which is then used for subsequent dynamic weight determination and weighted scoring.

[0029] Example 1:

[0030] like Figure 1 As shown, an ultrasonic anti-interference ranging method based on multi-feature fusion and dynamic weighting includes:

[0031] S100: Alternately transmits short pulse sequence signals and long pulse sequence signals, and collects the corresponding echo signals respectively.

[0032] Within a measurement cycle, the ultrasonic transducer is controlled to first emit a short pulse sequence signal, followed by a long pulse sequence signal; or first emit a long pulse sequence signal, followed by a short pulse sequence signal. A preset time interval is set between the two pulse sequence signals to avoid aliasing caused by the effective echo of the previous pulse sequence signal affecting the echo acquisition of the corresponding subsequent pulse sequence signal.

[0033] The transmission times of short-pulse and long-pulse signal sequences are recorded separately, and a corresponding echo acquisition time window is opened for each transmission. This allows the acquired echo signals to be correlated with either the short-pulse or long-pulse signal sequences, ensuring that each subsequently identified candidate echo has a clearly defined pulse sequence type.

[0034] In one example, both the short pulse sequence signal and the long pulse sequence signal have a center frequency of 40 kHz. The short pulse sequence signal consists of 4 consecutive cycles, and the long pulse sequence signal consists of 12 consecutive cycles. The short pulse sequence signal is mainly used for short-range measurements, while the long pulse sequence signal is mainly used for long-range measurements. The number of cycles and center frequency mentioned above are only examples and can be adjusted according to the transducer resonant frequency, measurement range, and the medium being measured.

[0035] After transmitting a short-pulse or long-pulse sequence signal, the echo signal is received by an ultrasonic transducer. The analog echo signal is then converted into digital sampled data via an amplifier, bandpass filter, and analog-to-digital converter. The sampling time window is determined based on a preset maximum measurement distance to ensure that it covers the time required for the ultrasonic wave to travel to and return from the maximum measurement distance.

[0036] S200: Filter and de-value the echo signal to obtain the echo waveform.

[0037] Filtering is used to suppress high-frequency random noise, low-frequency baseline drift, or interference components that do not correspond to the operating frequency band of the ultrasonic transducer in the echo signal. Filtering methods can include sliding window mean filtering, median filtering, bandpass digital filtering, or a combination of these methods.

[0038] In one implementation, a sliding window mean filter is used to process the digital sampled data. For the current sample point, its average value with a preset number of sample points before and after it is calculated, and the current sample value is replaced with the average value, thereby suppressing local spike noise while preserving the trend of echo envelope variation.

[0039] After filtering, the filtered echo signal is compressed by decimation. Decimation compression reduces the amount of data required for subsequent peak detection and feature extraction. Decimation compression can be performed at a fixed decimation ratio, or different decimation ratios can be used depending on the degree of local waveform variation.

[0040] For example, the filtered echo signal is divided into multiple local waveform intervals, and the change between adjacent sampling points within each local waveform interval is calculated. When the local waveform change is large, a smaller sampling ratio is used to preserve the rising edge, falling edge, and peak position of the wave peak; when the local waveform change is small, a larger sampling ratio is used to reduce the amount of data in flat intervals. Thus, while reducing the amount of data computation, the main waveform information used to calculate echo amplitude, echo time, echo energy, and echo width is preserved.

[0041] The echo signals corresponding to short pulse sequence signals and long pulse sequence signals can be filtered and decimated / compressed respectively to obtain short pulse echo waveforms and long pulse echo waveforms. Both can be collectively referred to as echo waveforms.

[0042] S300: Perform peak detection on the echo waveform and extract echo features of candidate echoes based on the detection results.

[0043] Specifically, step S300 may include steps S310 to S350.

[0044] S310: Determine a noise reference value based on the noise range in the echo waveform, and determine an echo detection threshold based on the noise reference value.

[0045] The noise interval can be a pre-determined targetless echo interval within the echo acquisition time window, or a background interval identified based on local waveform energy and fluctuation level. The sampled values ​​within the noise interval are statistically analyzed to obtain the noise mean, noise peak value, noise variance, or noise standard deviation, and a noise baseline value is determined based on at least one statistical result.

[0046] In one implementation, the noise reference values ​​include the noise mean and the noise standard deviation, and the echo detection threshold can be expressed as:

[0047]

[0048] in, Indicates the echo detection threshold. This represents the noise mean of the noise range. The standard deviation of noise represents the noise range. This represents the threshold adjustment coefficient.

[0049] The threshold adjustment coefficient can be set according to the type of short or long pulse sequence, historical signal-to-noise ratio, and current noise level. Dynamically determining the echo detection threshold based on the noise range can avoid generating too many false candidate echoes or missing weak echoes when the ambient noise changes.

[0050] S320: The waveform interval that continuously exceeds the echo detection threshold is determined as a candidate echo interval, and the wave peak in the candidate echo interval is determined as a candidate echo.

[0051] When the sampled values ​​in the echo waveform continuously exceed the echo detection threshold, and the number of consecutive sampled points reaches a preset number, the corresponding continuous waveform interval is determined as a candidate echo interval. By limiting continuity, pulse noise with only a single sampled point or a small number of sampled points exceeding the echo detection threshold can be filtered out.

[0052] For two adjacent waveform intervals that exceed the echo detection threshold, if the interval between them is less than the preset merging interval, the two waveform intervals can be merged into one candidate echo interval to avoid the same echo envelope being incorrectly divided into multiple candidate echoes due to local concavity.

[0053] Within each candidate echo interval, the sampling point with the largest amplitude is identified as the peak, and this peak and its corresponding candidate echo interval are defined as a candidate echo. Each candidate echo is associated with its corresponding pulse sequence type.

[0054] S330: Extract the echo amplitude, echo time, echo energy and echo width of the candidate echo according to the candidate echo interval, and fuse the echo amplitude, echo time, echo energy and echo width to generate echo features.

[0055] The echo amplitude can be the maximum amplitude within the candidate echo interval, or it can be the difference between the maximum amplitude and the noise reference value.

[0056] The echo time can be the sampling time corresponding to the wave peak, or it can be the start time of the candidate echo interval, the energy center time, or the center time determined by envelope fitting. In one embodiment, the sampling time corresponding to the wave peak is used as the echo time.

[0057] The echo energy can be obtained by accumulating or integrating the sampled values ​​or envelope values ​​within the candidate echo interval. For example, the echo energy of the i-th candidate echo... It can be represented as:

[0058]

[0059] in, This represents the envelope value corresponding to the j-th sampling point within the i-th candidate echo interval.

[0060] The echo width can be the time difference between the start and end times of the candidate echo interval, or it can be the half-peak width of the echo waveform at a preset proportional peak position. In one embodiment, the echo width is determined by the duration from when the echo waveform first exceeds the echo detection threshold to when it falls below the echo detection threshold.

[0061] The echo amplitude of the i-th candidate echo echo time Echo energy and echo width Combination to form echo characteristics The echo characteristics It can be represented as:

[0062]

[0063] S340: Determine the predicted echo time based on the target distance value of the previous measurement cycle.

[0064] Historical measurement results include the target distance value from the previous measurement cycle. Based on the target distance value and ultrasonic wave propagation speed from the previous measurement cycle, the flight time corresponding to the target echo from the previous measurement cycle can be calculated, and this flight time, or the time predicted based on the changing trend of multiple consecutive historical measurement cycles, is determined as the predicted echo time.

[0065] When the target distance value of multiple consecutive historical measurement cycles shows a stable trend, the target distance value of the current measurement cycle can be predicted based on the trend, and the predicted echo time can be determined based on the predicted target distance value.

[0066] S350: Determine the temporal continuity characteristics of each candidate echo based on the deviation between the echo time of each candidate echo and the predicted echo time, and update the echo characteristics based on the temporal continuity characteristics.

[0067] For the i-th candidate echo, calculate its echo time. With predicted echo time Time deviation between :

[0068]

[0069] The smaller the time deviation, the higher the continuity between the candidate echo and historical measurement results.

[0070] Temporal continuity characteristics It can be determined based on the time deviation ΔTi:

[0071]

[0072] For example, the temporal continuity feature can be set to a normalized value that decreases as the time deviation increases. Then, the temporal continuity feature is added to the echo feature, resulting in an updated echo feature. Represented as:

[0073]

[0074] Therefore, historical measurement results do not directly replace current candidate echoes, but are used as a basis for evaluating the temporal continuity of each candidate echo, in order to reduce the possibility that interference echoes that are significantly inconsistent with historical measurement trends are identified as target echoes.

[0075] S400: Based on the pulse sequence type, historical measurement results and echo characteristics corresponding to each candidate echo, determine the weight coefficient corresponding to each echo characteristic and perform weighted scoring, and determine the candidate echo with the highest score as the target echo.

[0076] In this embodiment, the weighting coefficient is not fixed, but dynamically determined based on the pulse sequence type corresponding to the candidate echo, the degree of change of the historical target distance value, the dispersion of the candidate echo width, and the correlation between short pulse echoes and long pulse echoes.

[0077] Specifically, in step S400, determining the weighting coefficients corresponding to each of the echo features includes:

[0078] S411: Determine the degree of distance variation based on the target distance values ​​from multiple historical measurement periods.

[0079] The difference in target distance values ​​between adjacent historical measurement periods can be calculated, and statistical analysis of multiple consecutive differences can be performed to obtain the degree of distance change. The degree of distance change can be expressed as the average, maximum, variance, or standard deviation of the absolute values ​​of the differences.

[0080] S412: When the degree of distance change is less than a preset change threshold, increase the weight coefficient corresponding to the time continuity feature.

[0081] If the distance change is less than a preset threshold, it indicates that the target is in a relatively stable state within the continuous measurement period. In this case, the echo time of the current actual echo should usually be close to the predicted echo time. Therefore, increasing the weighting coefficient corresponding to the time continuity feature allows candidate echoes that conform to historical measurement trends to receive higher scores.

[0082] S413: When the degree of distance change is not less than the preset change threshold, reduce the weight coefficient corresponding to the time continuity feature.

[0083] If the distance change is not less than a preset threshold, it indicates that the target being measured may be moving, or that the liquid or material surface being measured is in a state of rapid change. In this case, if we still rely too much on historical measurement results, we may misjudge the actual distance change as interference. Therefore, we reduce the weighting coefficient corresponding to the time continuity feature, so that the current echo amplitude, echo energy, and echo width have a greater impact on the scoring results.

[0084] Determining the weighting coefficients corresponding to each of the echo features includes:

[0085] S421: When the pulse sequence type of the candidate echo is the short pulse sequence, increase the weighting coefficients corresponding to the echo amplitude and the echo time.

[0086] Short pulse sequence signals have a short duration and relatively clear time boundaries for echo peaks, making them suitable for distinguishing adjacent reflecting targets based on echo time. Therefore, for candidate echoes corresponding to short pulse sequences, the weighting coefficient corresponding to the echo time can be increased.

[0087] Meanwhile, in the close-range measurement area, short pulse echoes usually have a high echo amplitude, so the weighting coefficient corresponding to the echo amplitude can be increased to enhance the ability to identify close-range real echoes.

[0088] S422: When the pulse sequence type of the candidate echo is the long pulse sequence, increase the weighting coefficient corresponding to the echo energy.

[0089] Long-distance echoes attenuate during propagation, and their peak amplitude may be lower. However, when long-pulse sequence signals have large transmitted energy, the true echo can still have relatively stable accumulated energy within a certain duration. Therefore, for candidate echoes corresponding to long-pulse sequences, increasing the weighting coefficient corresponding to the echo energy can reduce the possibility of missing true long-distance echoes due to relying solely on peak amplitude.

[0090] S423: When the dispersion between the echo widths of the candidate echoes exceeds a preset dispersion threshold, increase the weighting coefficient corresponding to the echo width.

[0091] The dispersion of echo widths can be determined based on the variance, standard deviation, or range of multiple candidate echo widths within the same echo waveform. When the dispersion of echo widths exceeds a preset dispersion threshold, it indicates that the multiple candidate echoes have significant differences in duration, and the echo widths have high discriminative power.

[0092] For example, spikes formed by random noise typically have small echo widths, while echoes formed by the measured target usually have continuous rising and falling edges. Increasing the weighting coefficient corresponding to the echo width is beneficial for suppressing narrow spike interference.

[0093] The weighted scoring includes:

[0094] S431: Normalize the echo amplitude, echo time, echo energy and echo width of each candidate echo.

[0095] Different echo characteristics have different dimensions and numerical ranges, therefore normalization is performed before weighted scoring. The normalized echo amplitude, echo time, echo energy, and echo width are denoted as follows: , , and .

[0096] For echo time, normalization can be performed based on the deviation between the echo time and the predicted echo time, so that candidate echoes with smaller deviations obtain larger time feature values. For echo width, normalization can be performed based on the degree of matching between the echo width of the candidate echo and the preset target echo width range.

[0097] S432: Determine the basic score of each candidate echo based on the normalized echo amplitude, echo time, echo energy, and echo width, as well as the corresponding weighting coefficients.

[0098] In one implementation, the base score of the i-th candidate echo It can be represented as:

[0099]

[0100] in, This represents the weighting coefficient corresponding to the echo amplitude. This represents the weighting coefficient corresponding to the echo time. This represents the weighting coefficient corresponding to the echo energy. This represents the weighting coefficient corresponding to the echo width. This represents the weighting coefficients corresponding to the time continuity feature. This represents the temporal continuity characteristic of the i-th candidate echo.

[0101] Each weighting coefficient can either sum to 1, or it can be used to normalize the base score after calculation. The specific values ​​of the weighting coefficients can be dynamically adjusted based on the pulse sequence type and the current measurement status.

[0102] S433: Based on the degree of matching between the echo width of each candidate echo and the preset target echo width range, the basic score is corrected to obtain the score result.

[0103] The preset target echo width range can be determined based on the characteristics of the ultrasonic transducer, the duration of short or long pulse sequences, and the historical target echo width.

[0104] When the echo width of a candidate echo is within the preset target echo width range of the corresponding pulse sequence type, its basic score is maintained or increased; when the echo width of a candidate echo deviates from the preset target echo width range, the basic score is reduced according to the degree of deviation.

[0105] This processing not only uses echo width as a feature dimension in the weighted scoring, but also uses the target echo width range to perform secondary correction on the scoring results, which can further suppress noise peaks or multipath reflection echoes with abnormal width.

[0106] Before performing weighted scoring, the candidate echoes corresponding to short pulse sequences and candidate echoes corresponding to long pulse sequences can be correlated and verified.

[0107] S441: Based on the echo time, pair the candidate echoes corresponding to the short pulse sequence with the candidate echoes corresponding to the long pulse sequence to obtain a pulse-correlated echo group.

[0108] For any candidate echo corresponding to a short pulse sequence, find candidate echoes whose echo time difference is less than a preset pairing time difference among multiple candidate echoes corresponding to a long pulse sequence, and form a pulse-correlated echo group between the two.

[0109] Since short-pulse and long-pulse signals are transmitted at different times, during pairing, the reception time of the candidate echoes can first be time-of-flight corrected based on their respective transmission times, and then the corrected echo times can be compared. Thus, two candidate echoes in a pulse-correlated echo group correspond to the same or similar measurement distances.

[0110] S442: Determine the associated feature benchmark based on the echo characteristic correspondence between short pulse echoes and long pulse echoes corresponding to the same measured target in historical measurement results.

[0111] In the historical measurement cycle, when both short pulse echoes and long pulse echoes are identified as corresponding to the same target, at least one of the following is recorded: echo time difference, echo amplitude ratio, echo energy ratio, and echo width ratio. The associated characteristic benchmark is determined based on the recording results of multiple consecutive historical measurement cycles.

[0112] The associated feature benchmark is used to characterize the stable correspondence between the echo characteristics formed by the same target under short-pulse signal sequence and long-pulse signal sequence excitation. The associated feature benchmark can be updated with historical measurement results for different targets or under different measurement environments.

[0113] S443: Determine the correlation confidence of each pulse-correlated echo group based on the echo time difference between two candidate echoes in each pulse-correlated echo group and the degree of deviation of the echo characteristics of the two candidate echoes from the correlation characteristic benchmark.

[0114] When the corrected echo times of two candidate echoes in the same pulse-correlated echo group are close, and the echo amplitude relationship, echo energy relationship, or echo width relationship between the two is close to the correlation characteristic benchmark, the pulse-correlated echo group is determined to have a high correlation confidence.

[0115] When the echo time difference between two candidate echoes is large, or the correspondence between their echo characteristics deviates significantly from the correlation characteristic benchmark, the pulse correlation echo group is determined to have low correlation confidence.

[0116] The correlation confidence level reflects whether two candidate echoes could be generated by the same target under short-pulse and long-pulse signal sequences, respectively. This correlation verification can cross-confirm candidate echoes using complementary information between different pulse sequences.

[0117] The step of determining the candidate echo with the highest score as the target echo includes:

[0118] S451: Based on the correlation confidence of each pulse-correlated echo group, the scoring results of two candidate echoes within the pulse-correlated echo group are corrected to obtain the corresponding corrected score.

[0119] S452: When the correlation confidence reaches a preset confidence threshold, improve the score results of the two candidate echoes in the pulse correlation echo group; when the correlation confidence does not reach the preset confidence threshold, reduce the corresponding score results according to the deviation between the two candidate echoes and the historical measurement results.

[0120] When the correlation confidence reaches the preset confidence threshold, it means that the short pulse candidate echo and the long pulse candidate echo have passed mutual verification, and the correlation gain can be increased for their scoring results.

[0121] When the association confidence level does not reach the preset confidence level threshold, the deviation between the two candidate echoes and the historical measurement results is calculated separately. Candidate echoes with larger deviations from the predicted echo time receive a larger score attenuation, while candidate echoes with smaller deviations from the predicted echo time receive a smaller score attenuation.

[0122] Therefore, even if the correlation confidence of the pulse-correlated echo group is low, all candidate echoes in the group are not directly discarded. Instead, each candidate echo is processed separately based on the deviation between it and the historical measurement results, so as to avoid one true echo being wrongly discarded because another pulse sequence did not form an effective echo.

[0123] S453: The candidate echo with the highest correction score is determined as the target echo.

[0124] After correlation confidence correction, the correction scores are compared among all candidate echoes in the current measurement period, and the single candidate echo with the highest correction score is determined as the target echo.

[0125] Therefore, the correlation between short-pulse echoes and long-pulse echoes is used to correct the scoring results of candidate echoes, rather than directly fusing the distance values ​​corresponding to two candidate echoes. Ultimately, a unique target echo is determined to ensure that the subsequent original distance value can be calculated from the time difference between the transmission and reception times corresponding to that target echo.

[0126] S500: Based on the time difference between the transmission time and the reception time corresponding to the target echo, the original distance value is calculated, and the original distance value is filtered and outlier is removed to obtain the target distance value.

[0127] The target echo is associated with a corresponding pulse sequence type, thus allowing us to determine the transmission time of either the short-pulse or long-pulse signal that generated the target echo. Subtracting the corresponding transmission time from the reception time of the target echo yields the round-trip time of the ultrasonic wave.

[0128] Original distance value This can be determined based on the following relationship:

[0129]

[0130] in, This indicates the speed at which ultrasound waves propagate in the current medium. This represents the time difference between the transmission time and the reception time of the target echo.

[0131] When the ambient temperature changes, the ultrasonic wave propagation speed can be corrected based on the ambient temperature obtained from the temperature sensor. Further corrections can be made based on humidity, air pressure, or medium type.

[0132] The process of filtering the raw distance values ​​may include the following steps.

[0133] S510: Determine the measurement noise parameters for the current measurement cycle based on the target echo score and signal-to-noise ratio.

[0134] A higher target echo score indicates greater reliability in terms of multiple echo characteristics and pulse correlation; a higher signal-to-noise ratio (SNR) indicates less susceptibility to noise. Therefore, a higher score and a higher SNR allow for a smaller measurement noise parameter setting.

[0135] Conversely, when the target echo score is low or the signal-to-noise ratio is low, the measurement noise parameter is set to a larger value to reduce the impact of the current raw distance value on the filtered output.

[0136] S520: Perform adaptive Kalman filtering on the original distance value based on the measured noise parameters.

[0137] The state variables of a Kalman filter can include distance and the rate of distance change. The current distance is predicted based on the filtered state of the previous measurement period, and then the state is updated based on the original distance value of the current measurement period.

[0138] The noise parameters are measured dynamically based on the target echo score and signal-to-noise ratio, so that the original distance value with higher reliability has a greater update effect, while the original distance value with lower reliability has a smaller update effect, thus balancing the stability of filtering and the ability to follow changes in target distance.

[0139] After completing the adaptive Kalman filter, outliers can be removed from the original or filtered distance values.

[0140] Specifically, the distance deviation between the current raw distance value and the target distance value or filtered distance value of the previous measurement period is calculated. When the distance deviation does not exceed a preset deviation threshold, the current filtering result is output as the target distance value.

[0141] When the distance deviation exceeds the preset deviation threshold, record the number of consecutive occurrences of abnormal deviations with the same direction of change and similar magnitude of change. If the number of consecutive occurrences does not reach the preset number, the current original distance value is determined to be an abnormal value that may be caused by instantaneous interference, and the target distance value of the previous measurement cycle is maintained, or the current target distance value is updated only with a small update ratio.

[0142] If the number of consecutive occurrences reaches the preset number, it indicates that the current distance change has persisted for multiple consecutive measurement periods. This distance change can be identified as the true distance change, and the target distance value can be updated based on the current filtering results.

[0143] By combining the deviation magnitude and the number of consecutive occurrences to eliminate outliers, we can avoid sudden changes in the target distance value caused by a single interference, and at the same time prevent the actual liquid level change, material level change, or target movement from being restricted to the vicinity of historical measurement results for a long time.

[0144] Example 2:

[0145] Building upon Example 1, in close-range measurement conditions, candidate echoes corresponding to short pulse sequences typically exhibit clearer peaks and higher temporal resolution. In this case, the weighting coefficients corresponding to echo amplitude and echo time can be increased, while the weighting coefficient corresponding to echo energy can be appropriately decreased.

[0146] In long-distance measurements, the peak amplitude of candidate echoes may decrease due to propagation attenuation, but the echo envelope still possesses identifiable cumulative energy over a certain time range. In this case, the weighting coefficient corresponding to the echo energy can be increased to prevent weak echoes from being excluded simply because of their small peak amplitude.

[0147] When agitators, pipes, steps, or other fixed reflective structures are present in the measurement environment, false echoes may form near the fixed echo time. If there is a significant deviation between the false echoes and the historical target distance values, the weighting coefficient corresponding to the time continuity feature can be increased.

[0148] When the target being measured is in a state of rapid change, the degree of distance change is not less than the preset change threshold. At this time, the weight coefficient corresponding to the time continuity feature is reduced to avoid the historical measurement results from over-constraining the actual distance change.

[0149] When multiple peaks with significantly different widths exist in the candidate echo, increasing the weighting coefficient corresponding to the echo width and correcting the basic score based on the degree of matching between the candidate echo width and the preset target echo width range can reduce the possibility of spike noise being identified as the target echo.

[0150] The above-mentioned weight adjustment conditions can take effect simultaneously. When multiple conditions are triggered at the same time, the weight adjustment amount corresponding to each condition can be calculated separately first, and then the adjusted weight coefficients can be normalized to keep each weight coefficient within the preset range.

[0151] Example 3:

[0152] Based on Example 1, in the same measurement period, both the short pulse sequence signal and the long pulse sequence signal are transmitted towards the same target. For the same target, the short pulse echo and the long pulse echo should have similar echo times after the transmission time correction is completed.

[0153] However, since short pulse sequence signals and long pulse sequence signals have different durations and transmission energies, their corresponding echo amplitudes, echo energies, and echo widths are not required to be exactly the same, but rather have a correspondence that can be learned from historical measurement results.

[0154] For example, the energy of a long pulse echo corresponding to the same measured target is usually greater than that of a short pulse echo, and the width of a long pulse echo is usually greater than that of a short pulse echo. By statistically analyzing the above correspondences over multiple consecutive historical measurement periods, a correlation characteristic benchmark can be formed.

[0155] If the echo time difference between two candidate echoes in the current pulse-correlated echo group is small, and the echo energy ratio and echo width ratio are close to the correlation characteristic benchmark, then the correlation confidence of the pulse-correlated echo group is improved. Since candidate echoes that conform to historical correspondences are detected at close distances in two different pulse sequences, the candidate echoes within the group are more likely to be the actual target echoes.

[0156] If the time positions of short-pulse candidate echoes and long-pulse candidate echoes are close, but their feature correspondence deviates significantly from the associated feature benchmark, then there may be a true echo and an interfering echo. In this case, the scoring results are attenuated based on the deviation between the time of the two candidate echoes and the predicted echo, rather than averaging the distance values ​​corresponding to the two candidate echoes.

[0157] After correlation confidence correction, the single candidate echo with the highest correction score is selected as the target echo from all candidate echoes. This process utilizes the correlation between short-pulse echoes and long-pulse echoes while maintaining the calculation logic that the original distance value is determined by the flight time of the unique target echo.

[0158] Example 4:

[0159] An ultrasonic anti-interference ranging system based on multi-feature fusion and dynamic weighting includes a pulse transmission and acquisition module, an echo preprocessing module, a candidate echo extraction module, a dynamic weighting decision module, and a ranging processing module.

[0160] The pulse transmission and acquisition module is used to alternately transmit short pulse sequences and long pulse sequences, and acquire the corresponding echo signals respectively.

[0161] The pulse transmission and acquisition module may include a controller, a pulse drive circuit, an ultrasonic transducer, an echo amplification circuit, an analog filtering circuit, and an analog-to-digital conversion circuit. The controller controls the pulse drive circuit to generate short pulse sequences and long pulse sequences, and records the corresponding transmission times. The ultrasonic transducer receives the echo signal reflected by the target being measured, and after amplification and analog-to-digital conversion, forms a digital echo signal.

[0162] The echo preprocessing module is used to filter and de-value the echo signal to obtain the echo waveform.

[0163] The echo preprocessing module can be implemented using a digital signal processing program in the controller or by a separate digital signal processor. The echo preprocessing module filters and decrements the echo signals corresponding to short pulse sequences and long pulse sequences respectively, while preserving the correspondence between each echo waveform and the pulse sequence type.

[0164] The candidate echo extraction module is used to perform peak detection on the echo waveform, and determine candidate echoes and extract the echo features of each candidate echo based on the detection results.

[0165] The candidate echo extraction module determines the noise baseline and echo detection threshold based on the noise interval, identifies waveform intervals that continuously exceed the echo detection threshold as candidate echo intervals, and extracts the echo amplitude, echo time, echo energy, and echo width of the candidate echoes. The candidate echo extraction module can also determine temporal continuity characteristics based on historical measurement results and update the echo characteristics using these temporal continuity characteristics.

[0166] The dynamic weighted decision module is used to determine the weight coefficients corresponding to each echo feature based on the pulse sequence type, historical measurement results and echo features of each candidate echo, to perform weighted scoring on each candidate echo, and to determine the candidate echo with the highest score as the target echo.

[0167] The dynamic weighted decision module can adjust the weight coefficients corresponding to the time continuity feature according to the degree of distance change, adjust the weight coefficients corresponding to the echo amplitude, echo time and echo energy according to the short pulse sequence type or long pulse sequence type corresponding to the candidate echo, and adjust the weight coefficients corresponding to the echo width according to the dispersion of the candidate echo width.

[0168] The dynamic weighted decision module can also establish pulse-correlated echo groups between short-pulse candidate echoes and long-pulse candidate echoes, determine the correlation confidence of each pulse-correlated echo group, and correct the scoring results of candidate echoes within the group based on the correlation confidence.

[0169] The ranging processing module is used to calculate the original distance value based on the time difference between the transmission time and the reception time corresponding to the target echo, and to filter and remove outliers from the original distance value to obtain the target distance value.

[0170] The ranging processing module calls the corresponding transmission time based on the pulse sequence type corresponding to the target echo, calculates the round-trip time of the ultrasonic wave, and calculates the original distance value by combining it with the ultrasonic wave propagation speed. The ranging processing module further determines the measurement noise parameters based on the target echo scoring results and signal-to-noise ratio, performs adaptive Kalman filtering on the original distance value, and removes outliers based on the number of consecutive occurrences of distance deviation.

[0171] Each of the above modules can be implemented by an independent hardware circuit, or by a processor executing a computer program stored in memory. Multiple modules can also be integrated into the same microcontroller, digital signal processor, or programmable logic device.

[0172] In summary, this application employs an alternating transmission of short-pulse and long-pulse sequences, allowing the two types of pulses to complement each other during ranging. The shorter duration of the short-pulse sequence facilitates the differentiation of near-range echoes and reduces the measurement blind zone; the higher transmission energy of the long-pulse sequence is beneficial for identifying weaker echoes propagating over longer distances. Therefore, without altering the existing ultrasonic transducer and its main hardware structure, both near-range measurement accuracy and long-range measurement range can be achieved.

[0173] After filtering and decimation compression, the echo signal can reduce random noise, instantaneous spikes, and waveform baseline fluctuations, while retaining information needed for subsequent judgment, such as peak position, envelope area, and duration. This reduces the amount of data required for peak detection and feature calculation, and avoids losing the main shape of the echo due to simple compression, making it suitable for operation in embedded processors with limited computing power and storage space.

[0174] In the target echo identification process, the echo detection threshold is first determined based on the noise level of the current echo waveform. Then, the echo amplitude, echo time, echo energy, and echo width are extracted from the candidate echoes. Compared to judging solely based on a fixed threshold or the first peak, this process can reflect the authenticity of the candidate echoes from multiple aspects. For example, although a narrow and sharp interference peak may have a high amplitude, its echo width and energy often differ from the true echo, thus making it less likely to be mistakenly selected as the target echo.

[0175] The weights of each echo feature are not fixed in advance, but are adjusted based on the pulse sequence type corresponding to the candidate echo, historical measurement results, and current echo characteristics. For candidate echoes corresponding to short pulse sequences, more consideration can be given to echo amplitude and echo time; for candidate echoes corresponding to long pulse sequences, the influence of echo energy can be increased. When continuous measurement results are relatively stable, the role of time continuity features can be enhanced; when the measured target undergoes continuous changes, the limitation of historical results on the current judgment is correspondingly reduced. Therefore, the scoring criteria can change with the measurement state, avoiding the problem of insufficient adaptability of fixed weights under different operating conditions.

[0176] Furthermore, short-pulse candidate echoes and long-pulse candidate echoes can be paired according to their echo times, and the correlation reliability can be determined by combining the time difference and characteristic correspondence between them. Although the amplitude, energy, and width of echoes generated by the same target under the action of two types of pulses are not exactly the same, they usually have a relatively stable correspondence. Using this correspondence to correct the scoring results of candidate echoes allows for mutual verification of different pulse echoes within the same measurement period, reducing the impact of false echoes formed by reflections from the container wall, stirrer, pipes, or other structures on the judgment results.

[0177] After obtaining the target echo, the original distance value is calculated based on the corresponding transmission and reception times. Then, the filtering parameters are adjusted by combining the target echo scoring results and signal-to-noise ratio, and occasional outliers are removed. This approach can suppress sudden distance changes caused by single interference events and also enable timely tracking of the real target when distance changes occur continuously. Overall, this application can improve the accuracy of target echo identification in complex industrial environments, reduce measurement blind zones, enhance the identification capability of weak echoes at long distances, and improve the stability and continuity of ranging results.

[0178] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A dynamic weighted ultrasonic anti-interference ranging method, characterized in that, include: Short pulse sequence signals and long pulse sequence signals are transmitted alternately, and the corresponding echo signals are acquired respectively; The echo signal is filtered and de-valued and compressed to obtain the echo waveform; Peak detection is performed on the echo waveform, and echo features of candidate echoes are extracted based on the detection results; Based on the pulse sequence type, historical measurement results, and echo characteristics of each candidate echo, the weight coefficients corresponding to each echo characteristic are determined and weighted scores are performed. The candidate echo with the highest score is determined as the target echo. Based on the time difference between the transmission and reception times corresponding to the target echo, the original distance value is calculated, and the original distance value is filtered and outlier is removed to obtain the target distance value.

2. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 1, characterized in that, The step of performing peak detection on the echo waveform and extracting echo features of candidate echoes based on the detection results includes: A noise reference value is determined based on the noise range in the echo waveform, and an echo detection threshold is determined based on the noise reference value. Waveform intervals that continuously exceed the echo detection threshold are defined as candidate echo intervals, and wave peaks in the candidate echo intervals are defined as candidate echoes. The echo amplitude, echo time, echo energy, and echo width of the candidate echo are extracted based on the candidate echo interval, and the echo features are generated by fusing the echo amplitude, echo time, echo energy, and echo width.

3. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 2, characterized in that, The historical measurement results include the target distance value from the previous measurement period, and the method further includes: The predicted echo time is determined based on the target distance value of the previous measurement cycle; Based on the deviation between the echo time of each candidate echo and the predicted echo time, the temporal continuity characteristics of each candidate echo are determined, and the echo characteristics are updated based on the temporal continuity characteristics.

4. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 3, characterized in that, The determination of the weighting coefficients corresponding to each echo feature further includes: The degree of distance variation is determined based on the target distance values ​​from multiple historical measurement periods; When the degree of distance change is less than a preset change threshold, the weight coefficient corresponding to the time continuity feature is increased; When the degree of distance change is not less than the preset change threshold, the weight coefficient corresponding to the time continuity feature is reduced.

5. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 2, characterized in that, Determining the weighting coefficients corresponding to each of the echo features includes: When the pulse sequence type of the candidate echo is the short pulse sequence, increase the weighting coefficients corresponding to the echo amplitude and the echo time; When the pulse sequence type of the candidate echo is the long pulse sequence, the weighting coefficient corresponding to the echo energy is increased; When the dispersion between the echo widths of the candidate echoes exceeds a preset dispersion threshold, the weighting coefficient corresponding to the echo width is increased.

6. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 2, characterized in that, The weighted scoring includes: The echo amplitude, echo time, echo energy, and echo width of each candidate echo are normalized respectively. The basic score of each candidate echo is determined based on the normalized echo amplitude, echo time, echo energy, and echo width, as well as the corresponding weighting coefficients. The basic score is corrected based on the degree of matching between the echo width of each candidate echo and the preset target echo width range, to obtain the score result.

7. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 2, characterized in that, Before weighted scoring, the following is also included: Based on the echo time, the candidate echoes corresponding to the short pulse sequence are paired with the candidate echoes corresponding to the long pulse sequence to obtain a pulse-correlated echo group. Based on the echo characteristic correspondence between short pulse echoes and long pulse echoes corresponding to the same measured target in historical measurement results, the associated characteristic benchmark is determined. The correlation confidence of each pulse-correlated echo group is determined based on the echo time difference between two candidate echoes in each pulse-correlated echo group and the degree of deviation of the echo characteristics of the two candidate echoes from the correlation characteristic benchmark.

8. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 7, characterized in that, The step of determining the candidate echo with the highest score as the target echo includes: Based on the correlation confidence of each pulse-correlated echo group, the scoring results of two candidate echoes within the pulse-correlated echo group are corrected to obtain the corresponding corrected score. When the correlation confidence reaches a preset confidence threshold, the score results of the two candidate echoes in the pulse correlation echo group are increased; when the correlation confidence does not reach the preset confidence threshold, the corresponding score results are decreased according to the deviation between the two candidate echoes and the historical measurement results. The candidate echo with the highest correction score is determined as the target echo.

9. The ultrasonic anti-interference ranging method based on dynamic weighting according to claim 1, characterized in that, The filtering of the original distance value includes: The measurement noise parameters for the current measurement cycle are determined based on the target echo score and signal-to-noise ratio. Adaptive Kalman filtering is applied to the original distance value based on the measured noise parameters.

10. A dynamic weighted ultrasonic anti-interference ranging system, characterized in that, include: The pulse transmission and acquisition module is used to alternately transmit short pulse sequences and long pulse sequences, and acquire the corresponding echo signals respectively; The echo preprocessing module is used to filter and de-value compress the echo signal to obtain the echo waveform; The candidate echo extraction module is used to perform peak detection on the echo waveform, and determine candidate echoes and extract echo features of each candidate echo based on the detection results. The dynamic weighted decision module is used to determine the weight coefficients corresponding to each echo feature based on the pulse sequence type, historical measurement results and echo features of each candidate echo, to perform weighted scoring on each candidate echo, and to determine the candidate echo with the highest score as the target echo. The ranging processing module is used to calculate the original distance value based on the time difference between the transmission time and the reception time corresponding to the target echo, and to filter and remove outliers from the original distance value to obtain the target distance value.