A method of obtaining a peak value of a time-lagged cross-correlation function of received signals of two sets of ultrasonic transducers

CN123007918APending Publication Date: 2026-10-30HUANENG LANCANG RIVER HYDROPOWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611240622.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本发明旨在解决现有声学闪烁法(ASM)超声测流过程中,由于复杂流道环境与高噪声背景影响,导致超声信号能量分散、主峰特征不显著、噪声伪峰干扰严重,从而使互相关主峰定位和时延判定精度不足的问题,并针对1MHz高频采集信号体量大、实时处理与存储压力高的技术瓶颈,提出一种自适应窗函数回波提取、多分辨率递进分析、峰值权重增强与动态跟踪相结合的高效信号处理方法,实现对复杂水力工况下超声信号中真实回波的准确识别、主峰的高精度定位及噪声伪峰的有效抑制,同时通过特征提取与数据稀释,确保原始高频数据的高效管理与实时流量测量精度,大幅提升声学闪烁法测流在水轮机复杂进水流道中的实用性和可靠性

Benefits of technology

本发明通过引入非等长自适应窗函数提取、多路径回波分离、峰值加权增强及噪声抑制、多分辨率互相关函数递进分析、最小二乘拟合与插值优化峰值定位,以及峰值动态跟踪与异常判别校正等多环节协同算法,实现了对复杂水电机组环境下超声换能器接收信号的高精度时滞提取。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123007918A_ABST
    Figure CN123007918A_ABST
Patent Text Reader

Abstract

The application discloses a method for obtaining time delay cross-correlation function peaks of two groups of ultrasonic transducer receiving signals, and belongs to the field of signal processing. The method comprises adaptive window function extraction and multi-path echo separation, peak weighted enhancement and noise suppression, multi-resolution cross-correlation function progressive analysis, peak positioning based on least square fitting and interpolation optimization, and peak dynamic tracking and time difference discrimination output. The method filters and separates echo fragments with concentrated energy through non-equal-length adaptive window functions, dynamically weights local energy and kurtosis, and improves echo main peak recognition. Multi-resolution progressive cross-correlation analysis is adopted to realize rapid positioning and refinement of the main peak. Based on main peak fitting and interpolation joint optimization, the peak positioning accuracy is significantly improved. The dynamic tracking mechanism is used to stably discriminate and correct the delay output of multiple groups of signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing, and more specifically to a method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals. Background Technology

[0002] In the field of energy efficiency evaluation and flow measurement of hydro turbine units, traditional time-of-flight ultrasonic flow measurement technology has high requirements for the length, straightness, and flow stability of the measurement pipe section. In practical applications, it is often limited by structural and site constraints, especially in complex hydraulic environments such as hydropower station inlets, guide bends, and short channels, making it difficult to meet the needs for accurate and efficient measurement. Meanwhile, other flow detection methods, such as mechanical or electromagnetic flow meters, while possessing certain measurement capabilities in some situations, often suffer from numerous shortcomings, including device intrusion into the flow field, susceptibility to debris, the need for regular maintenance or calibration, and even the potential for head loss. These limitations prevent them from fully meeting the actual requirements for the long-term safe and efficient operation of hydro turbines.

[0003] In recent years, the Acoustic Scintillation Method (ASM), as an emerging non-invasive flow measurement technology, has gradually become an important candidate for velocity detection in the intake channel of water turbines due to its numerous advantages, including no moving parts, no head loss, resistance to debris interference, and no maintenance or calibration required. This method mainly involves placing two sets of ultrasonic transmitters on one side of the measurement section and corresponding receivers on the other side, utilizing the influence of the turbulent structure of the water flow on the transmission of ultrasonic waves to achieve high-precision velocity measurement. Because the turbulent flow disturbs the ultrasonic signal in real time with changes in velocity, the amplitude of the signal at the receiving end exhibits complex and random fluctuations. If the distance between the two propagation paths... When x is sufficiently close, the signal fluctuation trend at the downstream receiver is basically consistent with that at the upstream receiver, with only a fixed time delay. By performing cross-correlation analysis on the received signals from the upstream and downstream, this time delay can be accurately extracted. Furthermore, by combining the ultrasonic path spacing, the water flow velocity and flow rate are obtained through analysis, providing key data support for the energy efficiency assessment of the turbine unit.

[0004] However, to achieve high-precision time delay determination, especially under conditions of complex flow channels, turbulent water flow, and multipath echoes, the stability and accuracy of the main peak localization of the cross-correlation function remain core challenges for the engineering application of this technology. Existing cross-correlation analysis algorithms often suffer from errors in main peak determination due to multipath effects, echo energy dispersion, or sudden noise interference, even resulting in spurious peaks or main peak drift, severely restricting the reliability and real-time performance of flow measurement results. To address these challenges, this invention proposes a high-precision cross-correlation peak determination method that integrates adaptive window function extraction, multi-scale weighted enhancement, multi-resolution progressive analysis, least squares fitting, and interpolation techniques. By intelligently extracting energy-concentrated echo segments, enhancing true peak values, and suppressing noise spurious peaks, and employing dynamic tracking and anomaly correction strategies, this method effectively improves the accuracy and stability of time delay search for two sets of ultrasonic signals. This method is applicable to complex hydraulic environments such as short inlet channels and gradually curved pipes, and can provide highly reliable data support for turbine unit flow measurement and energy efficiency evaluation, possessing significant engineering promotion value and broad application prospects. Summary of the Invention

