# Region-Based Approach for Machining Time Improvement in Robot Surface Finishing
## 4 Case Study
### Region-Based Machining Validation  
Maintaining a controlled experimental environment is crucial to assess the impact of machining subdivided surfaces compared to traditional single-direction machining. For this purpose, the position of the workpiece was the same across all the tests. This consistency ensures that any variations in machining time can be attributed directly to the machining method employed, rather than differences in workpiece positioning or orientation. Both workpieces were placed with their centers at [0, \(-\)570, \(-\)96] (mm) from the robot reference frame and rotated 0 degrees. The workpiece positions were found and fixed manually to provide a stable basis for comparison; here, it must be added that finding  
Figure 4: Comparison of different machining toolpaths for two different workpieces, WP1 (**left** column) and WP2 (**right** column), in their initial positions: (**a,b**) \(X\)-direction, (**c,d**) \(Y\)-direction, (**e,f**) single optimal direction, (**g,h**) region-based optimal directions. the suitable position with trial and error, where the whole workpiece is reachable and the robot is not in self-collision, is difficult and time-consuming. Determining the optimal number of clusters for the K-means algorithm is an important step in our region-based machining strategy. After extensive testing, setting the number of clusters to 10 (\(K=10\)) provided the best results for both workpieces based on the MTI. Post-clustering, we identified and targeted smaller regions for potential merging to enhance the machining time index (MTI). Each small region was assessed for merging with adjacent regions, with the decision to merge based on achieving a more favorable MTI again. After regionalization, MATLAB's built-in global optimization function, particle swarm optimization (PSO) [33] was used to explore the potential directions comprehensively by maximizing the objective function \(F(\varphi)=V_{\text{max}}^{opt}\), defined to capture the constraints and demands of the machining process. The optimal machining directions enable the forming of a velocity vector field (VVF) used for the path planning process. Our experimental analysis demonstrates the efficiency of machining methods, particularly highlighting the advantages of a region-based approach over single-direction machining paths. The results for WPI are in Table 2, where we can see a decrease in machining time from approximately 20-37%, and the results for WP2 are in Table 3, where the decrease ranges from 5 to 33%. Workpieces with regions are shown in Figure 4g_h and are more detailed in Figure 5. Figure 5a represents the 3D regions of WP1 with optimal machining directions; in Figure 5b, a 2D visualization is shown, with added maximum feasible speeds for each region; similar results can be seen for WP2 in Figure 5c,d. \begin{table}
\begin{tabular}{c c c c c c} \hline  & **X-Direction** & **Y-Direction** & **Single Optimal** & **Regions** & **Impr. \%** \\ \hline MTI [s] & 114.46 & 151.89 & 113.59 & 66.82 & \\ Max. feasible & 87.36 & 65.83 & 8  
The comprehensive data show that region-based machining outperformed other strategies in reducing machining time, especially as the stepover values decreased. However, the reduction in machining time with smaller stepovers comes with an increase in machining distance. This increase is attributable to the higher density of toolpaths, which requires highly optimized feed rates. By subdividing the workpiece into regions, it is possible to avoid the bottleneck of machining the entire workpiece at the minimal (maximal feasible) speed dictated by the single-direction approach. Instead, each region can be machined at an optimized speed most suitable for its specific characteristics. In robot hammer peening, the oscillating speed of the metal ball on the electromagnetic hammer peening tools can be adjusted [47], allowing for synchronization with the tool's machining speed.