#### Abstract

With vigorous development of the maritime trade, many intelligent algorithms have been proposed to avoid collisions due to resulting casualties and increased costs. According to the international regulations for preventing collisions at sea (COLREGs) and the self-evolution ability of the intelligent algorithm, the collision avoidance trajectory can be more consistent with the requirements of reality and maritime personnel. In this paper, the optimization of ship collision avoidance strategies is realized by both an improved multiobjective optimization algorithm NSGA-II and the ship domain under the condition of a wide sea area without any external disturbances. By balancing the safety and economy of ship collision avoidance, the avoidance angle and the time to the action point are used as the variables encoded by the algorithm, and the fuzzy ship domain is used to calculate the collision avoidance risk to achieve collision avoidance. The simulation results show that the proposed method can optimize the ship collision avoidance strategy and provide a reasonable scheme for ship navigation.

#### 1. Introduction

Collisions are one of the biggest problems in terms of safe navigation at sea. With the development of science and technology, a substantial amount of equipment has been developed to avoid collisions, such as the automatic identification system (AIS), automatic radar plotting aid (ARPA), and global positioning system (GPS) [1, 2]. This equipment can clearly determine the navigation data of a target ship via radar and satellite positioning to conduct analyses and decision avoidance actions via navigators. However, the number of casualties and economic losses caused by collisions is still high each year. According to the investigation, the main reason for this is due to subjective judgment errors. Therefore, it is the main research problem of the researchers to provide reasonable collision avoidance strategy for navigators.

Collision avoidance is simply the reprogramming of the navigation path of a ship that intersects another route to prevent collision. In early navigations, collision avoidance was conducted based on the experience of seafarers (i.e., qualitative research on the regulations for preventing collisions at sea (COLREGS)), which has great instability. In recent years, along with the development of science and technology, the ARPA, AIS, and other marine auxiliary equipment have been widely used, and navigation information (e.g., the sailing speed, latitude, and destination of a ship) is obtained by specific equipment. Therefore, a new method for collision avoidance decisions was generated (i.e., the distance to the point of approach (DCPA) and time at the point of approach (TCPA)); the DCPA and TCPA can be used to plan ship avoidance behaviours [3] (i.e., the quantitative study of collision avoidance rules). However, such a method is only a rough evaluation of this action, and it sometimes results in an incorrect behaviour detection.

With the continuous success of intelligent algorithm practices, some algorithms are used to discover better collision avoidance strategies, such as genetic algorithms (GAs), the ant colony algorithm, and danger immunity algorithm [4–7]. The principle of the optimized collision path avoidance method is to avoid collisions with minimum loss. An intelligent algorithm is used to make the avoidance behaviour more reasonable and accurate. For example, Lyu used the artificial potential field method to plan the route of ships with a single TS avoidance and multiship avoidance [8]. Tsou completed the optimization of the collision avoidance path by using the ant colony algorithm to develop the real-number coding of avoidance parameters [9]. Mostefa adopted the GA to optimize the collision path in a fuzzy environment [10]. And to reduce the effect of human factors, Kang can use a particle swarm optimization (PSO) algorithm to plan ship paths [11]. Xu et al. proposed an autonomous collision avoidance method by training deep convolutional neural network [12]. In order to better judge the existence of danger, Chen et al. used the velocity obstacle approach to study collision avoidance of ships [13].

In the above method, the choice of a collision path is regarded as a problem based on multiple criteria and nonlinearity, and path planning is carried out through the combination of the DCPA and TCPA and algorithms. However, risk discernment between the DCPA and TCPA cannot sufficiently reflect the occurrence of collisions; namely, these methods cannot consider the information of a target ship and the opportune moment. To solve this problem, Szlapczynski introduced two new parameters in the field of ships: the degree of domain violation (DDV) and the time to domain violation (TDV), which were used to replace the DCPA and TCPA [14]. This method is based on an off-centred elliptical domain to calculate the time of the target ship's intrusion into the ship domain, and the fuzzy principle is used to estimate the extent of the target ship's intrusion into the fuzzy domain. Therefore, the navigation strategy for ships is planned based on the principle of noninvasive ship domains. At the same time, in most of above-mentioned researches, the optimization function is always defined as a single-objective optimization or transformed to a single-objective optimization by the weights allocation. But because of imperfection of single-objective optimization and the difficulty to determine the weight value, the trajectory of collision avoidance is not reasonable. Therefore, multiobjective algorithm is necessary for collision avoidance planning.

