# Wheeled Permanent Magnet Climbing Robot for Weld Defect Detection on Hydraulic Steel Gates
## 4 Experimental Validation
### Tracking Simulation and Experimental Validation  
To verify the coordinated control of the robot by the controller and its ability to track the reference trajectory, simulation experiments were conducted in Python3. During the tracking process, the heading angle \(\theta\) was regulated by adjusting the differential speed between the left and right wheels, ensuring that the robot continuously followed the weld trajectory. When the robot moves precisely along the weld direction, the heading angle \(\theta\) is zero; when the robot deviates from the weld direction, \(\theta\) becomes nonzero. The tracking control parameters for robot motion are as follows: the PID parameters \(\mathrm{k_{p}}\), \(\mathrm{k_{i}}\), and \(\mathrm{k_{d}}\) are set to 0.0005, 0.01, and 0, respectively, and the distance b between the left and right wheels is 0.45 m. In the simulation, to further validate the effectiveness of the controller, a curved trajectory was employed instead of a straight path. The equation of the curved trajectory is given by:  
\[y=2000\times cos(0.0005\times x), \tag{14}\]  
As shown in Figure 14, the blue curve represents the simulated weld trajectory, the green curve denotes the ideal robot motion trajectory, and the black solid line indicates the actual tracked trajectory. Figure 15 illustrates the tracking error in the X-direction during the tracking process, while the deviation in the heading angle \(\theta\) is presented in Figure 16. Based on analysis of the simulation data, it can be concluded that the black curve representing the tracking trajectory closely follows the green curve denoting the ideal motion path of the robot. This result demonstrates the effectiveness of the controller's strategy and parameter settings within the simulation environment, which warrants further validation through real-world experiments. Figure 14: Tracking simulation. Figure 15: Simulation distance deviation in X direction. A steel-structured experimental site was constructed in the laboratory, utilizing steel plates with a thickness of 8 mm. The site was divided into three areas, designated as A, B, and C. Area A consisted of a vertical steel plate measuring 5 m \(\times\) 6 m, where the experiments were conducted. Area B featured a curved steel plate designed to facilitate the robot's transition from the ground to the vertical surface. Area C, mounted on the floor, served as a supporting base for the other two steel plates. The configuration is illustrated in Figure 17. Figure 18 present images of the physical robot. A series of experimental results in Figure 19 are presented to validate the effectiveness and accuracy of the proposed algorithm. The total experiment duration is 240 s, and each image corresponds to a 20-s segment of the weld seam. The number after t in the image filename indicates the starting time of that segment. This naming convention clearly shows the timestamp of each image and allows direct alignment with the time axis in the associated charts. The experimental images include not only the actual captured weld seam images but also the weld centerlines identified and extracted by the image processing  
Figure 16: Angle deviation. Figure 17: Steel-structured experimental site. Figure 18: Actual robot photograph. algorithm. To enhance processing efficiency, all raw images were uniformly converted to single-channel grayscale images prior to processing. In each image, the automatically extracted weld centerline is overlaid as a bold black line, providing an intuitive visualization of the algorithm's detection performance. These images clearly show the extracted weld centerlines, offering a reliable visual foundation for subsequent robotic control. During the experiments, several key data points were also extracted, which are of great significance for evaluating system performance and optimizing algorithm parameters. Specifically, these include the lateral offset and angular deviation of the robot relative to the weld centerline.