*5.2. Trajectory Generation Performance*

The trajectory generation result is illustrated in Figure 5, from which we can see that the generated trajectory not only meets the collision avoidance condition, but also conforms to the hull's kinematic characteristics. In the experiment, the Otter is an under-actuated USV and cannot provide direct lateral thrust during its operation. This requires that the running trajectory of the USV must be smooth enough, because too many bends will bring instability to the motion control of the USV and lead to the failure of path trajectory. The corresponding results can be seen in the subsequent path tracking control experiments.

**Figure 5.** Global trajectory generation performance of the USV-UAV cooperative system.

The changing trend of the state and control quantity of the USV with time for the generated trajectory can be found in Figure 6. Overall, the quantities show a relatively gentle trend, especially for the *x* and *y* quantities, which verifies the smoothness of the trajectory. Higher order quantities such as *u*, *v* and *yaw* also present a gentle trend. Those are sufficient to show the effectiveness of the trajectory optimization method.

We also performed an ablation study on the proposed method. As shown in Figure 7, the LOP and GP+LOP methods are compared. LOP denotes the trajectory generation with local optimization planning, which means the global map provided by the UAV is unknown. Due to the limited perception field of the USV, it will take action to perform local trajectory planning unless it is near the obstacle. GP+LOP denotes global planning without trajectory optimization, which means the global map is known while trajectory optimization is not performed. Without the optimization stage, the generated trajectory shows a twisted shape, which is not optimal. GOP+LOP denotes the proposed method. In the lower left-corner of each sub-figure, the total length of the generated trajectory is shown. Our method obtains the shortest planned path with the best smoothness.

**Figure 6.** The changing trend of the state and control quantity of the USV with time.

**Figure 7.** Trajectory generation comparison with different methods. LOP: trajectory generation with local optimization planning (global map provided by the UAV is unknown); GP+LOP: global planning without trajectory optimization; and GOP+LOP: the proposed method.

Here, we also compare the three methods quantitatively in Table 1. The indexes, such as RMSE, max error, speed and time, are evaluated by driving the hull to move. With the trajectory optimization method, the generated trajectory is more in line with the kinematic characteristics of the hull. As such, the tracking error, execution speed and control time achieve optimal values compared with other methods.

**Table 1.** Quantitative comparison of different trajectory generation methods.


#### *5.3. Tracking Control Performance*

To further verify the effectiveness of the proposed NMPC tracking control module, extensive comparative experiments are conducted. As shown in Figure 8, GOP+LP denotes the tracking control method without optimization, i.e., the plain PID with adjusted parameters. The proposed NMPC shows better tracking control performance qualitatively and quantitatively. There is no prediction time window for GOP+LP, so there will be many minor adjustments, resulting in an actual motion trajectory that is not smooth.

**Figure 8.** Tracking control performance comparison. GOP+LP denotes the tracking control method without optimization, i.e., the PID control. GOP+LOP denotes the proposed method with NMPC control.

The execution states of different tracking control methods are visualized in Figure 9, from which the plain PID control shows unstable tracking states. Especially for the control input, the *τ<sup>r</sup>* shows a divergent trend, which may lead to the input variable exceeding the controllable range and adversely affecting the motion control of the USV.

**Figure 9.** Execution state comparison of motion tracking control.

The quantitative comparison of tracking control methods can be found in Table 2, from which the proposed method shows better performance than GOP+LP (i.e., plain PID control). The proposed method not only achieves a smaller tracking control error, but also drives the USV at a quicker speed. Those particularly prove the effectiveness of the combination of motion control and trajectory generation with hull dynamics.


**Table 2.** Quantitative comparison of tracking control methods.

#### **6. Conclusions**

In this paper, a USV-UAV cooperative trajectory planning algorithm is proposed to overcome the problem of USV navigation in complex and multi-obstacle environments with an unknown global map. The proposed cooperative system is simple yet practical. In our method, the UAV acts as a flying sensor, providing a global map to the USV in real-time with semantic segmentation and 3D projection. Afterward, a graph search-based method is applied to generate an initial obstacle avoidance trajectory. An optimization method that considers the kinematic characteristics of the hull is proposed to make the trajectory more in line with the situation. Finally, an NMPC control method is applied to ensure high precision motion control of the USV. The proposed method has excellent performance and strong practicability in ocean engineering. In future work, we will verify the feasibility of the method in physical experiments and try to study the heterogeneous cooperation scheme of multi USV-UAV systems.

**Author Contributions:** Conceptualization, T.H., Z.C. and Z.X.; methodology, T.H.; software, Z.C.; validation, T.H. and Z.C.; formal analysis, Z.C.; writing—original draft preparation, T.H.; writing review and editing, W.G. and Z.X.; supervision, Z.X. and Y.L.; project administration, Z.X. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data will be made available upon request from the authors.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
