USV Dynamic Accurate Obstacle Avoidance Based on Improved Velocity Obstacle Method

: Unmanned surface vehicle (USV) path planning is a crucial technology for achieving USV autonomous navigation. Under global path planning, dynamic local obstacle avoidance has become the primary focus for safe USV navigation. In this study, a USV autonomous dynamic obstacle avoidance method based on the enhanced velocity obstacle method is proposed in order to achieve path replanning. Through further analysis of obstacles, the obstacle geometric model set in the conventional velocity obstacle method was redeﬁned. A special triangular obstacle geometric model was proposed to reconstruct the velocity obstacle region. The collision time was predicted by ﬁtting the previously gathered data to the detected obstacle’s distance, azimuth, and other relevant data. Then, it is combined with the collision risk to determine when obstacle avoidance should begin and end. In order to ensure safe driving between path points, the international maritime collision avoidance rules (COLREGs) are incorporated to ensure the accuracy of obstacle avoidance. Finally, through numerical simulations of various collision scenarios, it was determined that, under the assumption of ensuring a safe encounter distance, the maximum change rates of USV heading angle are optimized by 17.54%, 58.16%, and 28.63% when crossing, head-on, and overtaking, respectively. The results indicate that, by optimizing the heading angle, the enhanced velocity obstacle method can avoid the risk of ship rollover caused by an excessive heading angle during high-speed movement and achieve more accurate obstacle avoidance action in the event of a safety encounter.


Introduction
With the advancement of science and technology, an increasing number of USVs have been utilized in a variety of scientific experiments, civil fields, and military fields, including marine environment monitoring, unmanned submersible recovery, search and rescue in complex waters, and military defense.The USV path planning method must be safe, reliable, and precise in order for the USV to perform complex surface missions.
Local dynamic obstacle avoidance is the key technology of USV autonomous navigation and a crucial issue that must be resolved [1].Many domestic and international researchers have developed and proposed many local path planning algorithms.Common algorithms consist of the artificial potential field method [2][3][4], the dynamic window method [5,6], the velocity obstacle method [7], the vector field histogram method, the fast random tree method, fuzzy logic [8,9], the set-based guidance (SBG) method [10][11][12][13][14][15], etc.Among them, velocity obstacle (VO) is a local path planning method first proposed by Fiorini in 1998 [16].Due to its rapid response, high real-time performance, strong robustness, and intelligent obstacle avoidance, the velocity obstacle method has been widely adopted for the autonomous obstacle avoidance of various types of underwater robots.Dubey and Rahul proposed a hybrid technology that combines velocity obstacle (VO) and rapid exploration of random trees (RRT) in order to generate the safe trajectory of autonomous surface ships.By combining these two methods, the joint forward simulation guarantees that the generated path remains effective and collision-free as the situation changes [17].Huang et al. proposed a collision avoidance algorithm based on the application of the generalized velocity obstacle (GVO) algorithm to ship collision protection, taking ship dynamics into consideration.They developed the GVO algorithm considering ship dynamics to deal with the near-distance multi-ship scene at sea [18].However, the effect of model error and environmental disturbance on the performance of the GVO algorithm, as well as the effect of ship shape, are not taken into account.Zhang et al. applied the velocity obstacle method to the avoidance of dynamic obstacles by USV [19].The ellipse is used to represent the USV and the obstacle, and the virtual obstacle is used to reduce the influence of error in obstacle motion information on the obstacle avoidance process.However, it does not use COLREGs.There is a high risk of collision if the unmanned ship on the surface chooses to avoid the obstacle in front of the dynamic obstacle when it encounters a dynamic obstacle.Xu et al. proposed an intelligent hybrid collision avoidance algorithm based on deep reinforcement learning, as well as a preferential sampling mechanism with cumulative pruning [20].However, there are limitations to the circular extension of all obstacles.The actual obstacle is not necessarily suitable for expanding into a circle.Wang et al. proposed an autonomous collision avoidance method based on deep reinforcement learning (DRL), in which the reward function includes a collision risk assessment model, responsibility avoidance rules, and interaction rules.The static obstacle's virtual potential energy is introduced to improve the DRL [21].However, it is impossible to predict the target ship's collision avoidance behavior.
This paper aims to solve the problem of dynamic autonomous and precise obstacle avoidance of unmanned surface vehicles in a variety of environments by enhancing the velocity obstacle method, fitting the information gathered in the early stage, and predicting its collision time to determine the timing of starting and ending obstacle avoidance.The aim was also to integrate the international rules for collision avoidance at sea (COLREGs) to ensure that its obstruction avoidance is accurate.Through numerical simulation of various collision scenarios, it was determined that, under the premise of ensuring a safe encounter distance, the maximum change rates of USV heading angle are optimized by 17.54%, 58.16%, and 28.63% when crossing, head-on, and overtaking, respectively.The results show that, by optimizing the heading angle, the improved velocity obstacle method can avoid the danger of ship rollover during high-speed maneuvering and achieve more accurate obstacle avoidance action in the event of a safety encounter.

