Dynamic Numerical Simulation and Transfer Learning-Based Rapid Rock Identification during Measurement While Drilling (MWD)

: In constructing rapid rock identification models for measurement while drilling (MWD) via neural network methods, collecting actual drilling data to train the model is extremely time-consuming and labor-intensive. This requires extensive drilling experiments in various rock types, resulting in limited neural network training data for rock identification that covers a limited range of rock types. To suitably address this issue, a dynamic numerical simulation model for rock drilling is established that generates extensive drilling data. The input parameters for the simulations include torque, drill bit rotation speed, and drilling speed. A neural network model is then developed for rock classification using large datasets from dynamic numerical simulations, specifically those of granite, limestone, and sandstone. Building upon this model, transfer learning is appropriately applied to store the knowledge obtained in the rock identification based on the neural network model. Further training through transfer learning is conducted with smaller datasets obtained during actual drilling, making the model suitable for practical rock identification and prediction in the drilling processes. The neural network rock classification model, incorporating dynamic numerical simulation and transfer learning, achieves a prediction accuracy of 99.36% for granite, 99.53% for sandstone, and 99.82% for limestone. This reveals an enhancement in prediction accuracy of up to 22.94% compared to the models without transfer learning.


Introduction
In the field of engineering geological surveying, drilling is the most commonly utilized approach; nevertheless, drilling results are primarily employed for stratigraphic logging and the preparation of rock core samples for laboratory-based testing.Commonly, laboratory-based physical and mechanical property tests are labor-intensive and timeconsuming.Martins et al. [1] indicated that the average cost of drilling may reach over USD 100 per meter drilled.During the drilling process, not much information about geotechnical properties remains underutilized.By employing measurement while drilling (MWD) to collect data and establish a quantitative relationship between the MWD data and the geotechnical properties, a larger volume of geotechnical sample data can be obtained, which substantially enhances the efficiency of advanced geological surveying.Horner and Sherrell pioneered the use of MWD technology in 1977 to evaluate layers and rock quality [2].The subsequent extensive and valuable explorations by many scholars are indicative of the exploitation of MWD technology to examine challenges such as rock layer boundary detection [3,4], mud logging [5], foundation strengthening [6,7], identification of weak layers [8], and rock mass engineering classification [9].
In recent industrial applications, many geological surveying equipment companies have developed MWD systems to address geotechnical survey issues.The main systems include: the MWD module of the RPD series drilling rig by Japan's KOKEN Company [10], used for predicting geological conditions ahead, such as the hardness of strata, cavities, spatial distances, and water inflow; this system is extensively employed in tunnel engineering; the DEFI geological prediction system by France's JEAN LUTZ Company [11], which can be integrated into various multifunctional drilling rigs for predicting rock layer geological conditions; and the EXPLOFOR system by France's Apageo Company [12], which collects drilling parameters to analyze geotechnical profile information.However, despite their advantages, MWD systems also present notable disadvantages.These include complexity and reliability issues, challenges in data interpretation, and susceptibility to interference from other electronic devices and natural sources.Generally, the cost of MWD systems is high, particularly when integrated into multifunctional drilling rigs, making it challenging to directly apply them to ordinary drilling rigs.Additionally, these commercial products can only determine relative hardness and detect cavities and water inflows.
There are three common methods to identify geotechnical properties based on MWD.The first approach involves analyzing the rock failure mechanism of the drilling rig to seek a quantitative relationship between the MWD data and the geotechnical properties.The second approach is essentially based on the statistical analysis of MWD data to suitably realize the relationships between various geotechnical properties and drilling parameters.The last approach utilizes machine learning techniques to discover correlations between the MWD data and the geotechnical properties.
In researching the rock mechanisms of drilling rigs, many investigators have examined the composition of the energy required for drilling to comprehend the relationship between the MWD data and the drilling energy.Teale [13] introduced the concept of rock drilling specific energy, which is influenced by various factors, such as thrust, torque, rotation speed, unconfined rock compressive strength, and drill bit.He demonstrated that the specific energy of rock drilling is closely related to the rock properties.Following Teale's research, several scholars conducted further investigations.For instance, Simon [14] proposed the exploitation of a mechanical specific energy index, which is based on the drilling energy analysis, to measure drilling efficiency.Hoberrock et al. [15] corroborated the relationship between the drilling specific energy and the rock strength.Hamrick [16] improved the calculation method used for drilling specific energy by appropriately adjusting the weight of the drill bit parameters.Finfinger et al. [17,18] utilized drilling parameters (i.e., thrust, torque, drilling speed, and rotational speed) to perform a series of tests on the characteristics of roof rocks, including fractures, joints, voids, rock layer boundary positions, and rock strength.They employed drilling energy to determine the average unconfined compressive strength.Manzoor et al. [19] examined the relationship between structural data from close-range terrestrial digital photogrammetry and MWD data to characterize rock mass structures.They found that MWD parameters showed significant changes in response to geological features, such as open joints or cavities, providing a method to correlate drilling parameters with rock mass structures.Prasad et al. [20] presented an innovative method for real-time downhole drilling data to identify formation strengths and facies.This method utilizes MWD data to infer rock strength and variability along the wellbore.Bout et al. [21] integrated physics-based observers into MWD systems to estimate bit speed and torque using current and voltage measurements.Their suggested approach demonstrated a strong correlation between MWD data and rock strength properties.
In a statistical analysis of MWD data, Schunnesson et al. [22,23] adopted principal component analysis (PCA) to examine and identify geotechnical conditions based on the drilling parameters, such as drill length, torque pressure, drilling speed, rotational speed, thrust, and percussive pressure.Navarro et al. [24] applied a normalization approach for MWD parameters for a series of data removal and correction analyses, predicting potential collapse zones in tunnel blasts.The obtained results indicated that the MWD data in discontinuous rock masses could display noticeable noise signals that can be utilized in predicting the occurrence of rock voids and fractures.Van Eldert et al. [25] used MWD data to predict rock mass conditions in tunneling, correlating these data with rock mass characteristics using multilinear regression and visual approaches.They demonstrated that MWD data could be used to support rock mass classification and rock support requirements.Lakshminarayana et al. [26] developed a mathematical model to predict uniaxial compressive strength using MWD data.Their model showed promise for estimating rock strength properties based on thrust and torque values collected during drilling.Khoshouei and Bagherpour [27] analyzed acoustic and vibration signals during drilling to predict the geomechanical properties of hard rocks.Their study provided a method for non-destructive, real-time prediction of rock properties using these signals.
MWD data generally show considerable randomness, making it challenging to establish relationships between drilling parameters and rock properties through simple statistical analysis.To examine the complex correspondence between the MWD data and geotechnical properties, therefore, many investigators have incorporated machine learning methods into their research and achieved remarkable results in identifying geotechnical properties during drilling.By adopting the neural networks method, Asadi [28] proceeded with predicting the uniaxial compressive strength of formation rocks in oil fields.Based on laboratory experiments, LaBelle et al. [29] classified lithology using neural network analysis methods and achieved an accuracy rate of 95.5% in stratigraphic identification.By utilizing Gaussian processes and unsupervised clustering approaches based on the MWD data, Zhou et al. [30] could classify suitable rock types.A method based on unsupervised learning was proposed to analyze drilling specific energy and thereby optimize the drilling speed.Klyuchnikov et al. [31] compared various machine learning algorithms for the classification of rock layer types based on borehole data and achieved a maximum classification accuracy of 91%.Vezhapparambu et al. [32] employed multiple methods, including multivariate analysis and advanced machine learning algorithms, to distinguish different lithologies.By adopting machine learning and gradient-boosted decision trees, Romanenkova et al. [33] classified rock layer types based on the MWD data.Fang et al. [34] developed a prediction model based on neural networks and genetic algorithms to predict geological conditions in tunnel excavation, indicating that the suggested methodologies could effectively predict geological conditions, with the accuracy of the predictions increasing as the volume of rock geological data increased.Cheng et al. [35] proposed a BILSTM-based deep neural network for rock mass classification using MWD data, exhibiting high accuracy in predicting rock mass classification and outperforming other machine learning models.Gupta et al. [36] developed a machine learning-based workflow for real-time geosteering by predicting lithology at the bit using MWD variables.This method improved the accuracy of lithology predictions significantly, aiding in cost and time savings during drilling operations.Amadi et al. [37] employed machine learning techniques for real-time prediction of rock properties, such as unconfined compressive strength (UCS), using drilling parameters.Their models achieved high accuracy in predicting UCS, which is critical for drilling performance and wellbore stability.
Research conducted by numerous investigators shows that drilling parameters, including drilling speed, torque, thrust, and rotational speed, measured during the drilling process can be effectively utilized to suitably identify rock.However, the geological conditions at engineering sites are commonly complex.Many factors influence test data, and theoretical drilling models, often based on numerous assumptions, have only been validated under ideal laboratory conditions.Commonly, machine learning-based algorithms lead to good prediction results in MWD data analysis, but the extensive data required for training models affects their practicality.In real-world applications, obtaining sufficient MWD data along with accurate calibration data for rock specimens requires considerable human and time resources.Actually, collecting extensive MWD training data covering a broad range of rock types and diverse drilling scenarios is among the major challenges.
Numerical simulation methods are able to effectively simulate the interactions between the drill bit and the rock during the rock breaking process in drilling rigs, obtain comprehensive experimental data, and provide significant support for rock identification tasks via machine learning methods.Up till now, several scholars have performed dynamic numerical simulations of the drilling process.Chiang and Elias [38] developed a 3D finite element simulation method, which was able to simulate the energy transfer during rock breaking by the drill bit and its interaction with the rock.Liu et al. [39] investigated the rock fracture mechanism caused by drills through numerical simulation and derived a formula to evaluate the extension length of the lateral crack after forming the rock crushing zone under the cutter.Saksala et al. [40] introduced a numerical approach for continuous simulations of the interaction process during rock failure by impact drill bits and rock mass, validating the reasonableness of complex constitutive models that include plastic compression, as well as viscoplastic shear and tensile damage.Han et al. [41] developed a nonlinear dynamic model of the drill string-bit-rock coupling system, which captures the real-time coupling vibrations of the drill string-bit system.This model provides a new approach for studying the drill string-bit interaction and optimizing drilling processes.Zhang et al. [42] used a 3D numerical model to examine the interaction between mesh-like cutting PDC bits and rock, improving the reliability of the bit-rock interaction model through indoor drilling experiments.Houshmand et al. [43] utilized three-dimensional continuum modeling to predict drill bit wear, demonstrating the effect of various parameters like rock type and bit material on wear depth.
This brief survey of the literature reveals that constructing suitable numerical simulation models that reflect the actual process of rock failure in drilling rigs and collecting data such as torque and drilling speed through dynamic simulations is of grave significance.By adopting machine learning algorithms, the development of rock strength parameter identification models will be then effectively facilitated.Utilizing the extensive MWD data obtained from simulations, these models can effectively overcome the challenges of limited test data and model applicability in geotechnical engineering MWD tests.This approach is anticipated to substantially enhance the efficiency of geotechnical property identification and to conquer the lengthy cycles and high costs associated with traditional rock mechanics tests.
In the present investigation, a self-developed miniature laboratory MWD system is employed to conduct laboratory drilling tests on typical rocks, during which data such as torque, drill bit, and drilling speed were appropriately collected through sensors.Suitable simulation models for both the drill bit and the rock are established.Utilizing the results of these laboratory tests, the elastoplastic dynamic numerical simulation experiments of the drilling process in the presence of various confining pressures are performed using ANSYS/LS-DYNA 2022R1 software.The response data are then monitored during the drilling process and compared with the results from laboratory tests to calibrate the numerical simulation model.With the calibrated model, numerical simulations of the drilling process in typical rock masses are carried out to obtain extensive MWD data.Through transfer learning methods, the knowledge obtained from solving rock identification tasks is stored in the dynamic numerical neural network model.The model is then further trained using small-sample drilling data obtained during actual drilling, making it suitable for practical rock identification and prediction tasks in the drilling process.
The study introduces a novel approach to rock identification during MWD by integrating dynamic numerical simulations with transfer learning techniques.It enhances the availability and diversity of training data for rock identification models in MWD.Traditional methods rely heavily on extensive field experiments, which are both time-consuming and costly.The dynamic numerical simulation model generates a large volume of training data under various drilling conditions and rock types, thus providing a more diverse and comprehensive dataset than that which can be typically achieved through field experiments alone.By employing transfer learning, the study leverages the extensive simulated data to train the neural network model and then refine it with smaller, real-world datasets.This significantly enhances the model's practical applicability and prediction accuracy, making it more suitable for real-world drilling operations.

