Introduction

The human spine is a complex structure encased by the spinal cord, blood vessels, and various nerve tissues. Poor lifestyle choices can lead to lesions in different spinal tissues, including intervertebral discs, bones, and surrounding muscles, which may result in nerve and blood vessel compression. In severe cases, this compression can lead to paralysis1. Vertebral decompression is a prevalent treatment for conditions such as vertebral nerve compression. This procedure involves removing portions of the vertebral lamina that are impinging on nerves, thereby alleviating pressure within the spinal canal. Performing vertebral decompression requires manual grinding of the vertebral lamina within a confined space, presenting significant challenges. The differing densities and mechanical properties of cortical and cancellous bone tissues2 necessitate that surgeons rely heavily on their experience to identify bone quality and control the extent of cutting. This complexity makes the procedure time-consuming and challenging to perform consistently. Even skilled spine surgeons may struggle to maintain high surgical quality, and the cumulative exposure to imaging radiation poses a significant concern.

Recent advancements in intelligent navigation and robotic technologies have led to the development of various orthopedic robotic systems that are increasingly being used to perform complex orthopedic surgeries3. However, these robotic systems currently lack the nuanced tactile feedback of human surgeons, resulting in suboptimal performance during vertebral lamina cutting. There is an urgent need to enhance the dynamic sensing capabilities of orthopedic robots to ensure stability and safety during the non-linear, unstructured, and unpredictable process of vertebral lamina cutting.

Human bone tissue is characterized by layers with varying densities, and a surgeon’s tactile feedback during cutting comes from the interaction with these different bone layers. For robotic bone cutting, understanding the mechanism of bone cutting, analyzing variations in cutting forces across different bone layers, and employing various signals to distinguish cutting states are crucial for improving the dynamic sensing capabilities of orthopedic robots.

Several studies have explored bone cutting mechanisms: Yeager et al.4 and Sui et al.5 employed variance-based statistics to analyze the effects of cutting depth and direction on cutting force and surface roughness. Noordin et al.6 investigated the impact of cutting speed, feed depth, and depth of cut using response surface methodology. Wu et al.7 developed a cutting force prediction model using least squares multiple regression with porcine femur as a test subject. Tahmasbi et al.8 introduced a second-order linear regression model to examine interactions between tool speed, feed speed, and drill diameter. Pell et al.9 reduced cutting forces and prevented thermal damage by improving the cutting mechanics approach. Dillon et al.10 studied the effects of tool type, cutting depth, speed, and angle on cutting force. Kusins et al.11 further investigated these factors and addressed vibration issues during cutting.

In terms of bone cutting state identification, various signals—such as force, acoustic, and vibration signals—have been used. Lee et al.12 employed force sensors to identify bone layers during surgery. Sugita et al.13 proposed a force feedback-based control method for robotic cutting feed speeds. Jin et al.14 developed a synergistic control method using a six-degree-of-freedom robot to recognize different cutting states through signal feedback. Kasahara et al.15 and Pandey et al.16 created a force-feedback-based monitoring system for analyzing bone drilling states. Gok et al.17 utilized real-time force feedback in a handheld drilling system to differentiate between bone tissues. Guan et al.18 employed acoustic sensing to achieve 84.2% accuracy in identifying cortical and cancellous bone. Wang et al.19 used force sensors to monitor and prevent excessive cutting through vertebral bone. Fan et al.20 utilized cutting force data for bone layer state identification. Abdullah et al.21 proposed a force-based model using artificial neural networks to predict milling forces for different bone densities. Dai et al.22 developed a vibration signal processing method and a machine learning model for differentiating bone states. Zakeri et al.23 constructed a recognition model using acoustic signals and machine learning methods. Sun et al.24 developed an intelligent algorithm for real-time bone layer judgment.

Understanding bone cutting mechanisms provides a theoretical foundation for recognizing bone layer cutting states in orthopedic robots25. Force-based state perception methods have proven effective, particularly in detecting sudden changes in cutting force to identify different bone layers21. However, current robotic bone cutting processes have not yet identified optimal feature parameters, leading to suboptimal bone layer recognition and impacting the robot’s ability to adapt cutting parameters, which affects stability and safety26. To improve robotic bone cutting systems, simulating a surgeon’s tactile feedback to distinguish between different bone layers is essential.

In this study, the introduction of the unit energy consumption model is innovative in applying cross-domain principles to robotic orthopedic surgery. Compared to traditional cutting force signals, unit energy consumption as a feature demonstrates higher reliability in differentiating between various bone layers, as it more comprehensively reflects energy changes during the cutting process, thereby enhancing recognition accuracy. Additionally, the relevance of this model to real-time dynamic sensing is explicitly highlighted. By monitoring unit energy consumption in real-time, the model can dynamically adjust cutting parameters to ensure stability and safety during the cutting process. Furthermore, this paper discusses the potential for generalizing the unit energy consumption model to other medical applications, such as joint replacement surgeries and bone fracture repairs, which will contribute to its broader impact.

This paper addresses the clinical need for enhanced dynamic sensing capabilities in robotic laminectomy. It aims to improve the ability of orthopedic robots to accurately identify and adapt to different bone layers during laminar cutting, thereby preventing damage to internal nerve tissues. By processing real-time cutting force signals and establishing a bone recognition model based on support vector machines, this study lays the groundwork for adaptive sensing control in robotic vertebral plate cutting. The main contributions of this paper are:

(1)Experimental platform construction: Development of a vertebral plate cutting experimental platform using a six-degree-of-freedom robotic arm with a force sensor. Selection of experimental bone materials with density characteristics similar to human bone, determination of test factors and cutting parameters, and collection of extensive cutting force signal data for model training.

(2)Signal processing and feature extraction: Preliminary processing of cutting force signals using wavelet threshold denoising, introduction of unit energy consumption concepts, establishment and optimization of the unit energy consumption function, and verification of feature extraction optimization.

(3)Bone recognition model development: Use of principal component analysis to reduce feature space, selection of representative feature vectors, application of support vector machine algorithms for model training, and optimization of model parameters using particle swarm optimization.

(4)Validation and application: Verification of the vertebral plate cutting state detection system’s effectiveness on the experimental platform, assessment of the system’s functionality, and evaluation of the accuracy of bone layer recognition.

Robot-assisted vertebral plate cutting bone recognition scheme

In vertebral plate cutting for nerve decompression surgery, precise control of the cutting tool within a confined surgical space is critical for accurately removing bone tissue around neural structures. Insufficient cutting can lead to inadequate decompression, while excessive cutting risks irreversible damage to surrounding bone and neural tissues. Even highly experienced surgeons face inherent challenges in maintaining such precision.

Advances in robot-assisted surgical techniques promise significant improvements in surgical accuracy and stability. However, traditional orthopedic robots often struggle to adapt in real time to individual patient differences and cannot dynamically sense complex bone structures. This results in a rigid, procedural approach with limited intelligent adjustments based on the actual bone condition. Consequently, enhancing the robot’s dynamic sensing capability during the cutting process is essential to meet the clinical demands of vertebral plate resection.

This scheme proposes a state-feedback bone recognition strategy centered on a unit energy consumption function. This function quantitatively correlates the energy expended during cutting with the volume of bone removed, thereby optimizing feature extraction and generating highly representative feature vectors. In turn, the robot can use real-time recognition results to dynamically adjust cutting parameters, ensuring that the optimal cutting operation is executed in different bone zones—thereby enhancing both safety and surgical precision.

The main steps are as follows:

(1) Experimental Platform Setup and Data Acquisition.

  • Platform Construction: An experimental platform consisting of a six-degree-of-freedom robotic arm and force sensors is established to simulate the vertebral plate cutting environment. This setup ensures high-precision, reproducible acquisition of cutting force signals.

  • Selection of Experimental Bone Materials: Materials with bone density characteristics similar to human bone are selected. By varying cutting parameters (e.g., depth of cut, feed speed) and conducting orthogonal cutting experiments, a comprehensive dataset of cutting force signals is collected to support subsequent model training.

(2)Data Processing and Model Construction.

  • Signal Preprocessing: The collected cutting force signals are preprocessed using wavelet denoising techniques to enhance data accuracy and improve the signal-to-noise ratio.

  • Feature Extraction via Unit Energy Consumption: A unit energy consumption function is introduced, which leverages the relationship between the energy expended during cutting and the volume of bone removed. This function optimizes the feature extraction process and produces highly representative feature vectors.

(3)Model Training and Parameter Optimization.

  • Dimensionality Reduction: Principal Component Analysis (PCA) is applied to reduce data dimensionality, thereby retaining essential information while minimizing redundancy.

  • SVM Model Training: A bone recognition model is developed using Support Vector Machines (SVM), with its parameters—specifically the kernel function (γ) and penalty factor (C1)—optimized by Particle Swarm Optimization (PSO). This approach enables accurate classification and prediction of different bone types.

(4)Validation and Performance Evaluation.

  • Experimental Validation: The system’s performance is evaluated through actual vertebral plate cutting experiments, assessing recognition accuracy and operational stability under various bone conditions.

  • Real-Time Monitoring: A supervisory interface continuously monitors the cutting status, ensuring that the feedback and dynamic adjustment functions operate effectively and reliably during surgery.

