*6.1. Analyze Effects of Wind and Current*

6.1.1. Analysis of Wind Effects

In this simulation experiment, the experimental wind speed is under normal conditions (0–8 m/s). According to the experimental results in Figure 7, under the influence of a wind speed of 0–8 m/s after a certain period of navigation, the navigation distance of the USV is almost unchanged, but the navigation direction is changed. From the analysis, we can observe that the change of the navigation direction shows a Gaussian distribution.

**Figure 7.** Wind impacts from 0 to 8 m/s. (**a**) Trajectories under wind disturbances from 0 to 8 m/s. (**b**) Heading statistics of wind impacts from 0 to 8 m/s. (**c**) Distance statistics of wind impacts from 0 to 8 m/s.

6.1.2. Analysis of Current Effects

In this section, the influence of the current is directly added to the navigation speed of the USV. Figure 8a,b respectively show the change of the navigation path and the navigation path distance of the USV under the influence of a certain current velocity.

**Figure 8.** Current impacts at from 0 to 11.3 m/s. (**a**) Trajectory diagram under the current disturbances from 0 to 11.3 m/s. (**b**) Trajectory distance statistics under the current disturbances from 0 to 11.3 m/s.

#### *6.2. Search Algorithm Construction*

In the process of constructing the algorithm, the wind and current effects are considered to be part of the path search generation value. Through experimental analysis, the influence of the wind on navigation presents a Gauss distribution, and the effect of the current is directly superimposed onto the speed of the USV.

Figure 9a is a cos (x) figure. The *x*-axis is the angle between the current direction and the direction of the USV, and the *y*-axis is the weight of the search cost. According to the simulation results, with the change of the angle between the direction of the current and the course of the USV, the current velocity superimposed onto the velocity of the USV presents a cosine curve change.

Figure 9b is a figure of a sin (x) function from 0 to 180° (similar to other angles) on the basis of current impacts. The *x*-axis represents the angle between the direction of the current or the wind and the course of the USV, and the *y*-axis represents the weight of the search cost. When the current or wind is 90° to the heading, the weight value is the largest, that is, the cost of steering becomes higher; this can help a USV to avoid a position where its navigation course will be perpendicular to the direction of the current or the wind in the process of motion planning, and to avoid a situation where it will roll due to the disturbances of the current or the wind.

The A\* search Algorithm 1 introduces the evaluation function F(x) when selecting the next exploration node of the current node:

$$\mathbf{F(x)} = \mathbf{G(x)} + \mathbf{H(x)}\tag{13}$$

