Research on Path Planning for Unmanned Surface Vessels Based on AIS Data

To address the issues of poor endpoint convergence and suboptimal path quality in global path planning for unmanned surface vessels (USVs), this paper proposes an endpoint-convergence oriented improved genetic algorithm based on AIS data. Firstly, utilizing a genetic algorithm with an endpoint-convergence objective function, a set of paths with strong endpoint convergence is selected. Secondly, to overcome the limitations of a single optimization algorithm, a multi-objective path planning approach is employed using a genetic algorithm, thereby improving the distance and trajectory smoothness in global path planning for unmanned ships. Finally, the planned paths are evaluated by comparing them with the real paths from AIS data. The simulation results demonstrate that the proposed method outperforms other traditional algorithms in terms of average path turn count and turn angle, reducing them by an average of 35.41% and 35.72%, respectively. Moreover, the proposed method exhibits the smallest error compared to the real trajectories, with an average reduction of 18.26%. These results validate the effectiveness and rationality of the proposed approach in improving path quality, reducing path turn count, and achieving better alignment with actual trajectories.


Introduction
Maritime transportation plays a crucial role in global trade, economic development, energy transportation, and environmental sustainability.It serves as a vital driver for promoting society's sustainable growth and prosperity.Unmanned surface vessels have found wide-ranging applications in path planning [1], enabling autonomous navigation through the utilization of path planning algorithms.They can autonomously select optimal routes in marine or river environments, considering predefined objectives and constraints, thereby avoiding obstacles and hazardous areas to safely reach their destinations.
Unmanned surface vessel path planning involves both global and local path planning, encompassing the acquisition of environmental information, environmental modeling, and path planning.These steps are crucial for enabling autonomous navigation of USVs in complex environments.This study focuses on global ship navigation path planning and provides an effective solution for optimizing path and enhancing performance of USVs.In [2], proposes a ship path planning method based on Automatic Identification System (AIS) trajectory data.They utilize turning point information from AIS trajectories and establish connectivity between turning points to construct a directed navigation network.The ant colony algorithm is then employed to plan ship routes and find the optimal path.This approach combines the strengths of AIS data and ant colony algorithm, improving navigation efficiency and safety.In [3], a method is proposed that performs cluster analysis of turning points and determines their connectivity using AIS trajectory data.To find the optimal path, they employ the Particle Swarm Optimization (PSO) algorithm for path planning.This method leverages the information from AIS trajectory data, enhancing the efficiency and accuracy of path planning.In [4], a combination of the neural network algorithm and AIS system information is proposed to achieve optimal collision avoidance decision-making during ship encounters.In [5], grid-based environmental modeling and an improved ant colony algorithm are utilized for global path planning of unmanned surface vehicles after grid representation of marine environments.In [6], environmental data from electronic nautical charts are utilized, and grid modeling is combined with genetic algorithms to find optimal route planning.In [7], AIS data is compressed and clustered to extract key turning points.The initial pheromone concentration of the ant colony algorithm is set based on the navigational frequency of ship routes to solve for safe and economical optimal routes.In [8], navigable and obstacle grids are defined using extensive AIS data.The adjacency matrix is combined with the ant colony algorithm to seek optimal route planning based on the computed adjacency matrix.
This paper addresses the limitations of ship navigation path planning using algorithms such as genetic algorithms, including a large search space and poor solution quality.Therefore, this study proposes a path planning approach for unmanned vessels based on AIS data.Firstly, the existing electronic nautical charts are subjected to grid-based environmental modeling.Then, a genetic algorithm is employed to initially filter out a subset of endpoint-oriented paths.From the filtered paths, the objective function is defined based on minimizing path length and ensuring smooth turning angles.The final result is a ship route that is safe, economical, and aligned with practical navigation.Furthermore, a comparison is conducted between the planned route and other algorithms as well as real-world paths to evaluate the accuracy.The test results demonstrate the feasibility and effectiveness of the proposed algorithm.

Preprocessing of AIS Data
The Automatic Identification System (AIS) [9] is a system that utilizes wireless communication technology to enable automatic identification and information exchange among vessels.By transmitting and receiving radio signals, this system facilitates the transmission of vessel-related information such as position, speed, heading, and route, thereby enhancing navigation safety and efficiency.The primary applications of AIS systems on ships are in navigation safety and management.

Data Description
AIS data consists of various types of information, including static information, dynamic information, voyage-related information, and safety-related short messages.When a vessel is in operation, dynamic position data is transmitted at a rate of at least once every 2 seconds and up to once every 3 minutes.Static information includes the Maritime Mobile Service Identity (MMSI), vessel name, call sign, vessel type, and other details.Dynamic information includes the vessel's latitude and longitude position, heading, speed, and navigation status, as shown in figure 1.

Data Cleaning
environmental influences, has been widely applied in routine ship navigation operations.However, due to various factors such as interference, the AIS data may contain some noise and irregular erroneous data.Measures such as data exclusion or completion are taken specifically targeting obvious anomalies.

Data Filtering and Deletion
According to the research requirements, a specific area range is set, and within this defined area range, specific types of vessels or designated vessel MMSI numbers are selected based on the research objectives.This enables narrowing down the scope of analysis and focusing on studying the vessels of interest.

Description of the Study Area
For this study, a specific shipping route within the waters of Qingdao Port was selected.The research area extends longitudinally from 120°10′E to 120°20′E and latitudinally from 35°59′N to 36°6′N.The research area near Qingdao Port is based on the S-57 standard electronic nautical chart, as shown in figure 2.