[0005] This invention aims to address the problems in existing acoustic scintillation (ASM) ultrasonic flow measurement, where complex flow channel environments and high noise backgrounds lead to dispersed ultrasonic signal energy, indistinct main peak characteristics, and severe noise spurious peak interference, resulting in insufficient accuracy in cross-correlation main peak localization and time delay determination. Furthermore, addressing the technical bottlenecks of large 1MHz high-frequency acquisition signal volume and high real-time processing and storage pressure, this invention proposes an efficient signal processing method combining adaptive window function echo extraction, multi-resolution progressive analysis, peak weight enhancement, and dynamic tracking. This method achieves accurate identification of true echoes in ultrasonic signals under complex hydraulic conditions, high-precision main peak localization, and effective suppression of noise spurious peaks. Simultaneously, through feature extraction and data dilution, it ensures efficient management of raw high-frequency data and real-time flow measurement accuracy, significantly improving the practicality and reliability of acoustic scintillation flow measurement in complex turbine inlet channels.

[0006] To achieve the above objectives, the present invention employs the following technical solution: the method comprising: Adaptive window function extraction and multipath echo separation: The received signals of two sets of transducers are preliminarily analyzed. An adaptive window function extraction algorithm with non-uniform length is used to intelligently select the echo segments with concentrated energy in different time periods and effectively separate multipath echoes. Peak weighting enhancement and noise suppression: Peak weighting is introduced before cross-correlation calculation. By calculating the short-time energy and statistical kurtosis of each sampling point, the weight of each point is dynamically adjusted to enhance the true echo peak and suppress noise pseudo-peaks. The multi-resolution cross-correlation function progressive analysis adopts a hierarchical progressive multi-resolution cross-correlation analysis method to perform coarse-grained temporal resolution cross-correlation and quickly locate the main peak interval; then the analysis interval is gradually narrowed and the sampling accuracy is improved, and the correlation window and resolution are dynamically and adaptively adjusted through interpolation and local refinement algorithms. Based on least squares fitting and interpolation optimization for peak location, after determining the main peak interval, a joint algorithm of least squares quadratic curve fitting and high-order interpolation optimization is used for the local peak points of the cross-correlation function. By performing nonlinear fitting on the values ​​around the sampling point and combining the characteristics of the signal physical model, the peak positioning accuracy can be further improved. Peak dynamic tracking and time difference discrimination output: The dynamic tracking algorithm is used to achieve stable output of time delay results of multiple groups of signals sampled in the same batch or continuously. Based on the historical peak distribution and noise statistical changes, it can autonomously identify anomalies and correct the output results.

[0007] In one embodiment, the method includes: The non-uniform length adaptive window function extraction algorithm is used to perform preliminary analysis on the received signals of two sets of transducers. It uses sliding window technology to detect the local energy of the signal, the variance within the window, and the kurtosis parameter within the window in real time, and autonomously adjusts the width and position of the window function according to the instantaneous energy change and statistical characteristics of the signal. An adaptive approach is used to set the energy threshold, which is automatically updated based on the energy distribution of the entire signal and the background noise. The significance of local anomalies is judged by the kurtosis within the window. When the local energy and kurtosis meet the predetermined standards, the window length is automatically extended to capture and cover the echo segments with concentrated energy. An overlapping area detection mechanism is also provided to merge windows when the energy and kurtosis of adjacent windows are highly correlated or the signal characteristics are continuous, thereby achieving multipath echo separation.

[0008] In one scheme, after the peak weighting enhancement and noise suppression are extracted by the adaptive window function, each sampling point is assigned a dynamic weight by calculating physical characteristics such as short-time energy and local statistical kurtosis before cross-correlation calculation. The weight is determined by a comprehensive function of energy and kurtosis and is normalized so that the weight does not exceed 1. By replacing the original signal with a weighted sequence in the cross-correlation function calculation, the true echo peak value is improved and noise spurious peaks are suppressed. The peak weighting enhancement and noise suppression mechanism includes local adaptive smoothing, applying moving average or median filtering to the weight sequence to weaken noise spikes, and cutting the upper and lower limits of the weight sequence to prevent weight overflow or amplify outliers. A local statistical adaptive adjustment is adopted, which dynamically adjusts the weights based on the difference between the statistical characteristics of the segment to which the sampling point belongs and the global characteristics, sets a local priority factor, enhances the weak multipath echoes, and prevents them from being masked by the global distribution.

[0009] In one scheme, the progressive analysis of the multi-resolution cross-correlation function includes: adopting a hierarchical progressive multi-resolution cross-correlation analysis method, based on peak weighting enhancement, taking the signal sequence after weight processing as input, first performing coarse-grained time resolution cross-correlation to quickly locate the main peak interval, then gradually narrowing the analysis interval and improving the sampling accuracy, and dynamically and adaptively adjusting the correlation window and resolution through interpolation and local refinement algorithms; The progressive analysis step of the multi-resolution cross-correlation function gradually approaches the location of the main peak in a progressive manner. It adopts a dynamic interval adjustment and resolution scaling strategy, iterates multiple times to shrink the main peak interval and reduce the correlation step size, and achieves the main peak location through interpolation and fitting optimization. By combining the main peak width, symmetry, and energy distribution discrimination indicators, abnormal pseudo-peaks are filtered out, and multiple main peak candidate points are generated at the multi-resolution level. The main peak set is screened and calibrated by the temporal distribution law, main peak energy distribution and signal statistical characteristics synergy, and finally the reliable main peak delay point is obtained.