Improved Dynamic Ship Collision Domain
The conventional velocity obstacle method reduces the irregularly moving obstacle object to a circle on the plane and the moving object to a particle.At the same time, it is assumed that the dynamic obstacles follow a specific trajectory.The instantaneous state (position and velocity) of dynamic obstacles is known or predictable at a specific time node [16,22].
As shown in Figure 1a, in the conventional velocity obstacle method, the dynamic obstacle is uniformly expanded into a circle with a radius of R, and then two tangents of λ 1 and λ 2 are made to the expanded circle through the particle of the moving object.Then, the set of relative velocity V uo is defined as the relative collision area of RCC uo .The structure of this area is closely related to the relative size and shape of the dynamic obstacle.
Through the study of dynamic obstacles on the sea, various types of ships pose the greatest threat to USV.Thus, various types of ships are the main research objects.In the conventional speed obstacle method, all dynamic obstacles are expanded into a circle with a radius R. Thus, the included angle formed by λ 1 and λ 2 in any direction is the same, that is, the same relative collision area RCC uo will be obtained.In fact, due to the different lengths and widths of the hull, the included angles formed in the different directions λ 1 and λ 2 are different, and the obtained relative collision area RCC uo is also different.Therefore, due to the inaccuracy of RCC uo , it may occur in the actual collision avoidance process that obstacle avoidance is performed when obstacle avoidance is not required, and large-angle obstacle avoidance is performed when only a small angle is required.
of the bottom edge is derived from the high value.Since the defined ratio is 2:1, the value of the bottom edge in the geometric expansion area of different ship types will exceed the actual ship width.Therefore, the additional range can withstand the interference of uncertain factors.
As shown in Figure 1b, it is assumed that u P is the center of a moving object with a velocity of u V and length of u L .Assuming that o P is the center of the dynamic obstacle, the velocity is o V and the length is o L [23].Assuming that the current time is  The relative velocity of a moving object u P and a dynamic obstacle o P is expressed by uo V .The mathematical formula is as follows: To solve the aforementioned issues, it is necessary to design a geometric expansion region that can maximally overcome the actual dynamic obstacles.Since the overall shape of the ship is more similar to that of a triangle, a special isosceles triangle is proposed as the geometric expansion region of the dynamic obstacle, which is more consistent with the actual shape of the dynamic obstacle.Further research reveals that the length-width ratio of ordinary transport ships is 7:1~9:1, the length-width ratio of ice breakers is 4:1~6:1, and the length-width ratio of small high-speed transport boats is 3:1~4:1.Therefore, the ratio of height (h) to base-side (d) of the geometric expansion region of the special isosceles triangle is defined as 2:1 (h = 2d), which corresponds to the actual length and width of the dynamic obstacle, respectively.In the actual process of obstacle avoidance, the value of the bottom edge is derived from the high value.Since the defined ratio is 2:1, the value of the bottom edge in the geometric expansion area of different ship types will exceed the actual ship width.Therefore, the additional range can withstand the interference of uncertain factors.
As shown in Figure 1b, it is assumed that P u is the center of a moving object with a velocity of V u and length of L u .Assuming that P o is the center of the dynamic obstacle, the velocity is V o and the length is L o [23].Assuming that the current time is T, the P u of the moving object is abstracted into a point, and the P o of the dynamic obstacle is expanded into an isosceles triangle with height (h = L u + L o ) twice the bottom.In this figure, λ 1 and λ 2 and are two rays emitted by P u passing through the two vertices of an isosceles triangle formed with P o as the center.
The relative velocity of a moving object P u and a dynamic obstacle P o is expressed by V uo .The mathematical formula is as follows: As shown in the figure, starting from the center point of the moving object P u and making a ray along the relative velocity V uo , it is defined as: where t represents the time of motion.Then, a ray λ(P u , V uo ) made along the relative velocity V uo represents the real-time relative position between the moving object P u and the dynamic obstacle P o at time t.
The set of the relative velocity V uo of moving object P u and dynamic obstacle P o is defined as the relative collision region of RCC uo (relative collision cone).Its mathematical formula is defined as follows: where O P O represents the special triangular area expanded by the dynamic obstacle P o .
As shown in the figure, if the current direction and speed of the moving object P u and the dynamic obstacle P o remain unchanged during the movement, and as long as the relative speed V uo falls within the fan-shaped relative collision area RCC uo , the moving object and the dynamic obstacle will collide.In contrast, any relative velocity V uo that falls outside the sector will not cause a collision between the two objects.