In this paper, in order to make the distance between the own ship and the target ship more appropriate and to consider the irregularity of the ship domain, it is considered that both ship domains exist at the same time. And the Szlapczynski’s method was applied to calculate the risk of collision between two ships; the maximum of the two ships’ risk is taken as the objective of algorithm optimization [14–16]. At the same time, the multiobjective optimization algorithm is used to optimize the collision avoidance parameters by considering two objectives (i.e., security and economics) [17]. And the multiobjective algorithm is improved by referring to the danger model theory [18], that is, mapping the dominated solution to the vicinity of the nondominant solution can effectively accelerate the convergence speed of the multiobjective algorithm. The whole collision avoidance trajectory only considers one avoidance, so the optimization variable of trajectory takes into account the time of action point and the angle of avoidance at the action point, which makes the collision avoidance trajectory instruction more clear.

The rest of the paper is organized as follows. The ship maneuverability equation, fuzzy ship domain, and basic parameter calculations are introduced in Section 2. Section 3 introduces the multiobjective optimization algorithm (NSGA-II) and the application of the combined algorithm and ship domain in the optimization of the collision avoidance strategy. In Section 4, a simulation example based on this method is given for the collision situation; finally, the summary and conclusions of the methods are given in Section 5.

#### 2. The Ship Motion Model, the Ship Domain, and Parameter Calculation

##### 2.1. Ship Motion Model

Because ships are subjected to a variety of forces during movement, it is necessary to consider six degrees of freedom to accurately reflect the movement of ships, which requires too many parameters and are too complicated. A complicated and vulnerable ship model may contain too many parameters, which are difficult to estimate and analyze. Therefore, the mathematical model of the ship is always an approximate model. In this paper, we used mathematical models from the Maneuvering Motion Group (MMG), which was established by the second meeting of the Japan Towing Tank Committee in March 1976. The linear surge velocity of the ship (), linear sway velocity (), yaw angular velocity (), and rudder angle () represent the state and control variables of the mathematical model. The mathematical model for ship motions with three degrees of freedom is considered here:where and denote the sum of the added masses and the mass of the ship in the -and -directions, respectively; and denote the velocities along the - (towards the front) and -axes (towards the starboard), respectively; , , and represent the surge force, sway force, and yaw moment, respectively; and and denote the moment of inertia of the ship and yaw rate, respectively.

In this study, the longitudinal motion of a ship considers the propelling force and fluid resistance of the ship. In addition, the transversal movement of a ship reflects only the effect of its lateral hydrodynamic force. The propelling force and transversal resistance should be considered for the yaw rotation of the ship. Thus, the response model is as follows:where , , and are flow resistant coefficients, and , , and are the proportional coefficients associated with the ship's length, which are calculated as follows (3).where and refer to the ship's length and command rudder angles, respectively; and are constants; and and represent the maximum speed and maximum propulsion, respectively.

##### 2.2. Ship Domain and Parameter Calculation

Ship safety domains are widely used in the study of collision avoidance, where early domain models are based on the statistical analysis of radar data, such as the Fuji ship domain and Goodwin ship domain, which originates from the empirical analysis method [19]. Currently, more analyses of ship domains are based on expert knowledge and theoretical analysis. For example, Wang proposed the quaternion ship domain (QSD) based on theoretical analysis [20], and Dinh proposed the polygonal ship domain based on the combination of analyses and statistics [21]. In this study, the model of the Kijima ship is adopted by taking into account the advance and tactical diameter [22]; the ship domain model is defined as follows:where , , , and represent the four radii of the ship domain. is the ship's course. is the coordinate of ship. where and are the advance and the tactical diameter, respectively.

If there are no and values for the own ship, the ship motion mathematical model is used to calculate their values, where different ships with different ship parameters obtain a specific ship domain. In the case of not knowing the target ship parameters, the following formula can be utilized [20]:where represents the speed of the ship. Then, the collision risk is determined by the principle of nonaggression on the two ship domains, and the related parameters are calculated as follows.