Laboratory MWD Platform
The laboratory rock drilling experiments were conducted using a self-developed miniature MWD system.This system appropriately controls the drilling by adjusting rotation and advancement, and by using sensors, the aim is to extract real-time data of various parameters, including thrust, torque, rotation speed, and drilling speed.When drilling in rock and soil samples, parameters such as drilling speed, bit rotation speed, and drill rod torque and thrust can be controlled.This system allows the implementation of the following four distinct combined control modes: constant drilling speed-constant rotational speed mode; constant drilling speed-constant torque mode; constant thrustconstant rotational speed mode; and constant thrust-constant torque mode.The key components of the laboratory MWD system include a servo-controlled drilling system, a servo-controlled confining pressure system, a drilling parameter acquisition system, and a control system (Figure 1).The main technical parameters of the laboratory MWD system are presented in Table 1.The platform, equipped with torque and rotational speed sensors, drill pressure sensors, confining pressure sensors, and drilling speed sensors, continuously gathers drilling parameters in real time.The details of these sensors are presented in Table 2.The laboratory rock drilling experiments were conducted using a self-developed miniature MWD system.This system appropriately controls the drilling by adjusting rotation and advancement, and by using sensors, the aim is to extract real-time data of various parameters, including thrust, torque, rotation speed, and drilling speed.When drilling in rock and soil samples, parameters such as drilling speed, bit rotation speed, and drill rod torque and thrust can be controlled.This system allows the implementation of the following four distinct combined control modes: constant drilling speed-constant rotational speed mode; constant drilling speed-constant torque mode; constant thrust-constant rotational speed mode; and constant thrust-constant torque mode.The key components of the laboratory MWD system include a servo-controlled drilling system, a servocontrolled confining pressure system, a drilling parameter acquisition system, and a control system (Figure 1).The main technical parameters of the laboratory MWD system are presented in Table 1.The platform, equipped with torque and rotational speed sensors, drill pressure sensors, confining pressure sensors, and drilling speed sensors, continuously gathers drilling parameters in real time.The details of these sensors are presented in Table 2.

Laboratory MWD Method
The drilling experiments employed a three-winged, three-nozzle, flat-toothed, impregnated diamond core drill bit, with an outer diameter of 32 mm, an inner diameter of 24 mm, and a nozzle spacing of 6 mm, as demonstrated in Figure 2. The present study conducted laboratory drilling tests on three types of rock samples: granite, sandstone, and limestone (Figure 3).The samples were cube-shaped with dimensions of 100 mm × 100 mm × 100 mm and had smooth and intact surfaces without visible cracks.Uniaxial compression tests were performed on cylindrical standard samples made The present study conducted laboratory drilling tests on three types of rock samples: granite, sandstone, and limestone (Figure 3).The samples were cube-shaped with dimensions of 100 mm × 100 mm × 100 mm and had smooth and intact surfaces without visible cracks.Uniaxial compression tests were performed on cylindrical standard samples made from the same batch of rocks using a rock mechanics testing (RMT) machine (Figure 4).For this purpose, the samples were placed in the center of the press platen, and the pressure plate was adjusted with a spherical seat to ensure that the samples were pressed uniformly.The control mode was displacement loading with a loading rate of 0.0020 mm/s until specimen failure.Each test set was repeated at least three times, and the mechanical parameters of the three types of rocks were obtained, as illustrated in Table 3.
Processes 2024, 12, x FOR PEER REVIEW 8 of 34 from the same batch of rocks using a rock mechanics testing (RMT) machine (Figure 4).For this purpose, the samples were placed in the center of the press platen, and the pressure plate was adjusted with a spherical seat to ensure that the samples were pressed uniformly.The control mode was displacement loading with a loading rate of 0.0020 mm/s until specimen failure.Each test set was repeated at least three times, and the mechanical parameters of the three types of rocks were obtained, as illustrated in Table 3.Multiple drilling tests were conducted in constant drilling speed-constant speed mode on three types of rock samples.The basic parameters of the drilling tests are shown in Table 4.The types of rocks used for the drilling tests were the same as those of the compression tests, all of which were obtained from the same batch and location.In each  from the same batch of rocks using a rock mechanics testing (RMT) machine (Figure 4).For this purpose, the samples were placed in the center of the press platen, and the pressure plate was adjusted with a spherical seat to ensure that the samples were pressed uniformly.The control mode was displacement loading with a loading rate of 0.0020 mm/s until specimen failure.Each test set was repeated at least three times, and the mechanical parameters of the three types of rocks were obtained, as illustrated in Table 3.Multiple drilling tests were conducted in constant drilling speed-constant speed mode on three types of rock samples.The basic parameters of the drilling tests are shown in Table 4.The types of rocks used for the drilling tests were the same as those of the compression tests, all of which were obtained from the same batch and location.In each  Multiple drilling tests were conducted in constant drilling speed-constant speed mode on three types of rock samples.The basic parameters of the drilling tests are shown in Table 4.The types of rocks used for the drilling tests were the same as those of the compression tests, all of which were obtained from the same batch and location.In each drilling experiment, the drilling depth (D) was continuously set at 100 mm, and the fixed drill rotation speed (N) was set at three different levels: 400, 600, and 800 RPM.For the granite drilling experiments, the constant drilling speed (v) was set at a variable rate from 5 to 40 mm/min, while for limestone and sandstone, the constant drilling speed (v) was set at a variable rate from 20 to 40 mm/min.During drilling, the MWD data were collected at 1 s intervals, and parameters such as torque, actual drilling speed, and actual rotational speed during drilling were recorded.