Selection of Rays Forming Relative Collision Regions
Since the set of relative velocity V uo is the relative collision region of RCC uo , it is composed of two rays λ 1 and λ 2 passing through two vertices of the isosceles triangle.Therefore, the correct two rays can be obtained by selecting the passing vertex.
As shown in Figure 2a, three vertices are obtained by the center point P o (x o , y o ) of a special triangle.The formula is as follows: A(x a , y a ) : C(x c , y c ) : α π α ≤ ≤ of the triangle.As shown in Figure 2a,b, the correct vertex is selected by the following conditions: The two vertices that make up the relative collision area of RCC uo are selected by the angle β (0 ≤ β ≤ 2π) between the center point P u of the USV and the center point P o of the obstacle and the direction angle α (0 ≤ α ≤ 2π) of the triangle.
As shown in Figure 2a,b, the correct vertex is selected by the following conditions: According to the range of γ in Table 1, determine the vertex through which the two rays pass.
Table 1.Selection of two vertices through which the ray passes.

Range of γ
The Two Vertices the Ray Passes through

Collision Time Prediction and Obstacle Avoidance Timing Judgment
This paper performs polynomial fitting of the collected data using the least squares method and predicts the collision time based on the detected dynamic obstacle distance and other relevant information.It is then combined with the collision risk to determine the timing of starting and ending obstacle avoidance.

Collision Time Prediction
In this paper, the sum of squares of errors ∑ m i=0 r 2 i is often used in curve fitting to calculate the size of the error r i = P(x i ) − y i between a given point (x i , y i ) (i = 0, 1, . . ., m) and the approximate function P(x).
Through known points (x i ,y i ), in the given function class Φ, find P(x)∈Φ, and minimize the sum of squares of the error r i = P(x i ) − y i .The formula is as follows: The objective is to find a curve y = p(x) with the smallest sum of squares of distances to a given point (x i ,y i ) geometrically.The fitting function or least square solution is known as the P(x) function, and the least square technique of curve fitting is known as the least square method of curve fitting [24].For known points (x i ,y i ), Φ is a set of functions made up of polynomials with a degree of no more than n.P n (x) = ∑ n k=0 a k x k ∈ Φ is calculated, and the following Formula ( 9) is obtained: Polynomial fitting is used when the fitting function is polynomial, and the least square fitting polynomial that satisfies Equation ( 10) is known as the least square fitting polynomial.If n = 1, this is known as linear fitting [25].
The aforementioned issue is the extreme value problem of I = I(a 0 , a 1 , . . ., a n ), since it is a multivariate function of a 0 , a 1 , . . ., a n .Through the necessary conditions for solving the extreme value using a multivariable function, the following formulas are obtained: Formula ( 12) is a linear system of equations about a 0 , a 1 , . . ., a n .Use matrix representation: Using the inverse proof technique, it is demonstrated that the system of Equation ( 13) has a unique solution.It is assumed that the coefficient matrix of the equation set ( 13) is singular and that the homogeneous equation set corresponding to it has a has a non-zero solution.It can be represented by the following formula: Multiply the j-th equation in Formula ( 14) by a j (j = 0, 1, . . ., n), and then add the left and right ends of the newly obtained n + 1 equations, respectively, to obtain ) is a polynomial of a degree no more than n.It has m + 1 > n different zeros, and a 0 = a 1 = . . .= a n = 0 can be calculated from the basic algebra theorem.It contradicts the hypothesis that the homogeneous equation has a non-zero solution.The normal Equation (13) must, therefore, have a unique solution.
The polynomial fitting and prediction steps are as follows: 1 When the USV detects an obstacle, the onboard sensor measures the distance between the USV and the obstacle ship in real time, and sample data with time and distance as variables are obtained.At the same time, the degree n of the fitting polynomial is determined; Write the equations and find a 0 , a 1 , . . ., a n ; 4 Obtain the fitting polynomial P(x) = a 0 + a 1 x + . . .+ a n x n ; 5 Calculate the maximum distance D max from the center of the expansion triangle to the boundary as the minimum collision distance between the USV and the obstacle ship; 6 Bring the known D max is into the curve equation to solve the collision time T z ; 7 The collision time T Z can be predicted in real time according to the distance change between the USV and the obstacle ship during the navigation.

