**1. Introduction**

With the rapid development of the global economy, according to the survey of the Baltic and International Maritime Council/International Chamber Shipping (BIMCO/ICS), the maritime industry has accounted for 80% of the world's trade and transportation [1]. Thus, the safety and efficiency of maritime transportation are of paramount importance. Current issues of maritime transportation include: (1) about 75–96% marine vessel accidents being caused by humans; (2) a severe shortage of seafarers and management personnel; (3) more than 80% of shipping costs being from fuel and labor [2]. Autonomous navigation is vital to mitigate the above issues for ships in that it can be more vigilant than humans at avoiding accidents by perceptions from heterogeneous sensors such as a camera, laser scanner, and mmWave radar [3]. Ship autonomy not only saves human labor costs but also utilizes intelligent path planning methods to achieve optimized fuel consumptions.

Realizing autonomous ships requires localization and path planning. Currently, the global positioning system (GPS) and compass have been commonly available to provide reliable location services. In contrast, path planning for ships still poses several challenges.

**Citation:** Hu, X.; Hu, K.; Tao, D.; Zhong, Y.; Han, Y. GIS-Data-Driven Efficient and Safe Path Planning for Autonomous Ships in Maritime Transportation. *Electronics* **2023**, *12*, 2206. https://doi.org/10.3390/ electronics12102206

Academic Editor: Felipe Jiménez

Received: 25 March 2023 Revised: 8 May 2023 Accepted: 10 May 2023 Published: 12 May 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Existing works mainly focus on the path planning for lightweight surface vessels, which are agile and applicable to harbor patrol, marine resource exploration, etc. [4]. Ships, however, exhibit high inertia and thus a significant delay in motion control. When encountering sudden situations, e.g., encountering a large iceberg, its dynamic nature prevents agile avoidance [5]. In addition to the "shortest path", dynamical feasibility is crucial for ship path planning [6].

Existing ship path planners are typically optimal path searching methods based on A\* and its modifications [7]. Although they provide optimal paths in a given map [8], the optimality is limited in ideal maps including the occupancy grid map, Voronoi-visibility roadmap [9], risk contour map [10], etc. Their path searching is conducted by discretized heading directions without considering the ships' dynamical constraints, making the planned path dynamically infeasible. More recent works [11,12] have taken the dynamical constraints into consideration. However, their iterative methods have high computational complexities, failing to plan in real time to avoid expected sudden risks. Researchers also proposed hybrid approaches that fuse the artificial potential field (APF) algorithm with velocity odometry and path optimization [13–15] to achieve real-time obstacle avoidance in complex maritime environments. However, the APF causes oscillations when searching for paths through narrow areas, causing frequent turning and increasing fuel consumptions and navigation risks. In addition to optimization-based methods, researchers incorporate reinforcement learning into path planning [16,17]. However, learning-based methods suffer from a trade-off between generality and accuracy. Their stochastic results cannot guarantee the safety and efficiency of ship navigation. In summary, none of the existing path planning methods meet the safety and efficiency needs when considering ship dynamics.

This paper presents ESP, a combinatorial optimized path planning approach that generates a safe, smooth, and dynamically feasible trajectory while minimizing the shipping cost. Realizing such an elegant approach poses several challenges: (1) to quantify the turning cost in optimal and dynamically feasible path searching; (2) to minimize the shipping cost in terms of fuel by formulating a minimum-snap problem, which is nontrivial in combining the dynamic model of ships; (3) to cope with sudden risks, e.g., avoid expected obstacles or enemy vessels, which requires replanning a smooth, safe, feasible and optimized path in real time.

To address the above challenges, ESP consists of three components. First, we propose A-turning, a path searching algorithm that quantifies the turning cost in order to obtain the optimal path with fewer turns. Then, we formulate the minimum-snap optimization problem subject to the dynamic constraints of ships to achieve the minimum shipping cost in terms of fuel. Finally, we propose a real-time path replanning algorithm using quasi-uniform cubic B-spline, achieving millisecond-level path replanning to cope with sudden risks.

In summary, the contributions of this paper include: (1) quantifying the turning cost and incorporating it into an optimal global path search through a modified A\* algorithm; (2) formulating a minimum-snap optimization problem to generate a smooth trajectory that consumes the least fuel and satisfies the ship's dynamic constraints; (3) enabling real-time obstacle avoidance for ships through a B-spline-based local trajectory replanner.

ESP is evaluated in a data-driven simulator implemented by MATLAB and our developed geographic information system (GIS). The simulation results demonstrate the effectiveness of ESP in generating a safe, smooth, and feasible path with minimal turns and fuel consumption. Moreover, ESP enables a quick reaction for ships to smoothly avoid unexpected obstacles by path replanning in less than 48 ms.

The rest of this paper is organized as follows. Section 2 reviews related works. Then, we elaborate on the design of ESP in Section 3. The performance evaluation in Section 4 demonstrates the effectiveness of ESP. Section 5 concludes this paper.