*(**1) The Parameters of Distinguishing Risk*. In this paper, the conventional DCPA and TCPA discriminant methods are not used, but the methods of Szlapczynski are imitated. We introduce the fuzzy ship domain, which is used to address the above four ship radii.where is used to represent the spatial collision risk in the fuzzy ship domain, which can be determined by the DDV. Here, indicates the most dangerous scenario, and indicates the most secure scenario. It can be seen that when , the ship domain is the reference domain. Figure 1 shows the principle of risk determination [14].

In addition to the introduction of , the principle of nonaggression in the double-ship domain is used to consider the information of the target ship, as shown in Figure 2 [19]. With the introduction of the double-ship domain, information of the target ship can be taken into consideration. Compared with the single-ship domain or conventional DCPA, the space between ships is the most reasonable result [19].

*(**2) Action Discriminant*. In this case, the action mode of a ship is analysed by the relative bearing of the target ship and the cross angle between the own ship and target ship. As shown in Figure 3, in the areas of A, B, C, D, and F, the ship takes avoidance action, whereas in the A, C, and F areas, the ship collision avoidance action turns to the starboard; due to the large cross angle, to prevent the ship from turning too much, the port side of the collision avoidance action is carried out in the B and D areas [22]. Therefore, it is necessary to identify the status of the encounter between the own ship and target ship.

#### 3. The Distance Process of Ship Collision Avoidance

##### 3.1. Description of the Multiobjective Optimization Algorithm

Since ship collision avoidance is a multiobjective problem involving safety and economics, this paper adopts the improved multiobjective optimization algorithm to plan collision avoidance trajectories. The traditional multiobjective algorithms mainly include the Pareto archived evolution strategy (PAES) [17], strength Pareto evolutionary algorithm (SPEA) [17], and the nondominated sorting GA II (NSGA-II) [18]. These algorithms are very good at identifying the Pareto front. In this paper, NSGA-II is used to optimize the collision avoidance parameters, and the process of the algorithm is accelerated by combining the danger model theory. NSGA-II has two main components: one is fast nondominated sorting, and the other is the crowd-distance calculation.

Fast nondominated sorting reduces the complexity of the algorithm process, which mainly has two parameters: the dominating set () and the domination count (). The domination count of the solution for the first nondominated front is equal to zero. To reduce the dominating count by one, we can find a solution in the dominating set () for the solution of the first nondominated front, where the domination count is zero. This solution occurs in the second nondominated front. By continuing the above steps, we have identified all fronts [17]. The crowding distance is calculated primarily to maintain population diversity while maintaining population size. The principle is to determine the density of the solution around each solution and remove solutions with high-density values [17]. In the above calculation, each solution has two properties and a dominating set: the nondomination rank , crowding distance , and dominating set , respectively. The calculation formula for the crowding distance is shown as follows:where is the th objective function value of individual . The parameters and are the maximum and minimum values of the th objective function.

Since the initial population is random, it is necessary to carry out a large number of iterations to make the final solution converge onto the first nondominated front, but the efficiency of the algorithm is reduced. The introduction of the danger model theory solves this problem very well. Xu combines the danger model theory with the immunity algorithm to make the danger model immunity algorithm better than the traditional immunity algorithm [18]. The danger theory provides an area for the data of the algorithm; outside this region, the solutions do not match the problem or are too far away from each other to be stimulated. Figure 4 shows the operational mechanism of the danger theory [18]. The principle of this mechanism is mainly that there will be some solutions that are not too bad around a better solution. By applying this principle, the dominated solution will be mapped around the nondominant solution and a better nondominant solution can be found. In this paper, the solutions of the dominating set is taken as the mapping set, and a set of solutions in the first nondominated front are used as the centre of the danger domain. The mapping set is projected around the solution in the first nondominated front so the algorithm can accelerate the convergence process. At the same time, to avoid the increase in the number of populations caused by mapping, the dominated degree is introduced here, which indicates that the solution in the dominating set has different degrees of dominance for a set of solutions in the first nondominated front that dominates this solution . The larger the dominated degree is, the farther the solution is from the nondominated solution in the first nondominated front and the worse the desirability of the solution is. The nondominated solution with the biggest dominance is found, and the solution in the dominating set is mapped around this nondominated solution. Figure 5 shows the mapping mechanism. The formula for the dominated degree is as follows: where is the dominated degree of the solution in the dominating set for the solution in the first nondominated front that dominates the solution .