[0010] In one scheme, the peak location based on least squares fitting and interpolation optimization includes: after determining the main peak interval, using a joint algorithm of least squares quadratic curve fitting and high-order interpolation optimization for the local peak points of the cross-correlation function, performing quadratic polynomial fitting through several sampling points near the main peak to obtain a local fitting curve, and using the extreme points of the fitting curve as the sub-sampling level main peak location result. By introducing higher-order interpolation optimization, cubic spline interpolation or polynomial interpolation is used for the correlation function within the fitting interval to obtain a continuous correlation function. The extreme points are searched on the interpolation results to achieve higher-precision peak location. The quadratic fitting and higher-order interpolation are performed in parallel, and the two peak positions obtained are selected as the final determination based on the smallest fitting residual.

[0011] In one scheme, the peak dynamic tracking and time difference discrimination output includes: by analyzing the temporal structure, statistical distribution and noise interference law of the peak delay sequence, using statistical filtering and trend modeling, constructing a benchmark time delay sequence and adaptively adjusting the sliding window width to mitigate the impact of sudden noise, accommodate time delay trend changes, and eliminate extreme outliers; Further adaptive anomaly detection and correction are implemented. Anomalies are identified through deviation analysis and noise tolerance threshold. Interpolation is used to regress anomalies to window trends, while normal points remain in their original positions and anomaly markers are recorded. For complex noise backgrounds, the main peak delay point is selected by weighting peak energy, local morphology, and related signal statistical parameters. Historical main peak probability models and time-series drift trends are used to prioritize statistically stable main peak points.

[0012] In one approach, the window adjustment strategy includes a window self-shrinking mechanism, which automatically shrinks the window width when the local energy and kurtosis at the end of the window drop sharply, and controls the window width change rate in combination with the local change rate; and uses a temporal clustering mechanism to cluster and group all the extraction window center times and correlations within the window, identify multipath echoes and store them separately, so as to provide energy-concentrated effective echo segments for subsequent high-precision cross-correlation analysis.

[0013] One approach employs a multi-window progressive strategy, calculating short-time energy, kurtosis, and local statistics at different echo windows of varying scales, and combining these with weights to achieve multi-scale weight superposition. This enhances the ability to identify the main peak and improves adaptability to echoes and noise at different time scales.

[0014] In one approach, the peak localization based on least squares fitting and interpolation optimization is achieved by adaptively adjusting the interval width and interpolation order according to the energy concentration and symmetry characteristics of the main peak. Fitting and interpolation are performed separately for multiple main peak intervals, and multiple sets of delay candidate points are stored in an array.

[0015] Beneficial effects of this invention: This invention achieves high-precision time-delay extraction of ultrasonic transducer received signals in complex hydropower unit environments by introducing a multi-stage collaborative algorithm, including non-uniform length adaptive window function extraction, multi-path echo separation, peak weighting enhancement and noise suppression, multi-resolution cross-correlation function progressive analysis, least squares fitting and interpolation optimization peak positioning, and peak dynamic tracking and anomaly discrimination correction.

[0016] This invention significantly improves the accuracy and robustness of acoustic scintillation method in capturing the main peak of ultrasonic signals in complex hydraulic environments by integrating innovative signal processing technologies such as adaptive window function echo extraction, multi-resolution progressive analysis, peak weight enhancement and dynamic tracking. It effectively solves the problems of noise pseudo-peak interference and time delay judgment error, and realizes high-precision and stable measurement of the true flow velocity of water.

[0017] Meanwhile, by extracting features and diluting data from the 1MHz high-frequency acquisition signal, the data processing and storage pressure is effectively reduced, improving the system's real-time response capability and engineering applicability. Overall, this invention not only possesses advantages such as no head loss, non-intrusiveness, resistance to contaminant interference, and maintenance-free calibration, but also significantly improves the accuracy and reliability of acoustic scintillation flow measurement. It provides a solid technical guarantee for high-efficiency flow measurement and unit energy efficiency evaluation in complex turbine inlet channels, and has broad engineering application prospects and significant economic and social value. Attached Figure Description

[0018] Figure 1 This is a flowchart of the method of the present invention; Figure 2This is a flowchart of the peak weighting enhancement and noise suppression process of the present invention; Figure 3 This is a flowchart of the peak localization process based on least squares fitting and interpolation optimization in this invention. Figure 4 This is a schematic diagram of data acquisition from two sets of ultrasonic transducers in this invention. Detailed Implementation

[0019] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Typical embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0020] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. To facilitate understanding, the invention will now be described more fully with reference to the accompanying drawings. Typical embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to make the disclosure of the invention more thorough and complete.

[0021] like Figure 1 As shown, a method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals specifically includes: Step 1. Adaptive window function extraction and multipath echo separation To address the multipath echo and noise aliasing problem in complex ultrasonic environments, a preliminary analysis of the received signals from two sets of transducers is first conducted, employing a non-uniform-length adaptive window function extraction algorithm. This algorithm autonomously adjusts the window function width based on the instantaneous energy changes and statistical characteristics of the signal, thereby intelligently selecting echo segments with concentrated energy at different time intervals and effectively separating multipath echoes. This step avoids signal errors and omissions inherent in traditional fixed-window methods and lays the foundation for subsequent high-precision cross-correlation analysis.