Construction of Dynamic Numerical Simulation Model
In this study, the initial stage involves constructing a drill bit model of the same dimensions as those used in the laboratory MWD experiments, based on the actual engineering drawings of the diamond core drill bit, using SolidWorks 2021 software (see Figure 5).The model was then imported into ANSYS 2022R1 Workbench, where the drill bit model was simplified using SpaceClaim 2022R1 and meshed using the LS-PrePost 4.7.7 platform in LS-Dyna 2022R1 (Figure 6).To save CPU computation time for dynamic numerical simulation, only the drilling part of the bit was taken, and it was assumed that the bit did not deform during drilling.The drilling material was defined as rigid body material, the so-called MAT_RIGID.The drilling speed of the bit in the vertical direction was defined using the keyword PRESCRIBED_MOTION_RIGID, with the specific parameters provided in Table 5.The model was then imported into ANSYS 2022R1 Workbench, where the drill bit model was simplified using SpaceClaim 2022R1 and meshed using the LS-PrePost 4.7.7 platform in LS-Dyna 2022R1 (Figure 6).To save CPU computation time for dynamic numerical simulation, only the drilling part of the bit was taken, and it was assumed that the bit did not deform during drilling.The drilling material was defined as rigid body material, the so-called MAT_RIGID.The model was then imported into ANSYS 2022R1 Workbench, where the drill bit model was simplified using SpaceClaim 2022R1 and meshed using the LS-PrePost 4.7.7 platform in LS-Dyna 2022R1 (Figure 6).To save CPU computation time for dynamic numerical simulation, only the drilling part of the bit was taken, and it was assumed that the bit did not deform during drilling.The drilling material was defined as rigid body material, the so-called MAT_RIGID.The drilling speed of the bit in the vertical direction was defined using the keyword PRESCRIBED_MOTION_RIGID, with the specific parameters provided in Table 5.The drilling speed of the bit in the vertical direction was defined using the keyword PRESCRIBED_MOTION_RIGID, with the specific parameters provided in Table 5.The rotational speed of the bit in the axial direction was defined using the keyword PRESCRIBED_MOTION_RIGID, with the specific parameters given in Table 6.Using LS-Dyna, a rock block was constructed and meshed for dynamic numerical simulation of MWD (Figure 7).To improve the CPU computation time of the dynamic numerical model and reduce the mesh data, the rock block was constructed in a cylindrical shape, with the actual contact area with the drill bit being the brown area, as illustrated in Figure 7.The height and radius of the rock block were, respectively, set as 9 cm and 23 cm.

DOF †
VAD SF DEATH BIRT 3 (z-translational DOF) 2 (displacement) 1 0 0 † Note: DOF stands for applicable degrees of freedom; VAD represents velocity/acceleration placement flag; SF represents the load curve scale factor; DEATH denotes that the time-imp motion/constraint is removed, while BIRTH represents the activation of the time-imposed tion/constraint.
The rotational speed of the bit in the axial direction was defined using the keyw PRESCRIBED_MOTION_RIGID, with the specific parameters given in Table 6.Using LS-Dyna, a rock block was constructed and meshed for dynamic nume simulation of MWD (Figure 7).To improve the CPU computation time of the dyn numerical model and reduce the mesh data, the rock block was constructed in a cylind shape, with the actual contact area with the drill bit being the brown area, as illustrate Figure 7.The height and radius of the rock block were, respectively, set as 9 cm an cm.Due to the influence of the test equipment, loading methods, and internal mat factors (such as humidity and temperature fields), the dynamic mechanical behavi the rock materials is quite complex, and currently, there is no constructive model tha accurately and completely describe that.This paper combines the results of numerou boratory experiments with numerical simulation results and finally adopts Holmquist-Johnson-Cook (HJC) constitutive model (JOHNSON_HOLMQUIST_C CRETE) as the constitutive model for the construction of rock materials.This mod capable of accurately describing the nonlinear deformation and fracture characteristi rocks, which is mainly applied in the simulation of concrete and rock under high s rates and large deformations.The HJC model basically consists of three aspects: a stre equation, an equation of state, and a damage evolution equation.This study aim Due to the influence of the test equipment, loading methods, and internal material factors (such as humidity and temperature fields), the dynamic mechanical behavior of the rock materials is quite complex, and currently, there is no constructive model that can accurately and completely describe that.This paper combines the results of numerous laboratory experiments with numerical simulation results and finally adopts the Holmquist-Johnson-Cook (HJC) constitutive model (JOHNSON_HOLMQUIST_CONCRETE) as the constitutive model for the construction of rock materials.This model is capable of accurately describing the nonlinear deformation and fracture characteristics of rocks, which is mainly applied in the simulation of concrete and rock under high strain rates and large deformations.The HJC model basically consists of three aspects: a strength equation, an equation of state, and a damage evolution equation.This study aims to reproduce the research findings of several papers [44][45][46][47][48] and to compare them with actual drilling results to determine the constitutive model parameters for limestone, granite, and sandstone (Tables 7-9).In these tables, RO is the mass density, G is the shear modulus, A is the normalized cohesive strength, B is the normalized pressure hardening, C is the strain rate coefficient, N is the pressure hardening exponent, fc is the uniaxial compressive strength, T is the maximum hydrostatic pressure, EPS0 stands for the maximum tensile hydrostatic pressure, S fmax is the normalized maximum strength, P c is the crushing pressure, µc is the crushing volumetric strain, PL is the locking pressure, µL is the locking volumetric strain, D 1 and D 2 are the damage constants, K 1 -K 3 are the pressure constants, and FS is the failure type.
In this research, only the uniaxial compressive strength (f c ) of the constitutive model varies within a reasonable range.To simulate the actual scenario after cutting the rock block and to enhance the CPU computational efficiency of the dynamic numerical model, this study applied the ADD_EROSION failure criterion to the rock block.This criterion automatically removes the rock block after the post-cutting failure condition is reached.The main focus was primarily on setting the maximum effective strain at failure (EFFEPS), based on comparisons and adjustments made with the results of the MWD laboratory tests.As a result, the EFFEPS was determined to be 0.022 for granite, 0.038 for sandstone, and 0.025 for limestone.The initial state of the simulation starts with the direct contact of the drill bit with the rock block, and it is ready to start drilling (Figure 8).The initial positioning of the drill bit is so that its tip is in immediate, direct physical contact with the surface of the rock.To simulate the actual scenario after cutting the rock block and to enhance the CPU computational efficiency of the dynamic numerical model, this study applied the ADD_EROSION failure criterion to the rock block.This criterion automatically removes the rock block after the post-cutting failure condition is reached.The main focus was primarily on setting the maximum effective strain at failure (EFFEPS), based on comparisons and adjustments made with the results of the MWD laboratory tests.As a result, the EFFEPS was determined to be 0.022 for granite, 0.038 for sandstone, and 0.025 for limestone.The initial state of the simulation starts with the direct contact of the drill bit with the rock block, and it is ready to start drilling (Figure 8).The initial positioning of the drill bit is so that its tip is in immediate, direct physical contact with the surface of the rock.