Under the consideration of COLREGs, Tsou describes the collision avoidance parameters with a grid and transforms the parameter optimization via the grid path optimization [9]. However, the accuracy of this method is too poor to consider the manoeuvrability of the reference ship and the information of the target ship. This study optimizes the above methods, adopts a binary code for the avoiding collision parameters, and uses the improved NSGA-II to determine the optimal solution set. The optimal collision avoidance action parameters are obtained according to the requirements.

##### 3.2. The Coding Form of Collision Avoidance Variable

When optimizing collision avoidance, changing the course for collision avoidance has a higher success rate than other methods used for collision avoidance; to have better command of the ship collision avoidance action, instead of using the ship coordinates as the content for the algorithm optimization, this study defines two points: the avoidance point and restoration point, where the action information for these points is optimized, as shown below.(1)The time of arrival for the collision avoidance points indicates the time of the reference ship it detected by the target ship to avoid collision action; the unit is minutes.(2)The avoiding range of the relative original route at the avoidance point indicates that the ship is in a position to avoid the point requiring action (unit: degree).(3)From the time between the turn towards collision avoidance and the turn towards navigational restoration, the duration of the collision avoidance navigation should not be less than ; otherwise, there is a collision risk (unit: min).(4)The return range of the relative avoidance route at the restoration point should be at least larger than ; otherwise, it cannot go back to the original route (unit: degree).

These four parameters are used to indicate the trajectory of the ship's avoidance and regulate actions as collision constraints. By considering the speed of the ship, length of the avoidance route and accuracy of the navigation, the scope of the four parameters is limited to , where the angle is due to the range of the action not being considered positive and having negative issues. In the improved NSGA-II, the solution space of the problem is formed by the chromosome; therefore, the above four parameters are encoded in binary format to form the chromosome. Using such a method, 28 binary bits are sufficient to express a route because seven binary bits can fully express the values within 100. Through the optimization of the algorithm, the Pareto-optimal set is obtained, and the optimal solution is selected from the Pareto-optimal set according to the actual navigation requirements. And since the length of chromosomes is relatively long, multipoint mutation and partial-mapped crossover operations are used here. This set conforms to the COLREGs and meets the safety and economic requirements. Compared to obtaining the coordinates of a point action, the optimal chromosome is more important for navigation.

##### 3.3. Objective Function

The purpose of the ship collision avoidance trajectory optimization is to select a reasonable and effective track for ships to sail safely and economically under all kinds of encountered situations. Therefore, it is necessary to select the appropriate objective function to optimize and estimate the optimal route. The objective function is regarded as the criterion for algorithm optimization.

In this study, the ship domain is used around the own ship and target ship to determine the risk of collision avoidance, and it is also used as a constraint to optimize the parameters. The improved NSGA-II is used to optimize the collision trajectory, where the optimal solution must satisfy the navigation path, minimize the deviation from the original route, and make the safety of the navigation path as secure as possible. Therefore, the collision avoidance problem is a multiobjective optimization problem (i.e., the route is both safe and experiences minimal loss). In this paper, safety discrimination of the objective function is adopted in the fuzzy ship domain, and the security objective function is as follows:where represents the collision risk at the point of avoidance, point of resumption, and point of the original route; a larger value in the double-ship domain is selected to determine the risk. When considering safe returns during the process of resuming navigation, the new encounter situation is avoided. The is in the range of .

In addition to considering the safety of the ship, the navigation loss is also considered. The loss of a ship (i.e., the economic issue) mainly involves the voyage time and fuel consumption of the ship. Because the speed of a ship is constant along the collision course of a ship, when other factors are unchanged, the time and fuel consumptions are basically related to the navigation distance. Therefore, the ship collision avoidance path is adopted as the economic objective function. The economic objective function is as follows:where represents the distance between the own ship detected by the target ship and the return voyage to its original route. is the sailing time. is the coordinate of ship. The navigation simulation is carried out through the aforementioned ship motion mathematical model.

