Global path planning for autonomous ship: A hybrid approach of Fast Marching Square and velocity obstacles methods

In this research, a hybrid approach for global path planning for Maritime Autonomous Surface Ship (MASS) is proposed, which generates the shortest path considering the collision risk and the proximity between path and obstacles. The collision risk concerning obstacles is obtained using Time-Varying Collision Risk (TCR) concept, taking into account the velocity constraint of the ship that can achieve during operation. The influence of proximity from obstacles is measured with the Fast Marching (FM) algorithm. A new cost function is proposed allowing to combine the influence of obstacle proximity and collision risk in the region. Finally, the Fast Marching Square algorithm is applied to generate the globally optimal path that can reach the pre-set destination. The contribution of this work is two-fold: 1) considering the velocity constraint of the own ship, together with its influences of collision risk into the global path planning stage of autonomous navigation. 2) measuring the collision risk induced by the obstacles from their comprehensive influences on the achievable velocity range using TCR concept, instead of numerical integration of risk measurement. The results of the case study indicate that the proposed approach can find an optimal path considering the collision risk and proximity from the


Introduction
Maritime transportation industry plays a significant role in the development of the world economy. Accidents, however, have been continuously posing risks to the society and the environment in terms of various aspects, e.g. loss of human life, property, etc. Improving the safety and efficiency of maritime traffic has always been an important research topic in academia (Chen et al., 2019;. The autonomous ship, in the meantime, is considered as a promising future to facilitate the development of maritime safety (Ghaderi, 2018;Wrobel et al., 2017;Wu et al., 2020;Xue et al., 2019). Path planning, as one of the critical task providing a safe and efficient route for the navigation of an autonomous ship, has been drawing much attention from both the academia and industry (Liu et al., 2016).
The objective of path planning is to provide an optimal route considering the various factors, e.g. distance, travel time, etc. For the ship to navigate in certain regions. Such a process is classified into two major categories: 1) Global path planning. This category of research is to provide a general, macroscopic route solution for autonomous ships considering more the static environment, such as geographic characteristics, e.g. (Akka and Khaber, 2018), meteorological information, e.g. (Song et al., 2017), etc. and 2) Local trajectory planning. This category of research is to provide a specific trajectory, or series of motions to achieve certain objectives, e.g. collision avoidances, e.g. (Lyu and Yin, 2018a).
According to Huang and van Gelder, 2019), the collision risk between the ship and an obstacle also depends on the velocity of the ship during navigation. Integration of the velocity profile of the ship would facilitate the development of a path that suits the manoeuvrability characteristics of the ship at the global path level. To expand the research on global path planning in this direction, a collision risk integrated path planning method is proposed based on Fast Marching Square (FM2) method in this paper. Compared with the traditional methods, the contribution of this research is two-fold: 1) The integration of collision risk into the global path planning process by considering the velocity constraint of the own ship to obtain length and risk optimal path. 2) Collision risk is measured with comprehensive influences of all obstacles in the velocity space of the own ship, using Time-varying Collision Risk (TCR)  concept, instead of numerically integrating the individual measurement on each obstacle. In this manner, a path that considers both the distance collision risk from a velocity perspective can be proposed. Such a path has the potential to be furtherly integrated with the local motion planning process to facilitate the development of the control model of MASS. To do this, we propose the integration of the FM2  and Velocity Obstacle (VO) (Fiorini and Shiller, 1998) method to generate the shortest path considering both the collision risk and the proximity from obstacles.
The contents of the paper are arranged as follows: Section 2 presents a brief literature review concerning global path planning methods. Section 3 elaborates the details on the methodology introduced in the research, followed by information on the methods utilised in the research, and the details on the model design in Section 4. A case study of global path planning using the proposed hybrid approach is implemented in Section 5, followed by its comparison with the results obtained with classical Dijkstra algorithm and discussions on the hybrid approach in Section 6. Section 7 concludes the research.