Dynamic Numerical Simulation Process of MWD Experiments
Based on the model developed in Section 2.2.1, this study involves batch modification of LS-Dyna keyword input files to randomly varying parameters, including drilling speed, rotation speed, and uniaxial compressive strength of the rock block during the drilling tests.This process generated a large number of models with various stochastic factors.These models were then batch-processed to generate extensive data from the dynamic numerical simulations of the MWD experiments, providing an important dataset for the subsequent development of a transfer learning-based rock strength parameter prediction model.

Dynamic Numerical Simulation Process of MWD Experiments
Based on the model developed in Section 2.2.1, this study involves batch modification of LS-Dyna keyword input files to randomly varying parameters, including drilling speed, rotation speed, and uniaxial compressive strength of the rock block during the drilling tests.This process generated a large number of models with various stochastic factors.These models were then batch-processed to generate extensive data from the dynamic numerical simulations of the MWD experiments, providing an important dataset for the subsequent development of a transfer learning-based rock strength parameter prediction model.
In the present research, the range of random production for the drilling speed (V) was set between 5 and 50 mm/min, and the rotation speed of the drill bit (N) was considered to be in the range of 400-800 rpm.The random generation ranges for the uniaxial compressive strength (f c ) of granite, sandstone, and limestone were set in the intervals of 100-300, 30-100, and 60-170 (MPa), respectively.The other factors of the HJC block rock model are consistent with those listed in Tables 7 and 8, and the only change is the uniaxial compressive strength (f c ) parameter.
During actual simulation calculations, the drilling depth increases geometrically with simulation time, and when a layer of rock block is removed, the drill bit enters a free travel phase.Because adjusting the drilling speed consumes considerable time, it takes more than 10 h of execution time to complete the drilling a full 9 cm rock block on a computer with a 64-core 4.0 GHz CPU and 512 GB memory.In addition, when the drill reached the next layer of rock, an impact force was generated, which led to anomalies in the drilling data.Therefore, in this study, the drilling time was set to 0.025 s with a data collection interval of 0.0002 s, which is approximately the time required to drill through a simulation layer.With this setup, running a drilling simulation takes just over 2 min.
Herein, data on the torque, drill bit rotational speed, and drilling speed were obtained during the operation of the drilling rig.The rotational speed and drilling speed were set as fixed preset values for each simulation.The torque was determined by obtaining Z_moment data from the lower S2 and S3 levels of the drill while drilling in the RCFORC (Figure 9).The specific parts represented by S2 and S3 are shown in Figure 10.Subsequently, the sum_curves feature in LS-Dyna PLOT was utilized to combine the Z_moment from both surfaces to obtain the sum of the moments (Figure 11).Then, an SAE filter with a C/S cutoff frequency of 60 Hz was utilized to reduce noise and suppress interference in the data.The resulting torque is illustrated in Figure 12.To ensure the automatic acquisition of actual drilling data for various types of rock and to enhance the quality of training data for the parameter prediction model, the study excluded data from the initial and final stages of the drilling process, capturing only the torque data of each simulation between 0.005 and 0.015 s.
Processes 2024, 12, x FOR PEER REVIEW 14 of 34 considered to be in the range of 400-800 rpm.The random generation ranges for the uniaxial compressive strength (fc) of granite, sandstone, and limestone were set in the intervals of 100-300, 30-100, and 60-170 (MPa), respectively.The other factors of the HJC block rock model are consistent with those listed in Tables 7 and 8, and the only change is the uniaxial compressive strength (fc) parameter.
During actual simulation calculations, the drilling depth increases geometrically with simulation time, and when a layer of rock block is removed, the drill bit enters a free travel phase.Because adjusting the drilling speed consumes considerable time, it takes more than 10 h of execution time to complete the drilling a full 9 cm rock block on a computer with a 64-core 4.0 GHz CPU and 512 GB memory.In addition, when the drill reached the next layer of rock, an impact force was generated, which led to anomalies in the drilling data.Therefore, in this study, the drilling time was set to 0.025 s with a data collection interval of 0.0002 s, which is approximately the time required to drill through a simulation layer.With this setup, running a drilling simulation takes just over 2 min.
Herein, data on the torque, drill bit rotational speed, and drilling speed were obtained during the operation of the drilling rig.The rotational speed and drilling speed were set as fixed preset values for each simulation.The torque was determined by obtaining Z_moment data from the lower S2 and S3 levels of the drill while drilling in the RCFORC (Figure 9).The specific parts represented by S2 and S3 are shown in Figure 10.Subsequently, the sum_curves feature in LS-Dyna PLOT was utilized to combine the Z_moment from both surfaces to obtain the sum of the moments (Figure 11).Then, an SAE filter with a C/S cutoff frequency of 60 Hz was utilized to reduce noise and suppress interference in the data.The resulting torque is illustrated in Figure 12.To ensure the automatic acquisition of actual drilling data for various types of rock and to enhance the quality of training data for the parameter prediction model, the study excluded data from the initial and final stages of the drilling process, capturing only the torque data of each simulation between 0.005 and 0.015 s.

Rapid Prediction Model for Rocks Based on Dynamic Numerical Simulation
Before training in this study, Z-score normalization [49] was first employed to normalize the data, smooth the process of seeking the optimal solution, and enable faster convergence to the best solution.Z-score normalization centralizes each data point  around the mean μ, then scales it by the standard deviation σ, resulting in normalized data  * , which follows a normal distribution with a mean of 0 and a variance of 1.The main normalization formula is as follows: To depict the nonlinear mapping relationship between the rock properties and drilling parameters in dynamic numerical simulation, the neural network model structures used in this study are presented in Figures 13 and 14.These figures, respectively, illustrate the prediction models of the rock type and the uniaxial compressive strength.The input layer of the model receives the data of drill torque, rotational speed, and drilling speed obtained based on the approach described in Section 2.2.2.The hidden layers of the model include seven layers, including four batch normalization layers [50] and three layers with the rectified linear unit (ReLU) activation function [51], each with 500 nodes.The output layer of the rock type prediction neural network model uses the softmax activation function [52] and one-hot encoding to convert the rock block classification labels into binary vectors: granite [1,0,0], sandstone [0,1,0], and limestone [0,0,1].It outputs the classification probability for each rock type and calculates the loss value using the binary_crossentropy loss function, then returns and adjusts the weights and thresholds for each node.The prediction neural network model used for evaluating uniaxial compressive strength uses a sigmoid function as the activation function in the output layer to output the predicted uniaxial compressive strength of each dataset.The model also employs the mean square error (MSE) as the loss function to calculate the loss value, then returns and adjusts the weights and thresholds for each node.The optimizer for both models is set to Adma.Training and prediction of the neural network prediction model are implemented via the Keras framework in Python.

Rapid Rock Identification Method Based on the Transfer Learning 2.3.1. Rapid Prediction Model for Rocks Based on Dynamic Numerical Simulation
Before training in this study, Z-score normalization [49] was first employed to normalize the data, smooth the process of seeking the optimal solution, and enable faster convergence to the best solution.Z-score normalization centralizes each data point x around the mean µ, then scales it by the standard deviation σ, resulting in normalized data x * , which follows a normal distribution with a mean of 0 and a variance of 1.The main normalization formula is as follows: To depict the nonlinear mapping relationship between the rock properties and drilling parameters in dynamic numerical simulation, the neural network model structures used in this study are presented in Figures 13 and 14.These figures, respectively, illustrate the prediction models of the rock type and the uniaxial compressive strength.The input layer of the model receives the data of drill torque, rotational speed, and drilling speed obtained based on the approach described in Section 2.2.2.The hidden layers of the model include seven layers, including four batch normalization layers [50] and three layers with the rectified linear unit (ReLU) activation function [51], each with 500 nodes.The output layer of the rock type prediction neural network model uses the softmax activation function [52] and one-hot encoding to convert the rock block classification labels into binary vectors: granite [1,0,0], sandstone [0,1,0], and limestone [0,0,1].It outputs the classification probability for each rock type and calculates the loss value using the binary_crossentropy loss function, then returns and adjusts the weights and thresholds for each node.The prediction neural network model used for evaluating uniaxial compressive strength uses a sigmoid function as the activation function in the output layer to output the predicted uniaxial compressive strength of each dataset.The model also employs the mean square error (MSE) as the loss function to calculate the loss value, then returns and adjusts the weights and thresholds for each node.The optimizer for both models is set to Adma.Training and prediction of the neural network prediction model are implemented via the Keras framework in Python.