Safety and economics are considered when optimizing the collision avoidance trajectory. Because of the multiobjective optimization, the objective functions contradict each other. Therefore, the better the economy of the route is, the closer is to 1.

##### 3.4. Collision Avoidance Optimization

In this paper, we use the double-ship domain to identify danger, regulate the navigation trajectory, and optimize the collision avoidance parameters via the improved NSGA-II. Figure 6 represents the flow chart of the collision avoidance optimization. High-frequency mutation is used to process the population data, and memory cells are introduced to accelerate the iterative process. For the initial chromosome group that is randomly generated, the genetic operation is carried out, and the offspring function is used to replace the parent function. Then, the iteration is repeated until the number of iterations and the Pareto-optimal front are obtained. The search ends, the four optimal parameters (, , , and ) are found, and the officers can refer to these parameters for collision avoidance navigation.

#### 4. Experimental Results and Analysis

The method mentioned above has been programmed in the Matlab software, whose good image visualization ability is used to display the simulation results with a graphical user interface (GUI). According to the situation described via the COLREGs, the situation of the two ships is divided into three situations: crossing, encountering, and overtaking (shown in Figure 3). In this paper, the three situations of the two ships are used to prove the rationality and reliability of the above methods. The parameters of the ship motion model are shown in Table 1. The parameters of the algorithm are defined in the previous chapter, and information of the target ship can be obtained through the ARPA. It is assumed that for a wide sea, both the reference ship and target ship maintain a certain speed, and the course does not change, which is the plan for a collision avoidance course. According to actual demands, to avoid violating the ship domain while ensuring the appropriate path length, with security as the selection standard, the collision risk is set to (the choice of 0.5 refers to the size of the original ship domain, while the choice of 0.2 is to prevent unreasonable path length of the selected solution); that is, the boundary values of the security target function can be calculated to be and , as shown in Figure 9. This way, we can select the required collision avoidance instructions from the Pareto-optimal solution set.

##### 4.1. Algorithm Efficiency

In this paper, the collision avoidance trajectory is optimized by improving the algorithm. The improved algorithm uses the mapping mechanism to improve the multiobjective genetic algorithm (namely, the multiobjective risk model genetic algorithm (DM-NSGA-II)). The improvement is mainly to enhance the convergence of the original algorithm. In this paper, Inverted Generational Distance (IGD) is used to evaluate the advantages of the improved algorithm, in which IGD is the average distance between any point from the real Pareto optimal set of the function and its closest point from the Pareto optimal set obtained by the algorithm [23]. This is evaluated using the multiobjective test function ZDT1, ZDT2, and ZDT3, as shown in Figure 7. The comparison data of the multiobjective test function are shown in Table 2, where the smaller the IGD value, the closer the approximation set from the reference set. It can be seen that the improved algorithm has better convergence. We describe these problems in Table 3. The calculation formula for the IGD is shown as follows:where is the real Pareto optimal set of the function and is the Pareto optimal set obtained by the algorithm.

##### 4.2. Crossing Encounter Situation of Single Ship

The crossing encounter situation is a frequent occurrence in the collision course; therefore, it is the focus of this research. Here, we set the own ship’s heading to , the own ship’s speed to , the own ship’s length to , the target ship’s heading to , the target ship’s speed to , and the target ship's length to . Using the above parameters (6) and ship motion mathematical equations to calculate the parameters of the own ship domain and target ship domain, (8) is used to calculate the risk of collision between two ships; then the algorithm optimizes collision avoidance and the optimal trajectory, as in Figure 8, to comply with the requirements of the COLREGs. The solid line in the figure represents the collision course, the dashed line represents the original route of the ship's voyage, and the dotted line represents the trajectory of the Pareto-optimal solutions. The degree of danger is identified by the double-ship domain, and the ship domain is the range area shown in the circle in Figure 8. The collision avoidance fully abides by the nonaggression principle of the domain and satisfies the safety and economic requirements.

After analysing the collision simulation data, as shown in Table 4, you can see that the ship domains of the two ships are different because the ship speeds are different; even if the ship’s lengths are consistent, the collision avoidance tracks comply with the principles of inviolability in the ship domain. In Figure 9, all nondominated solutions obtained after 100 iterations are shown. Because the security and economy of the objective function are offset, the curve is convex near the origin, and the boxed line in the figure represents the selection area. The objective function values are and n mile.