Literature review
Path planning is a research topic in various disciplines. In this section, we mainly focus on the development of related works in the maritime discipline, especially for ocean-going ships and MASS. Among the related literature, the optimisation methods and heuristic searching methods are popular in path planning (Liu et al., 2016).
Artificial Potential Field (APF) is a frequently seen method for path planning of maritime vessels, which obtains the path via constructing a potential field of the environment. The destination of the path generates global attractive forces to the ship, and the obstacles (stationary or dynamic) in the environment generates local repulsive forces. Lyu and Yin (2018b) constructed an artificial potential field to represent the influence of obstacles and International Regulations for Preventing Collisions at Sea (COLREGS) for the collision avoidance of autonomous ships. Wang et al. (2019) established a multi-layered APF model for the path planning of the unmanned ship with consideration of minimum energy consumption and external influences. A discretised version of APF is also proposed by (Lazarowska, 2019) to obtain collision-free trajectory for the ship. Among these examples, the risk induced by obstacles is usually measured by the function of local repulsive forces, which is determined by the proximity between obstacles and the own ship.
In the meantime, the short computation time of heuristic methods has made them the most popular methods in global path planning of autonomous ships. The principle of this type of global path planning method is to generate the optimal path with the lowest total cost (path length, energy consumption, etc.). For the risk of collision in these methods, the distance between obstacles is also frequently utilised to formulate the estimation function. Ant Colony Optimisation (ACO), Astar (A*) (Singh et al., 2018b), and Dijkstra algorithm (Singh et al., 2018a;Topaj et al., 2019) are representatives for this approach. Lazarowska (2014) applied ACO for path planning during collision avoidance of autonomous ships in a dynamic environment. Xia et al. (2019) proposed an improved quantum ACO algorithm considering multiple obstacles for path planning of autonomous ship. Eriksen et al., 2019Eriksen et al., , 2020 have developed a series of new methods for path planning and collision avoidance operation for the autonomous ship. The energy-saving perspective and Rule compliance (COLAV) have also been integrated into the process using A* approach and Model Predictive Control (MPC) method.
Another typical approach of global path planning is the computational geometry methods such as Voronoi Diagram (VD), Visibility Graph (VG), etc. Candeloro et al. (2017) utilised VD as the global planner of the underactuated marine vessels, considering the depth information of the environment. Kulbiej (2018) utilised VG to design the shortest path for autonomous ship considering the confined marine environment. Besides, to integrate the advantages of VD and VG, Niu et al. (2019) applied the Voronoi-Visibility graph-based approach for path planning problem of autonomous ships. As for this type of approach, the distance between obstacles and ships are also frequently utilised as indicators of collision risk.
For the global paths obtained with the methods above, the length or travel time could be optimal and shortest. In the meantime, the collision risk induced by external factors (wind, current, etc.), and limitations of the own ship alongside the path, e.g. maximum and minimum velocities of the ship, etc. should also be considered. Some works have been conducted to solve this issue, e.g. Song et al. (2017) have proposed a Fast Marching Method (FMM)-based approach that generates the shortest path considering the external influence of wind and current. Garrido et al. (2020) also applied such a set of methods on path planning of marine surface ship with consideration of the influence of wind, current, etc. via a vector field.
For the collision risk analysis in these works, proximity from obstacles still the primary indicator. Although the velocity of obstacles is also utilised to measure the risk with indicators such as Distance/Time to Closest Point of Approach (D/TCPA), such parameters are frequently integrated numerically, e.g. (Yoo and Lee, 2019;Zhang et al., 2019). In such a design, it is difficult to give a clear physical interpretation to the control module or Remote operator of MASS on the current situation. TCR concept can analyse the risk of collision via measuring the difficulty of collision avoidance in velocity space, and consider the influences from multiple obstacles comprehensively, e.g. (Du et al., 2020). Based on such an idea, a risk-integrated Fast Marching Square (FM2) method is then proposed to generate the optimal path considering both the path length and velocity-related collision risk.

Methodological overview of the research
In this research, the risk of collision defined as the proportion of velocities which would lead to a collision to the whole velocity sets that the own ship can achieve. Such an idea is adopted from , where the risk is considered as inversely proportional to the free space in the velocity space of the own ship. Such a consideration include the difficulty level of collision avoidance into the risk analysis process. Based on this definition of collision risk, a TCR-integrated FM2 (TCR-FM2) path planning method is proposed: 1) Firstly, a spatial proximity map of the obstacles is obtained by conducting the fast marching of front originating from the obstacles; 2) Secondly, the collision risk map in the region is calculated with the method of linear VO algorithm on each cell of the map; and 3) By integrating these two layers of analysis on the environment as a new indicator through a path cost function, the shortest path considering both the proximity between ship and obstacles and collision risk can be generated with gradient descent method. The details of the methods utilised are elaborated in section 3.2 and 3.3, respectively. The framework of the methodology can be found in Fig. 1:

