Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 14, No. 2, 2025 70 On‐time Extraction of Ultrasonic Waves Based on Wavelet Transform and AIC Criterion Jie Chen, Min Wan School of Mechatronic Engineering, Southwest Petroleum University, Chengdu 610500, China Abstract: Acoustic instruments have become the mainstream technology for downhole parameter measurement due to their non-contact and high-precision characteristics, but due to the high-noise environment in the downhole, the accuracy of echo signal extraction has always been low. In this paper, we propose an echo signal processing method using wavelet transform and AIC criterion, which can accurately extract the arrival time of echo signals with low signal-to-noise ratio and improve the accuracy of measurement instruments. Keywords: Wavelet transform; AIC; Ultrasonic waves. 1. Introduction In recent years, with the development of ultrasonic technology, it has gradually been applied in the field of oil and gas well drilling for the measurement of some complex parameters. [1]Particularly, the downhole ultrasonic imaging technology during drilling has attracted increasing attention from relevant researchers and technicians. In the processing of ultrasonic echo data, the picking of echo arrival time is a crucial step, and the accuracy of picking directly affects the measurement position accuracy of the instrument and the final imaging effect. Although manual identification and picking of echo arrival time is relatively stable, it is inefficient and lacks real-time performance. Therefore, many scholars at home and abroad have developed various methods for processing downhole ultrasonic echo signals and extracting arrival times, such as the time window energy ratio method and the time window amplitude ratio method, which are efficient but have a significant impact on picking accuracy due to the length of the time window; correlation-based methods, which utilize the full waveform information of the signal, perform well on weak signals with low signal-to-noise ratios; neural network and fractal picking methods, which are complex and difficult to implement, and have relatively low efficiency; edge detection and boundary tracking methods, which have larger picking errors in low signal-to-noise ratio conditions; the AR- AIC method based on the AR model and Akaike information criterion; and the wavelet transform method. Based on the above, this paper proposes a two-step automatic echo arrival time extraction method that combines wavelet transform and AIC criterion. Firstly, the wavelet transform is used to roughly determine the position of the echo arrival time, and then the AIC criterion is locally applied to precisely extract the arrival time point. Through analysis and testing on real data, this algorithm has high extraction accuracy and the advantages of fast speed and simple implementation. 2. The Principle of Wavelet Transform Ultrasonic echo signals are considered non-stationary. Its characteristic is that it has two parts: one is the noise part before the signal arrives, and the other is the effective part after the signal arrives. Due to the fact that the sound signal excited by the ultrasonic transducer has a single frequency, the echo signal is also a single frequency. Figure 1 illustrates a typical echo signal. Noise is considered random and independent of the echo signal, and is sampled by the sensor before the echo signal arrives. Sensors are based on mechanical principles and generate tail vibrations, which makes it impossible for the echo to correspond to the transmitted sound waves after receiving ultrasonic signals, as shown in Figure 1. Therefore, the best method for identifying ultrasound echo signals is to determine the arrival time of the first wave. However, within the frequency range, there is a significant overlap in the spectra of noise and echo signals. In complex environments, noise sources such as strong electromagnetic fields and high temperatures inevitably interfere with instruments. Figure 2 shows a typical set of electromagnetic interference ultrasonic echo signals. In Figure 2 (a), the amplitude of the background noise has exceeded that of the first wave, and due to electromagnetic interference, the echo waveform shows some distortion. The background noise spectrum is distributed throughout the entire frequency domain, as shown in Figure 2(b), indicating that the arrival time of the first wave cannot be clearly identified and the filter cannot effectively eliminate the noise.3 System overall scheme design[2]. In order to accurately determine the arrival time of the first wave in noise, it is necessary to utilize parameters that have distinct characteristics when the first wave arrives. As mentioned above, it can be seen that when the echo arrives, the frequency of the signal changes significantly, so joint time-frequency analysis can be used to estimate the arrival time of the first wave. When the echo signal arrives, the frequency of the signal increases rapidly over time, which means that when the first wave arrives, joint time-frequency analysis requires good time resolution to provide accurate time-frequency positioning. This can be achieved by preprocessing the signal through wavelet transform, which involves using the signal time-frequency spectrum to perform time-frequency analysis and obtain the distribution relationship between time, frequency, and energy.[3] Wavelet transform can provide a time-frequency window that varies with frequency, and the definition of continuous MWT is expressed as 71 Figure 1. Typical Ultrasonic Echo Signal (a) (b) Figure 2. The impact of noise on echo signals: (a) Echo signals with noise; (b) Signal spectrum (1) The selection of wavelet functions is crucial in wavelet transform, as it relates to whether good resolution can be obtained in the time-frequency domain. The frequency of the echo signal received by the sensor is single, which means that a high time resolution is required for time localization of this single frequency. The Morlet wavelet transform (MWT) using Morlet wavelet functions is an ideal choice, and its analytical formula is: (2) In the formula, πœ” is the center frequency of the wavelet and 𝑗 is the imaginary unit. Therefore, equation can be rewritten as: (3) Among them, is the scale plot of the echo signal, representing the energy distribution of displacement factor b and scale factor a. The scaling factor a is related to frequency f and is expressed as: 72 (4) Where is the sampling frequency. Therefore, the equation can be rewritten as (5) Based on this, the time-frequency relationship of typical echo signals can be obtained, and the time-frequency distribution of echo signals can be plotted as Figure 3. Figure 3. Wavelet time-frequency diagram The figure shows the result of wavelet transform on the echo signal. The figure clearly shows the significant change in energy with signal frequency when the echo signal arrives. The testing of a large amount of noise showed the same regularity. Based on this characteristic, sampling points that change with energy fluctuations can be found on the echo signal as a reference for determining the accurate arrival time of the echo signal[4]. 3. Echo Point Localization Based on AIC AIC is a standard based on the concept of entropy, derived from information theory and maximum likelihood principle, used to balance the complexity of statistical estimation models and measure the goodness of fit of such models. Used in echo arrival extraction to determine the boundary position between two different stationary sequences. For a time series of a given length N, it can be represented by an autoregressive model as[5]. (6) In the formula, M represents the order of the AR model, represents a stationary white noise sequence with a mean of zero and variance of , and is the coefficient. The AIC value of this model is: (7) Among them, K represents the order of the AR model, and Οƒ represents the variance of the sequence. A(K) represents the likelihood corresponding to order K. Due to the different statistical characteristics of noise components and echo signal components, they can be regarded as stationary processes and can be represented by AR models. Assuming that the k-th point is the optimal boundary between the noise component and the signal component, the signal is divided into two segments at the k- th point, and the corresponding AIC value can be expressed as: (8) In the above equation, and represent the variances of noise data and signal data, respectively. The calculation of the order M of the AR model is relatively complex, but when M is much smaller than the number of points, it can be expressed as: (9) Among them, var represents the variance of the data sequence. The above equation can directly calculate the AIC value from data. At the arrival time of the echo signal, due to the significant difference in statistical properties between the noise signal and the echo signal, the fitting degree of these two signals is the worst in the least squares sense, and the corresponding AIC value is the smallest. [6]Based on this, by calculating AIC and selecting the point corresponding to the minimum AIC value as the boundary point between two different stationary sequences, that is, the echo arrival point. 4. Algorithm Validation and Testing In order to verify the feasibility of the algorithm proposed in this article, a two-step comparative test was conducted using a dataset accurately determined by manual judgment at 73 time points, including traditional threshold detection methods, time window energy ratio method (STA/LTA), and wavelet and AIC criteria. Take 500 different sets of data for testing, and calculate the average accuracy of each extraction method. The test results are shown in the table. Table 1. Three Scheme comparing Method Error range Threshold method -21.8%~+4.2% STA/LTA -4.5%~+2.8% Wavelet-AIC -2.3%~+1.2% The test results show that the method proposed in this paper has higher accuracy in extracting echo arrival times compared to traditional methods, and is easy to implement, with strong engineering practicality. References [1] Bohui Oilfield Services. China's external oil and gas dependence [EB/OL]. [5-27]. [2] Kronland-Martinet R, Morlet J, Grossmann A. Analysis of sound patterns through wavelet transforms[J]. International Journal of Pattern Recognition & Artificial Intelligence, 1987, 1(2). [3] Cowell D M J, Freear S. Separation of overlapping linear frequency modulated (LFM) signals using the fractional fourier transform[J]. IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control, 2010, 57(10): 2324–2333. [4] Hou S , Xie Q, Shi L X, et al. Research on Direct Wave Separation of PD Ultrasonic Signal Based on ICA[J]. Advanced Materials Research, 2013, 734–737: 2819–2823. [5] SongF, KuleliHS, ToksozMN, et al. An improvedmethod for hydrofracture-induced microseismic event detection and phase picking [J]. Geophysics, 2010, 75(6): A47-A52. [6] St-OngeA. Akaike informationcriterionapplied todetecting first arrival times onmicroseismic data [G]. SEGTechnical Program ExpandedAbstracts, 2011:1658-1662.