##### 4.3. The Head-on Encounter Situation of Single Ship

A head-on situation occurs when two ships are heading in opposite or nearly opposite directions. Here, we set the own ship’s heading to , the own ship’s speed to , the own ship’s length to , the target ship’s heading to , the target ship’s speed to , and the target ship’s length to . By analysing the encounter situation, we know that the ship should avoid collision along the starboard because only the movement of the reference ship is considered here; the movement of the target ship is not considered. The parameters of the optimized collision avoidance are shown in Table 5, where the sizes of the two ship domains are basically the same size. The trajectory is obtained by substituting four parameters into the ship mathematical model, as shown in Figure 10, which meets the requirements for the optimization objective. All nondominated solutions obtained after 100 iterations are shown in Figure 11. In this case, the objective function values of the selected solution are and n mile.

##### 4.4. The Overtaking Encounter Situation of Single Ship

The example here is that the reference ship is overtaking the target ship, and the reference ship is a collision avoidance vessel. We set the own ship’s heading to , the own ship’s speed to , the own ship’s length to , the target ship’s heading to , the target ship’s speed to , the target ship’s length to . According to the heading cross angle between the two ships and the relative course of the target ship, the ship’s collision avoidance along the starboard side is determined, and it conforms to the COLREGS. Because the own ship speed is greater than the target speed and the ship domain of the own ship is greater than that of the target ship, the collision trajectory constraints mainly constitute the own ship domain and the collision parameter optimization provides results, such as those in Table 6. The collision trajectory can be simulated by the parameter instructions, as shown in Figure 12. At the beginning, the target ship is in front of the own ship; the speed of the own ship is greater than that of the target ship, and the real curve represents the collision avoidance route that meets the safety and economic requirements. Figure 13 shows all nondominated solutions after 100 iterations. In this case, the objective function values of the selected solution are and n mile.

##### 4.5. The Trajectory Efficiency

In this paper, the combination of ship domain and algorithm is used for collision avoidance optimization. In order to verify the advantages of the collision avoidance method, it is compared with the method of collision avoidance using genetic algorithm (Tsou uses TCPA and DCPA to determine the risk and combine genetic algorithm to optimize collision avoidance [24]), as shown in Figure 14. The trajectory data are shown in Table 7, and it can be seen that the improved collision avoidance algorithm is more effective than the original collision avoidance algorithm, in which the path safety is calculated by using the same equation. The improved collision avoidance track length and track safety are both better than the genetic algorithm.

#### 5. Conclusions

In this paper, the risk discernment of the double-ship domain is used to make the distance between ships conform to the COLREGs standards and meet the requirements of maritime operators. Through the determination of the danger degree and the calculation of the objective function, the improved NSGAII is used to optimize the collision avoidance parameters and obtain the operation instructions for collision avoidance, including the instructions for the collision avoidance point and return point. Under the combination of the fuzzy domain and multiobjective algorithm, the balance problem of safety and economic targets and the accurate discrimination of danger in the trajectory generation process are perfectly overcome. At the same time, the control of collision avoidance is simplified by the operation instructions for collision avoidance, making it easy for the crew to operate.

In the simulation test, we can verify the method via the simulation of a single-ship collision. Since the collision avoidance route is drawn directly by the collision avoidance command, the electronic navigation chart (ENC) is read directly here and used as a vector map. Based on the simulation results, we can see that the optimal collision avoidance parameters are effectively decided by using the double-ship domain combined with the algorithm and considering the manoeuvrability of the ship. Therefore, this method can be helpful for decision-making in terms of collision avoidance at sea.

Although the simulation results are very good, there are still some limitations. For example, in the case of multiship, collision avoidance planning becomes more complex since a slight change in course by one ship might affect the future decisions of the other ships. And in restricted waters, increased navigation restrictions result in much longer computational time. Therefore, in our further work, we will refer to the distributed algorithm and the velocity obstacle approach to grasp the dynamic information between ships and take the maximum running time into account in parameter optimization to solve these problems.

#### Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.