Establishment of Grid-based Environmental Model
To enhance the efficiency of path search algorithms, a grid-based modeling approach can be employed to convert the S-57 standard-defined electronic nautical chart.Grid modeling transforms complex marine information into a simplified grid model.In the grid model, the positions of obstacles within the electronic nautical chart are designated as obstacle grids and represented by the color black, while positions without obstacles are represented by the color white.The grid model assigns real number codes to each grid in a sequential order, starting from the bottom left corner and progressing from left to right and bottom to top, establishing a one-to-one correspondence.Therefore, the image is first processed into grayscale and then transformed into a grid model, as shown in figure 3.

Generation of Initial Population
In traditional genetic algorithms, the individuals in the initial population often generate routes and infeasible paths that deviate significantly from the real-world situation due to their random nature.This can reduce the accuracy of the search process.To address this, this paper proposes a vessel path planning approach based on endpoint bias.The distance from randomly generated paths to the destination is incorporated as part of the fitness function, aiming to guide the path planning towards the endpoint.
Assuming the number of individuals in the initial population is N, the initial population can be represented as T, as in equation ( 2).

Selection of Fitness Function
To guide the path planning towards the endpoint, the distance to the destination is considered as a part of the fitness function.This ensures that the path planning process is more inclined towards reaching the endpoint.The fitness function can be expressed as in equation ( 3).
where i p represents a path and _ ( ) i path length p represents the length of path i p .The fitness function value is calculated as the reciprocal of the path length plus one, indicating that higher fitness scores correspond to shorter path lengths.Assuming the population size is M=100, the top 50 individuals with higher probabilities are selected from the initial 100 paths as the initial population for the next stage.
Furthermore, the optimization objective is to minimize the ship's path length and maximize the smoothness of turns.The purpose of planning the route is to avoid obstacles while minimizing the path length and achieving optimal smoothness.Therefore, it is necessary to establish the corresponding mathematical model and define the objective function to be optimized.
Objective function 1: Minimize Path Length The shortest distance can be determined using equation ( 4).
( ) As in equation ( 5), Objective function 2: Optimal Smoothness The smoothness of turns in unmanned vessels is closely related to the stability of their motion.Smooth changes in turning angles can reduce the instability of unmanned vessels during navigation, thereby improving their control stability.By considering the smoothness of turns as an objective function, it is possible to optimize the control performance of unmanned vessels while enhancing their comfort, ultimately improving their safety.As in equation ( 5).
Finally, by using weights, the two objective functions can be combined into a comprehensive objective function, thereby transforming the multi-objective optimization problem into a singleobjective optimization problem.As in equation (6).

Comparison with Other Traditional Algorithms
To validate the effectiveness of the improved algorithm, MATLAB R2018a is used as the simulation tool in this study.Based on the same grid map, the initial population size is set to M=100, and the termination generation is set to G=50.The parameter selection is consistent with the study in the literature [10].The starting position of the unmanned vessel is (120.20212°E,35.996122°N), and the destination position is (120.32508°E,36.096015°N).The path search results of the proposed algorithm are compared with single-objective GA algorithm that considers only path length, traditional particle swarm algorithm, and A* algorithm.As shown in figure 5. in terms of path length and smoothness, it is a single-objective path planning algorithm that can only find the shortest path.In path planning problems that require considering multiple factors or objectives, the A* algorithm may not provide suitable solutions.Compared to other algorithms, the proposed algorithm reduces jitters and drastic changes along the path, thereby enhancing path smoothness and comfort.In summary, it effectively reduces path length and generates smoother and more stable paths.

Comparison of Error between Different Algorithms and the Real Trajectory
The difference between the actual flight trajectory and the planned flight trajectory was calculated using the method of straight-line distance error.The Haversine formula was employed to calculate the distance between two GPS coordinate points.MATLAB was utilized to compute the errors of the four different algorithms compared to the real trajectory, as shown in figure 7. From figure 7, it can be observed that through improvements and research, the modified GA algorithm exhibits the smallest error compared to the real trajectory.On average, it reduces the error by 18.26% compared to other algorithms.This indicates that the proposed algorithm in this paper can enhance the accuracy and reliability of ship path planning, enabling better prediction and simulation of vessel motion trajectories.

Conclusion
To address the issues of insignificant convergence towards the destination and poor path quality in path planning, this study establishes an endpoint convergence-oriented objective function to enhance the significance of the destination.This ensures that path planning better aligns with the intended target endpoint.Additionally, based on S-57 electronic charts, the length and smoothness of ship path planning are considered.Finally, the generated trajectories are evaluated for errors against the real AIS trajectories.
Based on the analysis of simulation data, the proposed method demonstrates good performance in terms of path distance and trajectory smoothness in real maritime environments.It achieves a reduction of 35.41% in the average number of turning angles and turning instances compared to traditional algorithms.Furthermore, it exhibits the smallest error when compared to the real trajectory, reducing the error on average by 18.26% compared to other algorithms.Overall, the proposed method outperforms other path planning approaches, providing an effective solution for optimizing and enhancing the performance of unmanned vessel paths.

Figure 2 .
Figure 2. The electronic nautical charts of Qingdao Port waters and the research area.

Figure 3 . 1 p
Figure 3. Rasterized map of the research area.