## 4 Experimental Verification
### Sample Data Acquisition and Parameter Setting  
The construction of the training sample dataset is critical, as it directly impacts the accuracy and generalization ability of the prediction model. To build a comprehensive training dataset within the working range of the robotic arm, the Monte Carlo pseudo-random number method is first employed to determine the full spatial range accessible by the end of the rock-drilling robotic arm based on the joint limits of the arm. During the dataset construction process, the straight-line distance between the rock-drilling robot and the palm face is continuously adjusted. Position points are planned within the coverage of each palm face, ensuring an even distribution across the entire surface. This guarantees both the completeness and diversity of the training sample dataset.  
In the rock-drilling robot, each joint of each arm is equipped with an encoder that outputs joint information in real time during the arm's operation, as shown in Figure 9,b. The encoder used is the AAM58A10-1213-CDCOR3P absolute encoder produced by AiYan Mechatronics, featuring a single-turn resolution of \(\leq\)13 bits and excellent repeatability. Its error range is controlled within \(\pm\)1 bit, which meets the experimental accuracy requirements. The control unit is responsible for collecting and storing the values of each robotic arm joint.The actual position data at the end of the robotic arm are then collected and recorded by the total station. The use of a high-precision encoder and total station ensures the accuracy of the training sample dataset.  
Figure 8: G3 Zi rock-drilling robot.  
Figure 9: Encoders applied to rock-drilling robots. (**a**) Encoders at rotary joints. (**b**) Encoders at telescopic joints.  
The number of training samples is a key factor for the neural network. When the training sample size is too small, the model tends to overfit. Conversely, an excessively large sample size increases the cost of data processing and training time, with only limited improvements in model performance. To determine the optimal number of training samples in this study, 85% of the sample data were used as the training set, and 15% were used as the test set. The maximum prediction bias relative to the number of samples is shown in the curve in Figure 10a, and the average prediction bias relative to the number of samples is illustrated in Figure 10b.  
From Figure 10a, it can be seen that when the number of samples is less than 3500, the maximum prediction deviation gradually decreases as the sample size increases. However, once the number of samples exceeds 3500, the maximum prediction deviation stabilizes, eventually converging to 36.078 mm. Figure 10b shows a similar trend for the average prediction deviation; it decreases initially and then stabilizes as the sample size increases. When the number of samples exceeds 3500, the average prediction deviation stabilizes at approximately 28.208 mm. Based on this analysis, when the number of samples reaches 3500, the prediction error of the model begins to stabilize at a lower level, and further increasing the sample size does not significantly improve model performance.  
Therefore, 3500 groups of sample data are selected for this experiment. Each group contains the values of seven joints of the robotic arm and their corresponding end position errors, covering the entire working space of the robotic arm. A total of 85% of the sample data are used for training, and 15%, i.e., 525 groups, is used for network prediction.