Fast marching and fast marching square method
Fast Marching Method (FMM) is firstly proposed by Sethian (Sethian, 1996(Sethian, , 1999 to compute the position of a monotonically propagating front by solving the Eikonal equation. A path of shortest time cost of front expansion can be extracted from the arrival time matrix of the fronts with the utilisation of the gradient descent method. Especially, when the speed of the front expansion is set as a constant, e.g. 1, the time-optimal path obtained can also be considered as the path with the shortest distance. Based on such a principle, FMM has been proposed (Sethian, 1996) and applied in the path/route planning of robots and MASS, etc. (Garrido et al., 2017(Garrido et al., , 2020Janson et al., 2015;Song et al., 2017).
As aforementioned, the essence of the FMM is solving the Eikonal equation (Sethian, 1996), which is, where is the time when the front reaches the point, and is the front expansion speed at the point. According to the design of the FMM proposed by (Sethian, 1996;Valero-Gomez et al., 2013), three types of points are defined to apply the algorithm on a grid map: 1) Unknown, which denotes the points where the front has yet not reached, whose arrival time is therefore unknown; 2) Narrow-band, which are the points that the front will arrive at next step; and 3) Frozen, which are the points that the front have already passed and their arrival time have been therefore determined.
From the front origin, an iteration of arrival time calculation at each point of the map is then performed. The starting point, which is also the origin of the path, is defined as a frozen point with arrival time assigned as 0 at the first iteration. For each round of iterations, the arrival time of the front on all points around frozen points are calculated by solving the discretised form of the Eikonal equation. The details of such a process can be referred to (Garrido et al., 2017). After the iteration, the arrival time of each point in the grid map is obtained as an ordinal number, which qualitatively indicates the total cost from the origin if no metric is specified. An example of front expansion in a 50 × 50 grid space without obstacle is shown in Fig. 2: For global path planning with a single origin, this method is efficient to obtain the shortest path with the gradient descent method. However, the results of this method only consider the cost on distance, which cannot ensure the safety of the path as it may drive the autonomous ships into dangerous proximity with the obstacles. To handle such an issue Valero-Gomez et al., 2013), proposed the Fast Marching Square (FM2) method to integrate the consideration of safety during global path planning following the logic of FMM. The difference compared with the original FMM is that it introduced a two-step front expansion. 1) for the first step, consider all the obstacles in the environment as the start points to obtain a "potential field", i.e. the arrival time map of the fronts induced from the obstacles is calculated, as shown in Fig. 3. If the path planned needs to be contained within the environment, an external boundary could be added by one grid outside the environment, which is shown in Fig. 3(b). The blue ring around Fig. 3 (b) is induced by the external boundary added. The discussion of the boundary is followed up in section 6.2. 2) Taking the arrival time map as a function of the speed, i.e. the closer the points to the obstacle, the speed of front expansion at this point will be slower. A second-round calculation of arrival time with the velocity map is performed, based on which, the time and safety optimal path can be obtained.

