## 5 Experimental Validation
### Experiments in the Simulated Environment  
The gazebo was selected as the simulation platform for simulating the OPTL, the FPLIR, and the background in the simulation experiments. The simulation environment was built based on the ROS of the Melodic version. The overall size of the OPTL is \(60\times 8\times 13\) m (length, width, and height), while the diameter of the ground wire is 35 mm. The background scene, including grasses and trees, is shown in Figure 11. The FPLIR is modeled using Solidworks software. All software employed in the simulation environment is the same as that installed on the real hardware, including the Pixhawk firmware. The MPC problem was solved using the ACADO toolbox and the qpOASES solver. The codes were exported to c-code using the code generation tool, which was integrated into the ROS node. The step size was set to \(\mathrm{dt}=0.1\) s and the time range \(\mathrm{t}_{\mathrm{h}}=2\) s, running one iteration step in each control loop at a frequency of 100 Hz. As a result of the effect of solution speed, the prediction time horizon is set to 20, and the control time horizon is set to 10. For the weight matrix, the position, velocity, and input weights are set to 5, 2 and 0.2, respectively, while the others are set to 1. After receiving the takeoff signal, the FPLIR rises at \(6.5\times 10^{-1}\) m/s to reach the initial height of \(I_{H}=8.2\) m, and the power line comes into the view of the camera, which completes the fast fall line phase. During the precise landing line phase, the segmentation algorithm in Section 4.1.1 is used to segment the power line image by calculating the slope of the power line. Then, the appropriate slope of the landing line is searched for in the database created in Section 4.2.2 in order to obtain an acceptable landing slope. Since the power line is a slender object, the binocular camera cannot directly obtain the distance information of the power line at a long distance. When the distance is greater than 3 m, an estimation method is used to roughly obtain the distance between the power line and the FPLIR, determining the landing position. When the distance between the FPLIR and the power line is less than 3 m, the distance is obtained using the binocular camera to accurately calculate the relative position. The position is sent to the planning module to plan a landing line trajectory. At this time, the FPLIR enters the landing line mode. Figure 12a shows the schematic diagram of the autonomous landing line in the simulation environment. Figure 12b represents the 3D trajectory of the FPLIR landing line, which is divided into two parts. The blue part indicates that it flies to the initial altitude at a fixed speed, and the green part indicates that it lands on the power line in accordance  
Figure 11: Simulation environment for the FPLIR landing line. In a, the velocities along the \(x\)-, \(y\)-, and \(z\)-axes at 20.3 s are \(1.2\times 10^{-5}\) m/s, \(2.1\times 10^{-5}\) m/s, and \(-1\times 10^{-6}\) m/s, respectively, thus meeting the velocity requirements at the landing line. Figure 14b shows the velocity errors. The velocity errors along the x-, y-, and z-axes are in the range of \(-0.11\) to 0.47 m/s, \(-0.08\) to 0.06 m/s and \(-0.20\) to 0.10 m/s, respectively. In addition, the velocity errors between the planned and actual trajectories are shown in Table 6.  
Based on Figures 13 and 14, it is evident that the predominant fluctuation occurs in the initial 20 s. During the take-off stage, the FPLIR reaches high speed and has a great deal of inertia, which is influenced by its weight. Consequently, the FPLIR needs to overcome its own inertia, adjust its balance, and accurately determine the position of the target power line. As a result, fluctuation occurs during this stage. Once the FPLIR reaches balance after 20s, both position error and velocity error tend to zero. From the above data, it is evident that FPLIR can fly smoothly and follows the reference trajectory well.