Figure 1 illustrates the overall structure of the proposed scheme, clearly depicting the relationship between various cutting parameters and bone recognition, as well as the dynamic adjustment process enabled by real-time feedback. The modular design of this method not only renders it suitable for vertebral plate cutting but also facilitates its extension to other orthopedic surgical procedures (e.g., cranial or spinal surgeries). The system can be flexibly adjusted according to specific surgical requirements, demonstrating excellent cross-platform applicability.

Fig. 1
figure 1

Robotic vertebral plate cutting bone recognition scheme.

Experimental design of robotic vertebral plate cutting

Experimental platform construction

To develop a robust bone identification model, it is essential to reliably collect and process the force signals generated during vertebral plate cutting. For this purpose, we constructed an experimental platform comprising two primary sections: the measurement section and the control section.

(1) Measurement Section.

This section is dedicated to capturing cutting forces with high precision. It is equipped with a six-dimensional force/torque sensor (model KWR75B, Kunwei, China) capable of measuring forces along the Fx, Fy, and Fz axes and the associated torques with an accuracy of up to 0.1% of full scale. The sensor operates at a sampling frequency of 50 Hz, ensuring that transient events during the cutting process are captured with high fidelity.

  1. (2)

    Control Section.

The control section includes several critical components that manage and execute the cutting process:

  • Robotic Arm: A six-degree-of-freedom (6-DOF) robotic arm(Elite, China) is employed, which can operate at speeds up to 2800 mm/s and support a maximum load of 6 kg. The arm follows precisely defined trajectories based on coordinate point placements, ensuring accurate tool positioning throughout the cutting operation.

  • End Effector and Milling Cutter: The robotic arm’s end effector is fitted with a ball-end milling cutter designed for precision bone cutting. This end effector utilizes a single-flute medical ball-end milling cutter with a 4 mm ball diameter, a 2.35 mm shaft diameter, and an overall length of 70 mm. Fabricated from cemented carbide, the cutter is engineered to maintain rigidity under high-speed cutting conditions.

  • Motor and Control Board: The milling cutter is driven by a DC brushless motor (type AM-BL2453 AE) that achieves a maximum no-load speed of 28,715 rpm and an output power of 257.5 W. This motor supports axial loads of up to 2.5 N and radial loads of up to 16 N. It is interfaced with a dedicated motor control board that communicates with a host computer, providing real-time position feedback and enabling precise control of critical cutting parameters, including rotation speed, depth of cut, and feed speed.

A detailed installation diagram of the experimental platform is provided in Fig. 2. This comprehensive setup, with its meticulously specified parameters and components, ensures high-precision and reproducible acquisition of cutting force signals, thereby forming a solid foundation for reliable model training and dynamic control during robotic vertebral plate cutting.

Fig. 2
figure 2

Experimental platform for robotic vertebral plate cutting.

Experimental subject Preparation

Dataset construction and statistical validation

To achieve effective bone tissue identification predictive modeling, an a priori statistical power analysis was conducted (GPower 3.1 software; α = 0.05, β = 0.2, effect size = 0.8) to determine the required sample size. A total of 48 fresh porcine T6–T12 vertebral specimens were commercially procured from licensed suppliers compliant with GB/T 9959.1–2021 standards, sourced from 12–18 monthold pigs (body weight 90 ± 15 kg (measurement uncertainty ± 3 kg, k = 2)), and subjected to visual and palpation screening to exclude specimens with structural defects or pathological lesions, with each group set at n = 12 (theoretical calculation required 11 specimens/group, retaining 8.3% redundancy for outlier exclusion). All fresh vertebral specimens were processed via standardized cryogenic processing (–20 °C ± 2 °C (temperature uncertainty ± 0.5 °C, k = 2)) using industrialgrade refrigeration equipment compliant with GB/T 21001.2–2020 and machined into standard cortical bone plates. Bone density was quantified and stratified using dualenergy Xray absorptiometry (DEXA, Hologic Discovery Wi), resulting in three density groups: high (1.15 ± 0.05 g/cm³ (measurement uncertainty ± 0.02 g/cm³, k = 2), n = 16), medium (0.95 ± 0.05 g/cm³ (measurement uncertainty ± 0.02 g/cm³, k = 2), n = 16), and low (0.75 ± 0.05 g/cm³ (measurement uncertainty ± 0.02 g/cm³, k = 2), n = 16). The specimens were vacuumsealed in phosphatebuffered saline (PBS) and stored at 4 °C to maintain hydration, as shown in Fig. 3. Further analysis revealed a coefficient of variation of 9.2% for bone density. Biological sources of variation included age (Pearson correlation coefficient r = 0.58, p < 0.01) and gender (effect size η² = 0.21, p = 0.02). Oneway ANOVA confirmed statistically significant intergroup differences in bone density (F(2,45) = 63.24, p < 0.001), validating that the dataset met the 85% statistical power requirement (Ftest, ANOVA) for detecting variations in cutting force. A detailed residual analysis was performed: QQplot inspection supported normality, Shapiro–Wilk test yielded W = 0.97 (p = 0.28), and Levene’s test for homogeneity of variance gave p = 0.45. The ANOVA residuals had a mean of 0 and a standard deviation of 0.05 g/cm³, with all values falling within ± 0.10 g/cm³, indicating no significant bias or heteroscedasticity.

Fig. 3
figure 3

Preparation of partial pig bone samples.

Optimization of surgical environment adaptability

Although porcine bone exhibits comparable macromechanical properties to human bone (elastic modulus: 3.2 ± 0.4 GPa vs. 3.5 ± 0.6 GPa; hardness: 0.45 ± 0.05 GPa vs. 0.52 ± 0.08 GPa), this study employed three intraoperative environmental simulation strategies to optimize clinical adaptability. These strategies included thermomechanical stabilization, where a continuous infusion of physiological saline at 37 ± 0.5 °C (flow rate 5 mL/min) was used to simulate in vivo tissue metabolic conditions; pathological spectrum expansion involved selecting samples with lower bone mineral density, as determined by DEXA measurements, to serve as models simulating osteoporosis, accounting for 25% of the specimens (n = 12); and safety threshold calibration, which set the predictive algorithm threshold to 1.3 times the peak cutting force observed in pre-experimentation. This comprehensive approach effectively overcame three critical clinical translation barriers: compensating for ex vivo sample hydration degradation (as hardness decreased by 0.08 GPa per hour without perfusion), covering pathological heterogeneity in bone tissue (since the current model does not account for tumors or infections), and enhancing the intraoperative safety margin by implementing a safety margin exceeding 30% of the maximum load to improve procedural redundancy.

Orthogonal test design

The vertebral plate bone is anatomically divided into three distinct layers: outer cortical bone, cancellous bone, and inner cortical bone. There exists a transitional zone between these different layers, as illustrated in Fig. 4. During the cutting process, the force signals generated exhibit phase changes depending on the specific bone layer being cut. Specifically, as the cutting tool progresses through the cortical bone layer, the force signal initially increases. Conversely, the force signal significantly decreases when the tool transitions into the cancellous bone layer.

Fig. 4
figure 4

Distribution of vertebral bone layers.

In the context of using a spherical milling cutter, several factors influence the cutting force of bone tissue, notably the tool rotation speed (n), the depth of cut (d), and the feed speed (v). The mechanical properties of cortical and cancellous bone differ markedly, leading to variations in the collected cutting force signals. Cortical bone, being denser, produces larger feedback force signals compared to cancellous bone, which has a lower density and consequently smaller overall force signals. Therefore, the introduction of a bone density parameter (ρ) is essential for the validation experiments.Given the non-smooth nature of the variables and the interactions between different factors, it is crucial to optimize the experimental design. To achieve this, this study employs a response surface orthogonal experimental design method, specifically Box-Behnken design, for the robotic vertebral plate cutting experiments27.

To optimize the cutting parameters, a Box-Behnken design was used to ensure the representativeness and rationality of parameter combinations. This method confirms geometrical coverage and detects parameter interactions, ensuring that the chosen ranges are practical. The experimental setup was aligned with real-world conditions, considering the fundamental cutting mechanics.The parameters for the robotic cutting process were carefully selected based on several considerations:

(1)Rotation Speed (n): The rotation speed was set between 4000 and 6000 rpm, considering anatomical constraints, mechanical stability, and clinical relevance. Speeds above 6000 rpm can cause thermal damage to bone, while a 10% safety margin capped the upper limit at 6000 rpm. This range reflects typical neurosurgical drill speeds.

(2) Feed Speed (v): The feed speed was selected to be 1–3 mm/s, balancing thermal injury risk, cutting integrity, and robotic precision. A feed speed above 3 mm/s increases bone debris and disrupts force signal accuracy, while 1–3 mm/s ensures stable cutting and maintains positioning accuracy within 0.05 mm.

(3)Depth of Cut (d): The depth of cut was set to 0.3–0.5 mm to match the cortical-cancellous bone transition zone and minimize force fluctuations. This range ensures the robotic system accurately follows the bone structure while maintaining consistent cutting forces.

(4)Bone Density (ρ): Bone density values were based on CT scans, with cortical bone density ranging from 0.85 to 1.05 g/cm³and cancellous bone from 0.55 to 0.7 g/cm³. These values represent typical bone densities in porcine models, capturing mechanical differences between cortical and cancellous bone that affect cutting forces.