Start and End Obstacle Avoidance Timing Judgment
Through the velocity obstacle method, it is possible to predict whether the USV and the dynamic obstacle will collide at a future time, but it is not possible to predict the timing of the beginning and ending obstacle avoidance.Therefore, the timing of obstacle avoidance is determined by combining the velocity obstacle method and the collision risk [26,27].
The collision point between USV and the expansion geometric region of dynamic obstacles is defined as CPA, the distance between USV and CPA is defined as D CPA at a certain moment, and the time is defined as T CPA .
As in Formula ( 16), D uo is the distance between USV and dynamic obstacles at a certain time, and D s is the distance from the expanded special triangle center to the triangle boundary. T According to Formula (17), T Z is the collision time predicted by the least square fitting polynomial and T d represents the current time of USV.
D is the relative distance between the USV and the dynamic obstacle, and is defined as follows: Definition B is the relative azimuth angle between the USV and the dynamic obstacle as follows: K is defined as the speed ratio of USV to the dynamic obstacle as follows: When USV finds dynamic obstacles, the collision risk assessment set is established as {D CPA , T CPA , D, B, K}.The hazard membership functions are µ d (D CPA ), µ t (T CPA ), µ D (D), µ B (B), and µ K (K): In Equations ( 21)-( 25), d 1 and d 2 are the range of the distance to the nearest encounter point, t 1 and t 2 are the time interval to the nearest encounter point, D 1 represents the latest starting obstacle avoidance distance, D 2 is the earliest starting obstacle avoidance distance, and C is the collision angle between the USV and the dynamic obstacle.
Each indicator has different impacts on the collision risk.The collision risk assessment set µ dtDBK can be obtained by combining the weighting coefficient with the risk membership function: Through a large number of data statistics, and in combination with the weighting parameter calculation method in reference [28], the specific weighting coefficients can be calculated as k 1 = 0.41, k 2 = 0.35, k 3 = 0.18, k 4 = 0.04, and k 5 = 0.02.
At this point, the opportunity to start and end obstacle avoidance is determined by: First, the collision distance D CPA between USV and obstacles is less than the set safe distance D s .
Second, the relative velocity V uo between USV and obstacles is located in the relative collision area RCC uo .
Third, when the collision risk is evaluated as high risk, i.e., when µ dtDBA > 0.5.When the USV decision-making system needs to meet the above three conditions in the actual obstacle avoidance process, the obstacle avoidance can be terminated if it is not satisfied.

International Regulations for Preventing Collisions at Sea (COLREGS)
According to the COLREGs collision rules, when there is a collision risk between two ships and one of the ships must be avoided, the encounter scenarios must be classified [29,30].It is primarily divided according to rules 13 to 15 in COLREGs.These rules define three distinct encounter scenarios: overtaking, head-on, and crossing.To ensure the safety of maritime navigation, the relative azimuth of the USV and obstacle ship is used to distinguish and define ship encounters.The formula for calculating the relative azimuth angle is shown in Formula (27).
where x pu (t k ) and y pu (t k ) denote the co-ordinate position of USV at t k , x po (t k ) and y po (t k ) denote the co-ordinate position of obstacle ship at t k , and ψ po (t k ) represents the heading angle of obstacle ship at t k .As shown in Figures 3 and 4, it follows the relevant rules of COLREGs combined with the relative azimuth angle to determine the encounter situations of ships:

Simulation and Discussion
Simulation validates the improved velocity obstacle method proposed in this paper.To verify and compare the accuracy of the algorithm, several different simulation experiments are carried out.All experiments are based on USV detection devices that can detect moving obstacles from varying distances and directions.According to the actual size of the ship, the length of the obstacle ship is set to 16 m and the length of the USV is set to 6 m.The traditional velocity obstacle method abstracts the obstacle ship as a circle with a 22-m diameter, whereas the improved velocity obstacle method abstracts the obstacle as an isosceles triangle with a 22-m height and an 11-m base.To obtain valid comparison results, the obstacle avoidance speed of the USV is held constant.

Simulation Study of Predicting Obstacle Avoidance
As shown in Figure 5, a dynamic obstacle avoidance simulation is carried out for an

Simulation and Discussion
Simulation validates the improved velocity obstacle method proposed in this paper.To verify and compare the accuracy of the algorithm, several different simulation experiments are carried out.All experiments are based on USV detection devices that can detect moving obstacles from varying distances and directions.According to the actual size of the ship, the length of the obstacle ship is set to 16 m and the length of the USV is set to 6 m.The traditional velocity obstacle method abstracts the obstacle ship as a circle with a 22-m diameter, whereas the improved velocity obstacle method abstracts the obstacle as an isosceles triangle with a 22-m height and an 11-m base.To obtain valid comparison results, the obstacle avoidance speed of the USV is held constant.

Simulation Study of Predicting Obstacle Avoidance
As shown in Figure 5, a dynamic obstacle avoidance simulation is carried out for an obstacle vessel with variable speed and direction.By obtaining the real-time distance be- • ], the encounter scenario is judged to be (left and right) cross.When the obstacle ship is on the USV's starboard side, the right rudder of the USV steers away, while the obstacle ship maintains its original driving posture.When the obstacle ship is on the USV's starboard side, the USV maintains its original driving position, and the obstacle ship's right rudder steers away.

Simulation and Discussion
Simulation validates the improved velocity obstacle method proposed in this paper.To verify and compare the accuracy of the algorithm, several different simulation experiments are carried out.All experiments are based on USV detection devices that can detect moving obstacles from varying distances and directions.According to the actual size of the ship, the length of the obstacle ship is set to 16 m and the length of the USV is set to 6 m.The traditional velocity obstacle method abstracts the obstacle ship as a circle with a 22-m diameter, whereas the improved velocity obstacle method abstracts the obstacle as an isosceles triangle with a 22-m height and an 11-m base.To obtain valid comparison results, the obstacle avoidance speed of the USV is held constant.

Simulation Study of Predicting Obstacle Avoidance
As shown in Figure 5, a dynamic obstacle avoidance simulation is carried out for an obstacle vessel with variable speed and direction.By obtaining the real-time distance between the USV and the obstacle vessel, the collision time T Z is measured using the least square fitting polynomial when the obstacle avoidance scheme is not adopted.Then, the real-time T CPA is obtained by subtracting the current time T d of the USV.Through the obtained T CPA , the hazard membership function is established to determine the timing of starting and ending obstacle avoidance.As shown in Figure 5d, collision time Z T can be predicted in real time by collecting distance information before obstacle avoidance.Combined with (a), (d), and (c), this method can accurately implement obstacle avoidance for obstacle ships with variable speed and variable direction, where the minimum distance between the two ships is greater than the safe distance.

Comparison of Accurate Implementation of Obstacle Avoidance Measures
To verify that the improved velocity obstacle method can be a more accurate implementation of obstacle avoidance measures, the traditional velocity obstacle method and the improved velocity obstacle method are compared under identical conditions in terms of their implementation of obstacle avoidance measures.
As shown in Figure 6, the beginning point co-ordinate of the USV is (155, 20), the ending point co-ordinate is (175, 240), and the velocity is 3 m/s.The starting co-ordinates of obstacles are (155, 220), the ending co-ordinates are (155, 80), and the speed is 2 m/s.It can be found through experiments that the improved velocity obstacle method in Figure As shown in Figure 5d, collision time T Z can be predicted in real time by collecting distance information before obstacle avoidance.Combined with (a), (d), and (c), this method can accurately implement obstacle avoidance for obstacle ships with variable speed and variable direction, where the minimum distance between the two ships is greater than the safe distance.