Modified time-varying collision risk
VO method is another tool for detecting and measuring the collision risk between the ship and obstacles (Chen et al., 2018;Huang et al., 2018). The principle of VO is the projection of the spatial-temporal relationship between the own ship and the obstacle, e.g. suppose that ship A navigates in the waterways where B is an obstacle. The status of ship A can be denoted as, and obstacle B is denoted as, where L is the dimensions of them; P is the position of A and B at time t, and V is the velocity of them at the time step t. Since B is the static obstacle in the environment, its position is set to be stationary, and its velocity is set to be 0. Fig. 4 shows their spatiotemporal relationship and corresponding projection into the velocity space of A.
As shown in Fig. 4(b), the spatiotemporal relationship between ship A and obstacle can be projected into the velocity space of ship A. are all the possible positions of A around the obstacle when the collision happens in the future time . The criterion of collision considering the ship's movement can be denoted as, where denotes the position of A and B at collision time and is the Minkowski addition. denotes the position of A and B at the given time after the observation timestep. Considering the assumption that A maintain their kinematic status constant during the encounter process, the collision criterion can be reorganised as, where denotes the velocity sets of the own ship induced by the obstacle, which is the cone-shaped area in the velocity space of the own ship and indicates the distance between ship B and A at observation timestep. Such a projection provides an effective method to determine the risk of collision: if the velocity of the own ship falls into, collision will happen in the future if the ship does not take action. Due to the assumption that the ship's kinematic status remains constant, the VO method utilised in research is also defined as Linear VO (LVO) method.
VO provides an efficient method to determine which velocities of the own ship are likely to cause a collision with obstacles by obtaining the VO sets. Such a risk measurement not only consider the distance between the own ship and the obstacles but also take the spatiotemporal proximity into account with the utilisation of velocity. Based on this notion, in this research, the risk of collision between the own ship and obstacles is calculated using the concept of TCR, which is. is the range of velocity of own ship obtained by LVO, which denotes the velocities that could lead to a collision between the own ship and obstacles in the environment. is the range of the possible velocities that the own ship can achieve. The basic idea is demonstrated in Fig. 5: As shown in Fig. 5, the blue ring indicates, and the red area is the velocities that could lead to a collision. In , is obtained by accurately estimating the reachability of the own ship based on its manoeuvrability parameters. Such a process would need extensive computational time for each point in the map and should be considered in local motion planning (collision avoidance) instead of global path planning. As a modification of TCR, here we use maximum and minimum velocities the ship can reach as the constraint of for simplification. The risk of collision is obtained with the proportion of to.
In this manner, the influence of ship velocity on collision risk can be considered from a general perspective at the global planning stage.

Map construction
The first step for the path planning is to construct the grid-based environment map for further processing. Since the VO method is introduced to calculate the collision risk in each cell of the grid map, which requires the actual geo-coordinates of the obstacles as the inputs to construct the VO sets, the picture-based map is not suitable to utilise directly. Therefore, the environment map will be reconstructed from the geographical information about the obstacles.
The information on the obstacles is obtained from map providers such as OpenStreetMap 1 first. It then is extracted with the help of Geographical Information System (GIS) software such as QGIS, etc. By setting the reference point of the region, the geo-coordinates of the obstacles will be transformed into the coordinate system with the unit which is consistent with the velocity of the ship, e.g. meter in distance and m/s in velocity. In this research, we utilised the meter as the unit. Based on these processes, a map of obstacles in Cartesian coordination system can be constructed. Fig. 6 shows an example of the process:

Obstacle potential field construction
The objective of this process is to construct a potential field of the environment to measure the spatial proximity from the obstacles. The obstacles are set as origins of the expansion of the front (with same expansion speed of the fronts). The arrival time of each position in the environment can be considered as a measurement of the proximity of the obstacles, which then can be considered as a measurement of collision risk Valero-Gomez et al., 2013).
The resized grid map of the obstacles based on the spatial resolution R in the analysis is first processed to obtain the location of obstacles. Once the locations are obtained, the fast marching method is introduced to perform the front expansion originating from the obstacles to determine the obstacle potential map. Fig. 7 elaborates an example of obstacle potential map with a grid size of 10 m, which is obtained based on Fig. 6 (b). The effect of map resolution is discussed in section 6.3. As the figure shows, the blue regions indicate the area close to or inside the obstacles, and the yellow areas indicate longer distance from the obstacles.