Considering the distinct mechanical feedback properties of cortical bone, cancellous bone, and the transition zone, layered cutting tests were conducted on bone blocks. The robotic system performed cross-tests across these various bone layers to collect force data. The tool speed was set with an upper limit of 6000 rpm, the feed speed was capped at 3 mm/s, and the depth of cut was maximized at 0.5 mm. Bone density was measured using CT scans28; for the porcine bone samples, cortical bone density ranged from 0.85 g/cm³ to 1.05 g/cm³, while cancellous bone density ranged from 0.55 g/cm³ to 0.7 g/cm³. Based on these parameters, a table of test variation levels was established, incorporating feed speed (v), drill rotation speed (n), depth of cut (d), and bone density (ρ), as detailed in Table 1.

Table 1 Table of variation levels of bone cutting parameters.

Establishment of the unit energy consumption function of vertebral plate cutting

Signal selection and noise reduction processing of vertebral plate cutting force

During the vertebral plate cutting process, the primary sources of cutting force are the tool’s rotational movement along its axis, transverse feeding motion, and longitudinal feeding motion. As illustrated in Fig. 5, the cutting force components are categorized as follows:Fx originates from the tool’s rotational movement along its axis, Fy results from the transverse feeding motion, and Fz is due to the longitudinal feeding motion. Among these, Fy and Fz are particularly significant, as the tool primarily moves in the transverse direction layer by layer during cutting. Consequently, Fx provides limited reference value in this context.

Fig. 5
figure 5

Schematic diagram of bone block cutting.

A six-dimensional force sensor was employed to record the force signals in the x, y, and z directions during the cutting of porcine bone samples. The recorded force signals are illustrated in Figs. 6 and 7, and 8. The signals demonstrate distinct variations when cutting through different bone layers, with periodic changes in cutting force corresponding to the tool’s rotation angle. Notably, the transverse cutting force Fy is the most significant, while the axial force Fx and the longitudinal force Fz exhibit similar trends. Therefore, in this study, the longitudinal cutting force Fz will be utilized to calculate the friction coefficient in subsequent feature extraction. Conversely, the transverse cutting force Fy will serve as the primary signal for bone feature extraction in the bone identification process.

Fig. 6
figure 6

Characteristic diagram of transverse cutting force signal Fy.

Fig. 7
figure 7

Characteristic diagram of longitudinal cutting force signal Fx.

Fig. 8
figure 8

Characteristic diagram of axial cutting force signal Fz.

The vibration and noise generated during the cutting process introduce several anomalies on the signal change curve, as evidenced by the recorded force signal distribution. To mitigate the impact of these noise frequencies and enhance the accuracy of bone detection, the wavelet transform method was applied for noise reduction. Specifically, the Daubechies 4 (db4) wavelet was selected due to its effectiveness in capturing transient features in the force signals. A decomposition level of 4 was chosen to balance noise reduction with signal preservation. Additionally, soft thresholding was implemented using the universal threshold method to minimize the impact of noise while retaining the essential characteristics of the cutting force signals. Figures 9 and 10, and 11 illustrate the noise reduction effects on the transverse cutting force signal Fy under various cutting conditions. These figures demonstrate the effectiveness of the noise reduction process, optimizing the data while preserving signal authenticity.

Fig. 9
figure 9

Noise reduction effect diagram of cutting process.

Fig. 10
figure 10

Noise reduction effect diagram of cortical bone cutting process.

Fig. 11
figure 11

Noise reduction effect diagram of cancellous bone cutting process.

Cutting parameter sensitivity analysis and feature distribution

Cutting parameter sensitivity analysis

(1) Experimental design and data collection.

In this study, a four-factor, three-level orthogonal experimental design was employed to comprehensively evaluate the effects of four key parameters: rotation speed, feed speed, depth of cut, and bone density. Each experimental combination featured uniformly distributed parameter values within the ranges specified in Table 1. Fresh porcine vertebrae samples representing different bone density levels (high, medium, and low) were prepared for the experiments (see Fig. 3). To minimize random error, each parameter combination was tested multiple times using the same clamping and tool conditions. During the tests, real-time lateral cutting force signals were recorded, and the force data were filtered and denoised. The average force values for each combination were then calculated and summarized in Table 2, providing a reliable and balanced dataset for subsequent modeling.

Table 2 Cutting test sequence and results for bone layers.

(2) Construction and validation of the second-order response surface model.

Using the collected experimental data, a second-order polynomial response surface model was fitted in DesignExpert software. This model included main effects, quadratic effects, and two-factor interaction terms, enabling it to capture the nonlinear coupling relationships between cutting parameters. Regression coefficients were estimated using the least squares method, and an analysis of variance (ANOVA) was conducted to evaluate the model’s significance and goodness of fit. Results showed that both the R² and adjusted R² values exceeded 0.95, and most regression coefficients were statistically significant (p < 0.01), indicating the model had strong explanatory power for the lateral cutting force. Additionally, normality and independence tests were performed on the residuals, confirming that the assumptions of the model were satisfied and establishing a solid statistical foundation for subsequent sensitivity analysis.

(3) Sobol global sensitivity analysis.

After building the response surface model, the Sobol method was applied for global sensitivity evaluation of the input parameters. Assuming each input parameter followed a uniform distribution within the experimental range, 2000 Monte Carlo samples were generated to ensure stability and convergence of the results. The Sobol method decomposes the total variance of the output into contributions from individual parameters and their interactions. It calculates first-order sensitivity indices (contribution of individual parameters) and total effect indices (combined contribution of each parameter and its interactions). During the computation, convergence curves were monitored to verify that the sample size met the accuracy requirements.

The results of the Sobol analysis are summarized in Table 3, showing the sensitivity indices for the four cutting parameters with respect to the lateral cutting force. Bone density exhibited the highest sensitivity, with a first-order index of 0.6357 and a total effect index of 0.6983, indicating a dominant influence. Feed speed followed, with indices of 0.2810 and 0.3120, suggesting some degree of interaction with other factors. In contrast, rotation speed and depth of cut had minimal influence, with sensitivity values below 0.02 and nearly identical first-order and total effect indices, indicating negligible and non-interacting effects. The convergence plots (Figs 12 and 14) further confirmed the stability of the sensitivity indices after 1500 samples, supporting the reliability of the results.

Table 3 First-order and total effect sensitivity indices of cutting parameters.
Fig. 12
figure 12

First-order sensitivity index plot.

Fig. 13
figure 13

Total effect sensitivity index plot.

Based on the sensitivity analysis, bone density is identified as the most influential parameter affecting the cutting force and can therefore serve as a key determinant in bone quality recognition models. Feed speed also exerts a notable impact, whereas rotation speed and depth of cut show relatively minor effects. Given that bone density is typically fixed during the cutting process, a bone quality feature vector can be constructed based on the relative contributions of other cutting parameters to the force signal. This vector can be used to accurately distinguish between different bone layer structures.

Characteristic distribution of cutting parameters

Figure 14 presents the transverse cutting force signal data for a specific bone block after processing. It illustrates the distribution of transverse cutting force signals throughout the cutting process as the tool sequentially traverses cancellous bone, transitional zones, and cortical bone. The figure highlights significant numerical differences in cutting forces between cancellous and cortical bone. Variations in cutting parameters such as feed speed, rotation speed, and depth of cut cause the transverse cutting force to fluctuate within a range when cutting similar types of bone. However, the force signals in the transitional zone between cortical and cancellous bone overlap both ranges.

Fig. 14
figure 14

Distribution of force signals during bone layer cutting.

To address this, 1500 force signals were extracted representing cortical bone, cancellous bone, and transitional zone of the cortical-cancellous bone using various cutting parameters. Figure 15 depicts the spatial distribution of these cutting parameters, revealing partial overlap in the force signal distribution zones for the transitional zone, cancellous bone, and cortical bone under different cutting conditions. This overlap complicates the task of distinguishing between these zones during bone quality recognition. Consequently, feature extraction and integration of the original cutting force signal are essential, as using the raw force signal alone may lead to significant discrepancies in bone identification and classification.

Fig. 15
figure 15

Spatial distribution of raw signal features.

The transverse cutting force signal, post-noise reduction, better delineates bone layer features. Nevertheless, it remains influenced by variables such as bone density and cutting parameters. Moreover, the cutting force signal from the six-dimensional force sensor may exhibit similar values across different bone layers and cutting parameters, complicating accurate classification. Variations in cutting force throughout the process further impact bone recognition. Thus, a stable signal feature model capable of differentiating between various bone layers is crucial for effective bone identification.

Establishment of the unit energy consumption function

The energy required to cut a specified volume of bone varies with cutting parameters and bone density, given that cortical bone is dense and hard, while cancellous bone is loose and fragile. The transverse contact force is influenced by factors such as feed speed and depth of cut. Accordingly, this paper establishes a unit energy consumption function that reflects bone characteristics, using parameters such as transverse cutting force signal Fy, feed speed v, cortical bone depth of cut d1, and cancellous bone depth of cut d2, as depicted in Fig. 16.

Fig. 16
figure 16

Bone feature extraction and processing.