Rapid Prediction for Rocks Using Transfer Learning Method
The establishment and collection of an actual drilling dataset is extremely time-consuming and labor-intensive, requiring a large number of drilling tests on different rock types.In the field of laboratory drilling experiments, it is necessary to prepare or collect a vast array of rock specimens.Taking the laboratory drilling platform used in this project as an example, each drilling operation comprises a series of processes, including setup, drilling, cleaning, and machine cooling.Conducting a complete drilling experiment requires approximately three hours.Similarly, collecting drilling data on actual engineering

Rapid Prediction for Rocks Using Transfer Learning Method
The establishment and collection of an actual drilling dataset is extremely time-consuming and labor-intensive, requiring a large number of drilling tests on different rock types.In the field of laboratory drilling experiments, it is necessary to prepare or collect a vast array of rock specimens.Taking the laboratory drilling platform used in this project as an example, each drilling operation comprises a series of processes, including setup, drilling, cleaning, and machine cooling.Conducting a complete drilling experiment requires approximately three hours.Similarly, collecting drilling data on actual engineering

Rapid Prediction for Rocks Using Transfer Learning Method
The establishment and collection of an actual drilling dataset is extremely timeconsuming and labor-intensive, requiring a large number of drilling tests on different rock types.In the field of laboratory drilling experiments, it is necessary to prepare or collect a vast array of rock specimens.Taking the laboratory drilling platform used in this project as an example, each drilling operation comprises a series of processes, including setup, drilling, cleaning, and machine cooling.Conducting a complete drilling experiment requires approximately three hours.Similarly, collecting drilling data on actual engineering sites also involves a series of preparation and drilling activities and further calibration of the rock samples obtained during drilling to form usable data for model training, which is even more time-consuming.Hence, obtaining a large number of data samples for model training is challenging.This study uses a transfer learning method based on a large sample dataset of drilling parameters obtained from dynamic numerical simulation, as established in Section 2.3.1.The knowledge obtained from solving the rock classification tasks is appropriately stored in the dynamic numerical simulation neural network model of rock identification.This knowledge is then applied to the transfer training of the model via small-sample drilling data obtained during actual drilling, thereby adapting the model to predict rock classification in the actual drilling process.
Transfer learning is a machine learning methodology [53] that allows the application of knowledge and experience gained in one task to another related yet distinct task.This approach is particularly useful in areas where data acquisition is scarce or expensive.The basic principle of transfer learning lies in the sharing of knowledge between different but related tasks.In traditional machine learning methods, each task usually starts learning from scratch independently of other tasks.However, transfer learning breaks this isolation by leveraging existing knowledge to accelerate and enhance the efficiency of learning new tasks.
The transfer learning process includes the following key components: (1) Source task: This is the initial task on which the model is trained, usually a data-rich task used to learn general features or knowledge.(2) Target task: This represents a new task with the goal of applying the knowledge gained from the source task.The target task is typically characterized by scarce data or high data acquisition costs.( 3) Pre-trained model: A model trained on the source task whose weights and parameters contain valuable information and features that can be transferred to the target task.In the current investigation, the source task is the rock classification task based on the dynamic numerical simulation data, and the target task is the rock classification task based on actual drilling data.
The transfer learning process includes the following steps: (1) Selection and training of the source task model: A model is trained on the source task, typically using a dataset that is relevant to the target task.(2) Model transfer: Part or all of the source task model is transferred to the target task.This often involves copying the weights and model architecture.(3) Freezing and adjusting: Part of the model is frozen on the target task to preserve previously learned features while adjusting or adding new layers to adapt to the new task.(4) Fine-tuning: The model undergoes subtle adjustment; some layers are unfrozen and further trained on the target dataset.
In the present investigation, we first loaded the neural network model used for training the dynamic numerical simulation rock classification.This process retained the input layer, hidden layers, and output layer of the original model, which contains the feature extraction capabilities necessary for the original task.After that, a selective layer-freezing strategy was adopted.The first two layers were frozen with the ReLU activation function (Figure 15).Using Adam's optimizer and the binary_crossentropy loss function, the model was trained on the dataset of the actual drilling process, and finally, an appropriate neural network model was constructed for rock classification during the actual drilling process.The training process of the neural network model took approximately 1 min on a computer with a 64-core 4.0 GHz CPU and 512 GB memory.

Results of the Laboratory MWD Experiments
In this study, multiple drilling tests were conducted on three types of rock samples: granite, limestone, and sandstone, using the constant drilling speed-constant rotational speed mode.The actual torque, drilling speed, and rotational speed of the drill bit were obtained during the drilling process.The settings for the drilling speed and rotational speed are presented in Table 4.The drilling results for 14 granite samples, 6 sandstone samples, and 6 limestone samples collected at 1 s intervals are illustrated in Figure 16; the index (x-axis) refers to the set of parameters obtained from each data collection during drilling.The plotted results reveal that the torque during granite drilling was primarily between 1.4 and 6.4 Nm, for limestone drilling between 1 and 5.9 Nm, and for sandstone drilling between 1.4 and 2.6 Nm.The reason for the gradually decreasing torque according to granite, limestone, and sandstone may be that granite's interlocked crystalline structure and higher quartz content increase its hardness, while limestone's calcite composition makes it easier to drill.Sandstone, composed mainly of softer minerals, requires less force to drill through, thus resulting in lower torque.The obtained results indicate that for all three types of rock, the drilling speed is directly proportional to the torque, and the rotational speed of the drilling rig is inversely proportional to the torque and is in line with practical observations.The state of the samples after the test is presented in Figure 17.The rock cores are uniformly cylindrical, intact, and unfractured, with rotational drilling

Results of the Laboratory MWD Experiments
In this study, multiple drilling tests were conducted on three types of rock samples: granite, limestone, and sandstone, using the constant drilling speed-constant rotational speed mode.The actual torque, drilling speed, and rotational speed of the drill bit were obtained during the drilling process.The settings for the drilling speed and rotational speed are presented in Table 4.The drilling results for 14 granite samples, 6 sandstone samples, and 6 limestone samples collected at 1 s intervals are illustrated in Figure 16; the index (x-axis) refers to the set of parameters obtained from each data collection during drilling.The plotted results reveal that the torque during granite drilling was primarily between 1.4 and 6.4 Nm, for limestone drilling between 1 and 5.9 Nm, and for sandstone drilling between 1.4 and 2.6 Nm.The reason for the gradually decreasing torque according to granite, limestone, and sandstone may be that granite's interlocked crystalline structure and higher quartz content increase its hardness, while limestone's calcite composition makes it easier to drill.Sandstone, composed mainly of softer minerals, requires less force to drill through, thus resulting in lower torque.The obtained results indicate that for all three types of rock, the drilling speed is directly proportional to the torque, and the rotational speed of the drilling rig is inversely proportional to the torque and is in line with practical observations.The state of the samples after the test is presented in Figure 17.The rock cores are uniformly cylindrical, intact, and unfractured, with rotational drilling marks on the sides, but no cracks are evident.An endoscope was employed to inspect the walls of the borehole, which were found to be smooth and free of cracks, and overall, the cubic rock specimens were intact, with no significant cracks on any surface.
Processes 2024, 12, x FOR PEER REVIEW 20 of 34 marks on the sides, but no cracks are evident.An endoscope was employed to inspect the walls of the borehole, which were found to be smooth and free of cracks, and overall, the cubic rock specimens were intact, with no significant cracks on any surface.

