Automatic calibration of wellbore pressure wave velocity using perforation-induced shock waves Authors: Xingming Wang, Yuanyuan Yang, Le He, Qiaozhu Wang, Bin He Published: 2026 ABSTRACT AbstractConventional wellbore wave velocity estimation mainly relies on water hammer oscillation signals. These signals have a limited frequency range and long oscillation periods. Under complex wellbore conditions, they are easily affected by noise and changes in boundary conditions, which limits the accuracy and stability of wave velocity characterization. To address this limitation, this study focuses on staged hydraulic fracturing in horizontal wells and proposes an automatic method for calibrating wellbore pressure wave velocity using impact pressure waves generated during perforation operations. The impact pressure waves produced during perforation have high frequencies, short pulse durations, concentrated energy, and clear propagation paths. These characteristics provide a signal source with strong physical advantages for detailed wellbore wave velocity characterization. Based on these properties, this study introduces a peak to peak detection approach. This approach shifts wellbore pressure wave velocity calibration from a dependence on overall oscillation features to a physical description based on transient echo time scales. A complete automatic calibration workflow is therefore established. Numerical simulation results show that, for synthetic pressure waves generated by a convolution model, the extracted time intervals between adjacent waves agree well with theoretical values. For individual perforation clusters, the mean absolute error ranges from 1.6 to 1.8 ms, and the root mean square error does not exceed 2.4 ms, indicating millisecond level time extraction accuracy. In addition, simulations based on a water hammer model show that the relative errors of pressure wave peak amplitudes are all below 0.2%. This result confirms the high accuracy of the proposed method from both the time and amplitude perspectives. Field applications indicate that the average wave velocities calculated for individual perforation clusters are mainly concentrated between 1530 and 1555 m/s. The coefficients of variation within clusters are generally below 5%, and the differences in average wave velocity between different stages are less than ± 15 m/s. These results demonstrate good overall consistency and stability. Further statistical analysis shows that the wave velocity distribution at the perforation cluster scale exhibits stable multimodal characteristics. This behavior reflects the possible existence of multiple propagation paths for perforation induced shock waves within the wellbore. The results demonstrate that the proposed method can achieve stable identification of perforation reflected waves and reliable wave velocity calibration under complex wellbore conditions. It provides an effective approach for the quantitative analysis of wellbore acoustic characteristics.Keywords: Perforation-induced shock waves, Wellbore pressure wave, Wave velocity calibration, Automatic extraction, Convolution model, Water hammer modelSubject terms: Engineering, Physics, Solid Earth sciences Introduction During staged operations in horizontal wells, perforation serves as a critical process that connects the reservoir to the wellbore. Within a very short time, it releases high energy fluids1–4 and generates strong wellbore pressure waves. This impact process produces high amplitude transient fluctuations in the wellbore fluid system. As a result, a series of pressure waves propagate along the wellbore and undergo multiple reflections5. These transient pressure signals contain diverse physical information, including fluid properties, wellbore parameters, and the coupling state of perforation energy6. They serve as important acoustic indicators of perforation energy transfer efficiency, wellbore integrity7, and fracture initiation response. During staged hydraulic fracturing in horizontal wells, the complex wellbore structure and variable fluid boundary conditions, together with high temperature, high pressure, and strong noise during perforation, cause wellbore pressure wave signals to attenuate and distort easily during propagation. Accurate calibration of wave velocity is not only a basic parameter for interpreting wellbore transient signals, but also an important input for subsequent fracture depth inversion and real time fracturing monitoring. According to water hammer wave propagation theory, wave velocity is jointly controlled by fluid compressibility and pipe wall elasticity, and it reflects the combined mechanical behavior of the wellbore and formation system. However, in practical fracturing operations, the wellbore environment is complex and variable. Parameters such as formation elastic modulus, fluid properties, and wellbore stress state are difficult to determine accurately. As a result, wave velocities calculated from theoretical models often differ markedly from field measurements. Because water hammer waves propagate at high velocities, even small errors in wave velocity can lead to noticeable depth shifts, which affect subsequent fracture location and inversion accuracy. Therefore, waves generated by events such as perforation or packer setting8 are commonly used in the field to calibrate wave velocity. This practice corrects theoretical calculation errors and improves the reliability of inversion results. With continuous advances in efficient oil and gas development and well completion technologies, the propagation characteristics of perforation induced shock waves and wave velocity calibration have become active research topics. Deng et al.9 investigated the propagation of impact loads in the wellbore and completion system after perforation in ultra deep wells through numerical simulation. Zhang et al.10 analyzed the mechanisms of generation, propagation, and attenuation of perforation induced shock waves based on underwater explosion theory. Li et al11. proposed a model for pressure wave propagation and attenuation in two phase fluids within the wellbore. Lin et al.12 examined the calculation of pressure wave velocity in gas liquid pipelines, which provides reference for similar wave propagation in wellbores. Li et al.13 reported that guided waves identifiable in perforation signals with known excitation times can be used to correct velocity models in the wellbore. Ye et al.14 inverted radial shear wave velocity profiles around the wellbore using acoustic logging, indicating an alternative direction for velocity calibration. Zhang et al.15 found that perforation induced shock waves attenuate at the perforation tunnels and also exhibit changes in wave velocity during axial propagation along the wellbore. Liu et al.16 showed that explosive pressure waves in perforating fluids influence wellbore structure and wave velocity propagation characteristics. Zhang et al.17 carried out experimental and theoretical analyses on pipelines containing slightly gas bearing liquids. They showed that gas volume fraction and dispersion state in gas liquid two phase flow have a significant influence on pressure wave velocity. As gas content increases or bubble distribution becomes nonuniform, wave velocity decreases markedly or deviates from expected values. A modified wave velocity calculation formula was proposed. Hu et al.18 further studied wave velocity from the perspective of water hammer waveform inversion. They established a water hammer pressure wave experimental system and compared four wave velocity calculation methods, including pressure jump point picking, wavelet decomposition with cross correlation, water hammer period analysis, and spectral analysis. These studies provide a theoretical basis for understanding the generation and early stage propagation of wellbore pressure waves and offer valuable reference for wave velocity calibration theory. In addition, previous studies have explored wellbore pressure waves from the perspectives of experimental downlink systems and data-driven recognition, indicating that wellbore pressure waves are not only important carriers of downhole dynamic responses but also exhibit identifiable and predictable temporal features under noisy conditions19,20. On the other hand, in the field of geophysical monitoring, the perforation process is widely regarded as a repeatable downhole transient excitation source, and distributed acoustic sensing (DAS) is used to observe and physically interpret the wavefield generated by perforation. Based on DAS observations and numerical modeling, Lellouch et al.21 revealed the propagation characteristics of perforation-induced guided waves and their sensitivity to formation structure. Li and Jin22 further used the P-waves generated by perforation and their dispersion information to characterize unconventional reservoirs and to extract velocity-related propagation parameters. In terms of source mechanism analysis and inversion frameworks, Bader et al.23,24 performed moment tensor inversion of perforation sources based on DAS data, and incorporated perforation-induced signals into full-waveform inversion for reservoir parameter estimation and comparative analysis before and after stimulation. Meanwhile, Zhang et al.25 used perforation sources for reservoir characterization and analyzed anisotropy, attenuation, and the sources of uncertainty. These studies demonstrate, from the perspectives of wavefield physics and inversion, that perforation-induced signals can provide important field constraints for medium-parameter interpretation and velocity calibration. It should also be noted that during engineering processes such as drilling acceleration and reservoir stimulation, the wellbore and formation system is often affected by the coupling of multiple physical processes, including impact loading, confining pressure variation, fracture propagation, and fluid flow in fractures. Yang et al.26 investigated the coupling mechanism of impact loading and confining pressure release, and revealed the intrinsic relationship between the improvement of rock breaking efficiency and the variation of stress response under hot dry rock conditions. Tahir and Guo27 discussed the effects of hard core defects on fracture propagation patterns and propagation efficiency in CO₂ fracturing of natural hydrogen reservoirs. Li and Liao28 analyzed at the microscopic scale the flow resistance mechanisms of displacement fluids in fractures and their effects on pressure gradients and flow behavior. Such coupled effects can alter the transient pressure response of the wellbore and increase the uncertainty of field interpretation. Therefore, it is of practical significance to develop an automatic wave velocity calibration method applicable to field data for completion and stimulation monitoring. Considering the high frequency, transient, and multiple reflection characteristics of perforation induced shock waves, this study proposes an automatic method for calibrating wellbore pressure wave velocity based on perforation impacts. The method focuses on high amplitude transient pressure waves generated during perforation. Through systematic analysis of shock wave propagation characteristics, it achieves automatic identification of key wellbore reflection information and extraction of time scales, and it quantitatively calibrates wave velocity by incorporating wellbore structural parameters. To verify the reliability and applicability of the method, theoretical analysis and field perforation data are used to systematically evaluate the accuracy and consistency of the proposed wave velocity calculation. Furthermore, statistical analysis is applied to systematically investigate wave velocity distribution characteristics at the perforation cluster scale. This analysis aims to reveal possible multipath propagation behavior of perforation induced shock waves within the wellbore. Method Propagation process of perforation-induced shock waves Perforation is a key operational process in which a perforating gun is installed downhole and high energy explosives are detonated inside the casing, creating conductive channels through the steel casing, cement sheath, and surrounding formation. After the perforating charge detonates, chemical energy is rapidly converted into high temperature and high pressure fluids, generating strong shock waves and high velocity metal jets. Because of the pronounced differences in acoustic impedance among the involved media, shock waves are reflected at material interfaces, producing a series of wave components such as the primary wave and reflected waves29. Their propagation behavior can be described by the acoustic wave equation: Here, denotes the disturbance pressure, and represents the propagation velocity in the medium. This equation describes the propagation of pressure disturbances in time and space, indicating that pressure disturbances travel through the medium in the form of waves, with their velocity jointly determined by the elastic modulus and density of the medium. Within the wellbore, the shock wave first interacts with the casing and the wellbore fluid, after which part of its energy is transmitted into the cement sheath and the surrounding formation. Owing to differences in physical properties among the layered media, the waveforms attenuate and distort during propagation, and part of the energy is reflected back into the wellbore and recorded by sensors. By analyzing these reflected wave signals, the propagation characteristics and wave velocity of perforation pressure waves can be obtained. The propagation process of the shock wave is illustrated in Fig. 1, and the signals analyzed in this study correspond to the transient response of wellbore pressure during perforation. Schematic illustration of the propagation process of perforation-induced shock waves. Overall framework for automatic identification To achieve automatic calibration of wellbore pressure wave velocity under perforation impact conditions, this study designs a workflow for identifying wellbore pressure waves and calibrating wave velocity based on perforation-induced shock waves. The method takes high frequency pressure signals as the primary analysis target. By applying systematic filtering and feature extraction to the raw pressure data, it enables automatic identification of the main shock wave and multiple reflected waves, and it completes quantitative wave velocity calibration by incorporating wellbore geometric parameters. The overall workflow is illustrated in Fig. 2 and consists of three core modules: data preprocessing, peak and trough identification, and wave velocity calibration. Workflow for automatic calibration of wellbore pressure wave velocity based on perforation-induced shock waves. In the data preprocessing stage, three successive steps are applied according to the characteristics of the data: detrending, Savitzky–Golay smoothing, and Butterworth filtering. Detrending is used to remove baseline drift components from the signal, allowing the pressure curve to return to a stable reference level. Savitzky–Golay smoothing suppresses random noise through local polynomial regression. In nonstationary signal processing, it preserves the local shape and extreme positions of transient shock waves, thereby avoiding distortion of the main shock wave peak22. Butterworth filtering further extracts effective energy components within the target frequency band and removes interference from instruments and the surrounding environment. After preprocessing, the waveform features of the main shock wave and its multiple reflections become clearer, providing high quality input for subsequent identification. In the peak and trough identification stage, the Hilbert envelope is calculated from the preprocessed signal , and is then smoothed. Envelope peak detection is then performed on , and the peak prominence threshold is defined adaptively based on a robust noise scale: . A minimum spacing is imposed between adjacent envelope peaks to avoid repeated segmentation. For each envelope peak, the left and right boundaries of the window are determined at the positions where the envelope decays to times the peak value, and the window is further extended at both ends to cover the complete echo wave packet, yielding each echo window . For each echo window, the global maximum and global minimum within the window are taken as the candidate peak and trough, respectively, and the extrema are searched again within a local neighborhood around the candidate points for refinement, so as to reduce the extremum shift caused by discrete sampling and noise. The validity of each extremum pair is determined jointly by temporal and amplitude constraints. The temporal constraint is defined using a half-period window: . The amplitude constraint is adaptively defined based on a robust noise scale: is calculated for the signal within the window, and the peak-to-trough amplitude difference is required to satisfy .With this adaptive threshold setting that varies with the noise level, the algorithm can maintain a consistent decision criterion across windows with different noise intensities, thereby improving robustness. In the wave velocity calculation stage, the time intervals between adjacent waves in each cluster and the corresponding plug distances are extracted from the identified peak and trough sequences, and the perforation wave velocity is then calculated. During calculation, reference perforation numbers and correction parameters are introduced. Wave velocity is calculated individually for each cluster and each wave segment, followed by unified calibration and statistical averaging to reduce the influence of noise and systematic errors. The final wave velocity results reflect the propagation behavior between perforations and provide quantitative support for connectivity analysis of the wellbore and fracture system. To avoid subjective selection of the filtering parameters, we performed PSD analysis on the raw wellhead pressure signals from representative perforation event windows, and the results are shown in Fig. 3 and Table 1 The spectra of Segment 15 and Segment 18 both show that the main energy is concentrated below 40 Hz, while narrowband interference peaks are also visible near 50 Hz, 100 Hz, and 150 Hz. Therefore, a default band of 0.5 to 40 Hz was adopted in the subsequent processing as the effective frequency band, so that the main signal components could be preserved while high-frequency noise and narrowband interference were suppressed. Spectral energy distribution of the raw wellhead pressure signal. Table 1Proportion of spectral energy.FrequencySegment 15Segment 18 ≤ 40 Hz0.5200.95940–100 Hz0.0620.017100–200 Hz0.2140.014 Proportion of spectral energy. For reproducibility, all default and used parameters of the automated workflow are summarized in Table 2. Table 2Key parameters used in the automated workflow.ModuleParameterValue usedUnitNotesData inputFS1000HzSampling frequencyDetrendingDETREND_MODElinear–Linear detrendingCENTER_BYmedian–Median centering for robustnessSG smoothingSG_WIN_MS51msSG window; internally converted to samples and forced to be odd with length adaptationSG_POLY3–SG polynomial orderSG safeguardMIN_SEG_PTS_SG7pointsSkip SG for very short segmentsButterworthhp_eff0.5HzEffective cutoff is computed as hp_eff = max(HP_HZ,0.5)lp_eff40HzEffective cutoff is computed as lp_eff = max(LP_HZ,40)Filtfilt(method = “gust”)enabled–Zero-phase filtering to avoid phase delay in timingHalf-cycle constrainHALF_MIN_MS8msMinimum peak-trough separationHALF_MAX_MS300msMaximum peak-trough separationPairing thresholdAMP_MIN0.03MpaMinimum amplitude threshold for peak–trough pairingNoise metric_mad()MADNoise estimated by MAD, used in adaptive thresholdingOnset detectionENV_SMOOTH_MS25msHilbert-envelope smoothing windowON_Z5–Onset threshold multiplierDWELL_MS15msRequired dwell time above thresholdFirst-wave correctionFIRST_WIN_MS200msSearch window for the first-wave pairFIRST_TOP_FRAC0.45–Strength ratio threshold for the dominant first extremeFIRST_LATENCY_MS25msMinimum latency after onsetGUARD_BEFORE_S0.2sGuard time after onsetExtreme refinementREFINE_MS30ms ± refinement window around candidate extremaEcho segmentationECHO_MIN_SEP_MS900msMinimum separation between envelope peaksECHO_MIN_WIDTH_MS40msMinimum echo-window widthECHO_ALPHA0.15–Alpha-span ratio for defining window boundariesECHO_PROM_Z3.8–Envelope-peak prominence threshold Key parameters used in the automated workflow. Filtfilt (method = “gust”) Principle of detrending The essence of detrending is to remove low frequency and slowly varying components from the original signal that are not relevant to the target analysis, so that the remaining signal more clearly represents short period or transient features. In wellbore pressure signals, these low frequency trends usually originate from changes in pumping pressure, variations in tubing friction, temperature effects, or system drift, and they tend to mask high frequency fluctuations such as perforation impacts. The principle of detrending can be understood by assuming that the observed signal can be expressed as: Here, denotes the high frequency component, and represents the slowly varying trend term, which can be approximated as . The parameter describes the linear drift in the signal, while represents the baseline offset. By estimating and removing it from the original signal, the following expression can be obtained: As a result, the signal becomes more stable and its mean approaches zero, which facilitates subsequent processing steps such as filtering, envelope extraction, peak and trough detection, and arrival time estimation. Principle of Savitzky–Golay smoothing Savitzky–Golay smoothing is a filtering method based on local polynomial fitting. Its basic idea is to fit a low order polynomial within a sliding window using the least squares method and to use the fitted value at the central point as the smoothed output. Compared with simple moving average filtering, which only performs weighted averaging of the signal, the Savitzky–Golay method uses local polynomial approximation to suppress random noise while preserving signal details such as peaks, troughs, and transient variations to the greatest extent. For a data point located at time , a sliding window with a length of 2k + 1 is selected: It is assumed that the signal within this window can be approximated by an m-order polynomial: The coefficient vector is obtained using the least squares method: Here: The smoothed value is given by the value of the fitted polynomial at the central point, that is = . Principle of Butterworth filtering The pressure signals recorded during perforation contain multiple noise components, including detonation noise, mechanical vibration, and environmental interference. These factors introduce high frequency fluctuations and low frequency drift, which reduce the accuracy of subsequent peak detection and wave velocity calculation. To extract the main energy characteristics of shock wave propagation, filtering is applied to the raw signal to suppress noise and retain effective information within the target frequency range. The basic principle of filtering is to use the frequency selective property of linear systems, so that specific frequency components of the input signal are preserved or attenuated.According to their frequency response characteristics, commonly used filters include low pass, high pass, band pass, and band stop filters. In this study, the energy of perforation pressure signals is mainly concentrated in the low and middle frequency range, whereas the high frequency components are dominated by random noise. Therefore, a Butterworth filter is selected for signal preprocessing23,24,30,31. The Butterworth filter is characterized by a maximally flat amplitude response. It exhibits no ripples in the passband and a smooth, monotonic transition band, which allows effective suppression of high frequency noise while maintaining signal smoothness. Its amplitude frequency response can be expressed as: Here, denotes the frequency response function of the filter, is the cutoff angular frequency, and is the filter order. When ,, indicating that the signal experiences almost no attenuation within the passband; when ,, and high frequency noise is effectively suppressed. As the filter order increases, the transition near the cutoff frequency becomes steeper, while the phase delay increases accordingly. In practical data processing, the Butterworth filter is typically implemented in digital form, where the discretized transfer function is derived from its analog form using bilinear transformation.: Here, and are filter coefficients, which are determined by the cutoff frequency and the filter order. Principle of wellbore wave velocity calculation The propagation velocity of pressure waves in the wellbore is jointly influenced by fluid compressibility, fluid density, and the coupling characteristics between the wellbore and the formation. When pressure waves propagate within the wellbore, their energy is mainly transmitted through the fluid in the form of longitudinal waves. At the same time, elastic responses are induced in the casing, the wellbore wall, and the surrounding formation, which reduces the propagation velocity relative to the acoustic velocity in an ideal fluid. For an incompressible fluid, when deformation of the wellbore wall is neglected, the pressure wave propagation velocity can be approximated in terms of the fluid bulk modulus and density as: Here, denotes the fluid bulk modulus (Pa), and denotes the fluid density (kg/m3). This expression describes the intrinsic acoustic velocity of pressure disturbances in a fluid medium and represents the ability of the fluid to respond to internal compression and expansion. However, under actual perforation conditions, the wellbore system does not behave as an ideal rigid boundary. Under the action of pressure waves, the wellbore wall, casing, and surrounding formation undergo small elastic deformations. As a result, part of the wave energy is consumed by medium deformation rather than propagation, which leads to a reduction in the effective wave velocity. To account for this coupling effect, the corrected wellbore wave velocity can be expressed as: Here, denotes the intrinsic acoustic velocity of the fluid, and represents the equivalent elastic modulus of the formation (Pa), which characterizes the ability of the formation to resist deformation. The parameter is the wellbore-formation coupling coefficient, and its value depends on factors such as wellbore diameter, casing thickness, formation Poisson’s ratio, and porosity. This expression indicates that lower formation stiffness and stronger wellbore-formation coupling lead to a lower pressure wave propagation velocity. This relationship reflects the influence of wellbore-formation interaction on wave propagation characteristics. In practical applications, the formation elastic modulus can be estimated through acoustic measurements or numerical simulations, which allows further refinement of the wave velocity model and improves calculation accuracy. On the other hand, transient pressure disturbances generated by perforation impacts propagate along the wellbore toward the wellhead. During propagation, reflections occur at the well bottom, at packers, and at locations where the wellbore geometry changes, which leads to a superposition of multiple reflected waves in the wellhead pressure records. After perforation, the pressure sequence measured at the wellhead exhibits a series of successive waveform peaks and troughs, with a stable time interval between adjacent waves. This time interval reflects differences in the propagation paths of pressure waves within the wellbore and can be used to characterize the actual propagation velocity in the medium.If the propagation distance from the perforation interval to the reflecting interface is known, the actual wave velocity in the wellbore can be calculated by measuring the time difference between adjacent waves: This expression is derived from the time–distance method based on round-trip wave propagation, in which the wave travels a round-trip path length of 2L within the wellbore. Moreover, this formulation does not depend on the specific wellbore geometry or on waveform details. Instead, it relies solely on the path difference and arrival time difference between adjacent waves, which provides high stability and practical applicability in field operations. When the reflecting interface is known, the wellbore pressure wave velocity can be robustly calibrated by measuring the arrival time difference between the direct wave and the reflected wave. This provides reliable fundamental parameters for subsequent depth inversion and hydraulic fracturing monitoring. System architecture and module functions To enable automated implementation of the peak-to-peak detection method and visualization of results, a perforation-induced shock wave velocity calculation system was developed in a Python environment. The system adopts a Python and PyQt technical framework and integrates signal processing algorithms with graphical interface design, thereby realizing a complete workflow from data input to wave velocity calculation. A three-layer modular architecture is employed, consisting of a data support layer, a functional logic layer, and a user interaction layer. Standardized data interfaces are used to enable data transfer and function calls between layers, forming a closed-loop processing pipeline from raw signal input and feature identification to result output. The wave velocity calculation interface is shown in Fig. 4. Wave velocity calculation interface. User interaction layer User interaction layer The user interaction layer is implemented using a PyQt graphical interface and serves as the primary interface between the system and the user. This layer provides visual functions such as data loading, parameter configuration, waveform inspection, and result export. Users can inspect preprocessing effects in real time, select target perforation intervals, and perform peak-to-peak detection within the interface. After detection, the system automatically generates wave velocity calculation results and graphical displays, enabling full visualization and interactive control from signal input to result output. (2)Functional logic layer Functional logic layer The functional logic layer is the core component of the system and integrates three main modules: signal preprocessing, peak-to-peak detection, and wave velocity calculation. The preprocessing module incorporates multiple signal enhancement functions to suppress low-frequency drift and random noise, thereby improving the signal-to-noise ratio. The peak-to-peak detection module serves as the key algorithm unit. Through the GUI, it supports interactive window selection, real-time annotation, and automatic result storage, and it performs peak and trough identification, wave cluster indexing, and result output within user-defined perforation intervals. (3) Data support layer Data support layer The data support layer provides the foundation for system operation and is responsible for raw signal import, data standardization, and result storage. The system supports data input in multiple formats, automatically identifies time-series or single-channel signal structures, and determines the sampling frequency based on the input type or user-defined settings. This layer also manages structured result storage, including peak-to-peak detection outputs, wave velocity statistics tables, and annotated image files, providing data support for subsequent analysis and visualization. Principle of method validation Convolution model To verify the reliability of the proposed wellbore pressure wave velocity calibration procedure, a convolution model was constructed based on the linear time-invariant characteristics of the wellbore-fluid system. During propagation of transient pressure disturbances generated by perforation, the system response can be regarded as the convolution superposition of a source wavelet and a sequence of reflections from multiple wellbore interfaces. Because the wellbore structure remains stable over short time intervals, the fluid can be treated as a weakly compressible medium, and pressure wave propagation satisfies the principle of superposition, the convolution framework can accurately describe the propagation and reflection behavior of perforation-induced shock waves. The input signal of the model uses a Ricker wavelet to approximate the initial impact generated by perforation, and its waveform is shown in Fig. 5. This wavelet exhibits zero phase, a single dominant peak, and a concentrated frequency spectrum, which closely matches the shape of the main pressure peak observed in actual perforation signals. Perforation clusters, the well bottom, and other structural interfaces within the wellbore cause partial energy reflections, and their reflection strength is described by the reflection coefficient . By representing all reflecting interfaces as an impulse sequence, as shown in Fig. 6, the reflection response function of the system can be obtained as: Ricker wavelet. Configuration of reflecting interfaces. Here, denotes the round-trip travel time associated with the -th reflecting interface, represents the interface position, and is the prescribed wellbore wave velocity. The convolution model can generate simulated pressure waveforms with multiple echo clusters, multiple attenuated echoes, and clearly separated intervals, which effectively capture the multiple reflection characteristics that occur in the wellbore after perforation impacts. By adjusting the reflection coefficients, interface positions, and noise levels, data sets representing different scenarios can be constructed for subsequent validation of the automatic wave velocity calibration algorithm. Water hammer model To evaluate the accuracy and robustness of the proposed automatic calibration method for perforation-induced shock wave velocity, a one-dimensional wellbore water hammer propagation model was constructed. Under known wave velocity, wellbore structure, and boundary conditions, perforation pressure wave signals were synthesized and used as input data for the automatic calibration procedure. By comparing the prescribed wave velocity in the model with the velocity automatically inverted by the algorithm, the performance of the method under ideal water hammer conditions was evaluated, providing a theoretical basis for subsequent field applications. The fluid inside the wellbore is treated as a compressible single-phase liquid, and the influence of pipe wall elasticity on wave propagation velocity is taken into account. According to water hammer theory, the one-dimensional transient governing equations can be expressed as: Here, denotes the hydraulic head, is the volumetric flow rate, is the cross-sectional area, and is the one-dimensional equivalent wave velocity. The parameter , where is the internal pipe diameter and is the friction factor. The term represents the distributed friction term, which describes the energy dissipation of pressure waves during propagation. Under the system of Eqs. (16 and 17), the two characteristic line directions of one-dimensional water hammer propagation are given by: The spatial step is set to , and the time step is set to , so that the characteristic lines (as shown in Fig. 7) fall exactly on adjacent grid points and an explicit scheme without numerical dispersion is obtained. For an interior node (i,j), we have: Schematic diagram of characteristic lines. Here, . Results and validation Method validation Validation using the convolution model Based on the established convolution model, controllable synthetic data were constructed to evaluate the reliability of the proposed wellbore pressure wave velocity calibration method under different operating conditions and to verify its effectiveness. By specifying reflecting interface locations, propagation distances, and time delays within the convolution model, artificial pressure signals containing multiple reflections were generated and fed into the developed wave velocity calibration workflow. The deviation between the intra-cluster wave interval extracted by the algorithm and the prescribed theoretical value was then analyzed to assess the accuracy and stability of the method. During model construction, multiple reflecting interfaces were defined according to the typical spacing between perforation clusters, and different reflection strengths were assigned to each interface. By varying the number of interfaces, their distances, and the amplitude attenuation patterns, wellbore reflection scenarios with different levels of structural complexity were generated. These interface parameters were used to generate impulse sequences with different delay positions, and the convolution model automatically superimposed source wavelets with corresponding amplitudes according to these delays, producing multi-echo pressure waveforms with clear temporal structures, as shown in Fig. 8. To improve the consistency between the simulated data and field pressure records, Gaussian white noise and low-frequency baseline drift of specified intensity were added to the generated waveforms to mimic instrument noise and long-term acquisition trends at the wellhead. As a result, the simulated waveforms exhibit both ideal structural features and realistic engineering disturbances. Simulated echo pressure waveforms. The generated simulated waveforms are directly used as input data for validation within the proposed wave velocity calibration workflow. The entire validation procedure follows the same processing steps as those applied to field data, including signal preprocessing, extremum detection, waveform clustering, echo grouping, and propagation time extraction. Because the true propagation time associated with each reflecting interface in the simulated data is 5 s, the wave interval times extracted by the algorithm can be directly compared with the prescribed theoretical delays to quantify error sources and evaluate the temporal resolution capability of the algorithm. The identification results are shown in Fig. 9. Identification results. To quantitatively illustrate the performance of echo identification, the peak times, trough times, and the corresponding time intervals of each echo cluster generated by the convolution model were statistically analyzed and summarized in Table 3. This table clearly reveals the arrival-time patterns of successive echoes and provides a solid numerical basis for subsequent wave velocity calculations. Table 3Identified time intervals between successive echoes.cluster_idwave_idpeak_to_prev_s(s)11125135.003144.996155.000164.99921225235244.997255.002264.99631325.003334.997345355365.003 Identified time intervals between successive echoes. To further evaluate the overall performance of the proposed method, the mean absolute error (MAE) and root mean square error (RMSE) were employed to quantitatively assess the identification errors of adjacent-wave time intervals under different simulated scenarios. Figure 10 illustrates the MAE and RMSE of inter-wave intervals for each cluster. The results show that the MAE values of all three clusters are controlled at approximately s, while the RMSE remains within about s. The overall error level is relatively low, indicating that the algorithm demonstrates good consistency and stability across different clusters. Bar charts of MAE and RMSE for each cluster. To evaluate the concentration of the identification results, Fig. 11 presents the mean values and standard deviations of the inter-wave time intervals for each cluster. The mean values of all three clusters closely match the true preset value of 5 s, with deviations on the order of approximately s. The standard deviations are consistently distributed around s, indicating good stability and repeatability of multiple-echo identification within each cluster. These results demonstrate that the proposed workflow can reliably extract the temporal structure of adjacent echoes within clusters and remains robust under varying reflection energies and amplitude attenuation conditions. Mean values with ± 1 standard deviation error bars. The error histogram shown in Fig. 12 further illustrates the distribution of the extracted time interval . Most errors are concentrated around zero, with only a few samples exhibiting a slight deviation of approximately s, and no systematic bias is observed. This indicates that the entire identification workflow does not introduce systematic time drift due to peak-through detection or pairing errors. The residual errors are mainly attributed to minor sampling noise or interpolation uncertainty. Histogram of identification errors. Meanwhile, this study conducted a noise-level sensitivity test on convolution-based synthetic pressure signals. Under the condition that the waveform ground truth remained unchanged, the noise level was set to three cases, namely 10 dB, 5 dB, and 0 dB, and an automated workflow was used to extract the intervals between adjacent echoes. Table 4 presents the statistics of this test. It can be seen that the echo intervals can be stably extracted under all three noise conditions, and the MAE of the interval time remains at the millisecond level. Table 4Summary statistics of the sensitivity test.SNR_dBMAESTD100.00790.01050.00620.00900.00650.009 Summary statistics of the sensitivity test. The results obtained from the synthetic data demonstrate that, under ideal and well controlled conditions with known true propagation times, the proposed wave velocity calibration workflow achieves millisecond level accuracy in time extraction. The results from all three clusters converge steadily to the theoretical values, and no evident misidentification or systematic bias is observed. These results confirm the reliability and robustness of the method in identifying inter echo time intervals. They also provide a solid basis for the subsequent application of the method to field perforation induced pressure signals. Validation using a water hammer model In the model, the wellbore length and the wave velocity are specified, with the damping parameter set to , and the excitation applied at the central time of the Gaussian pulse. The simulated wellhead pressure curve is shown in Fig. 13. 1-D water-hammer wellhead pressure response used as a baseline reference (not the primary validation for perforation transients). Under the present simulation condition, the wellbore length and the wave speed are known parameters, so the theoretical round-trip travel time can be calculated directly. Therefore, the key point of the validation is to determine whether the automatically identified peak time intervals agree with the theoretical values. When the identified results are stable and show close agreement with the theoretical values, this demonstrates the correctness of the reflection identification and wave-speed calibration procedure. In this case, further wave-speed inversion would lead to the same result and is therefore not repeated. The theoretical round-trip travel time at the wellhead is given by: Therefore, under ideal conditions, the peak time intervals between successive reflections should approach 9.6 s. Figure 14 shows the identification results of the simulated pressure waves generated by the water-hammer model within the wave-speed calibration workflow. Identification results of pressure waves generated by the water-hammer model. Figure 15 presents a local magnified view of the second echo in the filtered transient pressure signal. The algorithm can accurately locate the peak and trough of this echo, which are directly indicated by annotations in the figure. This result demonstrates that the proposed identification method can effectively capture the main features of the echo, providing a reliable basis for subsequent time-difference calculation and wave-speed calibration. Enlarged view of the identification result for the second echo. Table 5 lists the statistical timing results of the identified echoes, including peak times, trough times, and peak-to-peak intervals between adjacent echoes. It can be observed that the echo arrival times exhibit a clear increasing trend, which is highly consistent with the round-trip propagation behavior of water-hammer waves in the wellbore. This table provides clear and quantifiable time inputs for wave-speed calibration and serves as an important basis for subsequent inversion calculations. Table 5Identification results.cluster_idwave_idpeak_t(s)trough_t(s)peak_to_prev_s(s)114.9925.012–1214.59214.6129.6001324.19224.2129.6001433.79233.8129.6001543.39243.4129.6001652.99253.0129.5991762.59262.6129.6001872.19272.2129.5991981.79281.8129.60011091.39291.4129.599 Identification results. The results show that the multiple reflection periods obtained from numerical simulations are fully consistent with the theoretical predictions, with relative errors between successive peaks smaller than 0.2%. Therefore, the proposed wave velocity calibration procedure exhibits high accuracy and stability for perforation-induced transient signals and can serve as a reliable method for wellbore wave velocity calibration. Validation based on field data Data preprocessing This study uses pressure signals measured during a perforation operation in an oil and gas well as the research object, with a sampling rate of 1000 Hz. The signals capture the high-amplitude shock wave generated at the instant of perforation and its multiple reflections within the wellbore. Owing to the complex field operating conditions, the raw signals are inevitably affected by fluid disturbances and random noise, which results in slow baseline drift and high-frequency spikes. Figure 16 shows the raw perforation pressure signal acquired at the field site. Raw pressure signal of the perforation cluster. To improve signal quality and highlight the main reflected features of the perforation shock wave, the signal is first processed using linear detrending to remove low-frequency drift, so that the waveform fluctuates around a near-zero mean level.After this processing, the signal baseline becomes stable, as shown in Fig. 17. Next, Savitzky–Golay smoothing is applied to suppress random high-frequency noise, while reducing spikes and preserving the shape and timing characteristics of the main shock wave peak, as shown in Fig. 18. Finally, a Butterworth filter is applied to extract the main energy components of the signal. The cutoff frequency is set to 40 Hz, and a forward and backward filtering scheme with zero phase shift is used to eliminate phase distortion, as shown in Fig. 19. Result after detrending. Result after Savitzky Golay smoothing. Result after Butterworth filtering. After the three processing steps, the shock wave and its multiple reflection features become clearly visible in the signal. The background noise is greatly reduced, and the signal to noise ratio is significantly improved. Figure 20 shows a local enlarged view of perforation cluster 1. The main shock wave shape is clearly identified, and the energy of the subsequent reflected waves shows evident attenuation, which provides a reliable basis for subsequent peak to peak detection and wave speed calculation. Enlarged processed result of perforation cluster 1 in segment 18. To further verify the applicability of the preprocessing method in different perforation segments, Fig. 21 presents the processing results of the perforation data from segment 15 under the same procedures. It can be observed that although the energy amplitude and attenuation behavior differ among perforation segments, the preprocessing procedure consistently reveals the main shock wave and its multiple reflections, which provides a reliable basis for subsequent consistency analysis. Data from segment 15. Results of the identification algorithm To verify the applicability and identification accuracy of the peak and valley detection algorithm for field perforation data, this study implements the algorithm in an engineering form on the Python platform. The program uses high frequency perforation pressure signals as input and applies a graphical interface for band selection and result display. During practical operation, the user loads the preprocessed signal through the interface and selects the target perforation time window to trigger automatic detection. After the detection process is completed, the program automatically generates result files and annotated images. The result files record the peak time, valley time, and peak to peak interval for each wave in each cluster, which facilitates subsequent statistical analysis and wave speed evaluation. Figure 22 shows the identification results for the perforation cluster in segment 15. It can be observed that the main perforation peak is accurately located, and the subsequent reflected waves exhibit a step by step attenuation trend. The peak and valley markers are clear, as shown in Fig. 23, and the reflection sequence structure is complete. This indicates that the algorithm can still stably extract effective features in well segments where the signal energy is weak and attenuation is rapid. Identification results for segment 15. Peak and valley identification results for perforation cluster 2 in segment 15. Figure 24 presents the identification results of the perforation data from segment 18. Compared with segment 15, the reflected waves of the perforation clusters in segment 18 show higher energy, and the periodic structure is more evident. The algorithm can also accurately identify the peaks and valleys of successive reflected waves. The time intervals between the reflected waves remain highly consistent, which further confirms the applicability and robustness of the algorithm under different perforation energy conditions. Identification results of segment 18. Tables 6 and 7 list the peak and trough identification results and the interval between adjacent main peaks for the perforation data of segment 15 and segment 18, respectively.The results show that both data sets contain multiple clusters and multiple levels of reflected waves, with the values of mainly distributed between 5.2 s and 6.3 s, while the variation of within each cluster is small and shows a stable periodic pattern. This indicates that the algorithm can reliably extract the time features of the reflection paths and provides a sound basis for wave speed inversion. Table 6Peak and trough identification results and intervals between adjacent main peaks for each perforation cluster in segment 15.cluster_idwave_idpeak_t(s)trough_t(s)win_start(s)win_end(s)peak_to_prev_s(s)1132.56032.39827.65074.041–1238.28438.14527.65074.0415.7241344.00044.17627.65074.0415.7161450.07449.81627.65074.0416.0741555.67655.92827.65074.0415.6021661.83461.50927.65074.0416.1581767.32367.70727.65074.0415.4891873.58673.19927.65074.0416.26321109.554109.357105.551153.141–22115.229115.093105.551153.1415.67523120.926120.810105.551153.1415.69724126.613126.740105.551153.1415.68725132.584132.439105.551153.1415.97126138.256138.418105.551153.1415.67227144.250144.069105.551153.1415.99428149.906150.157105.551153.1415.65631230.742230.618223.666267.815–32236.450236.338223.666267.8155.70833242.137242.275223.666267.8155.68734247.840247.949223.666267.8155.70335253.776253.646223.666267.8155.93636259.458259.610223.666267.8155.68241296.289296.168291.324334.327–42301.986301.874291.324334.3275.69743307.674307.806291.324334.3275.68844313.649313.472291.324334.3275.97545319.299319.505291.324334.3275.65046325.346325.101291.324334.3276.04747330.959331.200291.324334.3275.61351351.602351.471344.647389.371–52357.300357.180344.647389.3715.69853362.981363.107344.647389.3715.68154368.960368.773344.647389.3715.97955374.590374.800344.647389.3715.63056380.681380.406344.647389.3716.09157386.243386.509344.647389.3715.56261413.119412.989409.439457.029–62418.818418.702409.439457.0295.69963424.497424.625409.439457.0295.67964430.469430.288409.439457.0295.97265436.101436.323409.439457.0295.63266442.175441.910409.439457.0296.07467447.720448.030409.439457.0295.54571469.606469.474465.629518.953–72475.312475.188465.629518.9535.70673480.978481.116465.629518.9535.66674486.952486.773465.629518.9535.97475492.576492.806465.629518.9535.62476498.695498.402465.629518.9536.11977504.210504.539465.629518.9535.51578510.421510.032465.629518.9536.211 Peak and trough identification results and intervals between adjacent main peaks for each perforation cluster in segment 15. Table 7Peak and trough identification results and intervals between adjacent main peaks for each perforation cluster in segment 18.cluster_idwave_idpeak_t(s)trough_t(s)win_start(s)win_end(s)peak_to_prev_s(s)1185.52685.35080.286125.208–1290.92690.76880.286125.2085.4001396.31696.54480.286125.2085.39014102.159101.88980.286125.2085.84315107.519107.97680.286125.2085.36016113.682113.15280.286125.2086.16317118.921119.41480.286125.2085.23921160.069159.885156.203198.369–22165.466165.370156.203198.3695.39723170.855171.000156.203198.3695.38924176.548176.363156.203198.3695.69325181.869182.098156.203198.3695.32126187.725187.399156.203198.3695.85627192.938193.219156.203198.3695.21331222.795222.575217.476260.960–32228.165228.020217.476260.9605.37033233.522233.682217.476260.9605.35734239.210239.039217.476260.9605.68835244.542244.740217.476260.9605.33236250.282250.039217.476260.9605.74037255.595255.816217.476260.9605.31341289.830289.600282.701332.115–42295.188295.045282.701332.1155.35843300.542300.710282.701332.1155.35444306.242306.046282.701332.1155.70045311.554311.768282.701332.1155.31246317.315317.063282.701332.1155.76147322.594322.819282.701332.1155.27948328.408328.100282.701332.1155.81451353.958353.721349.245396.023–52359.318359.478349.245396.0235.36053364.667364.836349.245396.0235.34954370.362370.172349.245396.0235.69555375.692375.880349.245396.0235.33056381.430381.199349.245396.0235.73857386.708386.918349.245396.0235.27858392.484392.240349.245396.0235.77661419.654419.415415.129462.566–62424.986425.188415.129462.5665.33263430.740430.525415.129462.5665.75464436.047436.299415.129462.5665.30765441.836441.570415.129462.5665.78966447.108446.801415.129462.5665.27267452.364452.630415.129462.5665.25668458.148457.922415.129462.5665.78471485.625485.365481.014533.721–72490.953491.154481.014533.7215.32873496.715496.485481.014533.7215.76274502.007502.251481.014533.7215.29275507.853507.554481.014533.7215.84676513.071513.409481.014533.7215.21877519.007518.574481.014533.7215.93678524.163523.857481.014533.7215.156 Peak and trough identification results and intervals between adjacent main peaks for each perforation cluster in segment 18. Wave velocity extraction and validation Based on the previously identified main peak and main trough for each cluster, the propagation velocity of the perforation induced pressure wave in the wellbore can be further calculated. This study uses the geometric distance data of perforation clusters and applies the developed wave velocity calculation program to obtain the propagation velocity and statistics for each cluster. The program uses the time interval between adjacent echoes as the time difference input and applies the echo method with a path factor of K = 2 to automatically calculate the wave velocity for each single sample, and then derives the mean wave velocity, the standard deviation, and the sample count for each perforation cluster. Table 8 presents the wave velocity calculation results for each perforation cluster in segment 15. Overall, the mean wave velocities of all clusters are concentrated in the range from 1532 to 1553 m/s, and the differences among clusters are small, which indicates that the propagation velocity in this wellbore section is relatively uniform. Among them, Cluster 3 has the highest mean wave velocity and the smallest standard deviation, which indicates that its echo times are the most stable and its propagation paths are the most consistent, making it the most representative cluster for the wave velocity in this section. By comparison, Clusters 1 and 7 show slightly larger standard deviations, which reflects the presence of a small number of wave velocity outliers within these clusters. Even so, their mean values remain within a narrow range of ± 10m/s, and no pronounced deviation is observed. The cluster level wave velocity distribution in Section 15 is stable with limited variation, and all clusters fall within the theoretical wave velocity range, which confirms the reliability of the wave velocity extraction process. Table 8Statistical results of wave velocity for each perforation cluster in segment 15.cluster_idnmean(m/s)std(m/s)distance(m)161541.87469.5144459.000261543.10640.7184459.000351553.22428.58944459.000461544.63348.2794459.000561546.33055.3824459.000661548.07654.8294459.000771532.24169.7334459.000 Statistical results of wave velocity for each perforation cluster in segment 15. Table 9 summarizes the wave velocity results for each cluster in segment 18. Similar to segment 15, the average wave velocities in segment 18 are mainly concentrated within the range of 1530 to 1555 m/s, with only small variations among clusters. Cluster 1 exhibits the largest standard deviation, indicating relatively larger fluctuations in echo identification within this cluster. Cluster 3 shows the highest average wave velocity and, consistent with segment 15, remains one of the most stable clusters in terms of wave velocity within the segment. Overall, the cluster level results for segment 18 maintain good concentration, with the mean values of all clusters falling close to the theoretical wave velocity range and no obvious abnormal clusters observed. Table 9Statistical results of wave velocity for each perforation cluster in segment 18.cluster_idnmean(m/s)std(m/s)distance(m)161530.04893.5754244.000261551.93767.2854244.000361554.26753.3534244.000471542.52964.3954244.000571544.33260.4934244.000671546.44371.2844244.000771546.41389.6204244.000 Statistical results of wave velocity for each perforation cluster in segment 18. Discussion Statistical consistency and stability analysis Figure 25 shows the box plots of wave speed for each perforation cluster in Segment 15 and Segment 18. The medians of wave speed in both segments are stably distributed between 1530 and 1555 m/s, and the difference between segments is very small, which indicates good overall consistency of propagation speed among different perforation segments. The box heights in both segments are generally small, and the interquartile ranges are concentrated, which indicates stable identification of echo intervals and low dispersion of wave speed within each cluster. A few clusters show slightly longer whiskers, which reflects locally weaker echo amplitude or the influence of changes in wellbore conditions, but the number of outliers is very small and the wave speed values still fall within the theoretical speed range. Box plot of wave speed for perforation clusters. This study uses four statistical indicators, including mean, variance, root mean square error, and kurtosis, to perform a multi dimensional evaluation of wave speed for each cluster, as shown in Fig. 26. The mean represents the central level of wave speed and is a key metric for evaluating consistency between different stages. Variance and root mean square error jointly describe the stability of wave speed and the overall level of fluctuation. Kurtosis is used to identify sharp peak distributions or abnormal values. Statistical radar plots for each perforation cluster. Through analysis of statistical radar plots for each perforation cluster in segment 15 and segment 18, it can be observed that cluster level wave speeds in both stages show highly consistent overall patterns across mean, root mean square error, variance, and kurtosis, with only a few clusters showing normal level variation in variance and kurtosis. The overall shapes of the radar plots for the two segments largely overlap, indicating that the statistical characteristics of wave speed remain highly consistent across different perforation segments, which reflects the stability and robustness of the proposed echo identification and wave speed calculation method when applied across segments. Combined with the theoretical range of wave speed described earlier, the cluster level wave speeds extracted from both segments fall within the theoretical limits, which further verifies the accuracy and physical validity of the proposed method. Figure 27 shows the coefficients of variation of wave speed for each cluster in segment 15 and segment 18. It can be seen that the coefficients of variation for segment 15 are mainly within the range of 2 to 4%, whereas those for segment 18 are slightly higher overall and mostly fall within the range of 3 to 5%. Although some clusters show relatively higher coefficients of variation, the overall level remains low, which indicates good consistency of echo wave speed within each cluster. Coefficients of variation of wave speed for each cluster. Comparison with the conventional method Water hammer period method Water hammer period method To verify the reliability of the wave velocity calibration results, a comparison was carried out under the same well section and the same field conditions. The method proposed in this study inverts the wave velocity by extracting the propagation time delay from the echoes of transient pressure waves generated by perforation excitation, whereas the water hammer period method estimates the wave velocity from the dominant period of the decaying oscillation of the liquid column under water hammer conditions. The two methods involve different excitation mechanisms and signal forms, and therefore they use different characteristic quantities and formula expressions. However, both methods share the same well section geometric scale and the same in situ medium and boundary conditions, which allows their velocity estimates to be compared in terms of consistency and stability within the same well section. For the water hammer pressure data, a time window corresponding to the quasi-periodic oscillation after the impact was first selected (Fig. 28). The sequence of peak times was then picked using the point marking method18, as shown in Fig. 29. Based on the water hammer period relation reported in the literature, the estimated wave velocities and their statistical indicators are presented in Tables 10 and 11. Pressure treatment curve. Water hammer period determined by the point marking method. Table 10Wave velocity calculated from the water hammer method for Segment 15.IDStart_time(s)Peak_time(s)Interval(s)Velocity(m/s)1–13.355––213.35525.6312.2751453.035325.6337.40611.7761514.606437.40650.08112.6751407.179550.08161.85711.7761514.606661.85774.33212.4751429.739774.33286.30711.9751489.436886.30799.08212.7751396.164999.082110.65811.5761540.77410110.658123.63212.9741374.74911123.632135.30811.6761527.57812135.308147.88312.5751418.37013147.883161.05613.1731353.982 Wave velocity calculated from the water hammer method for Segment 15. Table 11Wave velocity calculated from the water hammer method for Segment 18.IDStart_time(s)Peak_time(s)Interval(s)Velocity(m/s)1–15.774––215.77427.04011.2661506.835327.04037.33110.2911649.597437.33148.86311.5321472.078548.86359.24210.3791635.610659.24270.41911.1771518.833770.41980.97610.5571608.033880.97692.24211.2661506.835992.242102.26610.0241693.53610102.266114.15311.8871428.11511114.153124.62110.4681621.70412124.621136.33111.711449.701 Wave velocity calculated from the water hammer method for Segment 18. Table 12 summarizes the statistical results of wave velocity estimated from perforation pressure and from water hammer pressure under the same well section conditions for Segment 15 and Segment 18, including the mean, standard deviation, and coefficient of variation. It can be seen that the wave velocities obtained by the two methods are of the same order of magnitude in both segments, but differences exist in their mean values and degrees of dispersion. This difference is related to the different excitation mechanisms and signal characteristics of the two types of data: the perforation-based method relies on the travel time delay of transient echoes, whereas the water hammer method relies on the extraction of the period of decaying quasi-periodic oscillations. The wave velocity estimates obtained by the proposed method show lower dispersion, with CV values of 3.3% and 4.6%, respectively, indicating that this method has good stability and consistency under perforation conditions. Table 12Comparison of wave velocity estimates from perforation pressure and water hammer pressure.MethodMean(m/s)Std (m/s)CV(100%)Segment 15 perforation1544.21252.4353.3%Segment 15 water-hammer1451.68564.0754.4%Segment 18 perforation1545.13871.4294.6%Segment 18 water-hammer1553.71690.4195.8% Comparison of wave velocity estimates from perforation pressure and water hammer pressure. (2)Cross-correlation method Cross-correlation method In this study, the cross-correlation method was introduced as the second comparison scheme. Table 13 summarizes the wave velocity statistics obtained by the cross-correlation method for Segment 15 and Segment 18, and compares them with those obtained by the proposed method. It can be seen that the mean wave velocities obtained by the cross-correlation method are generally lower, and their dispersion is larger. Table 13Comparison of wave velocity statistics between the perforation-based method and the cross-correlation method.MethodMean(m/s)Std (m/s)CV(100%)Segment 15 perforation1544.21252.4353.3%Segment 15 Xcorr1327.322111.5818.4%Segment 18 perforation1545.13871.4294.6%Segment 18 Xcorr1235.47670.5815.7% Comparison of wave velocity statistics between the perforation-based method and the cross-correlation method. Analysis of distribution patterns and propagation mechanisms Although the wavefield generated by perforation may contain multiple propagation modes, the observable quantity under the wellhead pressure recording conditions considered in this study mainly reflects the response of wellbore fluid pressure perturbations. Therefore, the multimodality discussed in this paper should be understood as the statistical stratification of equivalent propagation time delays in the wellhead pressure signal, rather than as a strict separation and one-to-one attribution of guided waves, casing waves, or formation-coupled modes. On this basis, kernel density estimation is used to characterize the distribution of equivalent wave velocities, and its possible relationship with different reflection paths or coupling processes is discussed. Figure 30 presents the kernel density distributions of wave speed samples for each perforation cluster in segment 15. The figure shows that the wave speed distributions of different perforation clusters do not strictly follow a single peak pattern, but instead exhibit double peaks or clear shoulder peaks in several clusters. One group of wave speed peaks is concentrated in a higher wave speed range, while another group of peaks is distributed in a relatively lower wave speed range. KDE density curves of wave velocity for each cluster in segment 15. Further comparison among perforation clusters shows that although the sample size and distribution shape differ among clusters, the high and low wave speed features can be repeatedly identified in multiple clusters, which indicates that the double peak structure is not caused by abnormal samples from a single cluster, but reflects a certain level of statistical stability. Similar distribution characteristics are also observed in the KDE results of each perforation cluster in segment 18, as shown in Fig. 31. Compared with segment 15, most cluster KDE curves in segment 18 show a clearer bimodal shape, in which the secondary peak has a higher amplitude and a more distinct separation from the primary peak, and in some clusters the two peaks are even relatively close to each other. The consistency in peak locations and distribution patterns between the two segments indicates that this multimodal wave velocity feature has a certain level of repeatability across different segments. KDE density curves of wave velocity for each perforation cluster in segment 18. To describe the multi modal features in the wave speed distribution of each perforation cluster in a quantitative manner, the locations of the main peak and the secondary peak in the KDE of each cluster were extracted and summarized, as shown in Table 14. The results show that the main peak identified in different perforation clusters is concentrated in a higher wave speed range, whereas the secondary peak is consistently located in another lower wave speed range, and the two types of peak values do not show clear numerical overlap. From the perspective of variation among clusters, the variation range of the same type of peak across different perforation clusters is relatively limited, and the wave speed difference between the main peak and the secondary peak remains within a similar range for all clusters, which further indicates that these two wave speed features do not correspond to random noise but to two propagation processes with stable differences in scale. Table 14Statistical results of the KDE main peak and secondary peak positions for each perforation cluster.Segment IDcluster_idpeak1_x(m/s)peak1_ypeak2_x(m/s)peak2_y1511575.25290.00491471.78040.003221567.88340.00941496.06980.004931566.24850.01531505.62770.004041573.93840.00771492.83470.004251577.62040.00661486.15370.003661578.23170.00651488.99360.003771574.31480.00471476.23400.00351811580.26980.00401413.93940.001921586.48240.00531474.94200.002931587.46880.00711492.32730.003741590.87880.00521481.06960.003951590.46040.00551485.30640.004261601.73200.00471474.96540.003671610.29710.00361465.85940.0028 Statistical results of the KDE main peak and secondary peak positions for each perforation cluster. Based on the statistical results of the main peak and secondary peak positions from the KDE of each perforation cluster, the two types of wave velocity features identified in different perforation clusters are compared across clusters, as shown in Figs. 32 and 33. It can be observed that two types of equivalent wave velocity positions can be identified simultaneously in different perforation clusters, and they form a clear two layer distribution structure across clusters. Two stable wave propagation paths identified in different perforation clusters in segment 15. Two stable wave propagation paths identified in different perforation clusters in segment 18. It should be noted that although a unified plug distance is used as the geometric reference scale in the wave velocity calculation, the differences in equivalent wave velocity originate from differences in echo arrival time characteristics. The actual propagation process of the perforation impact wave in the wellbore may involve different reflection interfaces and propagation modes, which leads to systematic differences in echo arrival times. After normalization using a fixed distance, these arrival time differences statistically manifest as two stable ranges of equivalent wave velocity. Considering the wellbore structural features, the high velocity feature is more likely associated with a dominant propagation path formed by strong reflecting interfaces such as bridge plugs, whereas the low velocity feature is more likely related to secondary reflection processes near the perforation location or to coupled propagation between the wellbore and fractures, which shows weaker reflection strength and lower stability. To verify the velocity distribution features from an overall statistical perspective, velocity samples from all perforation clusters are combined, and kernel density estimation analysis is applied to the merged samples, as shown in Fig. 34. The results indicate that the overall velocity distribution shows a clear two peak structure rather than a single peak pattern. The locations of these two peaks are consistent with the primary peak and secondary peak ranges identified in single cluster and cross cluster analyses, which indicates that the two types of equivalent velocity features show strong consistency at the overall statistical level and further confirms the existence of at least two stable wave propagation paths within the wellbore at the full sample scale. Kernel density estimation curves of wave velocity for perforation clusters. To explain the bimodal feature observed in the KDE distribution of equivalent wave speed, Fig. 35 presents a schematic diagram of possible multi path propagation of perforation shock waves inside the wellbore. In the schematic diagram, Path A represents the main propagation path dominated by strong reflection interfaces such as the bridge plug, while Path B represents a propagation path related to secondary reflection near the perforation location or to coupling between the wellbore and fractures. Because the echo arrival times differ for the two paths, normalization with a fixed bridge plug distance leads to different ranges of equivalent wave speed. Schematic diagram of multi path propagation of perforation pressure waves. This study uses the high-frequency transient pressure response recorded by a wellhead pressure sensor, which is more sensitive to perturbations in wellbore fluid pressure. Therefore, the wave velocity calibrated in this paper is defined as the effective pressure-wave speed under wellhead pressure recording conditions, which mainly reflects propagation characteristics dominated by fluid pressure waves. We do not perform strict modal separation of the complex wavefield, although weak modal mixing and weak dispersion may still affect the local waveform. Conclusions This study addresses the difficulty of wave speed calibration in transient wellbore pressure signals during perforation operations. An automatic calibration method for wellbore pressure wave speed based on perforation impact is proposed. The accuracy and stability of the method are systematically verified using both theoretical models and field data. The main conclusions are summarized as follows: A new automatic calibration method for perforation impact wave speed is established. A multi stage preprocessing scheme that includes detrending, Savitzky-Golay smoothing, and Butterworth filtering significantly improves baseline stability and signal to noise ratio. An adaptive peak and trough detection and wave separation strategy enables high accuracy automatic identification of the main impact wave and multiple reflected waves, which overcomes the subjectivity and instability of manual picking. A new automatic calibration method for perforation impact wave speed is established. A multi stage preprocessing scheme that includes detrending, Savitzky-Golay smoothing, and Butterworth filtering significantly improves baseline stability and signal to noise ratio. An adaptive peak and trough detection and wave separation strategy enables high accuracy automatic identification of the main impact wave and multiple reflected waves, which overcomes the subjectivity and instability of manual picking. A visual system for wave speed calculation is developed with good user interaction and field applicability. The system is built using the Python language and the PyQt graphical interface framework. It provides graphical and interactive execution of the wave speed calibration process, which effectively reduces subjective judgment and operational complexity, and offers a reliable tool for rapid field analysis of wellbore pressure wave speed. A visual system for wave speed calculation is developed with good user interaction and field applicability. The system is built using the Python language and the PyQt graphical interface framework. It provides graphical and interactive execution of the wave speed calibration process, which effectively reduces subjective judgment and operational complexity, and offers a reliable tool for rapid field analysis of wellbore pressure wave speed. The method demonstrates high accuracy and strong robustness in theoretical models. In the convolution model, the error between the extracted echo intervals and the preset values remains at the millisecond level. In the water hammer model, the identified multiple reflection periods are highly consistent with the theoretical round trip travel time, with relative errors below 0.2 percent, which confirms the time extraction capability and wave speed calibration accuracy of the algorithm. The method demonstrates high accuracy and strong robustness in theoretical models. In the convolution model, the error between the extracted echo intervals and the preset values remains at the millisecond level. In the water hammer model, the identified multiple reflection periods are highly consistent with the theoretical round trip travel time, with relative errors below 0.2 percent, which confirms the time extraction capability and wave speed calibration accuracy of the algorithm. Field perforation data verification shows that the method exhibits good consistency and stability across different perforation stages and perforation cluster scales. For the data from Stage 15 and Stage 18, the identified reflected wave structures are clear and the time intervals are stable. The wave speeds of all clusters are mainly distributed between 1530 and 1555 m/s. The coefficient of variation within clusters is generally below 5 percent, and the average wave speed difference between clusters within a stage is less than plus or minus 15 m/s. In addition, the wave speed statistical distribution at the cluster scale shows stable multimodal features, which indicates that perforation impact waves may propagate along multiple paths in the wellbore and reflects the complexity of the wellbore pressure wave propagation process. Field perforation data verification shows that the method exhibits good consistency and stability across different perforation stages and perforation cluster scales. For the data from Stage 15 and Stage 18, the identified reflected wave structures are clear and the time intervals are stable. The wave speeds of all clusters are mainly distributed between 1530 and 1555 m/s. The coefficient of variation within clusters is generally below 5 percent, and the average wave speed difference between clusters within a stage is less than plus or minus 15 m/s. In addition, the wave speed statistical distribution at the cluster scale shows stable multimodal features, which indicates that perforation impact waves may propagate along multiple paths in the wellbore and reflects the complexity of the wellbore pressure wave propagation process. The proposed method provides a foundation for fracturing diagnosis and post fracturing evaluation. The automatically calibrated wave speed results can be further used for coupled modeling of perforation, wellbore, and formation systems, as well as for inversion of fracture initiation depth, which supports intelligent fracturing monitoring and real time acoustic diagnosis. The proposed method provides a foundation for fracturing diagnosis and post fracturing evaluation. The automatically calibrated wave speed results can be further used for coupled modeling of perforation, wellbore, and formation systems, as well as for inversion of fracture initiation depth, which supports intelligent fracturing monitoring and real time acoustic diagnosis. Acknowledgements The authors would like to express their sincere gratitude to the Research and Development Center of the Downhole Service Company, CNPC Chuanqing Drilling Engineering Company Limited, for their strong support and valuable assistance throughout the course of this research. Author contributions WANG Xingming conceived the research idea, designed the overall methodology, established the theoretical model, and was responsible for the main writing and revision of the manuscript. YANG Yuanyuan participated in the theoretical derivation, numerical analysis, and data processing. WANG Qiaozhu contributed to the finite element simulation, experimental design, and result analysis. HE Bin provided guidance on the research framework, supervised the study, and contributed to manuscript review and improvement. All authors have read and approved the final manuscript. Funding This work was funded by the National Science and Technology Major Project (Grants No. 2025ZD1008303), the National Natural Science Foundation of China (Grants No. 52327803, 52204006), Sichuan Science and Technology Program (2026NSFSC0342), the National Natural Science Foundation of China (52204006, 52327803), the National Key Research and Development Program of China (2023YFE0110900, 2023YFF0614102), the Key Research and Development Project of Sichuan Province (Grants No.2022YFG0244), and the Tianfu Yongxing Laboratory Organized Research Project Funding (NO.2023KJGG13), and by China Postdoctoral Science Foundation (NO.2022M723399). Data availability The data that support the findings of this study are available from the corresponding author upon reasonable request. Declarations Competing interests The authors declare no competing interests. Ethics approval and consent to participate This study does not involve human participants, human tissue, or personal data. Therefore, ethical approval and informed consent are not required. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The data that support the findings of this study are available from the corresponding author upon reasonable request.