To simplify the unit energy consumption function and enhance classification efficiency, the potential energy of the tool is excluded from the calculations. The unit energy consumption function comprises transverse feed energy Ey,, energy consumed by transverse feed friction Qfy, and total energy consumed by transverse cutting Ec. The energy consumption function for the cutting process is expressed as follows:

$${E_c}{\text{=}}{E_y}{\text{-}}{Q_{fy}}$$
(1)

To improve feedback efficiency, the cutting process is divided into quantifiable time intervals, with Vy representing the volume of bone cut during each interval. The suggested energy consumption function per unit volume Wy is:

$${W_y}=\frac{{{E_c}}}{{{V_y}}}=\frac{{{E_y}{\text{-}}{Q_{fy}}}}{{{V_y}}}$$
(2)

The calculations for each energy component are as follows:

(1) Transverse feed energy Ey:

The transverse feed energy Ey is calculated using force signals after wavelet thresholding noise reduction and the set milling cutter feed speed. The formula for Ey is derived from the work done by force:

$${E_y}=\int_{0}^{T} {{F_{yi}} \cdot v{\text{ }}} dt$$
(3)

Where Fyi denotes the instantaneous cutting force, v the transverse feed speed, and T the cycle time. The average cutting force Fya over a period T is used:

$${F_{ya}}=\frac{1}{T}\int_{0}^{T} {{F_{yi}}{\text{ }}} dt$$
(4)

Equation 3 can be rewritten as:

$$Ey=T \cdot Fy{\text{a}} \cdot v$$
(5)

(2) Tool’s transverse friction coefficient µ0:

To determine the transverse friction coefficient \(\:{\mu\:}_{0}\) between the tool and the bone block, a friction experiment was conducted under specific conditions.

In this experiment, the tool’s rotational speed is deliberately set to zero to isolate the transverse friction between the tool and the bone block. This helps in eliminating the effect of rotational forces and allows the measurement of friction based purely on the relative sliding between the two surfaces.With the tool stationary (no rotation), a relative sliding motion was created between the tool and the bone block, simulating the frictional interaction during cutting. This sliding motion enables the measurement of the forces involved in the friction.The lateral feed force \(\:{F}_{y0}\) was measured along the y-direction, which corresponds to the direction of the tool’s movement relative to the bone block. This force was recorded by a force sensor and represents the force applied by the tool in the lateral direction when no rotational motion occurs.The force along the z-direction \(\:{F}_{z0}\) was the magnitude of the normal force exerted by the tool on the bone block. This force was also measured by a force sensor and corresponds to the pressing force that the tool applies perpendicular to the bone surface.

Since the forces varied during the experiment, the average values of the lateral feed force Fy0 and normal force Fz0 were calculated over the course of the experiment to ensure a reliable estimation of the friction coefficient.The friction coefficient \(\:{\mu\:}_{0}\) is calculated based on the the average values of the lateral feed force Fy0 and normal force Fz0 according to the following formula (6):

$${\mu _0}=\frac{{{{\bar {F}}_{{\text{y0}}}}}}{{{{\bar {F}}_{{\text{z0}}}}}}$$
(6)

Where \(\:{\overline{F}}_{y0}\) is the average value of the lateral feed force Fy0 in the y-direction, and \(\:{\overline{F}}_{\text{z}0}\) is the average value of the normal force Fz0 in the z-direction. The formula expresses the friction coefficient as the ratio of the lateral force to the normal force. This ratio quantifies the resistance to motion (friction) between the tool and the bone block.

After performing the experiment and measuring \(\:{\overline{F}}_{y0}\) and \(\:{\overline{F}}_{\text{z}0}\), the friction coefficient \(\:{\mu\:}_{0}\) was calculated. In this study, the experimentally determined friction coefficient \(\:{\mu\:}_{0}\) is found to be 0.1206.

(3) Energy consumed by transverse feed friction Qfy:

The friction energy Qfy is primarily determined by the friction coefficient µ and longitudinal contact force Fz:

$${Q_{fy}}=\int_{0}^{T} {\mu \cdot {F_{zi}} \cdot v{\text{ }}} dt$$
(7)

Similarly, the averaging method is still used to obtain the longitudinal average cutting force Fza during the cutting cycle T. The friction coefficient µ0 is then substituted into the Eq. 7 :

$${Q_{fy}}={\mu _0} \cdot T \cdot Fza \cdot v$$
(8)

(4) Volume of bone layer cut during the cycle Vy:

As shown in Fig. 17, the cutting tool primarily operates along the cutting edge at the bottom, which is represented by the sector area. The formula for the area of bone cut is given by:

$${S_y}={S_0} - {S_1}$$
(9)

Where Sy denotes the surface area of the bone layer cut, S0 denotes the sector area, and S1 is the triangular area of the upper part of the surface area of the bone layer cut.

Fig. 17
figure 17

Cutting tool contact diagram.

The formula for S1 is:

$${S_1}={d_{\text{0}}}{\text{sin}}\alpha {\text{(}}\frac{{{d_0}}}{2}{\text{-}}{d_a}{\text{)}}$$
(10)

Where d0 denotes the diameter of the tool and da denotes the depth of cut during bone layer cutting.

The included angle α is calculated by the relationship between tool diameter and depth of cut, as follows:

$$\alpha =\arccos (1 - \frac{{2{d_a}}}{{{d_0}}})$$
(11)

The formula for the area of the sector S0 is:

$${S_0}=\frac{{2\alpha \pi {{(\frac{{{d_0}}}{2})}^2}}}{{360}}=\frac{{\pi {d_0}^{2}\alpha }}{{720}}$$
(12)

From the above equation, the cutting cross-sectional area Sy is obtained as:

$${S_y}=\frac{{\pi {d_0}^{2}\alpha }}{{720}} - {d_{\text{0}}}{\text{sin}}\alpha \cdot {\text{(}}\frac{{{d_0}}}{2}{\text{-}}{d_a}{\text{)}}$$
(13)

From Eq. (13), the volume of bone cut during the cutting cycle T is :

$${V_y}=T \cdot v \cdot {S_y}=T \cdot v \cdot (\frac{{\pi {d_0}^{2}\alpha }}{{720}} - {d_{\text{0}}}{\text{sin}}\alpha \cdot {\text{(}}\frac{{{d_0}}}{2}{\text{-}}{d_a}{\text{)}})$$
(14)

Based on the above equations, the formula for calculating the unit energy consumption function during the cutting cycle T is obtained as:

$${W_y}=\frac{{T \cdot Fy{\text{a}} \cdot v}}{{T \cdot v \cdot (\frac{{\pi {d_0}^{2}\alpha }}{{720}} - {d_{\text{0}}}{\text{sin}}\alpha \cdot {\text{(}}\frac{{{d_0}}}{2}{\text{-}}{d_a}{\text{)}})}} - \frac{{{\mu _0} \cdot T \cdot Fza \cdot v}}{{T \cdot {v_{}} \cdot (\frac{{\pi {d_0}^{2}\alpha }}{{720}} - {d_{\text{0}}}{\text{sin}}\alpha \cdot {\text{(}}\frac{{{d_0}}}{2}{\text{-}}{d_a}{\text{)}})}}$$
(15)

Two independent eigenvalues of the unit energy consumption function are extracted to form a new eigenvector ET = (ET1, ET2), as follows:

$${\left( {\frac{{Fy{\rm{a}}}}{{(\frac{{\pi {d_0}^2\alpha }}{{720}} - {d_{\rm{0}}}{\rm{sin}}\alpha \cdot {\rm{(}}\frac{{{d_0}}}{2}{\rm{0}}{d_a}{\rm{)}})}},\frac{{{\mu _0} \cdot Fza}}{{(\frac{{\pi {d_0}^2\alpha }}{{720}} - {d_{\rm{0}}}{\rm{sin}}\alpha \cdot {\rm{(}}\frac{{{d_0}}}{2}{\rm{0}}{d_a}{\rm{)}})}}} \right)^{\rm{T}}}$$
(16)

Substituting d0 = 4 mm and µ0 = 0.1206 into Eq. (16), it can be simplified to :

$${E_T}={\left( {\frac{{Fy{\text{a}}}}{{(\frac{\pi }{{45}}\alpha - \sqrt {8{d_a} - {d_a}^{2}} \cdot {\text{(2-}}{d_a}{\text{)}})}},\frac{{1.1206 \cdot Fza}}{{(\frac{\pi }{{45}}\alpha - \sqrt {8{d_a} - {d_a}^{2}} \cdot {\text{(2-}}{d_a}{\text{)}})}}} \right)^{\text{T}}}$$
(17)

Figure 18 displays the geographical distribution between the transverse cutting force Fy and the two independent eigenvectors, ET1 and ET2. Compared with the spatial distribution of the original signal features in Fig. 15, the different bone layers are distinguished by boundaries to varying degrees. The distinguishability of the bone samples has greatly improved, although there is still some overlap between some of the samples, and some features of the transitional zone are not effectively distinguished.

Fig. 18
figure 18

Independent eigenspace distribution of unit energy consumption functions.

Bone recognition model based on support vector machine with particle swarm optimization

Secondary extraction of combined features based on principal component analysis