Integration of FM2 and TCR
In the conventional FM2 method, the distance from obstacles is considered to formulate the indicator of collision risk. However, such design only considers the spatial proximity between the location of interest and obstacles and ignores the influences of the spatiotemporal relationship between them, which is caused by the velocity of the moving object. To integrate this aspect into the path planning process, we adopt the modified TCR to measure the collision risk on each cell in the environment based on the possible velocity range of the ship.
The calculation process is as follows: 1) Determine the centre point of the cell; 2) Perform the LVO algorithm for each obstacle for a detection time of 30 min, i.e. to analyse the potential collision risk with this obstacle for the next 30 min in the future. This parameter can be adjusted for the practical application; 3) Combine all the LVO sets obtained for the obstacles, and calculate the proportion of the overlap between the LVO sets and the possible velocity set of the own ship as the risk indicators of the cell.
To integrate the obstacle potential matrix and the collision risk matrix, a cost function for front expansion speed in the second step of FM2 method, which is utilised to modify the front expansion speed at each point, is proposed: is the combined cost for front expansion at considering both the proximity level and the local collision risk obtained with LVO. is a weight factor on the preference between the spatial proximity from the obstacle and the collision risk to decide which component has a stronger influence on cost, which is determined by comparing the total cost of the possible paths obtained using the algorithm. is the front expansion speed based on the cost at the point. If the local cost is high, the front expansion speed is slow, vice versa. To let the proximity level and risk have the same level of influence on the total cost, here we rescale the range of to [0,1], where 0 means that the location is an obstacle and 1 means that the location is at the farthest position from obstacles.

Path extraction using the gradient descent method
After the establishment of the risk potential map, the second round of   FM is performed, with the velocity of front expansion modified. The small value of indicates the front expands slowly, vice versa. A new arrival time matrix of front propagation will be obtained after the second-round of fast marching from the start point of the path, based on which, the gradient descent method is then performed to extract a path that has the global lowest cost.

Design of the algorithm
The whole process of the TCR-integrated FM2 algorithm is implemented through the FMM Toolbox of MATLAB. 2 Algorithm 1 shows the pseudocode of the whole algorithm:

Case study
In this section, a case study on path planning with the proposed TCR-FM2 algorithm is illustrated to verify the method. To do this, an area for the case study is randomly chosen, and the geo-information of the region is extracted within the following boundary: Latitude: 25.2125 • N to 25.2390 • N; Longitude: 119.5705 • E to 119.67 • E. The configuration of the case study are shown in Table 1:

Map construction
Based on the open street map service, the geo-coordinates of the obstacles are obtained in the form shown as where is the boundary of the ith obstacle in the area, are the vertices of the obstacles stored in Latitude/Longitude manner. Via setting the left-bottom corner as the reference point of the map, the positions of obstacles are transformed into the relative distance from the reference point using spherical distance calculation, based on which, a corresponding environment map is constructed and illustrated in Fig. 8: Before applying FM2 on this map to obtain the obstacle potential, the environment map should be transformed into a grid map with a larger resolution instead of 1 m in the original form to improve the efficiency of the calculation. In this case study, we chose 50 m as the resolution of the map, which is shown in Fig. 8 (b). However, different resolution can be selected based on the trade-off between the computation time and the accuracy of the results.

Obstacle potential map
The first step to applying TCR-FM2 method is to obtain the obstacle potential map based on the environmental information. The binary occupancy map (Fig. 8 (b)) is utilised as the input of the first step of FM with the settings as follows: 1) Front expand speed as 1; 2) Obstacles as the front origins. After the front propagation, The arrival time matrix of the front expansion is obtained. Fig. 9 is the illustration of the rescaled arrival time of the front expansion from the obstacles with or without external boundary, respectively: The blue region indicates areas close to the obstacle, and the red areas show otherwise. This obstacle potential map can be considered as a measurement of spatial proximity between the possible positions of the autonomous ship and obstacle. As can be seen from Fig. 9, the obstacle potential map with an external boundary alongside the map boundary is significantly different from the one without boundary. The reason to do so is to avoid the path planned reaching or exceeding the boundary. Such difference on the path planning will be discussed in section 6.2.

Collision risk map and integration with obstacle potential
As the next step, LVO-based collision risk potential map is constructed by calculating collision risk on each cell in the map, which is shown in Fig. 10: From Fig. 10, one can see clearly how collision risk is distributed in the environment considering the range of the velocity that the autonomous ship can achieve. Compared with the obstacle potential map, the collision risk does not linearly decrease with the increment of the distance from obstacles. For some points that are close to the obstacles, the collision risk considering the velocity range of the autonomous ship could be small, which is still navigable. Considering both the spatial  proximity and the collision risk during the global path planning, the obstacle potential map and collision risk map are integrated based on the total cost function. Fig. 11 shows the combined potential map with different α values.
One can see that when the α value is small, a large area of the environment is available for the front to expand with high speed, however, as the α value increases, the high-speed area decreases, which reflects the increment of the influence of spatial proximity from obstacles. Such difference will have an impact on the shortest path obtained with the introduction of the gradient descent method, which will be elaborated in section 5.4 and discussed in section 6.3.