Results of the Dynamic Numerical Simulation
In this study, 500 dynamic numerical simulation models for each granite, san and limestone sample were randomly generated.These models were different in drilling speed, rotational speed, and rock strength.The random generation rang drilling speed (V) was set as 5-50 mm/min, whereas the range of the rotational sp of the drill was set as 400-800 RPM.For the granite, the uniaxial compressive stren randomly generated in the range of 100 to 300 MPa, for sandstone from 30 to 1 and for limestone from 60 to 170 MPa.The change in Mises stress at different time the initial penetration of the drill into the rock is illustrated in Figure 18.At the be of the drilling process, the rock breaking penetration begins with the simultaneo teeth approaching and pressing the surface of the rock under the action of vertic sure.Under the influence of the torque, the rotation of the drill bit drives the drill cut into the rock.In the subsequent process, as the drill continuously penetrates t it experiences these two primary forces along with other frictional resistances.Sim ously, the interaction area and forces between the drill bit and the rock are co changing.
Figure 19 shows the torque comparison between the laboratory drilling tests numerical simulations for granite, limestone, and sandstone at a drilling speed ( mm/min and a rotational speed (N) of 400 RPM.The comparison indicates that th error between the laboratory tests and the numerical simulations does not exceed confirming that the dynamic numerical simulation models constructed for this st very similar to the actual drilling process.
Subjected to the same drilling conditions with a drilling speed of 20 mm/m rotational speed of 800 rpm, the simulations were performed for all three types which yielded the maximum Mises equivalent stress at intervals of 0.0002 s, as ill in Figure 20.The stress response range substantially varies among the different ro in the presence of the same drilling conditions.Limestone exhibits stress levels 200 MPa, while granite's stress level can reach up to 600 MPa.As a general rule, ro superior properties show higher maximum Mises equivalent stresses.

Results of the Dynamic Numerical Simulation
In this study, 500 dynamic numerical simulation models for each granite, sandstone, and limestone sample were randomly generated.These models were different in terms of drilling speed, rotational speed, and rock strength.The random generation range of the drilling speed (V) was set as 5-50 mm/min, whereas the range of the rotational speed (N) of the drill was set as 400-800 RPM.For the granite, the uniaxial compressive strength was randomly generated in the range of 100 to 300 MPa, for sandstone from 30 to 100 MPa, and for limestone from 60 to 170 MPa.The change in Mises stress at different times during the initial penetration of the drill into the rock is illustrated in Figure 18.At the beginning of the drilling process, the rock breaking penetration begins with the simultaneous drill teeth approaching and pressing the surface of the rock under the action of vertical pressure.Under the influence of the torque, the rotation of the drill bit drives the drill teeth to cut into the rock.In the subsequent process, as the drill continuously penetrates the rock, it experiences these two primary forces along with other frictional resistances.Simultaneously, the interaction area and forces between the drill bit and the rock are constantly changing.
Figure 19 shows the torque comparison between the laboratory drilling tests and the numerical simulations for granite, limestone, and sandstone at a drilling speed (V) of 20 mm/min and a rotational speed (N) of 400 RPM.The comparison indicates that the torque error between the laboratory tests and the numerical simulations does not exceed 1.5 N•m, confirming that the dynamic numerical simulation models constructed for this study are very similar to the actual drilling process.
Subjected to the same drilling conditions with a drilling speed of 20 mm/min and a rotational speed of 800 rpm, the simulations were performed for all three types of rock, which yielded the maximum Mises equivalent stress at intervals of 0.0002 s, as illustrated in Figure 20.The stress response range substantially varies among the different rock types in the presence of the same drilling conditions.Limestone exhibits stress levels of about 200 MPa, while granite's stress level can reach up to 600 MPa.As a general rule, rocks with superior properties show higher maximum Mises equivalent stresses.

Dynamic Numerical Simulation Rock Prediction Results
In this study, dynamic numerical simulation models were appropriately developed to predict rock strength and classify different types of rock.In the rock strength prediction models, the normalized data were randomized, with 10% allocated to the test dataset, 10% to the validation dataset, and the remaining 80% to the training dataset.The training and validation datasets were utilized for model training, whereas the testing dataset was employed to assess the prediction accuracy of the model.The learning curves for the three rock strength prediction models are depicted in Figure 21.The granite training dataset consisted of 54,540 entries, the limestone dataset comprised 50,400 entries, and the sandstone dataset contained 51,410 entries.These models were trained over 1000 epochs with a batch size of 5000.The analysis of the learning curves reveals that the prediction accuracy curves for the training and validation datasets of the three models exhibit close alignment, indicating no overfitting or underfitting during training.The MSE loss values for the three rock types, as presented in Table 10, emphasize the satisfactory prediction accuracy for all the rock types.This confirms that the data generated by the dynamic numerical simulation models conform to specific patterns.The loss values for all three types of rocks are around 0.04. Figure 22 illustrates the comparison between the predicted and actual values of the uniaxial compressive strength parameters for the three rock types.The plotted results indicate that the predicted values reflect the actual values well, with most of the data points closely approximating the actual values.In summary, the constructed neural network models are capable of successfully establishing a nonlinear mapping relationship between the torque, rotational speed, drilling speed, and uniaxial compressive strength of rocks in dynamic numerical simulations.In this study, dynamic numerical simulation models were appropriately developed to predict rock strength and classify different types of rock.In the rock strength prediction models, the normalized data were randomized, with 10% allocated to the test dataset, 10% to the validation dataset, and the remaining 80% to the training dataset.The training and validation datasets were utilized for model training, whereas the testing dataset was employed to assess the prediction accuracy of the model.The learning curves for the three rock strength prediction models are depicted in Figure 21.The granite training dataset consisted of 54,540 entries, the limestone dataset comprised 50,400 entries, and the sandstone dataset contained 51,410 entries.These models were trained over 1000 epochs with a batch size of 5000.The analysis of the learning curves reveals that the prediction accuracy curves for the training and validation datasets of the three models exhibit close alignment, indicating no overfitting or underfitting during training.The MSE loss values for the three rock types, as presented in Table 10, emphasize the satisfactory prediction accuracy for all the rock types.This confirms that the data generated by the dynamic numerical simulation models conform to specific patterns.The loss values for all three types of rocks are around 0.04. Figure 22 illustrates the comparison between the predicted and actual values of the uniaxial compressive strength parameters for the three rock types.The plotted results indicate that the predicted values reflect the actual values well, with most of the data points closely approximating the actual values.In summary, the constructed neural network models are capable of successfully establishing a nonlinear mapping relationship between the torque, rotational speed, drilling speed, and uniaxial compressive strength of rocks in dynamic numerical simulations.In the rock classification models, the data distribution was maintained at 10% for testing, 10% for validation, and 80% for training.The training and validation datasets were employed to train the model, and the test dataset was implemented to evaluate the      The neural network achieved a prediction accuracy of 99.82% for label 0 (granite), 99.53% for label 1 (sandstone), and 99.36% for label 3 (limestone).As a result, based on the dynamic numerical simulation results, the neural network model exhibits high classification accuracy for all three rock types.

Laboratory Drilling Experiment Rock Prediction Results
In the present investigation, since the uniaxial compressive strength of the same type of rock samples was assumed to be the same in the laboratory drilling tests, we exclusively focused on the rock classification model.The data were distributed as follows: 10% to the test set, 10% to the validation set, and 80% to the training set.The learning curves for the three rock prediction models, as demonstrated in Figure 25, reveal that the training dataset only contains 18,411 data entries, including the numerical simulation data for all three rock types.These models were trained over 1000 epochs with a batch size of 5000.Further analysis of the learning curves indicates a continuous decrease in the value of the loss function during training.However, signs of potential overfitting were observed after 700 epochs.The accuracy was 96.87% for the training set, 80.05% for the validation set, and 77% for the test set.Except for the training set, the accuracy was relatively lower in other sets.The neural network achieved a prediction accuracy of 99.82% for label 0 (granite), 99.53% for label 1 (sandstone), and 99.36% for label 3 (limestone).As a result, based on the dynamic numerical simulation results, the neural network model exhibits high classification accuracy for all three rock types.

Laboratory Drilling Experiment Rock Prediction Results
In the present investigation, since the uniaxial compressive strength of the same type of rock samples was assumed to be the same in the laboratory drilling tests, we exclusively focused on the rock classification model.The data were distributed as follows: 10% to the test set, 10% to the validation set, and 80% to the training set.The learning curves for the three rock prediction models, as demonstrated in Figure 25, reveal that the training dataset only contains 18,411 data entries, including the numerical simulation data for all three rock types.These models were trained over 1000 epochs with a batch size of 5000.Further analysis of the learning curves indicates a continuous decrease in the value of the loss function during training.However, signs of potential overfitting were observed after 700 epochs.The accuracy was 96.87% for the training set, 80.05% for the validation set, and 77% for the test set.Except for the training set, the accuracy was relatively lower in other sets.
Figure 26 illustrates the confusion matrix of the test dataset of the model.The obtained results reveal that the neural network achieved a prediction accuracy of 91.92% for label 0 (granite), 80.53% for label 1 (sandstone), and 76.42% for label 3 (limestone).As is seen, the prediction accuracy levels for all three rock types in the laboratory drilling tests are relatively lower than those of the dynamic numerical simulation data.In addition, the accuracy of the rock classification is lower for the rocks with smaller dataset sizes.As a result, it can be concluded that constructing neural network models with a limited amount of drilling data does not yield satisfactory predictive performance.Figure 26 illustrates the confusion matrix of the test dataset of the model.The obtained results reveal that the neural network achieved a prediction accuracy of 91.92% for label 0 (granite), 80.53% for label 1 (sandstone), and 76.42% for label 3 (limestone).As is seen, the prediction accuracy levels for all three rock types in the laboratory drilling tests are relatively lower than those of the dynamic numerical simulation data.In addition, the accuracy of the rock classification is lower for the rocks with smaller dataset sizes.As a result, it can be concluded that constructing neural network models with a limited amount of drilling data does not yield satisfactory predictive performance.Figure 26 illustrates the confusion matrix of the test dataset of the model.The obtained results reveal that the neural network achieved a prediction accuracy of 91.92% for label 0 (granite), 80.53% for label 1 (sandstone), and 76.42% for label 3 (limestone).As is seen, the prediction accuracy levels for all three rock types in the laboratory drilling tests are relatively lower than those of the dynamic numerical simulation data.In addition, the accuracy of the rock classification is lower for the rocks with smaller dataset sizes.As a result, it can be concluded that constructing neural network models with a limited amount of drilling data does not yield satisfactory predictive performance.

Rock Rapid Identification Results Based on the Transfer Learning
Using a transfer learning approach in conjunction with the dynamic numerical simulation models, the model was appropriately optimized with laboratory drilling test data.This optimization was performed with the aim of aligning with the nonlinear mapping relationship between drilling parameters and rock types in laboratory conditions.In the rock classification model, 10% of the data are set for the test set, 10% for the validation set, and 80% for the training set.The learning curves for the three rock prediction models are illustrated in Figure 27 Figure 28 presents the confusion matrix for the test dataset.The obtained results are indicative of the fact that the neural network approach could achieve a prediction accuracy of 99.82% for label 0 (granite), 99.53% for label 1 (sandstone), and 99.36% for label 3 (limestone).Compared to the prediction models without transfer learning, the prediction accuracy of granite is improved by 7.9%, sandstone by 19%, and limestone by 22.94%.These are significant improvements in classification accuracy for all three rock types, demonstrating that the exploitation of transfer learning methods noticeably mitigates the issue of lower prediction accuracy due to insufficient training data for actual drilling parameters.Figure 28 presents the confusion matrix for the test dataset.The obtained results are indicative of the fact that the neural network approach could achieve a prediction accuracy of 99.82% for label 0 (granite), 99.53% for label 1 (sandstone), and 99.36% for label 3 (limestone).Compared to the prediction models without transfer learning, the prediction accuracy of granite is improved by 7.9%, sandstone by 19%, and limestone by 22.94%.These are significant improvements in classification accuracy for all three rock types, demonstrating that the exploitation of transfer learning methods noticeably mitigates the issue of lower prediction accuracy due to insufficient training data for actual drilling parameters.

Conclusions
This study addresses the challenges of limited training data, limited coverage of rock types, and the time-consuming and labor-intensive process of data collection in the neural network models used for rock identification.We developed a fast rock identification method for MWD based on dynamic numerical simulation data and transfer learning neural network techniques.This method utilized a dynamic numerical simulation model to generate a large volume of simulated MWD rock test data.We then established a neural network model based on these dynamic numerical simulation data for rock identification.Building upon this model, transfer training was performed using real drilling data.This approach preserves the knowledge gained in the rock identification neural network model of dynamic numerical simulation for rock identification tasks.The model is refined with small-sample drilling data obtained during actual drilling operations, enabling transfer training.This fact enhances the applicability of the proposed model in predicting rock identification in actual drilling processes.
The main findings of the present investigation can be summarized as follows: (1) A novel approach is established by using a dynamic numerical simulation model and transfer learning to rapidly adapt the neural network model for practical rock identification, reducing the need for extensive actual drilling data.
(2) The accuracy of rock identification during drilling is enhanced, with a notable enhancement in the classification of granite, sandstone, and limestone, reaching 99.36%, 99.53%, and 99.82%, respectively.
(3) The transfer learning is able to improve prediction accuracy by up to 22.94% compared to models without transfer learning, effectively addressing the challenge of limited training data.
(4) By leveraging transfer learning, we significantly improved the model's prediction accuracy using smaller datasets obtained from actual drilling, demonstrating the model's practical applicability.
In the future, the exploration of more advanced algorithms and models could further enhance the accuracy and efficiency of rock strength parameter prediction.Techniques

Conclusions
This study addresses the challenges of limited training data, limited coverage of rock types, and the time-consuming and labor-intensive process of data collection in the neural network models used for rock identification.We developed a fast rock identification method for MWD based on dynamic numerical simulation data and transfer learning neural network techniques.This method utilized a dynamic numerical simulation model to generate a large volume of simulated MWD rock test data.We then established a neural network model based on these dynamic numerical simulation data for rock identification.Building upon this model, transfer training was performed using real drilling data.This approach preserves the knowledge gained in the rock identification neural network model of dynamic numerical simulation for rock identification tasks.The model is refined with small-sample drilling data obtained during actual drilling operations, enabling transfer training.This fact enhances the applicability of the proposed model in predicting rock identification in actual drilling processes.
The main findings of the present investigation can be summarized as follows: (1) A novel approach is established by using a dynamic numerical simulation model and transfer learning to rapidly adapt the neural network model for practical rock identification, reducing the need for extensive actual drilling data.
(2) The accuracy of rock identification during drilling is enhanced, with a notable enhancement in the classification of granite, sandstone, and limestone, reaching 99.36%, 99.53%, and 99.82%, respectively.
(3) The transfer learning is able to improve prediction accuracy by up to 22.94% compared to models without transfer learning, effectively addressing the challenge of limited training data.
(4) By leveraging transfer learning, we significantly improved the model's prediction accuracy using smaller datasets obtained from actual drilling, demonstrating the model's practical applicability.
In the future, the exploration of more advanced algorithms and models could further enhance the accuracy and efficiency of rock strength parameter prediction.Techniques such as deep learning and reinforcement learning may provide novel solutions to address issues in current models, enhancing their robustness and adaptability in processing complex

Figure 1 .
Figure 1.Main units of the laboratory MWD system: (a) integral construction, (b) bit rotation part, (c) sensor part.

Figure 1 .
Figure 1.Main units of the laboratory MWD system: (a) integral construction, (b) bit rotation part, (c) sensor part.

Figure 2 .
Figure 2. Cross-sectional view of the diamond drill bit as well as a sideview photo from its fabrication.

Figure 2 .
Figure 2. Cross-sectional view of the diamond drill bit as well as a sideview photo from its fabrication.

Figure 3 .
Figure 3. Three types of rock specimens (from left to right: limestone, sandstone, and granite).

Figure 3 .
Figure 3. Three types of rock specimens (from left to right: limestone, sandstone, and granite).

Figure 3 .
Figure 3. Three types of rock specimens (from left to right: limestone, sandstone, and granite).

Table 4 .
Basic parameters of the drilling experiments.
: DOF stands for applicable degrees of freedom; VAD represents velocity/acceleration/displacement flag; SF represents the load curve scale factor; DEATH denotes that the time-imposed motion/constraint is removed, while BIRTH represents the activation of the time-imposed motion/constraint.

Figure 7 .
Figure 7.The rock block model used for dynamic numerical simulations.

Figure 7 .
Figure 7.The rock block model used for dynamic numerical simulations.

Figure 8 .
Figure 8.Initial state of the dynamic numerical simulation.

Figure 8 .
Figure 8.Initial state of the dynamic numerical simulation.

Figure 9 .
Figure 9. Torque data of S2 and S3 in the dynamic numerical simulation.Figure 9. Torque data of S2 and S3 in the dynamic numerical simulation.

Figure 9 .Figure 10 .
Figure 9. Torque data of S2 and S3 in the dynamic numerical simulation.Figure 9. Torque data of S2 and S3 in the dynamic numerical simulation.

Figure 11 .
Figure 11.Time history plot of torque data after summation.

Figure 10 . 34 Figure 10 .
Figure 10.Specific locations of S2 and S3 in the dynamic numerical simulations.

Figure 11 .
Figure 11.Time history plot of torque data after summation.

Figure 11 .
Figure 11.Time history plot of torque data after summation.

Figure 12 .
Figure 12.Time history plot of torque data after filtering.

Figure 12 .
Figure 12.Time history plot of torque data after filtering.

Figure 13 .
Figure 13.Structure of the neural network model for predicting the rock type in the dynamic numerical simulation: (a) structure diagram, (b) main code.

Figure 14 .
Figure 14.Structure of the neural network model for predicting the uniaxial compressive strength of rocks in the dynamic numerical simulation: (a) structure diagram, (b) main code.

Figure 13 .Figure 13 .Figure 14 .
Figure 13.Structure of the neural network model for predicting the rock type in the dynamic numerical simulation: (a) structure diagram, (b) main code.

Figure 14 .
Figure 14.Structure of the neural network model for predicting the uniaxial compressive strength of rocks in the dynamic numerical simulation: (a) structure diagram, (b) main code.

Figure 15 .
Figure 15.Schematic representation of the layer-by-layer transfer learning model: (a) structure diagram, (b) main code.

Figure 15 .
Figure 15.Schematic representation of the layer-by-layer transfer learning model: (a) structure diagram, (b) main code.

Figure 18 .Figure 18 . 34 Figure 18 .Figure 19 .
Figure 18.Mises stress cloud map for the dynamic numerical simulation of granite drilling at various times.

Figure 20 .
Figure 20.Equivalent drilling stresses for various rocks.

Figure 19 .Figure 19 .
Figure 19.Comparison of the torques obtained from the drilling experiments and the numerical simulation under constant drilling speed-constant rotational speed mode: (a) granite, (b) limestone, (c) sandstone.

Figure 20 .
Figure 20.Equivalent drilling stresses for various rocks.Figure 20.Equivalent drilling stresses for various rocks.

Figure 20 .
Figure 20.Equivalent drilling stresses for various rocks.Figure 20.Equivalent drilling stresses for various rocks.

Figure 21 .
Figure 21.Training learning curves of the dynamic numerical simulation rock strength prediction model: (a) granite, (b) sandstone, (c) limestone.

Figure 23 .
Figure 23.Learning curves for the rock classification of sandstone, granite, and limestone via dynamic numerical simulation.

Figure 24
Figure 24 illustrates the confusion matrix for the test dataset.The confusion matrix shows the number of correct and incorrect predictions for the different rock types.It is a performance measurement tool used in machine learning classification problems where the output can be of two or more classes.The confusion matrix provides insights into the accuracy of the model by showing the true positive (TP), true negative (TN), false positive (FP), and false negative (FN) values.TP is the number of correctly predicted positive samples.TN represents the number of correctly predicted negative samples.FP denotes the number of negative samples incorrectly predicted as positive.FN signifies the number of positive samples incorrectly predicted as negative.

Figure 23 .
Figure 23.Learning curves for the rock classification of sandstone, granite, and limestone via dynamic numerical simulation.

Figure 24
Figure 24 illustrates the confusion matrix for the test dataset.The confusion matrix shows the number of correct and incorrect predictions for the different rock types.It is a performance measurement tool used in machine learning classification problems where the output can be of two or more classes.The confusion matrix provides insights into the accuracy of the model by showing the true positive (TP), true negative (TN), false positive (FP), and false negative (FN) values.TP is the number of correctly predicted positive samples.TN represents the number of correctly predicted negative samples.FP denotes the number of negative samples incorrectly predicted as positive.FN signifies the number of positive samples incorrectly predicted as negative.

Figure 24 .
Figure 24.Confusion matrix for the test dataset of the dynamic numerical simulation model employed for the rock classification model.

Figure 24 .
Figure 24.Confusion matrix for the test dataset of the dynamic numerical simulation model employed for the rock classification model.

Figure 25 .
Figure 25.Learning curves of the laboratory rock classification of sandstone, granite, and limestone.

Figure 25 .
Figure 25.Learning curves of the laboratory rock classification of sandstone, granite, and limestone.

Figure 25 .
Figure 25.Learning curves of the laboratory rock classification of sandstone, granite, and limestone.

Figure 26 .
Figure 26.Confusion matrix of the laboratory rock classification model's test dataset.
. Further examination of the learning curves reveals a continuous decrease in prediction error during training, indicating the model's correct setup and readiness for effective training.The accuracy curves for the training and validation datasets of the three rock classification models are perfectly aligned, indicating no overfitting or underfitting during training.The accuracy was 98.40% for the training set, 96.26% for the validation set, and 97.50% for the test set.These accuracies are highly satisfactory for all the rock types.Notably, compared to the predictions of neural network models without transfer learning, the accuracy of the test set is improved by 20.5%.In comparison with other rock identification methodologies based on machine learning, LaBelle et al.'s [29] classified lithology achieved an accuracy rate of 95.5%.Klyuchnikov et al. [31] compared various machine learning algorithms for the classification of rock layer types based on borehole data and achieved a maximum classification accuracy of 91%.The performance of rock identification in this study is similar to or exceeds the classification models of most scholars.

Figure 26 .
Figure 26.Confusion matrix of the laboratory rock classification model's test dataset.3.3.3.Rock Rapid Identification Results Based on the Transfer LearningUsing a transfer learning approach in conjunction with the dynamic numerical simulation models, the model was appropriately optimized with laboratory drilling test data.This optimization was performed with the aim of aligning with the nonlinear mapping relationship between drilling parameters and rock types in laboratory conditions.In the rock classification model, 10% of the data are set for the test set, 10% for the validation set, and 80% for the training set.The learning curves for the three rock prediction models are illustrated in Figure27.Further examination of the learning curves reveals a continuous decrease in prediction error during training, indicating the model's correct setup and readiness for effective training.The accuracy curves for the training and validation datasets of the three rock classification models are perfectly aligned, indicating no overfitting or underfitting during training.The accuracy was 98.40% for the training set, 96.26% for the validation set, and 97.50% for the test set.These accuracies are highly satisfactory for all the rock types.Notably, compared to the predictions of neural network models without transfer learning, the accuracy of the test set is improved by 20.5%.In comparison with other rock identification methodologies based on machine learning, LaBelle et al.'s [29] classified lithology achieved an accuracy rate of 95.5%.Klyuchnikov et al. [31] compared various machine learning algorithms for the classification of rock layer types based on borehole data and achieved a maximum classification accuracy of 91%.The performance of rock identification in this study is similar to or exceeds the classification models of most scholars.Figure28presents the confusion matrix for the test dataset.The obtained results are indicative of the fact that the neural network approach could achieve a prediction accuracy of 99.82% for label 0 (granite), 99.53% for label 1 (sandstone), and 99.36% for label 3 (limestone).Compared to the prediction models without transfer learning, the prediction accuracy of granite is improved by 7.9%, sandstone by 19%, and limestone by 22.94%.These are significant improvements in classification accuracy for all three rock types, demonstrating that the exploitation of transfer learning methods noticeably mitigates the issue of lower prediction accuracy due to insufficient training data for actual drilling parameters.

Figure 27 .
Figure 27.Learning curves of the rock classification results based on the transfer learning.Figure 27.Learning curves of the rock classification results based on the transfer learning.

Figure 27 .
Figure 27.Learning curves of the rock classification results based on the transfer learning.Figure 27.Learning curves of the rock classification results based on the transfer learning.

Figure 28 .
Figure 28.Confusion matrix of the test dataset of the rock classification model based on the transfer learning.

Figure 28 .
Figure 28.Confusion matrix of the test dataset of the rock classification model based on the transfer learning.

Table 1 .
Main technical parameters of the laboratory MWD system.

Table 3 .
Mechanical parameters of rock samples.

Table 3 .
Mechanical parameters of rock samples.

Table 3 .
Mechanical parameters of rock samples.

Table 5 .
Drilling speed parameters pertinent to PRESCRIBED_MOTION_RIGID. Note: DOF stands for applicable degrees of freedom; VAD represents velocity/acceleration/displacement flag; SF represents the load curve scale factor; DEATH denotes that the time-imposed motion/constraint is removed, while BIRTH represents the activation of the time-imposed motion/constraint.

Table 6 .
Rotational speed parameters pertinent to PRESCRIBED_MOTION_RIGID. SF represents the load curve scale factor; DEATH denotes that the time-imp motion/constraint is removed, while BIRTH represents the activation of the time-imposed tion/constraint.

Table 10 .
Loss values of the prediction model adopted for the dynamic numerical simulation rock strength parameter.

Table 10 .
Loss values of the prediction model adopted for the dynamic numerical simulation rock strength parameter.