#### **2. Related Works**

Path planning can be divided into two steps: path searching and path optimization. Path searching involves searching for an obstacle-free path from the start to the end. Path optimization involves optimizing the searched path to meet users' specific objectives, e.g., the shortest sailing distance, minimum fuel consumption, and minimum shipping cost.

Path searching has been well-studied for decades. It can be categorized by graphsearch-based and random-sampling-based path searching approaches. Graph-search-based path planning methods follow a set of steps to generate unique navigation paths. The classic algorithm, Dijkstra, expands a large number of irrelevant nodes during searching, which greatly slows down the searching process. In order to improve the searching efficiency, A\* family algorithms have been proposed. They make the searching process more purposeful to the destination by introducing heuristic functions [18–20]. These heuristic functions treat vessels as a mass point with unlimited turning and sailing speeds. Their results may have large-angle steers between consecutive path segments. However, to the best of our knowledge, the maximum speed of a ship (displacement > 320 t) is 15 knots, the maximum acceleration is 1, and the turning radius is three times the ship length. Simply considering the ship as a mass point leads to infeasible path planning, making the above heuristic solutions impractical. In addition, Yu et al. [21] proposed an A\* algorithm with velocity variation and global optimization (A\*-VVGO), which achieves the purpose of obstacle avoidance by changing the speed of the ship, and combines the artificial potential field method to ensure the smoothness of the path. Sang et al. [22] proposed a hybrid algorithm of an artificial potential field based on A\* and local programming, which is often combined with many algorithms, such as the genetic algorithm (GA) [23], Fuzzy artificial potential field (FAPF) [24], etc. These hybrid algorithms contain various advantages. However, these methods do not consider vehicles' dynamic constraints. Tracking the paths cannot guarantee safety and smoothness. Moreover, graph-search-based methods cannot work efficiently in large environments due to the searching space being exponential to the size of the occupancy grid maps.

To address the searching efficiency problem with respect to the occupancy grid maps, random-sampling-based algorithms have been proposed to incrementally build maps by sampling. They can work in the planning of the ocean. Zhang et al. [25] proposed the adaptive hybrid dynamic step size and target attractive force–RRT (AHDSTAF–RRT), imposing the dynamic constraints of unmanned surface vehicles (USVs) to allow USVs to navigate complex aquatic environments. Webb et al. [26] proposed Kinodynamic RRT\*, achieving asymptotically optimal motion planning for robots. However, these approaches suffer from slow convergence and inflexible settings of step size. Thus, Strub et al. [27] designed a heuristic function in the exploitation of random sampling with the aim that the new samples would be more likely to be closer to the destination. Xu et al. [28] proposed a simplified map-based regional sampling RRT\* (SMRS–RRT\*) algorithm to achieve path planning in complex environments. Dong et al. [29] proposed a path planning method based on improved RRT\*–Smart, which optimizes the node sampling method by sampling in the polar coordinate system with the origin of USV, improves the search efficiency, and ensures that the navigation path follows the International Regulation for Preventing Collision at Sea. This design does not only improve the convergence speed but also improves the quality of the solution. Nevertheless, random-sampling-based methods cannot provide optimal solutions. Their results are not unique. The searched path usually contains many sharp turns, which is especially evident in open water.

Based on the path searching from graph-search-based and random-sampling-based methods, researchers tried to generate smooth trajectories. A strawman option is to use interpolation. Liang et al. [30] interpolated the trajectory with the Dobbins curve to ensure the smoothness and reduce the number of sharp turns, but the trajectory curvature was discontinuous. To solve this problem, Candeloro et al. [31] used the Fermat spiral to connect the straight line segment with the curved segment, generating the trajectory with a continuous curvature. Wang et al. [32] used B-spline interpolation to construct smooth trajectories with sparse waypoints. It, however, does not impose the vehicle's dynamic constraints, making trajectories infeasible to be executed. To generate dynamic feasible trajectories, control-space sampling approaches [5,6,33] are simple and effective. However, such approaches lack purpose, so their sampling process could take too much time and fail to plan paths in real time. MahmoudZadeh et al. [34] combined a novel B-spline data frame and the particle swarm optimization (PSO) algorithm to establish a continuous route planning system to achieve route planning for USV ocean sampling missions. Zheng et al. [35] proposed a ship collision avoidance decision method based on improved cultural particle swarm to achieve the steering collision avoidance of a ship, but without considering the speed constraint of the ship.

#### **3. Methods**

#### *3.1. Problem Formulation*

The obstacles considered in this paper are the static obstacles in the chart and the unexpected static obstacles that appear within the detection range of the ship's radar during the actual navigation of the ship. One primary objective of our path planning is to be collision-free. Additionally, we optimize two more objectives: best stability and minimum fuel consumption. The specific objective function and constraints are given in the following subsections.