F(x) represents the sum of the actual cost G(x) from the starting point to the current point, and the evaluation cost H(x) from the current point to the target point (as shown in Formula (13). The weight of G(x) is expressed as follows: distance cost + steering cost + time cost. The steering cost is proportional to the change of the rudder angle; the change of the USV speed presents the time cost, and the speed of the USV is affected by the wind and current; the distance cost principle is the shortest path principle, where the Euclidean distance is used for the heuristic distance calculation (as shown in Equation (14)).

$$\mathcal{E} = \sqrt[2]{(\mathfrak{x}\_1 - \mathfrak{x}\_0)^2 + (\mathfrak{y}\_1 - \mathfrak{y}\_0)^2} \tag{14}$$

**Algorithm 1:** Motion planning algorithm of a USV with the effects of wind and current.

Input: map information, starting point, and end point.

Output: USV rudder angles, navigation angles, path points (x, y).

1. Define the open list and close list, add the starting point to the open list and set it as the current point.

2. Move the current point to the close list and explore the F minimum around the current point.

(1) If a point is already in the close list or cannot be passed, the point is ignored.

(2) If the point is not in the open list, we add it to the open list and take the current point as the parent node of the point, and then record the F, G, and H values of the point.

(3) If the point is already in the open list, the path is determined according to the G value, and the point with the lowest G value is the current point.

3. Under the influence of the wind and current environment, start to explore the appropriate trajectory based on the current node and the previous node, and then constantly adjust the rudder angle in the process of exploration.

4. The rudder angle adjustment range requires proper steering.

(1) If the rudder angle at this time cannot meet the steering requirements in this environment, abandon the current node. Go to step 2 and select the sub-optimal node, and so on, until the node that meets the navigation requirements of the USV is found.

(2) If the target point has already been added to the open list, then return to the starting point along with the parent node of each cell.

5. End (output planning information).

**Figure 9.** Wind and current impacts on the weight of motion planning. (**a**) Current impacts on the weight of motion planning. (**b**) Wind and current impacts on the planned heading of motion.

#### **7. Simulation Experiments and Analysis**

#### *7.1. Experimental Environments and Results*

This section will introduce the environments and results of the experiments. Figure 10 shows a schematic diagram of the force on the USV during navigation. Based on the dynamic model above, the corresponding motion model is established, and the corresponding trajectory cell is generated. In the experiment, the speed of the USV is 10 knots, the wind direction is 0°, the wind speed is 2 m/s, the current velocity in the *x*-axis direction is 1 m/s, and the current velocity in the *y*-axis direction is 1 m/s.

**Figure 10.** Force diagram of the USV during navigation.

As shown in Figure 11a, the starting point is (5, 24) and the ending point is (20, 10) in the environment without obstacles, and wind and current interfere with the USV motion planning experiment results (in the figure, the blue circle is the starting point, the green circle is the ending point, the green arrow represents current disturbances, and the red arrow represents wind disturbances). As shown in Figure 11b, the starting point is (20, 10) and the ending point is (4, 26). Figure 11c shows in detail the motion planning of the USV in the environment of the starting point (5, 24) and ending point (20, 5), without obstacles but with wind and current disturbances.

The experimental results of USV motion planning with obstacles and wind and current disturbances (the red asterisk is the obstacle) are shown in Figure 12a. The starting point and ending point are (25, 6) and (5, 24), respectively. Note: We consider Figures 11 and 12 as two-dimensional coordinate maps in which the unit of measurement used is meter.

**Figure 11.** Motion planning for a USV in a free open-sea environment at different starting and ending points, considering wind and current disturbances. (**a**) Motion planning for a USV at the starting point (5, 24) and the ending point (20, 10). (**b**) Motion planning for a USV at the starting point (20, 10) and the ending point (4, 26). (**c**) Local details of USV motion planning at the starting point (5, 24) and the ending point (20, 5).

**Figure 12.** Motion planning for a USV in obstacle environments at different starting and ending points, considering wind and current disturbances. (**a**) Motion planning for a USV at the starting point (25, 6) and the ending point (5, 24). (**b**) Motion planning for a USV at the starting point (5, 24) and the ending point (25, 6). (**c**) Motion planning for a USV at the starting point (2, 9) and the ending point (25, 24). (**d**) Motion planning for a USV at the starting point (25, 24) and the ending point (2, 9). (**e**) Motion planning for a USV at the starting point (25, 24) and the ending point (2, 9).

The experimental results of the USV motion planning in the environment of the starting point (5, 24) and the ending point (25, 6) with obstacles and wind and current disturbances are shown in Figure 12b. As shown in Figure 12c, the starting point is (2, 9) and the ending point is (25, 24). The experimental results of USV motion planning in the environment of obstacles and wind and current disturbances are also shown in Figure 12d. The experimental results of USV motion planning in the environment of the starting point (25, 24) and the ending point (2, 9) with obstacles and wind and current disturbances are shown in Figure 12e, and the detail trajectory is shown in the right of Figure 12e.

## *7.2. Analysis of Experimental Results*

In the experiments, the characteristics of the USV dynamics and the influence of wind and current on the motion of a USV are fully considered. First, the disturbance effects of wind and current are simulated and analyzed, and the relevant characteristic parameters are extracted. Second, according to the influence of the wind and current, the regularization-trajectory cell is constructed to resist wind and current disturbances. Finally, a wind speed of 2 m/s and a current speed in the *x*-axis and *y*-axis directions of 1 m/s are simulated. The experiments show that the trajectory of the USV changes irregularly under the environment disturbances, but that the method proposed in this paper makes the trajectory as smooth as possible and achieves a short path planning with safety through the regularization-trajectory cell that allows it to resist the environment disturbances.

From the experiments, the highlights of our method are as follows: (1) On the basis of the regularization-trajectory cell, the smooth rudder command in the trajectory cell is considered; in the process of solving a motion planning problem, the short distance is taken as one of the optimization objectives. (2) Compared with the existing research (such as the method proposed in reference [6]):


#### **8. Conclusions**

In this paper, we tried to solve issues with the disturbances of wind and current on USV motion planning. From the perspectives of USV navigation characteristics, a motion planning method was proposed: first, existing problems were analyzed in detail, and the problem formulation was provided. Second, the USV's dynamics model under the effects of wind and current was established. Third, the regularization-trajectory cell was constructed to provide reachable areas on the basis of a dynamics model. Furthermore, the USV's motion state disturbed by wind and current effects was analyzed in detail. Based on the analysis, the rules and the regularization-trajectory cell were established. Finally, the regularization-trajectory cell, rules, and the A\* algorithm were leveraged to construct the motion planning method for a USV under wind and current disturbances. The empirical results indicate the effectiveness of our proposed method that may help to achieve safe and efficient USV motion planning while considering the disturbances of wind and current; this is the key component in future attempts to overcome the influence of more complex environments.

In this study, the influence of waves was not considered, and the influence of waves may be more intense to some extent as compared to the influence of current and wind. Therefore, future research should consider the potential effects of waves more carefully. The problem may also be more complex; we have left this problem for future research.

**Author Contributions:** Methodology, S.G.; software, S.G.; validation, S.G.; formal analysis, S.G.; investigation, S.G.; resources, S.G.; data curation, S.G.; writing—original draft preparation, S.G.; writing—review and editing, C.Z.; visualization, S.G.; supervision, C.Z. and A.K.; project administration, C.Z., Y.W. and C.X.; funding acquisition, C.Z., Y.W. and C.X. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the National Science Foundation of China (NSFC) through Grant No. 52171349, the National Key R&D Program of China through Grant No. 2018YFC1407405, and the Zhejiang Provincial Science and Technology Program through Grant No. 2021C01010.

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

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The datasets generated during this study are available from the author, who can be reached by contacting gshangd@163.com.

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

#### **Appendix A. Regularization-TrajectoryCell Library**

**Figure A1.** Regularization-trajectory cell library: the first section. (**a**) Regularization-trajectory cells from the initial 0 ◦ direction to 45° (rudder angle is 13.6°). (**b**) Time-varying trajectory cell from the initial 0 ◦ direction to 0 ◦ (rudder angle is −1.92°). (**c**) From the initial 45◦ direction to the 45◦ regularization-trajectory cell (rudder angle is −11.52°). (**d**) Time-varying trajectory cell from the initial 45◦ direction to 0 ◦ (rudder angle is −13.66°). (**e**) Time-varying trajectory cell from the initial 45◦ direction to 90◦ (rudder angle is 2.58°). (**f**) Time-varying trajectory cell from the initial 90◦direction to 90◦ (rudder angle is −0.66°). (**g**) Time-varying trajectory cell from the initial 90◦ direction to 0 ◦ (rudder angle is −11.52°). (**h**) From the initial 135◦ direction to the 135◦ regularization-trajectory cell (rudder angle is −10.74°).

**Figure A2.** Regularization-trajectory cell library: the second section. (**a**) Time-varying trajectory cell from the initial 135◦ direction to 90◦ (rudder angle is −5.32°). (**b**) Time-varying trajectory cell from the initial 135◦ direction to 180◦ (rudder angle is 3.8°). (**c**) From the initial 180◦ direction to the 180◦ time-varying track cell (rudder angle is −0.78°). (**d**) Time-varying trajectory cell from the initial 180◦ direction to 90◦ (rudder angle is −22.78°). (**e**) Time-varying trajectory cell from the initial 180◦ direction to 270◦ (rudder angle is 4.33°). (**f**) Time-varying trajectory cell from the initial 180◦ direction to 225◦ (rudder angle is −0.05°). (**g**) Time-varying trajectory cell from the initial 180◦ direction to 135◦ (rudder angle is −9.61°). (**h**) From the initial 225◦ direction to the 225◦ regularization-trajectory cell (rudder angle is −16.65°).

**Figure A3.** Regularization-trajectory cell library: the third section. (**a**) Time-varying trajectory cell from the initial 225◦ direction to 180◦ (rudder angle is −25.79°). (**b**) Time-varying trajectory cell from the initial 225◦ direction to 270◦ (rudder angle is −9.74°). (**c**) From the initial 270◦ direction to the 270◦ regularization-trajectory cell (rudder angle is −34.68°). (**d**) Time-varying trajectory cell from the initial 270◦ direction to 180◦ (rudder angle is −34.64°). (**e**) Time-varying trajectory cell from the initial 270◦ direction to 0 ◦ (rudder angle is 0.84°). (**f**) Time-varying trajectory cell from the initial 270◦ direction to 315◦ (rudder angle is −13.68°). (**g**) From the initial 270◦ direction to the 225◦ regularization-trajectory cell (rudder angle is −29.17°). (**h**) From the initial 315◦ direction to the 315◦ regularization-trajectory cell (rudder angle is −29.96°). (**i**) Time-varying trajectory cell from the initial 315◦ direction to 0 ◦ (rudder angle is −8.25°). (**j**) Time-varying trajectory cell from the initial 315◦ direction to 270◦ (rudder angle is −27.19°).

## **References**