Comparison of Accurate Implementation of Obstacle Avoidance Measures
To verify that the improved velocity obstacle method can be a more accurate implementation of obstacle avoidance measures, the traditional velocity obstacle method and the improved velocity obstacle method are compared under identical conditions in terms of their implementation of obstacle avoidance measures.
As shown in Figure 6, the beginning point co-ordinate of the USV is (155, 20), the ending point co-ordinate is (175, 240), and the velocity is 3 m/s.The starting co-ordinates of obstacles are (155, 220), the ending co-ordinates are (155, 80), and the speed is 2 m/s.It can be found through experiments that the improved velocity obstacle method in Figure 6a determines that there is no collision danger at this time, and no collision avoidance measures are implemented.The conventional velocity obstacle method depicted in Figure 6b determines that a collision hazard exists at the current time and implements collision avoidance measures.By comparing the relative distances in Figure 6c, it can be determined that the center distance between the USV and the obstacle remains above the safe distance, indicating that no obstacle avoidance measures are necessary at this time.This demonstrates that the improved velocity obstacle method is more accurate for evaluating the implementation of collision avoidance measures.

Comparison of Obstacle Avoidance Simulation for Single-Ship and Multi-Scenario Encounter
Three distinct encounter scenarios are defined based on the COLREG collision rules for the single-ship encounter simulation experiment: overtaking, head-on, and crossing.According to the avoidance rule, the ship does not need to avoid the left cross-meeting scenario; it can simply maintain its original state of navigation.The obstacle avoidance in the scenarios of crossing from the right (Figure 7), head-on (Figure 8), and overtaking (Figure 9) is simulated, respectively.
Comparing and analyzing the experimental data in Tables 2-4 reveals that, assuming a safe encounter distance, the maximum change rate of USV heading angle is optimized by 17.54%, 58.16%, and 28.63% in crossing, head-on, and overtaking, respectively.The improved velocity obstacle method is clearly superior to the conventional velocity obsta-

Comparison of Obstacle Avoidance Simulation for Single-Ship and Multi-Scenario Encounter
Three distinct encounter scenarios are defined based on the COLREG collision rules for the single-ship encounter simulation experiment: overtaking, head-on, and crossing.According to the avoidance rule, the ship does not need to avoid the left cross-meeting scenario; it can simply maintain its original state of navigation.The obstacle avoidance in the scenarios of crossing from the right (Figure 7), head-on (Figure 8), and overtaking (Figure 9) is simulated, respectively.Comparing and analyzing the experimental data in Tables 2-4 reveals that, assuming a safe encounter distance, the maximum change rate of USV heading angle is optimized by 17.54%, 58.16%, and 28.63% in crossing, head-on, and overtaking, respectively.The improved velocity obstacle method is clearly superior to the conventional velocity obstacle method.The improved velocity obstacle method can avoid the danger of ship rollover due to excessive heading angle in process of high-speed motion by optimizing the heading angle, and can realize more accurate obstacle avoidance action in the case of a safe encounter.In addition, the USV that has completed obstacle avoidance no longer returns to the original path but instead plans a new route directly at the obstacle's end point, which can reduce the USV's bypass path and ensure that it maintains a greater distance under limited power or fuel.