[0022] like Figure 4 As shown, when processing two sets of ultrasonic transducer echo signals, a non-fixed-length adaptive window function extraction algorithm is proposed to extract effective echo segments from the mixed signals with high precision, especially in complex multipath aliasing and significant noise scenarios. The core of this process lies in the real-time analysis of the instantaneous energy and statistical characteristics of the signal, combined with the local variation characteristics of the signal, to dynamically adjust the width and position of the window function.

[0023] Specifically, the signal sequence is denoted as ( Its sampling points are In the initial stage of the algorithm, the entire signal domain is traversed, and the local energy of the signal is detected using the sliding window technique. The width of each window is defined as... The center of the window is Energy calculation within the window uses the formula. It does not rely solely on fixed standards, but further constructs the in-window variance and local kurtosis parameters. Variance is defined as ,in Mean within the window; Kurtosis To measure the significance of local outliers.

[0024] During window sliding, the energy threshold is set adaptively, automatically updated based on the overall signal energy distribution and background noise. For example, the average global background noise energy is set to... Set the local threshold as ,in To adjust the parameters. If the local energy of each window... And kurtosis If the target is exceeded, the window length is automatically extended to cover the continuously rising energy segment and dynamically capture the complete echo segment. To address the multipath characteristics of the echo, the algorithm employs an overlapping region detection mechanism: if adjacent windows show a high correlation in energy and kurtosis, or if the signal characteristics at the boundary are continuous, the windows are merged to ensure that multipath echoes are not fragmented.

[0025] Furthermore, the temporal distribution of signal and noise typically exhibits a mix of dense and sparse patterns. The algorithm incorporates a window self-shrinking mechanism: once the local energy and kurtosis drop sharply at the end of the window, the window automatically shrinks to prevent noise tails from interfering with echo segment extraction. The window adjustment strategy is based on the local rate of change of the signal. By controlling the rate of change of the window width, when the trend of the rate of change is related to the echo arrival time, the window is allowed to grow non-linearly, enhancing the algorithm's response capability to echo bursts. Simultaneously, referencing a statistical model of the global signal distribution, the algorithm performs a normalized distribution mapping on the window coverage area to prevent echoes with low energy but distinct temporal characteristics from being missed.

[0026] The multi-path separation capability further benefits from the analysis of the overall statistical characteristics of the signal. The algorithm constructs a time-series clustering mechanism—clustering the center times of all extraction windows and using a distance metric formula. and intra-window correlation Determine whether two echo segments belong to the same path. If the distance between cluster center pairs is greater than the minimum discrimination threshold, they are automatically identified as multipath echoes and grouped for storage.

[0027] The entire adaptive window function extraction process uses the physical meaning of the signal and mathematical statistical parameters as comprehensive criteria, without relying on manually set fixed window widths or traditional filtering models, allowing the window width to fluctuate significantly with the local characteristics of the signal. The algorithm achieves complete and accurate separation of each echo segment even under extreme conditions such as noise coverage, multiple parallel echo paths, and local energy bursts, providing high-quality signal input for subsequent cross-correlation peak localization. Actual tests show that dynamic window function adjustment can significantly improve the echo separation rate and reduce noise interference, solving a crucial fundamental processing problem for time-delay analysis of ultrasonic signals in multipath environments.

[0028] Step 2. Peak Weighting Enhancement and Noise Suppression By incorporating the output of an adaptive window function, a peak weighting mechanism is introduced before cross-correlation calculation. By calculating the short-time energy and statistical kurtosis of each sampling point, the weights at each point are dynamically adjusted to enhance the true echo peak and suppress noise spurious peaks. This mechanism does not rely on traditional filtering algorithms; instead, it utilizes the physical characteristics of the signal and local statistical properties to significantly improve the significance of the main peak after cross-correlation calculation and enhance the ability to distinguish the main peak from noise peaks.

[0029] like Figure 2 As shown, after the adaptive window function filters out high-quality echo segments, and before the signal enters the cross-correlation calculation stage, the peak weighting enhancement and noise suppression mechanism plays a crucial role. Based on the physical characteristics such as the short-time energy and local statistical kurtosis of each sampling point, dynamic weights are assigned to the sampling points, thereby significantly highlighting the true echo peak value and effectively suppressing spurious peaks caused by noise in the subsequent correlation analysis. The signal sequence is denoted as... ,in Optimized window output has been obtained. For each point, short-time energy is calculated. and local kurtosis .

[0030] S201. Specifically, select a local area centered on sampling point t. Where L is the window length. Short-time energy is defined as... Kurtosis is adopted ,in and These are the mean and variance of the interval, respectively.

[0031] The weight of each sampling point is given by a combined function of energy and kurtosis. Instead of directly processing the signal using traditional filtering methods, it works through weight boosting and dynamic suppression. The weighting function is defined as follows: in, and These are empirical coefficients used to adjust the proportion of energy and kurtosis contributions. The weights are normalized so that the maximum weight does not exceed 1, ensuring that significant peak values ​​are enhanced while weights in noisy regions approach zero. In this way, the signal sequence is transformed into a weighted sequence. This is further used for calculating the cross-correlation function.

[0032] To mitigate the occasional interference of noise on the weights, the algorithm introduces a local adaptive smoothing mechanism. This smoothing mechanism is applied to the weight sequence. Applying a moving average or median filter dilutes sudden noise spikes: To smooth the window width, the theoretical basis lies in the temporal continuity of energy and kurtosis in the true echo region, while noise disturbances are mostly isolated scattered points. The smoothed weight sequence controls the contribution of the sampling point values ​​to subsequent analysis, naturally weakening the spurious peak intervals. The weight sequence can also be subjected to upper and lower limit shearing to avoid negative weight overflow or amplification of outliers due to extreme noise.

[0033] S202. During local feature extraction, the algorithm considers the spatial statistical variations of the signal. For cases with multiple echo segments or significant multipath characteristics, a local statistical adaptive adjustment method is adopted: if the statistical characteristics of the segment to which the sampling point belongs differ significantly from the global characteristics, the parameters in the weight formula are dynamically adjusted. For example, the deviation ratio between the mean within the signal segment and the mean of the entire signal is calculated, and a local priority factor is set. And adjust the weights. This ensures that multipath echoes or weaker, effective signals can also be enhanced, preventing them from being masked by the global distribution.

[0034] It is worth noting that this mechanism does not employ traditional bandpass filtering, threshold filtering, or Gaussian noise models throughout the entire process. Instead, it dynamically assigns weights to areas with significant physical characteristics. The weight adjustment sequence directly participates in the calculation of the cross-correlation function; that is, the cross-correlation formula is transformed from the traditional form... Transformed into enhanced cross-correlation in , These are the weighted sequences of the two sets of signals, respectively. Through this mechanism, the signal-to-noise ratio of the main cross-correlation peak is maximized, and spurious peaks and noise interference are severely suppressed, making the subsequent peak discrimination process more reliable and accurate.

[0035] S203, the design of the designated weighting factor also includes a multi-window progressive strategy, that is, for echo windows of different scales, short-time energy, kurtosis and local statistics are calculated separately to achieve multi-scale weight superposition.

[0036] The specific operation involves independent calculations under different window widths. and The obtained weights are then linearly or nonlinearly combined to assign final weights to the sampling points: It is the weight of the window with width i. This contributes to the scale coefficient. This not only enhances the identification of the main peak, but also improves the algorithm's adaptability to echoes and noise at different time scales, taking into account both local details and overall trends.

[0037] Step 3. Progressive analysis of multi-resolution cross-correlation functions Building upon peak enhancement, a hierarchical, progressive multi-resolution cross-correlation analysis method is employed. First, coarse-grained temporal resolution cross-correlation is performed to quickly locate the main peak interval. Then, the analysis interval is progressively narrowed while improving sampling accuracy. Through interpolation and local refinement algorithms, the correlation window and resolution are dynamically and adaptively adjusted. The entire process progressively approximates the location of the main peak, ensuring computational efficiency while significantly improving the accuracy of main peak location, overcoming the limitations of traditional single-resolution cross-correlation.

[0038] Multi-resolution cross-correlation function progressive analysis fully leverages the flexible adjustment of time-domain resolution and the gradual refinement of local information to provide an efficient and high-precision solution for peak localization. This method takes a weighted signal sequence as input and performs progressive cross-correlation analysis in either the time or sampling dimension, significantly optimizing the search for the main peak interval and the final precise localization process. The signal is denoted as... and Preliminary setting of the global relevance search range Step size is This step is only coarse-grained, allowing for a rapid traversal of the entire potential main peak location within a short period of time.

[0039] The coarse-grained correlation calculation form is as follows: in The search uses a large step size and a wide sampling period, with the main objective being to pinpoint the main peak interval of maximum cross-correlation. Nearby. This stage considers not only the maximum value but also the width of the peak interval and surrounding gradient changes to measure the degree of energy accumulation in the local correlation function. [Regarding the cross-correlation results...] Take the first few maximum value points and record their corresponding delay positions and local rates of change.

[0040] After identifying the main peak region, the algorithm drastically narrows the search interval, covering only a few dozen sampling points near the main peak, while significantly reducing the step size to achieve finer-grained analysis. Here, a dynamic interval adjustment function is introduced: in The interval width, To refine the step size, This is the resolution scaling factor. After each iteration, if the main peak interval becomes clearer, the interval continues to shrink, and the step size is further reduced until the predetermined refinement level is reached or the main peak variation standard is met. This progressive shrinkage process is controlled by a threshold criterion: when the slope of the main peak region of the correlation function changes... If the value is below a certain threshold, it indicates that the process has entered the vicinity of the main peak extreme point and has stalled.

[0041] To further overcome the sampling period limitation, the algorithm introduces interpolation and fitting optimization. For the sampling sequence of the correlation function within the interval, high-order polynomial interpolation or piecewise cubic spline interpolation is used to construct a continuous cross-correlation function: Between two sampling points, any small step size can be taken, allowing for sub-sampling level main peak localization. Combined with local inflection point analysis, an extreme point search is performed on the interpolated correlation function, i.e., detection. Main peak location The delay point is determined to meet the conditions. The interpolation process can also be combined with the evaluation of the fitting residuals to ensure that the main peak point is not a noise spurious extreme value, thereby improving the positioning reliability.

[0042] The multi-resolution stage of the progressive analysis not only focuses on the extreme values ​​of the main peak but also incorporates the local morphological structure of the relevant function, using criteria such as main peak width, symmetry, and energy distribution to filter out anomalous pseudo-peaks. For complex multi-path scenarios, the algorithm allows the generation of multiple candidate main peaks at different resolution levels, followed by further screening based on the synergy between the main peak energy distribution and the statistical characteristics of the corresponding signal. Multi-level candidate main peaks are not simply eliminated; instead, the temporal distribution patterns among the main peak sets are utilized for further clustering or outlier calibration to obtain the final reliable main peak delay point.

[0043] The entire progressive process revolves around dynamically adjusted window size and related step size, with the step size, interval width, and refinement level adaptively set according to the input signal quality. For example, when the background noise is strong, the coarse-grained level is appropriately enlarged to ensure that the main peak interval is not interfered with by spurious peaks; when the signal energy is significantly concentrated, the refinement step size can be drastically reduced, improving the main peak localization accuracy to 1 / 10 or even lower of the sampling period. Multi-resolution analysis not only improves computational efficiency and avoids unnecessary calculations for high global precision, but also greatly improves the resolution and robustness of main peak localization, overcoming the limitations of traditional single-resolution cross-correlation algorithms that are easily affected by factors such as sampling accuracy, noise distribution, and local anomalies.

[0044] Step 4. Peak localization based on least squares fitting and interpolation optimization After determining the main peak interval, a combined algorithm of least-squares quadratic curve fitting and high-order interpolation optimization is used for the local peak points of the cross-correlation function. Nonlinear fitting of the values ​​surrounding the sampling points, combined with the characteristics of the signal physical model, further improves the peak localization accuracy. The algorithm can achieve sub-sampling level peak localization within the sampling period. Combined with multi-resolution analysis, it can significantly reduce time discrimination error, thereby greatly improving the accuracy and resolution of time delay measurements of the two sets of ultrasonic transducer signals.

[0045] like Figure 3 As shown, the accuracy of peak location directly determines the accuracy of ultrasonic signal time delay measurement, and the limitation of the sampling period becomes the primary bottleneck. Faced with the main peak interval locked by coarse-grained cross-correlation analysis, the algorithm strives to break through the sampling point resolution and obtain the sub-sampling level peak position by combining least squares curve fitting and high-order interpolation optimization.

[0046] S401. Specifically, first extract the cross-correlation function. Several sampling points near the main peak were recorded as follows: ,in The approximate location of the main peak is given by m, where m is the half-width of the fitting interval. Least-squares quadratic curve fitting uses this local interval as input to construct a quadratic polynomial. To fit the local shape of the correlation function, the following error function is minimized using the least squares criterion: After differentiation, a system of normal equations is derived and solved. Three parameters are used to obtain the locally fitted curve. The location of the main peak is the extreme point of the quadratic curve. .like This is a local maximum, the extreme point of the main peak. Typically, the location falls between the original sampling points, achieving sub-sampling level localization. This point not only reflects the shape of the local correlation function but also echoes the energy accumulation pattern of the echo main peak in the signal physical model, maximizing peak identification in a physical sense.

[0047] S402. To further eliminate the influence of noise and the asymmetry of local sampling, the algorithm simultaneously introduces high-order interpolation optimization. Cubic spline interpolation or polynomial interpolation is used for the correlation function within the fitting interval to construct a continuous function. in For interpolation basis functions, The interpolation coefficients are determined through local sampling values. After interpolation, the correlation function can take values ​​at any location outside the sampling points, greatly enriching the extremum search space. The main peak is precisely located by searching for extremum points on the interpolation results, and numerical extremum determination is used. satisfy The quadratic fitting and higher-order interpolation are performed in parallel. The two peak positions obtained can be fused by means (such as weighted average), or the one with the smallest fitting residual can be taken as the final determination, thereby improving the robustness of point localization.

[0048] S403. The fitting algorithm process is deeply integrated with the signal physical model. The actual echo peak typically approximates a Gaussian or pulse shape. Quadratic curve fitting captures the symmetry and energy concentration characteristics of the peak, while higher-order interpolation takes into account local details under peak asymmetry and multipath interference. For multi-peak intervals, fitting can be expanded at each peak separately, obtaining multiple sets of delay candidate points and storing them in an array. If local anomalies or noise spurious extrema appear near the peak, interpolation optimization uses full-interval smoothness discrimination to eliminate anomalies, retaining only the local extrema of the correlation function as the basis for delay measurement. This process adaptively adjusts the fitting interval width and interpolation order, automatically setting them based on the peak width of the correlation function to avoid overfitting or incomplete fitting.

[0049] The algorithm simultaneously evaluates the residuals and goodness of fit during the fitting process. The mean squared error of the fitting interval is defined as... The lowest RMSE among different fitting methods and interpolation results is selected to further improve peak location accuracy. The goodness of fit can also be judged in conjunction with the physical characteristic parameters of the main signal peak (such as energy peak, peak width, and sharpness). If the main extreme points of the fitting curve or interpolation function are consistent with the maximum range of the echo in the physical sense, the peak value is determined to be reliable.

[0050] Subsampling-level peak localization provides ultimate resolution for ultrasonic signal time-delay measurements. The peak delay points of the correlation functions of the two sets of signals are determined by the difference after fitting optimization. The accuracy of distance or positioning time at the corresponding sound speed is significantly higher than the sampling period limit. The algorithm is closely integrated with multi-resolution cross-correlation analysis, enabling rapid coarse-grained screening of the main peak interval, while local fitting and interpolation achieve fine-grained point positioning. The overall measurement error can be reduced to a fraction of the sampling period, even better than 1 / 10 of the period. Furthermore, the joint optimization of fitting and interpolation greatly enhances the adaptability to noise, anomalous sampling, and variations in the main peak shape, with the accuracy and stability of the main peak far exceeding traditional single-point extremum determination.

[0051] Step 5. Peak dynamic tracking and time difference discrimination output Building upon the aforementioned high-precision peak location, a dynamic tracking algorithm is employed to achieve stable output of time delay results from multiple sets of signals sampled in the same batch or continuously. This algorithm autonomously identifies anomalies and corrects the output results based on historical peak distribution and noise statistical changes. Combined with the results of preceding algorithms, it exhibits strong robustness and consistency, enabling it to adapt to the time delay measurement requirements of ultrasonic transducer signals in complex, noisy environments, and output stable and accurate time difference discrimination values.

[0052] Peak dynamic tracking and time difference discrimination output, as the endpoint of the process, not only affect the accuracy of a single measurement result, but also determine the stability, robustness, and intelligent discrimination capability of signal time delay measurement under long-term continuous sampling conditions. The cross-correlation main peak point obtained by the high-precision peak localization algorithm... Delay sequence generated as the measurement batch or sampling frame n changes The dynamic tracking algorithm analyzes the temporal structure, statistical distribution, and noise interference patterns of the sequence, adaptively summarizes and corrects anomalies, and outputs reliable time difference discrimination results.

[0053] The algorithm takes the peak delay sequence as input and first performs statistical filtering and trend modeling. Based on mean sliding and median filtering, a baseline time delay sequence is constructed. The sliding window width M is dynamically adjusted based on sampling stability and noise level. This process mitigates peak jumps caused by sudden noise while also accommodating time-delayed trend changes caused by slow drift or changes in the physical environment. For high-noise scenarios, median filtering is superior to mean filtering, as it can eliminate extreme outliers.

[0054] Based on the trend benchmark, the dynamic tracking algorithm further adaptively identifies and corrects anomalies. For each frame's peak delay point, its deviation from the sliding benchmark is calculated: If the deviation exceeds the noise tolerance threshold These are identified as outliers; noise tolerance can be dynamically estimated, for example, by taking the peak delay standard within a sliding window. and set a threshold , This is the robustness coefficient. Outliers can be corrected using interpolation or regression smoothing, such as letting... in For correction factors, This is the discriminant function. Outliers are forced to regress the window trend, while normal points remain in their original positions, and outlier markers are retained for subsequent analysis or output.

[0055] To adapt to complex noise backgrounds and multi-path waveform variations, dynamic tracking also incorporates preceding peak energy, local morphology, and related signal statistical parameters. For multi-peak candidates, a weighted selection of the main peak delay point is based on energy, peak width, and the sharpness of the correlation function, while simultaneously recording the temporal distribution of non-main peak points. If noise causes abrupt changes or switching of the main peak morphology, the algorithm establishes a priori models based on historical main peak distribution probabilities and temporal drift trends, prioritizing statistically stable main peak points within the delay sequence. The probabilistic modeling can be expressed as: in The candidate interval width is defined, and the high-probability main peak serves as the core reference for subsequent discrimination. The dynamic tracking algorithm continuously updates the peak probability distribution with each sampling batch, automatically adapting to changes in time delay measurement trends, high-noise environments, and multipath interference, ensuring the stability and physical consistency of the output time difference discrimination value.

[0056] In the output stage, the algorithm maps the tracked peak delay point sequence to the actual time difference discrimination result. For a single measurement, the corrected main peak delay is directly taken. This is combined with the sound speed output distance parameter. For multiple or continuous samples, the mean, median, confidence interval, and outlier distribution statistics of the output sliding window or the entire sequence are used to quantify the stability and accuracy of the measurement results. in To ensure effective output frame count (outliers can be removed). The output also indicates the outlier correction ratio, stability index, and noise adaptation parameters, ensuring that the time delay discrimination results have full traceability and high consistency.

[0057] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0058] It should be understood that the above detailed description of the technical solutions of the present invention with reference to preferred embodiments is illustrative and not restrictive. Those skilled in the art can modify the technical solutions described in the embodiments or make equivalent substitutions for some of the technical features based on reading this specification; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals, characterized in that: The method includes: Adaptive window function extraction and multipath echo separation: The received signals of two sets of transducers are preliminarily analyzed. An adaptive window function extraction algorithm with non-uniform length is used to intelligently select the echo segments with concentrated energy in different time periods and effectively separate multipath echoes. Peak weighting enhancement and noise suppression: Peak weighting is introduced before cross-correlation calculation. By calculating the short-time energy and statistical kurtosis of each sampling point, the weight of each point is dynamically adjusted to enhance the true echo peak and suppress noise pseudo-peaks. The multi-resolution cross-correlation function progressive analysis adopts a hierarchical progressive multi-resolution cross-correlation analysis method to perform coarse-grained temporal resolution cross-correlation and quickly locate the main peak interval; then the analysis interval is gradually narrowed and the sampling accuracy is improved, and the correlation window and resolution are dynamically and adaptively adjusted through interpolation and local refinement algorithms. Based on least squares fitting and interpolation optimization for peak location, after determining the main peak interval, a joint algorithm of least squares quadratic curve fitting and high-order interpolation optimization is used for the local peak points of the cross-correlation function. By performing nonlinear fitting on the values ​​around the sampling point and combining the characteristics of the signal physical model, the peak positioning accuracy can be further improved. Peak dynamic tracking and time difference discrimination output: The dynamic tracking algorithm is used to achieve stable output of time delay results of multiple groups of signals sampled in the same batch or continuously. Based on the historical peak distribution and noise statistical changes, it can autonomously identify anomalies and correct the output results.

2. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 1, characterized in that: The method includes: The non-uniform length adaptive window function extraction algorithm is used to perform preliminary analysis on the received signals of two sets of transducers. It uses sliding window technology to detect the local energy of the signal, the variance within the window, and the kurtosis parameter within the window in real time, and autonomously adjusts the width and position of the window function according to the instantaneous energy change and statistical characteristics of the signal. An adaptive approach is used to set the energy threshold, which is automatically updated based on the energy distribution of the entire signal and the background noise. The significance of local anomalies is judged by the kurtosis within the window. When the local energy and kurtosis meet the predetermined standards, the window length is automatically extended to capture and cover the echo segments with concentrated energy. An overlapping area detection mechanism is also provided to merge windows when the energy and kurtosis of adjacent windows are highly correlated or the signal characteristics are continuous, thereby achieving multipath echo separation.

3. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 1, characterized in that: The peak weighting enhancement and noise suppression, after the output is extracted by the adaptive window function, assigns a dynamic weight to each sampling point by calculating the short-time energy and local statistical kurtosis physical characteristics before cross-correlation calculation. The weight is determined by a comprehensive function of energy and kurtosis, and after normalization, the weight does not exceed 1. By replacing the original signal with a weighted sequence in the cross-correlation function calculation, the true echo peak value is improved and noise spurious peaks are suppressed. The peak weighting enhancement and noise suppression mechanism includes local adaptive smoothing, applying moving average or median filtering to the weight sequence to weaken noise spikes, and cutting the upper and lower limits of the weight sequence to prevent weight overflow or amplify outliers. A local statistical adaptive adjustment is adopted, which dynamically adjusts the weights based on the difference between the statistical characteristics of the segment to which the sampling point belongs and the global characteristics, sets a local priority factor, enhances the low-energy multipath echoes, and prevents them from being masked by the global distribution.

4. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 1, characterized in that: The progressive analysis of the multi-resolution cross-correlation function includes: adopting a hierarchical progressive multi-resolution cross-correlation analysis method, based on peak weighting enhancement, taking the weighted signal sequence as input, first performing coarse-grained time resolution cross-correlation to quickly locate the main peak interval, then gradually narrowing the analysis interval and improving sampling accuracy, and dynamically and adaptively adjusting the correlation window and resolution through interpolation and local refinement algorithms; The progressive analysis step of the multi-resolution cross-correlation function gradually approaches the location of the main peak in a progressive manner. It adopts a dynamic interval adjustment and resolution scaling strategy, iterates multiple times to shrink the main peak interval and reduce the correlation step size, and achieves the main peak location through interpolation and fitting optimization. By combining the main peak width, symmetry, and energy distribution discrimination indicators, abnormal pseudo-peaks are filtered out, and multiple main peak candidate points are generated at the multi-resolution level. The main peak set is screened and calibrated by the temporal distribution law, main peak energy distribution and signal statistical characteristics synergy, and finally the reliable main peak delay point is obtained.

5. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 1, characterized in that: The peak localization based on least squares fitting and interpolation optimization includes: after determining the main peak interval, using a joint algorithm of least squares quadratic curve fitting and high-order interpolation optimization for the local peak points of the cross-correlation function, performing quadratic polynomial fitting through several sampling points near the main peak to obtain a local fitting curve, and using the extreme points of the fitting curve as the sub-sampling level main peak localization result; By introducing higher-order interpolation optimization, cubic spline interpolation or polynomial interpolation is used for the correlation function within the fitting interval to obtain a continuous correlation function. The extreme points are searched on the interpolation results to achieve higher-precision peak location. The quadratic fitting and higher-order interpolation are performed in parallel, and the two peak positions obtained are selected as the final determination based on the smallest fitting residual.

6. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 1, characterized in that: The peak dynamic tracking and time difference discrimination output includes: by analyzing the temporal structure, statistical distribution and noise interference law of the peak delay sequence, using statistical filtering and trend modeling, constructing a benchmark time delay sequence and adaptively adjusting the sliding window width to mitigate the impact of sudden noise, accommodate time delay trend changes, and eliminate extreme outliers; Further adaptive anomaly detection and correction are implemented. Anomalies are identified through deviation analysis and noise tolerance threshold. Interpolation is used to regress anomalies to window trends, while normal points remain in their original positions and anomaly markers are recorded. For complex noise backgrounds, the main peak delay point is selected by weighting peak energy, local morphology, and related signal statistical parameters. Historical main peak probability models and time-series drift trends are used to prioritize statistically stable main peak points.

7. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 2, characterized in that: The window adjustment strategy includes a window self-shrinking mechanism, which automatically shrinks the window width when the local energy and kurtosis drop sharply at the end of the window, and controls the window width change rate in combination with the local change rate; and uses a temporal clustering mechanism to cluster and group all the extraction window center times and correlations within the window, identify multipath echoes and store them separately, so as to provide energy-concentrated effective echo segments for subsequent high-precision cross-correlation analysis.

8. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 3, characterized in that: A multi-window progressive strategy is adopted to calculate short-time energy, kurtosis and local statistics in echo windows of different scales, and then combine the weights to achieve multi-scale weight superposition, thereby improving the main peak identification capability and adaptability to echoes and noise at different time scales.

9. The method for obtaining the peak value of the time-delay cross-correlation function of two sets of ultrasonic transducer received signals according to claim 5, characterized in that: The peak localization based on least squares fitting and interpolation optimization achieves adaptive adjustment of interval width and interpolation order based on the energy concentration and symmetry characteristics of the main peak. Fitting and interpolation are performed separately for multiple main peak intervals, and multiple sets of delay candidate points are stored in an array.