Path planning
With the front expansion speed map obtained in section 5.3, the second round of FM should be applied with pre-set front origin to obtain the arrival time map and the shortest path. To compare the results obtained with standard FMM and different types of FM2, 4 cases of path planning are examined. Table 2 gives the name and description of each method. The paths obtained under different configurations are shown in Fig. 12. Their path length and accumulated risk are illustrated in Table 3. Fig. 12(1) is the path planned with standard FMM. One can see that the path is the shortest connection between the start point and destination (Table 3). However, alongside the planned path, two parts are extremely close to the obstacle. The accumulated risk of this path is also the highest among the four paths obtained (Table 3). As an improvement, Fig. 12 (2) and (3) illustrate the paths planned utilised collision risk and proximity from obstacles as the cost, respectively. The problem shown in Fig. 12 (1) can be solved by expanding the obstacles with methods such as standard FM2 and obtain a path that keeps a safe distance from the obstacles as shown in Fig. 12 (3). However, as Fig. 10 indicates, the collision risk considering the own ship's velocity is not evenly distributed around obstacles, so simply expanding the obstacles could generate a longer path (12 (3)) that sacrifices the length of path length. As can be seen from Table 3, the path obtained with standard FM2 has the lowest accumulated risk but the longest path length among the four results. For the risk-based path (Fig. 12 (2)), compared with the path obtained with standard FMM, the accumulated risk is lower than the path obtained with standard FMM. However, it path through some small objectives, which is not optimal from the navigation perspective. Fig. 12 (4) shows a good combination of (2) and (3). The accumulated risk of the path obtained with TCR-FM2 is only slightly larger than that of standard FM2, and the path length is shorter than that of standard   FM2 to a large extent (Table 3). The determination of weight factor alpha is discussed in section 6.3. Compared with Fig. 12 (2), the path obtained with TCR-FM2 avoids the high-risk and complicated area by travelling around the obstacles to the destination and at the same time, by staying at certain proximity from the obstacles, and the path is shorter than the path planned by standard FM2.
Besides these two indicators, we also analysed the curvature of each path. Fig. 13 shows the boxplot of the curvature value at each point of the paths. The outliers are discarded in the figure only to show general descriptions of the paths. For path obtained with Risk-based FM2 and standard FM2, their curvature is more dispersed compared with paths obtained with standard FMM and TCR-FM2, which indicates more manoeuvres have to be performed to follow the path. At the same time, the curvature distribution of path obtained with TCR-FM2 is narrow, which indicates a low path curvature fluctuation.

Path planning with dynamic obstacles
For global path planning in practices, the influences from the external dynamic obstacles such as other ships in the region should also be considered. To achieve this, we have added another component of collision risk, which is induced by target ships into the risk function, which is shown in Eq. (2): denotes the TCR induced by the static obstacles at point and denotes the TCR induced by the dynamic obstacles at point. The estimation of follow the same method as, which is based on (Chen et al., 2018). Since the information of the static environment remains constant during the navigation, such a design can simply recalculate risk from dynamic obstacles when it needs an update. In this way, the influences from target ships can be integrated into the cost function of the proposed TCR-FM2 method. To verify such design, another case study on global path planning, considering two assumed target ships is conducted. The configuration of the case study is illustrated in, Table 4: A target ship with known kinematic information is considered in this case study. Besides, an iteration scheme is also introduced to plan the global path at a certain time interval. The goal of this case study is to verify the capability of the path update of the proposed method instead of real-time collision avoidance. The target ship is assumed to keep speed and course unchanged. The speed of own ship is assumed to randomly choose between 2 and 4 m/s to simulate the update of ship speed during navigation. Here we designed to update the path every 5 min. The risk distribution in the region and the corresponding planned path is shown in Fig. 14: As shown in Fig. 14, with different iterations, the position of target ships is updated and considered in the collision probability estimation. At each iteration, the proposed TCR-FM2 can update the result of path planning with a new calculation of the collision risk induced by the target ships at a new start point. When in practices, once the new information of target ships is acquired from AIS, Radar, etc., or the pre-set update frequency has been reached, the proposed method can update the global path from the current location of the own ship. As for the update frequency, in this case, we chose 5 min. In practices, such parameter can be adjusted based on the updated information of target ships and the computational speed of each iteration. In the meantime, a dynamic local motion model can be developed and integrated with this method to design a complete path planning module for MASS. However, since the goal of this research is to develop a global path planning method, such consideration is not included in this work.