Conclusions
In this paper, the conventional velocity obstacle method is improved.Through further analysis of obstacles, the geometric obstacle model in the traditional velocity obstacle method is redefined.A special triangular obstacle geometric model is proposed for reconstructing the velocity obstacle area.Using the detected obstacle's distance, azimuth, and other relevant data, the least square fitting polynomial was applied to the previously gathered data to predict the collision time.Then, it was combined with the collision risk to determine when obstacle avoidance should begin and end.Under the assumption of ensuring safe driving between path points, the international maritime collision avoidance rules (COLREGs) are incorporated to ensure the accuracy of obstacle avoidance.
The experimental data indicate that, under the assumption of ensuring a safe encounter distance, the maximum change rate of USV heading angle is optimized by 17.54%, 58.16%, and 28.6% in crossing, head-on, and overtaking, respectively.The enhanced velocity obstacle method is superior to the conventional velocity obstacle method.The improved velocity obstacle method can avoid the danger of ship rollover due to excessive heading angle in the process of high-speed motion by optimizing the heading angle and can realize more accurate obstacle avoidance action in the case of a safe encounter.At the same time, the USV that has completed obstacle avoidance no longer returns to its original path but instead plans a new path directly at the obstacle's end point, which can reduce the USV's bypass path and ensure that it maintains a greater distance under limited power or fuel.In the future, it will be determined if the method can effectively avoid dynamic obstacles in confined waters using multi-sensor information fusion, and the stability control method in complex environments will be investigated in conjunction with dynamics.

Figure 1 .
Figure 1.Comparison of dynamic ship collision domains with velocity obstacle method: (a) traditional dynamic ship collision domain; (b) improved dynamic ship collision domain.

Figure 1 .
Figure 1.Comparison of dynamic ship collision domains with velocity obstacle method: (a) traditional dynamic ship collision domain; (b) improved dynamic ship collision domain.

6 )Figure 2 .
Figure 2. Schematic diagram of the selection of triangle vertices that form a relative collision area: (a) improved obstacle geometry region diagram; (b) vertex selection diagram of ray passing.

Figure 2 .
Figure 2. Schematic diagram of the selection of triangle vertices that form a relative collision area: (a) improved obstacle geometry region diagram; (b) vertex selection diagram of ray passing.

3π 2 ,
2π − arctan 1 2 and D(P o , P u ) ≥ D(P o , W CB ) 2π − arctan 1 2 , 2π − arctan 1 4 and D(P o , P u ) ≥ D(P o , W AB ) A and C Where P u represents the center point of USV, P o is the center point of obstacles, W AC is the intersection point of straight AC and straight P u P o , W BC represents the intersection point of straight BC and straight P u P o , W CB denotes the intersection point of straight CB and straight P u P o , and W AB is the intersection point of straight AB and straight P u P o .D(P o , P u ) is the distance between point P o and point P u , which is known by other similar theories.l 1 and l 4 are parallel to BC, l 2 is parallel to AC, and l 3 is parallel to AB.

Electronics 2022 ,
11, x FOR PEER REVIEW 11 of 16 real-time CPA T is obtained by subtracting the current time d T of the USV.Through the obtained CPA T , the hazard membership function is established to determine the timing of starting and ending obstacle avoidance.

Figure 5 .
Figure 5. Obstacle collision time prediction and obstacle avoidance simulation: (a) path simulation; (b) relative distance between USV and obstacle ship; (c) the change in USV heading angle; (d) curve fitting and collision time prediction.

Figure 5 .
Figure 5. Obstacle collision time prediction and obstacle avoidance simulation: (a) path simulation; (b) relative distance between USV and obstacle ship; (c) the change in USV heading angle; (d) curve fitting and collision time prediction.

Electronics 2022 ,Figure 6 .
Figure 6.Comparison of whether to implement obstacle avoidance: (a) improved VO path simulation; (b) traditional VO path simulation; (c) relative distance comparison graph; (d) USV heading angle comparison chart.

Figure 6 .
Figure 6.Comparison of whether to implement obstacle avoidance: (a) improved VO path simulation; (b) traditional VO path simulation; (c) relative distance comparison graph; (d) USV heading angle comparison chart.

Figure 8 .Figure 9 .
Figure 8. Simulation comparison of the head-on scene: (a) improved VO path simulation; (b) traditional VO path simulation; (c) relative distance comparison graph; (d) USV heading angle comparison chart.

Figure 9 .
Figure 9. Simulation comparison of the overtaking scene: (a) improved VO path simulation; (b) traditional VO path simulation; (c) relative distance comparison graph; (d) USV heading angle comparison chart.

Table 2 .
Simulation data of traditional VO for a single ship.

Table 3 .
Simulation data of improved VO for a single ship.

Table 2 .
Simulation data of traditional VO for a single ship.

Table 3 .
Simulation data of improved VO for a single ship.

Table 4 .
Optimization rate of steering angle in obstacle avoidance.