Other feature extraction techniques include statistical techniques, time-domain approaches, and frequency-domain methods. The primary goal of these techniques is the simplification and trimming of the original data for later use. Dimensionality reduction techniques are typically used to handle data when there are a lot of features. Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), Independent Component Analysis (ICA), t-SNE, and Kernel Principal Component Analysis (KPA) are common techniques for reducing dimensionality. These methods aim to identify the primary direction of change in the data and transform the original data while preserving the relationships between the data to extract and select features.

A two-dimensional independent feature vector ET=(ET1, ET2) was first generated based on the unit energy consumption function to describe the bone features. The feature spatial distribution map showed the impact of boundary distinction between various bone layers. In this section, the principal component analysis method is used to carry out the secondary extraction of the features after combining the original feature signals and the ET feature vectors. The secondary extraction process is illustrated in Fig. 19. PCA is a powerful dimensionality reduction technique that uses linear projection to map high-dimensional data while ensuring that the data’s information value in the projected dimension is maximized for more precise categorization. In this study, the number of principal components was chosen based on the cumulative explained variance ratio, selecting enough components to retain at least 95% of the original data variance. Additionally, the data were standardized to have zero mean and unit variance prior to applying PCA, ensuring that all features contribute equally to the analysis. Furthermore, the contribution rates of the principal components reflect the physical changes during the cutting process. For example, the first principal component may primarily capture changes in cutting force related to the tool’s rotation angle, while the second principal component might represent variations in bone layer density during cutting, aiding in understanding the behavior of different bone layers in the cutting process.The goal of this approach is to further improve the classification and recognition ability of the features, simplify the data structure, reduce the complexity of the classification operation, and improve the recognition efficiency of the model.

Fig. 19
figure 19

Combined feature secondary extraction process.

The following procedures are typically used to process the data in the PCA analysis method of dimensionality reduction29:

(1) Define the matrix of the original data.

The original data of k samples with n eigenvariables is defined as follows:

$${X_{k \times n}}=\left[ {\begin{array}{*{20}{c}} {{x_{11}}}&{{x_{12}}}&{ \cdot \cdot \cdot }&{{x_{1n}}} \\ {{x_{21}}}&{{x_{22}}}&{ \cdot \cdot \cdot }&{{x_{2n}}} \\ \vdots & \vdots &{}& \vdots \\ {{x_{k1}}}&{{x_{k2}}}&{ \cdot \cdot \cdot }&{{x_{kn}}} \end{array}} \right]$$
(18)

Where n represents the number of features in the sample, k represents the number of samples, and Xij(i = 1,2,…….,k and j = 1,2,…….,n) is denoted as the j-th feature in the i-th sample.

(2) Normalize the sample matrix

$${X_{k \times n}} = \left[ {\begin{array}{*{20}{c}}{{x_{11}}}&{{x_{12}}}&{ \cdot \cdot \cdot }&{{x_{1n}}}\\{{x_{21}}}&{{x_{22}}}&{ \cdot \cdot \cdot }&{{x_{2n}}}\\\vdots & \vdots &{}& \vdots \\{{x_{k1}}}&{{x_{k2}}}&{ \cdot \cdot \cdot }&{{x_{kn}}}\end{array}} \right]$$
(19)

Where X ij* is the standardized data metric, Xj is the mean under the j-th eigenvector, and δj is the standard deviation under the j-th eigenvector.

(3) Calculate the matrix of correlation coefficients between the characteristic parameters:

$${R_{n \times n}}=\left[ {\begin{array}{*{20}{c}} {{r_{11}}}&{{r_{12}}}&{ \cdot \cdot \cdot }&{{r_{1n}}} \\ {{r_{21}}}&{{x_{22}}}&{ \cdot \cdot \cdot }&{{r_{2n}}} \\ \vdots & \vdots &{}& \vdots \\ {{r_{n1}}}&{{r_{n2}}}&{ \cdot \cdot \cdot }&{{r_{nn}}} \end{array}} \right]$$
(20)

Where rij(i,j = 1,2,…,n) is the correlation coefficient after the data have been normalized.

(4)Compute principal components