Discussion
In the previous section, a series of case studies are conducted to  illustrate the process of TCR-FM2 algorithm on path planning in the environment and compare with three paths obtained with FMM and FM2 methods. In this section, the algorithm will be discussed on the comparison with the classical Dijkstra algorithm, the consideration of boundary during path planning, and the choice of the parameters α and resolution for TCR-FM2 for optimal path planning.

Comparison with the Dijkstra algorithm
As a comparison, two cases of path planning with classical Dijkstra 4 and 8 direction searching algorithms are shown in Fig. 15, respectively, which did not consider the collision risk factor. The principle of searching is the same between these two algorithms, while the difference is the number of search directions.
From the figure, one can see that both Dijkstra algorithms give the shortest path that goes through the area with high collision risk (between islands) and have close distances from the obstacles. Besides, compared with the path obtained from FMM and TCR-FM2, the results have many sharp turns and path sections, which is not suitable for the manoeuvre of autonomous ships and could result in a collision accident. This could be explained as follows: 1) Due to the discretised nature of the Dijkstra algorithm, the direction of searching is pre-defined in the implementation of the algorithm, e.g. 4 directions and 8 directions. The paths obtained based on such configurations are therefore not as smooth as those obtained with FM2, which is continuous in design. 2) Same as the standard FMM, since the classic Dijkstra algorithm does not consider the influence of obstacle proximity and collision risk, the path obtained will follow the principle of shortest total length, which would lead to    paths being too close to the boundary of the obstacles. Considering these differences, the proposed TCR-FM2 performs better on finding the shortest path considering both the spatial proximity of obstacles and collision risk induced by the velocities of the own ship.

Consideration of the map boundary
During the construction of the obstacle potential map, an external boundary of the environment based on the grid map was introduced. By adding a set of "phantom" obstacles at one cell outside the boundary of the map, the cost of approaching map boundary can be obtained and therefore influence the process of path planning. Fig. 16 illustrates two cases of the planned paths under two scenarios: with or without consideration of the map boundary.
From Fig. 16, one can see that the boundary of the environment influences the result of path planning. Such influence can be explained as follows: With the integration of standard FM2, the obstacles are enlarged to some extent. However, in a certain situation shown in Fig. 16   (a), the enlargement could force the gradient descent algorithm to generate the path alongside the boundary of the map. However, compared with Fig. 16(b), the path obtained under such a scenario is longer and has more sharp turns, which is not optimal compared with the results considering the influence of map boundary. This influence depends on the location of the start point and destination of the path to some extent, considering the difference in Fig. 16. To deal with such scenarios, the following aspects can be considered: 1) carefully determine the weight factor to adjust the influence of obstacle enlargement; 2) put an additional boundary of the area for path planning to consider it as an obstacle in the region. Such boundary can be set on the grid map obtained from the region's map with one cell outside the area. The reason to do so is to ensure each cell in the map is reachable.

Influence of parameter settings
According to the cost function, a convex combination of the risk cost and obstacle proximity cost is proposed with parameter α to integrate the influence from these two aspects. For each α, a shortest-length path under the configuration will be obtained after the TCR-FM2 process. Therefore, it is necessary to determine which path obtained is optimal among the solutions. To do this, an analysis of the paths obtained with is conducted. The total length (measured in cells of the grid map) and accumulated risk of paths are shown in Fig. 17(a). A combined evaluation indicator, which is the geometric mean of the total length and total risk, is shown in Fig. 17 Fig. 17, one can see that with the increment of weight factor α, the total length of the path planned is increasing. This is because the increasing influence of the obstacle potential with α will push the path from the obstacles as far as possible. At the initial stage, the path planned is short among other results, but the corresponding accumulated risk is high. The accumulated risk decreases with the increment of path length, but at a certain point, such decrement stops, as Fig. 17(a) indicates that risk is increasing with α afterwards, which indicates these paths are not optimal in both total length and accumulated risk.
From Fig. 17(a), it is difficult to determine which α and the corresponding path is optimal. To determine this, we choose the geometric mean of path length and accumulated as the combined evaluation indicator. The results of the evaluation are shown in Fig. 17(b). One can see that the evaluation of the paths is also divided into two parts. This can be explained by the results that the path has changed from going through the islands and instead go around the obstacles. According to Fig. 17(b), when α = 0.31, the combined evaluation is the minimum, which can be considered as the optimal choice for the case. From this process, it is advised that a comparison between the combined evaluation under different α should be conducted to find the best solution when implementing the method.
Another parameter which could also have an influence on the global path planning process is the resolution of the environmental map. The resolution of the environment map determines the accuracy of the shape of obstacles when they are constructed as the binary occupancy grid. Fig. 18 indicates the different binary occupancy grid map of the same environment and target ship information with different resolutions. Fig. 19 gives the relative difference between the length of path obtained with α = [0,1] under different resolutions.
As can be seen from the figure, with high resolution, the accuracy of the obstacle shape can be increased. However, as the number of the grid is increasing, the computational burden of the static risk map is also increasing. According to Fig. 19, the median relative difference of all the path lengths obtained with different resolutions are less than [-0.25%, 0.25%]. To achieve a proper balance between the update frequency of path planning and the accuracy of the map and path results, a trade-off between these two aspects should be considered when utilising this method in practices. We advise choosing the resolution parameter based on the relationship between the dimension of the own ship and the regional geographic characteristics of the obstacles, such as shape and

Conclusions
Path planning is a critical component of the autonomous ship system to facilitate finding the optimal route and its safety of navigation. To improve the quality of global path planning, various methods have been proposed. In this research, a collision risk-integrated FM2 (TCR-FM2) algorithm is proposed to plan the path for autonomous ship considering both the influence of environment obstacles and the velocity of the own ship.
For the conventional global path planning methods that find the time/distance paths, the influence of the velocity range of own ship can achieve on collision risk is rarely considered from a comprehensive perspective. To integrate such information into the process, a VO-based collision risk measurement is introduced to measure the risk of collision between ship and obstacles via the space of the dangerous velocity in the velocity space of the autonomous ship. Based on the definition, the spatial risk map is obtained, which is utilised as input for the FM2 algorithm. The influence of the environmental obstacles is obtained with the original design of the FM2 algorithm. With the integration of the two path costs according to the convex combination function in the paper, a front expansion cost matrix considering both the influence of spatial proximity and collision risk between obstacles are obtained as the inputs for the FM2 algorithm for path planning.
Four case studies based on different configurations of path planning methods are conducted. Based on the comparison, one can see that the proposed method integrates both the advantages from risk-based path planning and standard distance-based FM2 algorithm and produces a path that can avoid the high-risk areas and maintain a short total length at the same time. Besides, compared with results from the Dijkstra algorithm, the TCR-FM2 avoids producing a path that has sharp turns and proximity to obstacles, which shows good potential for practical impli- cations. An analysis of the influence of weight factor α is also conducted.
The results indicate that with the increase of α, the total length of the planned path increases continuously, while the accumulated risk first decreases and then increases slowly. To determine the optimal path, the combined evaluation on the path length and accumulated risk should be considered. Besides, an additional case study on verifying the capability of updating the path planning, considering the dynamic obstacle is also conducted. Compared with other global path planning methods, the advantages of the proposed method are as follows: 1) considering both the path length and collision risk during planning; 2) Introduction of velocity-induced collision risk considering the velocity constraint of the own ship; and 3) measuring collision risk from obstacles in the velocity space, which provides a clear physical interpretation of the risk. In the meantime, the relatively higher computational burden of the proposed method induced by the cell-based design is the limitation. However, since the computational power is increasing fast, with proper optimisation of the computer code with higher efficiency, such limitation can be addressed in practices.
With the proposed TCR-FM2, the velocity information of the autonomous ship is introduced into the global path planning stage. It provides a new perspective on finding multiple objectives (i.e. efficiency and safety) optimal path planning with the utilisation of FM2 method as the framework, which could facilitate the development of the global path planner of the autonomous ship in the future.
her encouragement and support.