$$\left\{ \begin{gathered} {F_1}={r_{11}}{x_1}+{r_{12}}{x_2}+ \cdots +{r_{1n}}{x_n} \\ {F_2}={r_{21}}{x_1}+{r_{22}}{x_2}+ \cdots +{r_{2n}}{x_n} \\ \vdots \\ {F_n}={r_{n1}}{x_1}+{r_{n2}}{x_2}+ \cdots +{r_{nn}}{x_n} \\ \end{gathered} \right.$$
(21)

Where F=(F1,F2,…,Fn) in the matrix represent the principal component components after dimensionality reduction.

(5) Rank principal components by contribution.

The principal components are ranked from largest to smallest based on their contribution, obtained from the eigenvalues of the correlation coefficient matrix:

$${\varphi _k}=\frac{{{\lambda _k}}}{{\sum\nolimits_{{i=1}}^{n} {{\lambda _i}} }}$$
(22)

Where φk denotes the contribution rate of the k-th principal component and λk denotes the eigenvalue of the k-th principal component.

(6)Determine number of principal components.

The size of m, i.e. the number of principal components after dimensionality reduction, is determined based on the cumulative contribution of the first m principal components:

$${\psi _m}=\frac{{\sum\nolimits_{{k=1}}^{m} {{\lambda _k}} }}{{\sum\nolimits_{{i=1}}^{n} {{\lambda _i}} }}$$
(23)

This paper presents the introduction of cutting parameters, including transverse cutting force Fy, feed speed v, depth of cut d, and two-dimensional feature vectors constructed based on the energy consumption function, to form a 5-dimensional vector for principal component analysis. The combination of features and feature extraction are accomplished by controlling the size of the cumulative contribution rate and determining the value of the number of principal components m.The findings of principal component analysis are displayed in Fig. 20; Table 4 where the cumulative contribution of the first four principal components is 99.87%. Thus, m is found to be 4, and the first 4 principal components are chosen to form the new feature parameters. These new feature vector parameters are then employed for the support vector machine classification model’s future training.

Table 4 Contribution of each principal component.
Fig. 20
figure 20

Comparison of the contribution of each principal component.

Bone recognition model training based on support vector machine

Optimizing feature extraction enhances the dynamic perception ability of surgical robots. An appropriate model must be selected for recognition and classification calculations, with the majority of issues in similar classification and identification tasks often boiling down to curve fitting difficulties. While curve fitting offers certain benefits, there is still room for improvement in using intelligent methods for classification problems like bone recognition. Neural networks offer powerful learning, self-organization, and function approximation capabilities. Support vector machines (SVMs), however, have a relatively simple structure, perform well with high-dimensional and nonlinear data, and are less prone to overfitting compared to neural networks.

Normalization of eigenvectors

The variations in cutting parameters yield different results for the cutting force recorded throughout the cutting process of a bone layer with varying bone density. When performing SVM classification, normalizing the secondary extracted feature vectors is necessary due to variations in bone density. This normalization ensures that cutting force signals collected under various bone layers are all under the same magnitude, ensuring the accuracy of the prediction model.

The normalization of the max-min method is used as follows:

$${x_k}=\frac{{{x_k} - {x_{\hbox{min} }}}}{{{x_{\hbox{max} }} - {x_k}}},k=0,1,….n$$
(24)

Where xmin is the minimum value of the data sequence and xmax is the maximum value of the data sequence.

The pre-optimized force signal data were normalized, obtaining the following distribution of eigenvector values for each bone layer after normalization, as shown in Figs. 21, 22 and 23, and 24.

Fig. 21
figure 21

First principal component normalization.

Fig. 22
figure 22

Second principal component normalization.

Fig. 23
figure 23

Third principal component normalization.

Fig. 24
figure 24

Fourth principal component normalization.

The processed eigenvector data removes the influence of individual variations in bone density, supporting the assertion that bone density affects the cutting force produced. The data processing maintained the properties of the force signal of cancellous and cortical bones, expediting data convergence in the ensuing SVM prediction model, thereby optimizing the algorithm and raising its accuracy and rate.

Model training

The experimental results demonstrate the nonlinear nature of the data due to variations in cutting conditions across different bone types: cortical bone, the cortical-cancellous bone transitional zone, and cancellous bone. Given the characteristics of various kernel functions in SVM models, careful selection is essential based on the specific classification task and the data properties.

The linear kernel function, suitable for linearly separable problems, is ideal for datasets with large feature dimensions and linear separability. In contrast, the Gaussian kernel function, also known as the Radial Basis Function (RBF), is more appropriate for datasets with fewer feature dimensions and non-linear separability. The Gaussian kernel function offers several advantages: it provides a smooth and continuous output based on the similarity of input samples, can make non-linear feature data differentiable by projecting samples into a high-dimensional space, and allows for adjustable internal parameters. Specifically, the parameter sigma controls sample similarity, which is crucial for the subsequent particle swarm optimization process. After careful consideration of the various kernel functions and experimental data, the RBF kernel function was selected for this study.

The SVM was employed to train the bone recognition model using normalized and processed feature vectors. A dataset of over 1400 samples from different bone cuts was randomly selected to validate and test the model. Out of these, over 1000 samples were used for training the SVM, while the remaining 400 were reserved for validation. The bone recognition utilized both the original signal features (rotation speed n, cutting force Fy, feed speed v, depth of cut d) and feature vectors derived from secondary extraction based on the unit energy consumption function. Data preprocessing, including noise reduction and sample signal normalization, was performed to produce relevant feature vectors.

Bone recognition using the SVM was conducted utilizing the libsvm toolkit in Matlab. The model was trained with 1,000 examples, and the remaining 400 samples were reserved for testing. Both the original feature vectors and those derived from secondary extraction were evaluated within the SVM model for classification and recognition verification. The effectiveness of the feature extraction process was assessed by comparing the accuracy rates before and after preprocessing.

Figures 25 and 26 present the prediction results for the test set using the RBF kernel, with overall accuracies of 43.8356% and 83.5616%, respectively. In both figures, the x-axis represents the sample number, and the y-axis denotes the bone types: Cancellous Bone Layer, Transitional Bone Layer, and Cortical Bone Layer. The legend indicates blue circles (Actual type) for the true bone types and red crosses (Predicted type) for the model’s predictions.

Figure 25 reveals that the model’s performance is relatively poor, with significant discrepancies between predicted and actual bone types for the Cancellous Bone Layer and Cortical Bone Layer. While the Transitional Bone Layer exhibits a good alignment between predicted and actual types, the Cancellous Bone Layer and Cortical Bone Layer show considerable deviations, with many red crosses located far from their corresponding blue circles. This challenge is primarily due to the overlapping characteristics of signals in the Transitional Bone Layer and the limitations of the current feature extraction methods in distinguishing these overlapping signals.

Fig. 25
figure 25

Raw feature signal recognition effect.

In contrast, Fig. 26 demonstrates a marked improvement in the model’s performance, with an accuracy of 83.5616%. Here, the alignment between predicted and actual bone types is much stronger across all bone layers. Notably, the Transitional Bone Layer and Cancellous Bone Layer show nearly perfect alignment between predicted and actual values, indicating robust prediction performance. However, in the Cortical Bone Layer, while the majority of the predictions align accurately, some discrepancies remain, suggesting that the model’s recognition accuracy for this bone type is slightly diminished.

Fig. 26
figure 26

Recognition effect of combined feature signal based on unit energy consumption function.

Figures 27, 28, 29 and 30 offer a clear and comparative presentation of the recognition results and accuracy for bone identification, utilizing both raw and combined feature signals, thereby enabling an intuitive comparison across different groups.

Figure 27 presents the recognition results for three bone types (Cortical Bone, Transitional Bone Layer, and Cancellous Bone) across three sample groups (Cortical Bone Group, Transitional Layer Group, and Cancellous Bone Group). Specifically, the Cortical Bone Group successfully identified 85 pieces of cortical bone without recognizing the other two bone types; the Transitional Layer Group identified 78 pieces of transitional layer bone and 202 pieces of cancellous bone but did not recognize cortical bone; the Cancellous Bone Group identified 51 pieces of cortical bone and 34 pieces of cancellous bone but failed to identify any transitional layer bone. The use of differentiated colors in the bars and numerical annotations at the top enhances data readability and contrast.

Fig. 27
figure 27

Bone identification results by group and bone type based on raw feature signals.

Figure 28 shows the recognition accuracy for each group, further emphasizing performance differences. The cortical bone group achieved the highest accuracy of 100%, reflecting excellent performance. The cancellous bone group achieved an accuracy of 95.29%, indicating strong performance, while the transitional layer group exhibited a relatively low accuracy of 27.96%. The numerical annotations atop each bar facilitate visual comparison of the performance discrepancies among the groups.

Fig. 28
figure 28

Comparison of identification accuracy by group based on raw feature signals.

Figure 29 provides a detailed breakdown of bone recognition results by group and bone type, based on the combined feature signals derived from the unit energy consumption function. The figure employs deep blue, orange, and green bars to represent recognition counts for Cortical Bone, Transitional Bone Layer, and Cancellous Bone, respectively. These bars are positioned side-by-side to illustrate the performance of each group across the three bone types. Specifically, the Cortical Bone Group identified 85 pieces of cortical bone without recognizing any other bone types; the Transitional Layer Group identified 210 pieces of transitional layer bone and 4 pieces of cancellous bone; the Cancellous Bone Group identified 81 pieces of cancellous bone and 4 pieces of transitional layer bone but did not recognize any cortical bone. Numerical annotations at the top of each bar enhance the data’s readability and comparability.

Fig. 29
figure 29

Bone recognition results by group and bone type for combined feature signals based on unit energy expenditure functions.

Figure 30 shows the recognition accuracy for each group based on the combined feature signals, offering a clearer view of each group’s performance. The Cortical Bone Group achieved an accuracy of 100%, followed by the Cancellous Bone Group with an accuracy of 95.29%, indicating strong performance. The Transitional Layer Group achieved a lower accuracy of 75.01%. The accuracy values displayed at the top of each bar facilitate an easy visual comparison of performance differences across the groups. These figures, with their color coding, data annotations, and clear bar layouts, comprehensively and intuitively present the bone recognition results and accuracy, thus providing valuable support for the analysis of recognition performance across the groups.

Fig. 30
figure 30

Recognition accuracy by sample group for combined feature signals based on unit energy expenditure functions.

The results suggest that the recognition accuracy for bone identification using original signal features is lower compared to that achieved after secondary feature fusion. Specifically, the recognition accuracy for the Cancellous Bone Group and Transitional Layer Group improved from 40% to 27.96%, respectively, to 75.01% and 95.29%, with total recognition accuracy increasing from 43.84 to 83.56%. These findings highlight the significant benefit of secondary feature extraction, which substantially enhances the SVM model’s ability to classify and recognize different bone types. Moreover, the lower accuracy in the Transitional Bone Layer is attributed to the overlapping characteristics of signals in this region and the current feature extraction methods’ limitations in effectively distinguishing these overlapping signals. Consequently, the feature vectors obtained from secondary extraction of combined features will continue to be used for further training and optimization of the bone recognition model to enhance its accuracy and reliability.

SVM parameter optimization based on particle swarm algorithm

The feature extraction process has significantly enhanced the recognition accuracy of the SVM model. However, there remains potential for further improvement in bone layer detection accuracy. It is crucial for the SVM model to appropriately set the internal parameter γ to control the complexity and generalization ability of the computational model. Inadequate selection of this parameter can lead to substantial deviations in recognition results.

To optimize the classification performance of the SVM, this study employs the Particle Swarm Optimization (PSO) algorithm to refine two key parameters—the penalty factor C1 and the kernel function γ30. Although the PSO-SVM combination has been widely applied in other fields, it is particularly suitable for this study due to its effectiveness in handling small datasets and improving computational efficiency31. Compared to traditional grid search or random search methods, PSO offers faster convergence speeds and superior global search capabilities, enabling the identification of near-optimal parameter combinations with fewer iterations. Additionally, PSO excels in addressing nonlinear optimization problems, making it well-suited for the complex biomedical signal processing scenarios in this research.

PSO operates by initializing a swarm of particles and performing continuous iterative computations to converge towards the ideal parameter values. The position and velocity of the i-th particle in a D-dimensional space are expressed as follows:

$$\begin{gathered} Position:{\text{ }}{x_i}=({x_{i1}},{x_{i2}}, \ldots ,{x_{iD}}) \hfill \\ Velocity:{\text{ }}{v_i}=({v_{i1}},{v_{i2}}, \ldots ,{v_{iD}}) \hfill \\ \end{gathered}$$
(25)

Each particle represents a D-dimensional vector. The best position experienced by the i-th particle is denoted as \({p_{bes{t_i}}}\), while the best position experienced by all particles is recorded as \({g_{best}}\),which are recorded as the following equation:

$${p_{bes{t_i}}}=({p_{i1}},{p_{i2}}, \ldots ,{p_{iD}})$$
(26)
$${g_{best}}=({g_1},{g_2}, \ldots ,{g_D})$$
(27)

During the iterative process, the particle’s position and velocity are adjusted based on:

$$\begin{gathered} Position Update:{x_{id}}^{k}={x_{id}}^{{k - 1}}+{v_{id}}^{{k - 1}} \hfill \\ Velocity Update:{v_{id}}^{k}={w_0}{v_i}{_{d}^{k - 1}}+{c_1}{r_1}(p_{{bes{t_{id}}}}^{{}} - {x_{id}}^{{k - 1}})+{c_2}{r_2}({g_{bes{t_d}}} - {x_{id}}^{{k - 1}}) \hfill \\ \end{gathered}$$
(28)

Where w0 is the inertia weight, c1 and c2 are acceleration coefficients, r1 and r2 are random functions, and k denotes the iteration step. To avoid boundary violations, the particle’s position and velocity are constrained within specified ranges.

The ranges for the particle’s position [Xmin, d, Xmax, d] and velocity [-Vmin, d, Vmax, d] are constrained during iterations. Particle positions and velocities are adjusted according to these constraints, ensuring they remain within defined limits.

To ensure effective optimization, several parameters for PSO are selected based on specific rationale. A population size of 20 particles is chosen, striking a balance between efficient parameter space exploration and manageable computational costs. The maximum iteration count is set to 200, ensuring sufficient exploration while balancing computation time. An inertia weight of 1 is used to maintain a balance between global exploration and local exploitation during the search process. Both acceleration coefficients, c1 and c2, are set to 1.5, encouraging particles to move towards both their individual best and the global best positions with equal importance. The parameter ranges for C1 are set between 0.1 and 50, while γ ranges from 0.01 to 1, based on prior research and exploratory tests that suggest these values are the most effective for the current problem. This approach provides insights into why these specific values were chosen for optimizing the SVM parameters.

The procedure for optimizing the SVM parameters using PSO involves the following steps, as illustrated in Fig. 31:

(1)Initialization: Define the particle swarm’s starting parameters, including the ranges for C1 and γ. For this study, the range of C1 is set between 0.1 and 50, while γ ranges from 0.01 to 1. The population size is set to 20, with a maximum of 200 iterations. The inertia weight w is set to 1, and the acceleration factors c1 and c2 are both set to 1.5.

(2) Particle Setup: Randomly assign initial values to each particle’s position and velocity. The global best gbest and individual best Pbest positions are initialized based on these values.

(3)Evaluation: Use the SVM model to evaluate classification performance based on current particle positions. The cross-validation accuracy is recorded as the fitness value for each particle.

(4)Update Best Positions: If a particle’s current fitness surpasses its previous best, update Pbest. Similarly, update gbest if the global fitness improves.

(5)Iteration: Repeat the evaluation and update process for the number of iterations specified, adjusting particle positions and velocities accordingly.

(6)Termination: Conclude the iterations once optimization criteria are met, and retrieve the optimal parameters.

Fig. 31
figure 31

PSO flowchart.

Figure 32 displays the results of the parameter optimization process. After 200 iterations, the cross-validation accuracy of the SVM model achieved a peak of 90.1% with optimal parameters C1 = 32.012 and γ = 0.0369. This improvement in classification accuracy underscores the effectiveness of the PSO algorithm in refining the model’s performance. The updated parameters will be used in subsequent training of the bone recognition model to enhance its accuracy and reliability.

Fig. 32
figure 32

PSO adaptation parameter iteration plot.

Validation of predictive models for bone identification

To validate the effectiveness of the bone recognition prediction model, over 400 processed samples from the training dataset were selected for testing. For the bone recognition test, only the feature vectors obtained from the secondary extraction of combined features based on the energy consumption function were utilized, as the accuracy comparison of feature vector extraction had been previously completed. Through data processing techniques, including noise reduction and signal normalization, relevant feature signal values were obtained for bone quality recognition and classification using SVMs optimized with particle swarm optimization (PSO-SVM).

Figure 33 displays the prediction results for the test set using the RBF kernel, achieving an accuracy of 90.6393%. The x-axis represents the sample number, while the y-axis denotes three bone types: Cancellous Bone Layer, Transitional Bone Layer, and Cortical Bone Layer. In the legend, blue circles indicate the actual bone types, and red crosses represent the model’s predicted types. The results demonstrate that the model performs exceptionally well for the Cortical Bone Layer and Cancellous Bone Layer, with red crosses nearly overlapping the blue circles, indicating minimal prediction errors. For the Transitional Bone Layer, although some deviations are present, the overall prediction accuracy remains high.

Fig. 33
figure 33

PSO-SVM recognition result plot.

Figure 34 illustrates the number of correctly identified samples for each bone type across three sample groups. The Cortical Bone Group achieved perfect classification, correctly identifying all 85 pieces. The Transition Layer Group correctly identified 227 pieces, with 41 pieces misclassified as Cancellous Bone. Similarly, the Cancellous Bone Group achieved perfect classification, correctly identifying all 85 pieces. The chart employs distinct colors and labeled bars, facilitating easy comparisons across sample groups.

Fig. 34
figure 34

Bone recognition results by sample group using PSO-SVM.

Figure 35 presents the recognition accuracy for each group. Both the Cortical Bone and Cancellous Bone Groups achieved perfect accuracy (100%), while the Transitional Layer Group attained an accuracy of 84.7%, attributable to some misclassifications as Cancellous Bone. These charts collectively underscore the high performance of the PSO-SVM model in accurately recognizing Cortical and Cancellous Bones, while indicating slightly lower performance for the Transitional Layer Group.

Fig. 35
figure 35

Recognition accuracy by sample group using PSO-SVM.

The SVM model optimized by the particle swarm approach achieved a recognition accuracy of 90.64%, as depicted in Fig. 36, significantly improving upon the previous SVM model. According to Figs. 32 and 33, bone recognition accuracy was further enhanced through feature extraction optimization. This improvement effectively addresses the issue of poor classification between Cancellous Bone and the Transitional Zone. Specifically, the particle swarm optimization algorithm enhanced the SVM model by optimizing the penalty factor (C1) and the kernel function (γ). Consequently, the recognition accuracy for the Transitional Layer and Cancellous Bone Groups increased from 75.01% and 95.29–84.7% and 100%, respectively. The Cancellous Bone Layer Group achieved 100% recognition accuracy, and the overall recognition accuracy improved from 83.56 to 90.64% compared to the pre-optimization stage.

Fig. 36
figure 36

Comparison of recognition accuracy.

Figure 36 compares the recognition accuracy between the optimized combined feature signal, the original signal, and the unoptimized combined feature signal. It is evident that following the secondary extraction of the combined features, the particle swarm optimized SVM model provides the highest recognition accuracy for each bone layer. The improved bone recognition model demonstrates a significant advantage over both the original signal model and the unoptimized SVM model.

Robotic vertebral plate cutting bone recognition experiment

Bone recognition experiment

Select the treated fresh pig bone material and fix it on the cutting platform. Establish the communication connection of each part, ensuring that the sensors, motors, and other executive parts operate normally. Conduct the tool alignment operation before cutting, program the robot for a linear cutting trajectory, and set up the cutting parameters (moving speed of 1 mm/s and depth of cut of 0.3 mm). Complete the pre-preparation for the experiment.In the motor control interface of the spherical milling cutter, set the motor speed to 4000 rpm, send the instruction to the motor controller, and drive the spherical milling cutter to rotate. Subsequently, control the robot to carry out the cutting movement according to the planned cutting trajectory program. Figure 37 shows the actual process diagram of robotic surgical cutting. After the cutting trajectory is completed, return the tool to the initial position, end the cutting process by selecting the end option, stop the tool rotation, cease signal collection by the sensors, disconnect the sensors and motors from the host computer, and store the data.During the cutting process, the tool sequentially cuts through the cortical bone and cancellous bone layers, recording the state of the cut bone layers during each cut as a reference for subsequent accuracy verification.

Fig. 37
figure 37

Robot bone cutting process.

During the experiment, the robot bone cutting force signal is collected in real-time with the sensor sampling frequency set to 50 Hz. Matlab is used to process the cutting force signal features, combining the transverse cutting force signal and input cutting parameters to construct the unit energy consumption function. Principal component analysis is adopted for the extraction of secondary fusion features, completing the optimization of the signal data.Set the particle swarm optimization model parameters in the PSO-SVM model. The optimized penalty factor C1 and kernel function γ, along with the cross-validation accuracy under these parameters, are outputted. Particle swarm optimization model input and output parameters are listed in Table 5.Based on the optimized parameters, identify the bone layer cutting state and obtain the bone identification results.

Table 5 PSO model input and output parameters.

Comparison of experimental results

The bone cutting was conducted following the predetermined cutting trajectory to compare the effects of feature extraction signals before and after PSO and to validate the model’s effectiveness. Figures 38 and 39 illustrate the feature signals before and after the optimization process, respectively.The comparison shows that, when cutting along the first trajectory, cortical bone cutting is observed with both models demonstrating accurate and stable signal recognition. However, during the second cutting trajectory, different degrees of deviation are present in both recognition modes, but the optimized model’s recognition results are significantly more accurate than those of the pre-optimized model. When cutting along the third trajectory, the optimized model’s recognition results remain stable and exhibit a high correct rate, outperforming the pre-optimization recognition mode.Analysis indicates that when cutting the second bone layer—the transitional layer, which contains a mix of cortical and cancellous bone with a majority of cancellous bone—the predicted results are biased due to the influence of other parameters. In such cases, the recognition results of the unprocessed model are less informative. Conversely, the optimized model’s recognition map shows that while individual data points in the transitional zone exhibit some deviation, the majority of bone recognition results fall between the cancellous bone and the transitional zone. This indicates that the bone layer can be distinguished accurately, maintaining overall recognition effectiveness even if it does not yield the expected results for the cortical bone layer.The final results demonstrate a significant improvement in the model’s recognition effect following feature processing and PSO. Specifically, the model’s prediction performance in actual cutting experiments is fully realized, and the recognition effect for the cancellous bone zone and the transitional zone is significantly better than that of the unoptimized recognition model, providing a valuable reference.

Fig. 38
figure 38

Recognition effect graph based on feature extraction.

Fig. 39
figure 39

Optimized and improved model recognition effect diagram.

To reduce the chance of data anomalies, multiple sets of samples were tested. The overall experimental results and recognition accuracies under different models are presented in Tables 6 and 7 . Analysis of the data reveals that, for the optimized and improved bone recognition model, the recognition accuracy for cortical bone reached 100% in three groups of experiments due to the hardness and distinct characteristics of the bone. However, for cancellous bone and the transitional zone, the transitional zone exhibited the lowest recognition accuracy due to the mixed nature of the bone layer and experimental signal acquisition errors. Some deviations in cancellous bone recognition were noted in two groups of experiments, all attributable to computational errors between the transitional zone and cancellous bone. The overall accuracy exceeded 90%, indicating a significant improvement over the pre-optimization model and resulting in reliable recognition. Based on monitoring results, some signal recognition errors were found in the transitional layer and cancellous bone layer, which are more challenging to recognize. Future research should focus on distinguishing between the transitional layer and the cancellous bone layer to enhance safety and control during the cutting process.

Table 6 Optimization of bone recognition accuracy before improvement.

Through several cutting trajectory planning experiments and the examination of recognition accuracy rates during each cut, it is evident that the bone recognition model based on PSO-SVM can significantly enhance the accuracy of bone layer recognition during robotic vertebral plate cutting. This is achieved by extracting features from the established energy consumption function. This advancement greatly improves the dynamic perception ability of orthopedic surgical robots and provides a theoretical foundation for the development of safe control strategies.

Table 7 Optimization of improved bone recognition accuracy.

Discussion

This study aims to develop an advanced bone recognition model to enhance the dynamic perception and control precision of robotic vertebral plate cutting. Our proposed model is based on a unit energy consumption function, which integrates cutting force, feed speed, and depth of cut to construct a unified energy index (Wy). This index quantifies the energy required to remove a unit volume of bone tissue and inherently reflects the mechanical properties of the bone. In combination with support vector machines (SVM) optimized by particle swarm optimization (PSO), our model improved the recognition accuracy from an initial 43.84–83.56% after secondary feature fusion, and further to 90.64% following PSO parameter optimization, thereby providing robust theoretical and practical support for real-time dynamic control in robotic surgery.

Comparison with previous studies

Traditional methods have predominantly relied on a single modality—such as cutting force, vibration, or acoustic signals—to distinguish between bone layers. However, these approaches are often hampered by noise and signal overlap, which hinder dynamic adjustments during surgery. For instance, studies by Yeager et al.4 and Sui et al.5 focused mainly on variations in cutting force but were limited by overlapping signals and noise interference. In contrast, by incorporating the unit energy consumption model, our approach not only leverages cutting force signals but also integrates feed speed and depth of cut, quantifying the energy required for bone removal. Experimental results showed that the unit energy consumption for cortical bone is approximately 28.6 J/mm³ and for cancellous bone about 9.3 J/mm³, providing a clear physical basis for differentiating bone layers. Compared to methods based solely on real-time force feedback (e.g., Guan et al.18 and Wang et al.19), our method exhibits higher sensitivity and adaptability, particularly in the transitional zone between cortical and cancellous bone.

Theoretical and practical contributions

Theoretically, our study introduces the unit energy consumption function as a crucial feature for bone recognition. Grounded in biomechanical theory, this concept reflects the significant differences in elastic modulus between cortical (15–25 GPa) and cancellous bone (0.1–2 GPa), thereby revealing the intrinsic mechanism behind the energy consumption differences during cutting. By optimizing energy features using principal component analysis (PCA)—which retained 95% of data variance while reducing dimensionality by 65%—our model effectively suppresses noise and amplifies density-related patterns, enhancing identification accuracy.

Practically, our PSO-optimized SVM classifier achieved an average recognition accuracy of 90.64% (SD = 1.2%), demonstrating a ‌6.94% improvement‌ over traditional SVM methods with unoptimized parameters (baseline: 83.7%)32. This enhancement stems from the adaptive hyperparameter tuning mechanism of PSO, which effectively balances global exploration and local exploitation during iterative optimization33.Notably, the improved model exhibits robust performance in transitional zones between cortical and cancellous bones, where complex biomechanical gradients challenge conventional classifiers‌. Such capability aligns with the requirements of real-time dynamic control in robotic surgery, particularly in scenarios demanding rapid tissue differentiation under varying mechanical loads‌.

Advantages and innovations

Our research presents several key innovations:

(1)Unit Energy Consumption Function: By quantifying the energy required for removing a unit volume of bone tissue, our model offers a comprehensive metric that reflects the mechanical properties of bone, greatly improving the differentiation of bone layers, especially between cortical and cancellous zones.

(2)Dynamic Feedback Control: The model supports real-time monitoring of bone state changes during the cutting process. When a transition between cortical and cancellous bone is detected, it automatically adjusts the feed speed, significantly reducing the risk of nerve injury due to improper cutting.

(3)Enhanced Classification Performance: By integrating PCA and PSO-SVM for feature extraction and model optimization, the recognition accuracy improved significantly—from 43.84% using original features to 90.64% after optimization—demonstrating the robustness of our approach in complex surgical environments.

(4)Broad Clinical Applicability: The unit energy consumption index not only facilitates bone layer recognition but also directly evaluates bone quality, potentially assisting in preoperative planning for osteoporotic patients. Moreover, the modular design of our method ensures excellent cross-platform adaptability for various orthopedic procedures, such as cranial or spinal surgeries.

Limitations and future directions

Despite promising results, several challenges remain for clinical translation:

(1)Variability in Pathological Bone Tissue: Our current training data primarily originates from healthy porcine vertebrae. Pathological conditions, such as metastatic lesions or osteophytes, may lead to unpredictable changes in energy features. Future studies should incorporate synthetic bone models with tumor-like structures and ex vivo human bone specimens to expand the model’s applicability.

(2)Multi-Sensor Fusion: Although our study relies mainly on force signals for energy feature extraction, integrating techniques like optical coherence tomography (OCT) or infrared thermography could provide additional data on microstructure or temperature changes, further enhancing recognition accuracy. For instance, temperature increases during cutting—an aspect not covered in this study—may correlate with bone density and tool wear.

(3)Sample Size and Diversity: Expanding the sample size and diversity to include bones from different ages, genders, and health conditions is crucial for ensuring the model’s robustness and statistical reliability in clinical settings.

(4)Advanced Feature Extraction Techniques: To better resolve the overlapping signals in transitional bone layers, future research could explore more sophisticated feature extraction methods, such as convolutional neural networks (CNNs) or multimodal sensing technologies, which may further improve model performance in complex recognition tasks.

Conclusions

This study aims to accurately recognize bone states during the robotic vertebral plate cutting process and to enhance the dynamic perception control capabilities of robotic vertebral plate layered cutting. Focusing on porcine vertebral plates with varying bone densities, we conducted robotic vertebral plate cutting experiments and established feature signals for the bone recognition model based on unit energy consumption. The SVM model was optimized using PSO. The main findings are summarized as follows:

(1)Feature signal acquisition based on unit energy consumption: A method for acquiring feature signals for bone recognition was proposed, based on unit energy consumption. By comparing the characteristics of cutting force signals in various directions, the transverse cutting force signal was selected for bone feature extraction and processed using wavelet thresholding for noise reduction. Additional parameters, including feed speed, rotation speed, and depth of cut, were incorporated to obtain the feature space distribution of cutting parameters. Lateral feed energy (Ey) and lateral feed friction energy (Qfy) were introduced to construct the energy consumption function (Wy) under unit volume. The feature vector (ET) based on unit energy consumption was then extracted, and a 3D spatial distribution map was drawn to verify the viability of the unit energy consumption principle.

(2)Prediction model development using SVM with PSO: A prediction model for bone recognition was developed based on SVM with PSO. The new feature vectors, obtained by dimensionality reduction through PCA, were used as training data. The data was trained and recognized using the SVM, with the PSO algorithm optimizing the SVM model parameters, specifically the kernel function (γ) and penalty factor (C1). Recognition verification showed that the model’s recognition accuracy increased from 43.84% with the original signal features to 83.56% after secondary feature extraction, and finally to 90.64% after PSO parameter optimization. This resulted in effective state recognition and provided a new optimization approach for surgical robot state monitoring during operations.

(3)Bone recognition verification experiment: A verification experiment for bone recognition was conducted using robotic vertebral plate cutting. The robot’s trajectory planning method determined the cutting route for the new porcine vertebral bone. Real-time collected force signals were used to complete the state recognition and feature extraction processes, with recognition accuracy rates recorded. Comparison with actual cutting results confirmed the validity of the prediction model and enhanced the dynamic perception capabilities of the surgical robot.

Although this study has made some progress, the clinical implications of the findings have not been sufficiently discussed. Specifically, future research will explore the potential impact on reducing the workload of surgeons, improving surgical precision, and enhancing patient outcomes. For example, improving model accuracy will enable more precise robotic control during surgeries, reducing surgical errors and the workload on surgeons, thus improving surgical outcomes.

Furthermore, future work plans to incorporate different types of bone samples, such as those with varying densities, ages, or synthetic materials simulating pathological states, to further assess the model’s generalizability. Integrating multimodal data (e.g., acoustic or vibration signals) and introducing more advanced feature extraction methods will help address the current issue of signal overlap in the transitional bone layer, further improving the accuracy of bone recognition.

The expansion of sample size and diversity is also part of our future plans. The discussion of sample size will be further explored in the paper to ensure statistical reliability, enhancing the model’s applicability and credibility in clinical environments. In particular, the challenge of recognizing the transitional bone layer, where signal overlap occurs, is a key issue that warrants further exploration. Potential solutions, such as introducing finer feature extraction techniques or combining other advanced methods like convolutional neural networks (CNN) or multimodal sensing technologies, could significantly improve the model’s performance, especially for complex bone layer recognition tasks.