Ship dynamic collision avoidance decision-making method based on improved DWA algorithm
By improving the DWA algorithm using the grid method and a dynamic elliptical ship domain model, the robustness and real-time performance issues of ship collision avoidance technology under complex sea conditions are solved. This achieves globally optimal collision avoidance decision-making in accordance with COLREGs rules, thereby improving the safety and efficiency of autonomous navigation.
Patent Information
- Application Number
- CN202511098118.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-11
AI Technical Summary
Existing ship collision avoidance technologies suffer from operational deviations in practical applications, inconsistencies between the logic of intelligent ships and human driving behavior, lack of robustness and real-time performance, simplistic collision avoidance criteria, and a lack of fully feasible autonomous collision avoidance decision-making capabilities, making it particularly difficult to achieve safe navigation in complex sea conditions.
The grid method is used for environmental modeling to construct a dynamic elliptical ship domain model. The evaluation function of the DWA algorithm is improved, including path deviation and collision avoidance rule evaluation. Weighted fusion is performed through weight allocation method to generate an optimized route that conforms to the COLREGs rule.
It achieves robustness and engineering practicality of autonomous collision avoidance under complex sea conditions, ensures that path generation conforms to safety boundaries and rule compliance, suppresses unreasonable manipulation, and achieves a globally optimal collision avoidance decision with a four-dimensional balance of safety, efficiency, and rules.
Smart Images

Figure CN120928818A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship collision avoidance decision-making, and in particular to a ship dynamic collision avoidance decision-making method based on an improved DWA algorithm. Background Technology
[0002] With the continuous development of maritime automation technology, ships have demonstrated enormous potential in improving shipping efficiency and reducing operating costs. However, the complex and ever-changing maritime environment places higher demands on ships' intelligent decision-making capabilities, especially in autonomous collision avoidance, algorithm testing and optimization, and real-ship verification, where many challenges remain. Current research is still insufficient in areas such as modeling, system integration, algorithm verification, and full-process autonomous path planning. In traditional navigation practices, collision avoidance decisions mainly rely on the experience and judgment of crew members, lacking standardized and automated auxiliary mechanisms. Therefore, there is an urgent need to develop a method based on real-time collision risk assessment, combined with the International Regulations for Preventing Collisions at Sea (ICC) to generate safe navigation paths that comply with regulations, thereby providing ships with full-process autonomous navigation support and technical assurance.
[0003] With the rapid development of intelligent ships, many scholars and experts have conducted research to achieve autonomous navigation of ships. Among them, the research on collision avoidance decision-making is one of the core issues of intelligent ship navigation.
[0004] While current ship collision avoidance technology has made some progress in sensor information processing, path planning algorithms, and preliminary decision-making mechanisms, it still faces many challenges in practical applications. First, many studies merely formally introduce the International Regulations for Preventing Collisions at Sea (COLREGs) without deeply understanding and accurately implementing their core principles, leading to discrepancies between collision avoidance behavior and actual ship operations at sea. Second, considering that traditional manned vessels and intelligent unmanned vessels will coexist for a considerable period, a lack of consistency between the behavior of intelligent vessels and that of human-driven vessels can easily lead to conflicts in collision avoidance judgments, thereby increasing navigational risks. Furthermore, most existing collision avoidance algorithms are based on theoretical modeling and simulation verification, lacking real-world testing and system verification under actual sea conditions; their robustness and real-time performance have not been fully tested. Collision avoidance criteria also generally suffer from simplification; most methods still rely primarily on static parameters such as the distance to nearest point of impact (DCPA) and the time to nearest point of impact (TCPA) to assess collision risk, lacking adaptability to complex multi-vehicle encounters and dynamic environmental changes. Meanwhile, current collision avoidance mechanisms are often localized and phased, lacking a closed-loop control structure of "perception-decision-execution-feedback," making it difficult to support the collision avoidance needs of autonomous navigation throughout the entire voyage and globally. Especially in situations of poor visibility, when two vessels cannot see each other, or when there are differences in maneuverability, the applicability and reliability of existing systems remain significantly insufficient. Therefore, there is an urgent need to develop a more intelligent, rule-consistent, and fully feasible collision avoidance technology to achieve future-oriented autonomous and safe navigation for ships. Summary of the Invention
[0005] This invention provides a dynamic collision avoidance decision-making method for ships based on an improved DWA algorithm, in order to overcome the operational deviations of COLREGs rules in real-world maritime navigation, the lack of unified behavioral logic between intelligent ships and human drivers, the lack of robustness and real-time verification of existing collision avoidance systems, and the technical problems of simplification in collision avoidance criteria.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows:
[0007] A ship dynamic collision avoidance decision-making method based on an improved DWA algorithm includes:
[0008] S1. Use the grid method to model the environment of the nautical chart to obtain the nautical chart environment data of the current navigation area; the nautical chart environment data includes: the number of obstacles in the water area of the nautical chart, the total number of grids, and the obstacle density;
[0009] S2. Construct a dynamic elliptical ship domain model based on the quaternion ship domain QSD model, which is used to dynamically adjust the domain size of the dynamic elliptical ship domain model for different encounter situations; calculate the Euclidean distance from other ships to the ship, and at the same time, calculate the Euclidean distance from other ships to the boundary of the dynamic elliptical ship domain of the ship according to the dynamic elliptical ship domain model, and quantify the ship collision risk, i.e., NCRI, based on the calculation results.
[0010] S3. Improved DWA algorithm: Based on the modification of the original DWA algorithm's velocity evaluation function and azimuth evaluation function, a new path yaw evaluation function and collision avoidance rule evaluation function are added; wherein, the path yaw evaluation function is used to evaluate the rationality of attitude changes in ship trajectory tracking; the collision avoidance rule evaluation function is used to constrain the generated path to conform to COLREGs rules;
[0011] S4. The evaluation function of the improved DWA algorithm is weighted and fused using a weight allocation method to obtain a weighted evaluation function;
[0012] S5. Based on the nautical chart environment data in S1, the NCRI in S2, and the improved DWA algorithm, the ship completes local collision avoidance and generates an optimized ship route.
[0013] Furthermore, the specific steps for constructing the dynamic elliptical ship domain model are as follows:
[0014] S21. Based on the quaternion ship domain QSD model, the elliptical domain surrounding the ship is divided into four unequal regions, centered on the ship. Using the Kijima blocking region estimation formula and introducing the influence coefficient s of the encounter situation, the four axis radii of the four unequal regions are optimized and calculated. The calculation expressions are as follows:
[0015]
[0016] In the formula, L and v are the ship's length and speed, respectively; s is a coefficient that takes into account the effects of different encounter situations; T 90 It is the time required for the ship to turn 90°; D T It is the tactical diameter of the ship's turning; where s and T are calculated. 90 The expression is:
[0017]
[0018] In the formula, α is the angle between the course of the ship and the other ship, in radians; v t For the speed of other ships; A D This represents the longitudinal distance of the ship;
[0019] A D and D T The value of is estimated using an approximate formula, which is expressed as:
[0020]
[0021] S22. Establish Cartesian coordinates with the ship's center as the origin, the starboard transverse direction as the positive x-axis, and the bow direction as the positive y-axis. Using the endpoints of the four axis radii as the coordinates of the four vertices, and combining with formula (1), obtain the major and minor axis parameters and offset parameters of the dynamic elliptical ship domain model. The expressions are as follows:
[0022]
[0023] Based on the major and minor axis parameters and offset parameters, the boundary equations of the dynamic elliptical ship domain model in the hull coordinate system are as follows:
[0024]
[0025] In the formula, a and b are the major and minor axis parameters of the respective domains; Δa is the offset of the ship along the major axis of the ellipse from the center of the ellipse to the stern; Δb is the offset of the ship along the minor axis of the ellipse to the port side.
[0026] Furthermore, the Euclidean distance from other vessels to the vessel is calculated, and the Euclidean distance from other vessels to the boundary of the dynamic elliptical vessel domain of the vessel is calculated based on the dynamic elliptical vessel domain model. The process of quantifying the risk of vessel collision based on the calculation results is as follows:
[0027] The Euclidean distance from another ship to this ship is calculated using the following expression:
[0028]
[0029] In the formula, D OT It is the Euclidean distance between his vessel and this vessel; x TS His ship's x-coordinate; y TS His ship's longitudinal coordinate; x OS y is the x-coordinate of this ship; OS This is the longitudinal coordinate of the ship;
[0030] The Euclidean distance from another vessel to the boundary of the dynamic elliptical vessel domain of this vessel is calculated using the following expression:
[0031]
[0032] In the formula, The radius of the dynamic elliptical vessel domain, defined by the dynamic elliptical vessel domain in the direction from the vessel to another vessel; d OT x is the Euclidean distance from the other vessel to the boundary of the dynamic elliptical vessel domain of this vessel; P The x-coordinate of the intersection of the lines is y. P It is the ordinate of the intersection point of the lines;
[0033] The expression for calculating NCRI is as follows, based on the Euclidean distance from other vessels to this vessel and the Euclidean distance from other vessels to the boundary of this vessel's dynamically elliptical vessel domain:
[0034]
[0035] Furthermore, the steps in step S3 to improve the DWA algorithm are as follows:
[0036] S31. Improve the azimuth evaluation function of the original DWA algorithm by selecting an intermediate distance point that is not at the end of the ship's trajectory, and evaluating the trajectory's state at that intermediate distance point; calculate the corresponding time interval based on the intermediate distance point and the ship's speed, with the following expression:
[0037]
[0038] In the formula, d mid is the selected intermediate distance point; v is the ship speed;
[0039] The deviation is calculated based on the pose over time intervals, and the expression for the azimuth evaluation function is obtained as follows:
[0040] Heading(v,ω)=180°-abs[(θ(n dt,h ,aim)-ψ(n dt,h (14)
[0041] In the formula, θ(n) dt,h (,aim) is the nth dt,h The azimuth angle of the position pointing towards the target at any given moment; ψ(n dt,hω is the heading angle of the ship at this position; v is the angular velocity; ω is the speed.
[0042] S32. The velocity evaluation function of the original DWA algorithm is improved by introducing a velocity oscillation evaluation index, wherein the velocity oscillation evaluation index is:
[0043] u=k0×|2u n -u n-1 -u n-2 | (15)
[0044] In the formula, k0 is the velocity oscillation penalty weight; u n The velocity of the trajectory at the current moment; u n-1 u n-2 These are the velocities of the trajectories at the previous two moments and respectively.
[0045] Substituting the velocity oscillation evaluation index into the velocity evaluation function of the original DWA algorithm, the expression of the velocity evaluation function is obtained as follows:
[0046] Velocity(v,ω)=k1×|u|+k2×|2u n -u n-1 -u n-2 | (16)
[0047] In the formula, k1 is the speed weighting coefficient, adjusting the preference for speed magnitude; k2 is the weighting coefficient for the smoothness of speed changes; |u| is the absolute value of the speed, maintaining navigation efficiency; |2u| n -u n-1 -u n-2 To measure speed fluctuations and ensure a smooth trajectory;
[0048] S33. Add a path yaw evaluation function. Based on global path planning, a navigable path is obtained by connecting local sub-target points. Based on the coordinates of the predicted trajectory points at the current time, the coordinates of the navigable path nodes, and the distance between the predicted trajectory points and the path nodes, calculate the path yaw evaluation function, the expression of which is:
[0049]
[0050] In the formula, d represents the coordinates of the navigable path node and the distance between the trajectory point and the path node. The expression for calculating d is:
[0051]
[0052] In the formula, (x t ,y t (x) represents the coordinates of the predicted trajectory point at the current moment; d ,y d ) represents the coordinates of nodes on the path;
[0053] S34. Additional Collision Avoidance Rule Evaluation Function: Based on the NCRI (National Collision Reference Institute) determining the vessel's avoidance opportunity, the collision avoidance rule evaluation function is calculated, and its expression is as follows:
[0054]
[0055] Furthermore, the expression for weighted fusion of the evaluation function of the improved DWA algorithm using a weight allocation method is as follows:
[0056]
[0057] In the formula, Dist(v,ω) is the obstacle distance evaluation function of the original DWA algorithm; α is the weight coefficient of the azimuth evaluation function; β is the weight coefficient of the obstacle distance evaluation function; γ is the weight coefficient of the velocity evaluation function; μ is the weight coefficient of the path yaw evaluation function; and η is the weight coefficient of the collision avoidance rule evaluation function.
[0058] Furthermore, the weight coefficients of the overall evaluation function of the improved DWA algorithm are allocated based on experimental data and expert experience to achieve a comprehensive quantitative evaluation of path quality.
[0059] The present invention has the following beneficial effects:
[0060] This invention utilizes a dynamic elliptical ship domain model to adaptively adjust the safety boundary based on the distance between ships and the encounter situation of COLREGs. By directly coupling the ship collision risk index (NCRI) with the collision avoidance rule evaluation function, it ensures that path generation simultaneously meets the dual constraints of physical collision avoidance and rule compliance. Combined with path yaw evaluation optimized by real-time attitude data, it suppresses aggressive maneuvers that do not conform to the ship's handling characteristics. Finally, relying on the weighted fusion of multiple evaluation functions, it coordinates environmental data, collision risk, and comprehensive evaluation values in rolling optimization to achieve a globally optimal collision avoidance decision with a four-dimensional balance of safety, efficiency, rules, and handling, significantly improving the robustness and engineering practicality of autonomous collision avoidance in complex sea conditions. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is a flowchart of the decision-making method of the present invention;
[0063] Figure 2 This is the simulated experimental water area for the ship of this invention;
[0064] Figure 3 This is the dynamic elliptical ship domain model of the present invention;
[0065] Figure 4 This is a schematic diagram of the path yaw prediction method of the present invention;
[0066] Figure 5 This is an experimental comparison graph showing the evaluation functions with different weights in this invention;
[0067] Figure 6 Flowchart of the improved DWA algorithm of this invention
[0068] Figure 7 This is a timing diagram of the collision avoidance process of the ship in an encounter situation according to the present invention;
[0069] Figure 8 This is a timing diagram of the collision avoidance process in a ship overtaking situation according to the present invention;
[0070] Figure 9 This is a timing diagram of the collision avoidance process in a situation where ships meet at an intersection, according to the present invention.
[0071] Figure 10 This is a timing diagram of the ship autonomous navigation simulation process of the present invention;
[0072] Figure 11 This is an enlarged view of the collision avoidance process of Ship1 and Ship3 in this invention;
[0073] Figure 12 This is an enlarged view of the collision avoidance process of Ship2 and Ship4 in this invention;
[0074] Figure 13 This is an enlarged view of the collision avoidance process of Ship1 and Ship2 in this invention;
[0075] Figure 14 This is a graph showing the heading, speed, and bow roll rate of the vessel according to the present invention.
[0076] Figure 15 This is a graph showing the variation of the NCRI values for ships according to the present invention. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0078] This embodiment provides a ship dynamic collision avoidance decision-making method based on an improved DWA algorithm, such as... Figure 1 As shown, it includes:
[0079] S1. Use the grid method to model the environment of the nautical chart to obtain the nautical chart environment data of the current navigation area; the nautical chart environment data includes: the number of obstacles in the water area of the nautical chart, the total number of grids, and the obstacle density;
[0080] S2. Construct a dynamic elliptical ship domain model based on the quaternion ship domain QSD model, which is used to dynamically adjust the domain size of the dynamic elliptical ship domain model for different encounter situations; calculate the Euclidean distance from other ships to the ship, and at the same time, calculate the Euclidean distance from other ships to the boundary of the dynamic elliptical ship domain of the ship according to the dynamic elliptical ship domain model, and quantify the ship collision risk, i.e., NCRI, based on the calculation results.
[0081] S3. Improved DWA algorithm: Based on the modification of the original DWA algorithm's velocity evaluation function and azimuth evaluation function, a new path yaw evaluation function and collision avoidance rule evaluation function are added; wherein, the path yaw evaluation function is used to evaluate the rationality of attitude changes in ship trajectory tracking; the collision avoidance rule evaluation function is used to constrain the generated path to conform to COLREGs rules;
[0082] S4. The evaluation function of the improved DWA algorithm is weighted and fused using a weight allocation method to obtain a weighted evaluation function;
[0083] S5. Based on the nautical chart environment data in S1, the NCRI in S2, and the improved DWA algorithm, the ship completes local collision avoidance and generates an optimized ship route.
[0084] Specifically, firstly, a gridded environment modeling technique is used to discretize continuous nautical charts into computable units, and quantitatively extract obstacle distribution features (density / number / spatial proportion) to provide a real-time environmental perception basis for dynamic collision avoidance;
[0085] Secondly, a dynamic elliptical ship domain model is constructed: based on the quaternion ship domain (QSD) model, the encounter situation influence coefficient is introduced to dynamically scale the major and minor axes of the ellipse, so that the ship domain shrinks / expands in real time with the collision risk; collision risk quantification: the standardized collision risk index NCRI is defined according to the COLREGs rule, and the danger level is objectively assessed by comprehensively considering parameters such as encounter angle, distance, and relative speed.
[0086] Furthermore, the DWA evaluation function system was designed and improved: a path yaw evaluation function was added to quantify the matching degree between the rate of change of heading angle and path curvature in trajectory tracking, thereby suppressing unreasonable turns and ensuring the smoothness of collision avoidance actions; a collision avoidance rule evaluation function was added to embed COLREGs rules (such as overtaking and avoidance responsibility, and right turn clauses in case of an encounter), constraining path generation to comply with international standards, transforming regulatory logic into computable constraints, and ensuring decision compliance; and a weight allocation fusion mechanism was used to coordinate multi-objective evaluations, balancing path tracking accuracy, obstacle avoidance safety, and rule compliance.
[0087] Finally, by combining environmental data, NCRI risk index and weighted evaluation function, the improved DWA algorithm is driven to generate optimized routes that take into account safety, efficiency and regulations in real time, and its engineering feasibility is verified by simulation based on complex navigation environment.
[0088] In a specific embodiment, the environmental modeling of the nautical chart is as follows: Figure 2 As shown, a two-dimensional grid map is constructed by modeling the target sea area using the grid method. Different colors are used to identify the grids based on their attributes and navigation safety: orange grids represent obstacle areas, typically including other vessels, underwater reefs, rocks, shipwrecks, and other objects or areas that constitute obstacles to passage; these are considered non-navigable areas and vessels should actively avoid them during navigation. Blue grids represent safe navigation areas, i.e., unobstructed spaces where vessels are allowed to navigate freely.
[0089] Grid-based modeling not only clearly reflects the spatial distribution characteristics of the navigation environment but also provides a unified data structure for collision avoidance path planning. Ships can perceive the current environmental state based on this grid map and perform path search and decision-making based on the passability between grids, thereby effectively avoiding obstacle areas and finding the optimal navigation path. In addition, environmental feature information related to navigation safety can be extracted based on the grid map, including the number of obstacles and the total number of grids. The obstacle density (number of obstacles divided by the total number of grids) can be obtained by calculating the ratio of the two. This density index is used to quantify the complexity of the current environment and can provide a basis for subsequent collision avoidance algorithm weight settings, risk analysis, and path selection strategies.
[0090] Specifically, the steps for constructing the dynamic elliptical ship domain model are as follows:
[0091] S21. In the quaternion-based QSD model of a ship, the elliptical domain surrounding the ship is divided into four unequal regions, each defined by a different radius. These radii reflect the variations in the ship's required maneuverability and safe distance under different conditions. The division of these four regions is based on the understanding of the importance of ship maneuverability and speed in assessing safe distance. Therefore, the regions defined by these four different radii constitute a polygon, which can be regarded as the polygonal region surrounding the ship.
[0092] Based on the Kijima blocking region estimation formula and introducing the influence coefficient s of the encounter situation, the four axis radii of the four unequal regions are optimized and calculated. The calculation expression is as follows:
[0093]
[0094] In the formula, L and v are the ship's length and speed, respectively; s is a coefficient that takes into account the effects of different encounter situations; T 90 It is the time required for the ship to turn 90°; D T It is the tactical diameter of the ship's turning; where s and T are calculated. 90 The expression is:
[0095]
[0096] In the formula, α is the angle between the course of the ship and the other ship, in radians; v t For the speed of other ships; A D This represents the longitudinal distance. Generally, the larger the longitudinal distance of a ship, the more sluggish its response to maneuvering, that is, the slower its response to the rudder.
[0097] A D and D T The value of is estimated using an approximate formula, which is expressed as:
[0098]
[0099] S22. Establish Cartesian coordinates with the ship's center as the origin, the starboard transverse direction as the positive x-axis, and the bow direction as the positive y-axis. Using the endpoints of the four axis radii as the coordinates of the four vertices, and combining with formula (1), obtain the major and minor axis parameters and offset parameters of the dynamic elliptical ship domain model. The expressions are as follows:
[0100]
[0101] Based on the major and minor axis parameters and offset parameters, the boundary equations of the dynamic elliptical ship domain model in the hull coordinate system are as follows:
[0102]
[0103] In the formula, a and b are the major and minor axis parameters of the respective domains; Δa is the offset of the ship along the major axis of the ellipse from the center of the ellipse to the stern; Δb is the offset of the ship along the minor axis of the ellipse to the port side.
[0104] In a specific embodiment, the constructed ship domain model is as follows: Figure 3 As shown, in the dynamic elliptical ship domain model, the ship's position is shifted to the lower left, dividing the domain into four distinct areas. This division exhibits a specific distribution pattern: the area in the bow direction is relatively large, while the area in the stern direction is relatively small; simultaneously, the area on the starboard side is larger, and the area on the port side is smaller. This distribution aligns with the actual experience of ship operators in navigation practice, namely, the potential danger at the same distance ahead of the ship is usually greater than the danger in the stern direction, while the danger on the starboard side is greater than that on the port side.
[0105] From formulas (1) to (8), it can be concluded that the constructed dynamic elliptical ship domain model considers a variety of encounter situations and can be dynamically adjusted according to the ship's speed and maneuvering performance parameters, making it more consistent with the actual navigation situation. This dynamic adjustment capability enables the ship domain model to not only reflect the safe zone of the ship under static conditions, but also adapt to the ever-changing maneuvering needs and safety requirements of the ship in complex situations.
[0106] Specifically, the process of calculating the Euclidean distance from other vessels to the vessel itself, and simultaneously calculating the Euclidean distance from other vessels to the boundary of the dynamic elliptical vessel domain of the vessel itself based on the aforementioned dynamic elliptical vessel domain model, and quantifying the risk of vessel collision based on the calculation results is as follows:
[0107] The Euclidean distance from another ship to this ship is calculated using the following expression:
[0108]
[0109] In the formula, D OT It is the Euclidean distance between his vessel and this vessel; x TS His ship's x-coordinate; y TS His ship's longitudinal coordinate; x OS y is the x-coordinate of this ship; OS This is the longitudinal coordinate of the ship;
[0110] The Euclidean distance from another vessel to the boundary of the dynamic elliptical vessel domain of this vessel is calculated using the following expression:
[0111]
[0112] In the formula, The radius of the dynamic elliptical vessel domain, defined by the dynamic elliptical vessel domain in the direction from the vessel to another vessel; d OTx is the Euclidean distance from the other vessel to the boundary of the dynamic elliptical vessel domain of this vessel; P The x-coordinate of the intersection of the lines is y. P It is the ordinate of the intersection point of the lines;
[0113] The expression for calculating NCRI is as follows, based on the Euclidean distance from other vessels to this vessel and the Euclidean distance from other vessels to the boundary of this vessel's dynamically elliptical vessel domain:
[0114]
[0115] Specifically, the steps in step S3 to improve the DWA algorithm are as follows:
[0116] S31. To improve the azimuth evaluation function of the original DWA algorithm, making it more reasonable in evaluating the quality of the trajectory, especially in terms of turning trend and heading change under the regression speed; firstly, an intermediate distance point other than the end of the ship's trajectory is selected to evaluate the trajectory's state at that point, thus more accurately reflecting the actual performance of the trajectory rather than solely relying on the attitude at the end of the trajectory; based on the intermediate distance point and the ship's speed, the corresponding time interval is calculated, and its expression is:
[0117]
[0118] In the formula, d mid is the selected intermediate distance point; v is the ship speed;
[0119] The deviation is calculated based on the pose over time intervals, and the expression for the azimuth evaluation function is obtained as follows:
[0120] Heading(v,ω)=180°-abs[(θ(n dt,h ,aim)-ψ(n dt,h (14)
[0121] In the formula, θ(n) dt,h (,aim) is the nth dt,h The azimuth angle of the position pointing towards the target at any given moment; ψ(n dt,h ω is the heading angle of the ship at this position; v is the angular velocity; ω is the speed.
[0122] S32. In the original DWA algorithm's speed evaluation function, only the magnitude of speed is typically considered to measure the ship's speed, aiming for higher speeds to improve efficiency. However, in actual ship navigation, simply maximizing speed often leads to excessive speed fluctuations, resulting in unstable tracks. Especially in obstacle avoidance or complex environments, frequent acceleration and deceleration not only affect navigation safety but also increase energy consumption and mechanical load. Therefore, to address the issue of uneven tracks caused by drastic speed changes, a penalty term for speed fluctuations is added to the original speed evaluation function, comprehensively considering both speed stability and magnitude to obtain a smoother and more reasonable speed output. Specifically, the following speed oscillation evaluation index is introduced:
[0123] u=k0×|2u n -u n-1 -u n-2 | (15)
[0124] In the formula, k0 is the velocity oscillation penalty weight; u n The velocity of the trajectory at the current moment; u n-1 u n-2 The values are the velocities of the trajectory at the previous moment and the two moments before that, respectively. The velocity oscillation evaluation index reflects the smoothness of the current velocity compared to the historical velocity. If the current velocity changes significantly compared to the historical velocity (i.e., the oscillation is obvious), the value of this item is higher, thus imposing a greater penalty in the comprehensive evaluation to force the trajectory to tend to be stable.
[0125] Substituting the velocity oscillation evaluation index into the velocity evaluation function of the original DWA algorithm, the expression of the velocity evaluation function is obtained as follows:
[0126] Velocity(v,ω)=k1×|u|+k2×|2u n -u n-1 -u n-2 | (16)
[0127] In the formula, k1 is the speed weighting coefficient, adjusting the preference for speed magnitude; k2 is the weighting coefficient for the smoothness of speed changes; |u| is the absolute value of the speed, maintaining navigation efficiency; |2u| n -u n-1 -u n-2 To measure speed fluctuations and ensure a smooth trajectory;
[0128] The improved speed evaluation function, by introducing a speed oscillation term, effectively enhances the smoothness of the trajectory, suppresses sudden speed changes, avoids ship handling instability caused by speed discontinuities, and ensures a natural and smooth course. Simultaneously, stable speed changes enhance the ship's navigation safety in complex environments, facilitate the smooth execution of obstacle avoidance control maneuvers, and improve collision avoidance performance. Furthermore, this improvement reduces energy consumption and mechanical wear caused by frequent acceleration and deceleration, extends the service life of the propulsion system, and improves ship operating efficiency. Especially in environments with dense dynamic obstacles and complex currents, speed stability is crucial for improving the smoothness and practicality of the trajectory.
[0129] S33. The original DWA algorithm, lacking local target guidance, may cause unnecessary detours when avoiding other vessels due to environmental complexity, leading to local optima and excessive deviation from the original globally planned path. Therefore, a path skew evaluation function is added to reduce the possibility of vessel detours and to ensure timely return to the original planned path after collision avoidance. A navigable path connecting local sub-target points is obtained through global path planning. The distance between the predicted trajectory point at the current moment and the path is denoted by d. Figure 4 As shown, based on the coordinates of the predicted trajectory point at the current moment, the coordinates of the navigable path nodes, and the distance between the predicted trajectory point and the path nodes, the path yaw evaluation function is calculated, and its expression is:
[0130]
[0131] In the formula, d represents the coordinates of the navigable path nodes and the distance between the trajectory point and the path nodes. The smaller the distance d, the larger the evaluation function value, and the better the planned navigation path. The expression for calculating d is:
[0132]
[0133] In the formula, (x t ,y t (x) represents the coordinates of the predicted trajectory point at the current moment; d ,y d ) represents the coordinates of nodes on the path;
[0134] S34. When a ship is navigating at sea and faces an encounter situation, it should take effective and reasonable collision avoidance maneuvers in accordance with the requirements of the collision avoidance rules. However, the original DWA algorithm does not impose such restrictions, and the planned collision avoidance path does not meet the requirements of the collision avoidance rules. During the local path planning process, the ship may encounter moving obstacles, such as when it encounters another ship. When the collision risk between the ships reaches a certain value, it is considered that there is a possibility of collision between the two ships. The timing of the ship's avoidance is determined according to the NCRI, and then the collision avoidance rule evaluation function is calculated, the expression of which is:
[0135]
[0136] If the predicted trajectory formed by the sampled velocity vector conforms to the collision avoidance rules, the evaluation value will be set to 1; otherwise, the evaluation value will be set to 0, and the predicted trajectory formed by that velocity vector will not be selected.
[0137] Specifically, the expression for weighted fusion of the evaluation function of the improved DWA algorithm using a weight allocation method is as follows:
[0138]
[0139] In the formula, Dist(v,ω) is the obstacle distance evaluation function of the original DWA algorithm; α is the weight coefficient of the azimuth evaluation function; β is the weight coefficient of the obstacle distance evaluation function; γ is the weight coefficient of the velocity evaluation function; μ is the weight coefficient of the path yaw evaluation function; and η is the weight coefficient of the collision avoidance rule evaluation function.
[0140] In collision avoidance decision-making, the higher the accumulated value of the evaluation function, the stronger the superiority of the predicted trajectory. Its main significance lies in the following aspects: When a ship faces an encounter situation, the evaluation function can effectively measure and select the optimal collision avoidance scheme, enabling the ship to reasonably adjust its navigation trajectory while adhering to collision avoidance rules and ensuring navigation safety, thus avoiding collisions with other ships. At the same time, the evaluation function also comprehensively considers the global path objective, minimizing yaw caused by collision avoidance maneuvers, thereby ensuring that the ship sails quickly and efficiently toward the target point. This mechanism not only improves the intelligence and reliability of collision avoidance decision-making, but also provides efficient navigation guidance for ships in complex dynamic environments, providing important guarantees for the safety and efficiency of the ship's overall navigation plan.
[0141] In a specific embodiment, the ship sets an initial route and sails along the initial route. A dynamic ship domain model is set up based on the dynamic elliptical ship domain model, which varies with the ship's size and speed. The ship perceives the current environmental state based on the constructed nautical chart environment data and performs path search and decision-making based on the passability between grids in the nautical chart. When a collision hazard is posed to another ship, the ship's collision hazard risk (NCRI) is calculated and input into the improved DWA algorithm. The improved DWA algorithm plans a collision avoidance path that conforms to the COLREGs rules. The ship avoids other ships according to the path planned by the improved DWA algorithm, thus achieving dynamic collision avoidance.
[0142] Specifically, the weight coefficients of the overall evaluation function of the improved DWA algorithm are allocated based on experimental data and expert experience to achieve a comprehensive quantitative evaluation of the path's merits.
[0143] In this embodiment, multiple sets of comparative experiments were designed. The maximum speed of the ship was uniformly set to 10 knots. During the voyage, the ship speed was automatically adjusted according to obstacles, turns, and other conditions to keep as consistent as possible with the planned global path and to ensure the comparability of the experimental results. The combination of the weight coefficients of the improved DWA algorithm is shown in Table 1.
[0144] Table 1 Comparison of Evaluation Function Weights
[0145]
[0146]
[0147] By adjusting the values of different index parameters in the evaluation function and conducting comparative analysis, five sets of parameters were set up in the experiment. The simulation results based on these parameter combinations are as follows: Figure 5 As shown.
[0148] Experimental results show that different weight combinations have a significant impact on the collision avoidance performance of ships. The value of the μ parameter directly affects the degree of deviation between the collision avoidance path and the global path. The comparison between weight1 and weight5 schemes shows that the larger μ parameter value of weight1 results in a collision avoidance trajectory that is closer to the global path. Due to the smaller μ parameter of weight5, the collision avoidance trajectory deviates more from the global path, affecting the overall path consistency. The value of the γ parameter directly affects the speed. The comparison between weight1 and weight4 schemes shows that the smaller γ parameter of weight4 reduces the flexibility of the collision avoidance path, resulting in a larger deviation from the global path when handling turns or obstacles.
[0149] In complex navigation environments, the β parameter has a critical impact on collision avoidance safety. As a distance evaluation factor in the evaluation function, the β parameter measures the distance between the ship and obstacles, reflecting the collision avoidance model's hazard mitigation capability. A larger β value indicates higher algorithm sensitivity to obstacles, and the collision avoidance scheme tends to move further away from obstacles, thus reducing potential collision risks. The comparison results between the weight1 and weight3 schemes when approaching obstacles such as islands and reefs are as follows: Figure 5 As shown in (b), the impact of β parameter design on collision avoidance performance is fully demonstrated. Both collision avoidance schemes guide the ship away from the obstacle by setting a large β parameter: weight1 scheme β = 15 and weight3 scheme β = 12. The results show that although both can achieve effective collision avoidance, the difference in β value leads to significant differences in collision avoidance performance. The collision avoidance performance of weight3 scheme deviates further from the global path. In contrast, weight1 scheme has stronger recovery ability after collision avoidance and can quickly return to the global path while ensuring safety. The continuity and consistency of the collision avoidance trajectory are better.
[0150] In the turning scenario, weight1, weight2, and weight4 all performed well in turning, with good collision avoidance trajectory continuity. Weight1, in particular, demonstrated stronger adjustment capabilities at turning points, exhibiting smoother collision avoidance trajectory and better global consistency than other combinations. In contrast, weight3 and weight5 exhibited significant deviations during turning and failed to effectively conform to the global path. Figure 5 (a) and Figure 5 (c) shows that, overall, the weight combination of the weight1 scheme performs well in various typical scenarios. Its combination design of α=10, β=15, γ=5, μ=12, and η=5 can effectively control the length and direction deviation of the navigation trajectory while ensuring the safety of ship navigation, and improve the smoothness of the collision avoidance trajectory and the consistency of the global path. Therefore, it can be concluded that the weight combination of the weight1 scheme can achieve better collision avoidance performance in complex environments, and provides a reference for the design of parameters of ship collision avoidance decision evaluation function.
[0151] In a specific embodiment, to verify the collision avoidance decision of the improved DWA algorithm combined with NCRI, the following simulation experiment was designed:
[0152] Two vessels were selected for simulation verification in open waters under three typical encounter scenarios: overtaking, head-on encounter, and cross encounter. The simulation vessel parameters are shown in Table 2.
[0153] Table 2 Basic parameters of the simulated ship
[0154]
[0155] The simulation verification of ship collision avoidance was carried out using the MATLAB programming tool. All ships in the experiment were regarded as motorized ships with equal maneuverability, and the two ships were in mutual visibility. The experimental environment was selected as a relatively open water area so that the avoidance action was not affected by other water obstacles. The experimental water area was gridded into a navigation area of 526×648, with the upper left corner as the origin of the coordinate system, and each grid represented 35.8m.
[0156] In this embodiment, to ensure the collision avoidance process aligns with actual ship maneuvering, the weight1 scheme is selected as the evaluation function coefficient. Based on the NCRI, when the normalized collision hazard ratio (NCRI) of the two ships is 0.6, the encounter situation type is determined. Experiments simulated various encounter situations, including head-on collisions, overtaking, cross-traffic encounters, and multi-ship cooperative collision avoidance. The performance of the improved DWA algorithm in these scenarios and its conformity to the COLREGs rules were analyzed in detail. Figure 6 The flowchart of the improved DWA algorithm is shown below. The results of each encounter situation in the verification experiment in this embodiment are as follows:
[0157] In a head-on situation, the initial position, target position, initial course, initial speed, and maximum speed of Ship1 and Ship2 are shown in Table 3.
[0158] Table 3 Ship Information Table in Encounter Situations
[0159]
[0160] Simulation results are as follows Figure 7 As shown, Figure 7 (a) to 7(d) are timeline diagrams of the collision avoidance process between the two ships;
[0161] like Figure 7 As shown, two ships are sailing from their respective starting positions towards their target positions, each traveling in opposite directions along the other's path. According to the COLREGs rules, this is a typical head-on collision situation. Both ships begin at initial speeds, and as their speeds increase, their collision avoidance zones gradually expand. Subsequently, both ships, following the COLREGs rules, choose to turn right to avoid collision, passing the other ship on its port side. Using the improved DWA algorithm, the ship first dynamically adjusts its safety zone based on real-time positions, speeds, and headings of both ships, accurately calculating the collision risk intensity (NCRI) between the two vessels. Then, based on the dynamic elliptical ship zone and NCRI, the improved DWA algorithm predicts the collision risk intensity (NCRI) at the predicted time. Within a given window, the system rapidly evaluates multiple possible navigation trajectories and selects the optimal path that ensures a safe distance between the two vessels while minimizing deviation from the original planned route. This invention not only considers the basic requirements for collision avoidance but also prioritizes navigation efficiency, efficiently completing collision avoidance maneuvers and quickly returning to the original planned path. The Normalized Collision Risk Index (NCRI) results show that throughout the entire collision avoidance process, the collision risk of both vessels remained below 0.6, meaning that the vessel's domain was never intruded upon, verifying the vessel's navigation safety. After clearing the area, both vessels promptly adjusted their course, returning to the original planned path and successfully reaching their target location. Simulation experiments of the encounter situation demonstrate that this invention can meet the safety requirements for vessel collision avoidance.
[0162] In a chase situation, the initial position, final position, initial course, initial speed, and maximum speed information of Ship1 and Ship2 are shown in Table 4:
[0163] Table 4. Ship Information Table in Overtaking Situation
[0164]
[0165] Simulation results are as follows Figure 8 As shown, Figure 8 (a) to 8(d) are timeline diagrams of the collision avoidance process between the two ships.
[0166] like Figure 8 As shown in Table 4, Ship1's initial speed is 2 knots and Ship2's initial speed is 4 knots. Upon discovering an approaching vessel ahead, Ship2 takes collision avoidance action in accordance with the relevant requirements of the COLREGs Code. While ensuring that Ship1 does not intrude into its own vessel's territory, Ship2 turns to starboard and overtakes the other vessel from its starboard side. After overtaking, Ship2 quickly performs a turning maneuver to return to its original planned path and continues sailing towards the target point.
[0167] In the cross-encounter scenario, the initial position, final position, initial heading, initial speed, and maximum speed information of Ship1 and Ship2 are shown in Table 5:
[0168] Table 5. Ship Information in Encounter Situations
[0169]
[0170] Simulation results are as follows Figure 9 As shown, Figure 9 (a) to 9(d) are timeline diagrams of the collision avoidance process between the two ships.
[0171] like Figure 9 As shown in Table 5, Ship1's initial speed is set to 3 knots and its initial heading to 332°, while Ship2's initial speed is set to 4 knots and its initial heading to 102°. According to the COLREGs rules, the two ships are in a cross-road encounter situation, with Ship2 giving way and Ship1 proceeding in the straight course. After reaching the action timing set by the improved DWA algorithm, Ship2 takes a collision avoidance maneuver by turning right and passing behind Ship1. Throughout the collision avoidance process, both ships remain outside each other's territorial space and successfully pass each other, allowing Ship2 to return to its original path and sail to the target position.
[0172] In a specific embodiment, a complex navigation environment is constructed and a ship navigation simulation experiment is conducted to verify the feasibility of the optimized ship route generated by the improved DWA algorithm; the ship navigation simulation experiment is designed as follows:
[0173] Ship1 sails from south to north along planned route 1, Ship2 sails from west to east along planned route 2, Ship3 sails from east to west along planned route 3, and Ship4 sails from north to south along planned route 4. During the voyage, the four ships will approach each other, posing a collision hazard. Ship positions, sailing routes, initial headings, and maximum speeds are shown in Table 6.
[0174] Table 6. Initial State and Global Path Information of Ships
[0175]
[0176] Figure 10The simulation results show the navigation of four ships in the experimental water environment. In the simulation, the tracks of different ships are represented by different colors. The red solid line represents the navigation track of Ship1, the purple solid line represents the navigation track of Ship2, the dark blue solid line corresponds to the navigation track of Ship3, and the light blue solid line represents the navigation track of Ship4.
[0177] In the initial phase of autonomous navigation, Ship1 departs from (9.39, 3.46) and gradually accelerates to its maximum speed of 6 knots according to the set speed. Its initial heading is 275°, and it heads towards the next turning point (7.55, 3.64). This process is as follows: Figure 10 As shown, at 1224s, Ship1 and Ship3 were close enough to pose a collision hazard; at this time, the ships' specific positions were as follows: Figure 10 As shown in (b), the relevant motion parameters are respectively... Figure 14 (a)-1, (a)-2, (a)-3 and Figure 14 (c)-1, (c)-2, (c)-3; At this point, Ship1's heading is 315° and its speed is 6 knots; Ship3's heading is 202° and its speed is 10 knots; the calculated NCRI value of Ship3 relative to Ship1 is 0.31; the NCRI value of Ship1 relative to Ship3 is 0.293, indicating that there is indeed a certain risk of collision between the two ships; based on the ships' positions, headings, speeds, and the relevant provisions of the COLREGs Code, Ship1 and Ship3 are in a cross-encounter situation, with Ship1 being the give-way vessel and Ship3 being the straight-ahead vessel; therefore, Ship1 takes evasive action, while Ship3 maintains its heading and speed; after comprehensively considering the collision risk, target heading deviation, and navigation environment constraints, Ship1 takes a right turn to avoid collision, adjusting its heading from 315° to 338°, while Ship3 maintains its heading unchanged; Figure 11 The magnified trajectories of Ship1 and Ship3 during close-range collision avoidance are shown. As can be seen from the NCRI of the two ships' collision risk, the two ships remained outside each other's dynamic elliptical domain throughout the entire avoidance process, without any intrusion, indicating that the collision avoidance actions and effects between the ships met safety standards.
[0178] When the ship navigated autonomously until 1866, such as Figure 10As shown; Ship2 and Ship4 approach each other, posing a collision hazard and forming a cross-traffic situation. At this time, Ship2's heading is 71° and its speed is 6 knots, while Ship4's heading is 155° and its speed is 10 knots. Ship2 shows Ship4's NCRI as 0.295; Ship4 shows Ship2's NCRI as 0.296, indicating that the collision hazard between the two ships has reached the critical value requiring collision avoidance measures. According to the COLREGs rules, Ship4, as the give-way vessel, takes evasive action, while Ship2, as the straight-ahead vessel, maintains its heading and speed. Ship4 takes a right turn to avoid collision, adjusting its heading from 155° to 168° (maximum 175° under inertia). During the avoidance process, the trend of Ship4's bow roll rate is as follows. Figure 14 As shown in (d-3), during the right turn avoidance phase, the bow angle remains positive, reflecting the dynamic adjustment process of actively avoiding Ship2; after the avoidance is completed, the bow speed gradually becomes negative, indicating that it turns left back to the original heading of 155°. Figure 12 The magnified trajectories of Ship2 and Ship4 during close-range collision avoidance are shown. From the avoidance trajectories of the two ships and the collision risk, it can be seen that Ship2 and Ship4 always remained outside each other's dynamic elliptical domains, and no domain intrusion occurred, indicating that the collision avoidance actions and effects between the ships met safety standards.
[0179] When the ship autonomously navigates to 2208s, the ship's navigation position is as follows: Figure 10 As shown in (e); Ship1 and Ship2 constitute a collision hazard; the motion parameter data of Ship1 and Ship2 are as follows: Figure 14 (a)-1, (a)-2, (a)-3 and Figure 14 As shown in (b)-1, (b)-2, and (b)-3; at this time, Ship1's heading is 316° and its speed is 6 knots; Ship2's heading is 72° and its speed is 6 knots; the collision risk NCRI of Ship1 and Ship2 is as follows: Figure 15 As shown, at this moment, Ship1 displays Ship2's NCRI as 0.23; Ship2, having just finished a meeting with Ship4, displays Ship1's NCRI as 0.12, indicating a potential collision risk between the two vessels. Based on Ship1 and Ship2's positions, course, speed, and COLREGs regulations, this is a cross-cutting situation; Ship2 is the yielding vessel, and Ship1 is the direct-going vessel. Ship2 immediately makes a sharp right turn to avoid Ship1, as follows... Figure 14 As shown in (b)-1, Ship2 changes its course from 72° to 117° to avoid Ship1; Figure 13The position trajectories of the two ships during the collision avoidance process are shown in the figure. As can be seen from the figure, the two ships always remained outside each other's dynamic elliptical domains, and no domain intrusion occurred, indicating that the collision avoidance actions and collision avoidance effects between the ships met safety standards.
[0180] When the ships autonomously navigated to 3256s, Ship1, Ship2, Ship3, and Ship4, after a series of collision avoidance maneuvers, successfully eliminated all collision hazards. Each ship returned to its original planned path and continued sailing towards its respective destination. Figure 10 As shown in (g); during the subsequent navigation, Ship2, while maintaining a safe distance from obstacles, can adjust its course in advance for larger corners in the planned path and track the globally planned path, such as... Figure 10 As shown in (h); this reasonable advance turning operation not only conforms to actual navigational maneuvering habits, but also further verifies the feasibility and rationality of the improved DWA algorithm proposed in this paper; finally, at 4794s, all ships safely arrived at the target point, and the simulation experiment ended; the curves of the changes in heading, speed, and yaw during the autonomous navigation process of the ships are shown in (h). Figure 14 As shown, the Normalized Collision Risk Index (NCRI) for ships is as follows: Figure 15 As shown.
[0181] The simulation process shows that the autonomous navigation vessel travels from the starting point to the destination along the pre-planned path. When another vessel is detected, the collision risk of the other vessel is calculated in real time and accurately. When the set threshold is reached, the encounter situation is determined according to the COLREGs rules and corresponding collision avoidance measures are taken. Throughout the entire navigation process, the domains of all autonomous navigation vessels are not invaded, indicating that the collision avoidance actions and effects between vessels meet the safety standards. This further proves the effectiveness and practicality of the proposed vessel path planning model, vessel domain model, vessel collision risk model, and vessel collision avoidance decision model.
[0182] The present invention has the following beneficial effects:
[0183] This invention utilizes a dynamic elliptical ship domain model to adaptively adjust the safety boundary based on the distance between ships and the encounter situation of COLREGs. By directly coupling the ship collision risk index (NCRI) with the collision avoidance rule evaluation function, it ensures that path generation simultaneously meets the dual constraints of physical collision avoidance and rule compliance. Combined with path yaw evaluation optimized by real-time attitude data, it suppresses aggressive maneuvers that do not conform to the ship's handling characteristics. Finally, relying on the weighted fusion of multiple evaluation functions, it coordinates environmental data, collision risk, and comprehensive evaluation values in rolling optimization to achieve a globally optimal collision avoidance decision with a four-dimensional balance of safety, efficiency, rules, and handling, significantly improving the robustness and engineering practicality of autonomous collision avoidance in complex sea conditions.
[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A ship dynamic collision avoidance decision-making method based on an improved DWA algorithm, characterized in that, include: S1. Use the raster method to model the environment of the nautical chart in order to obtain the nautical chart environment data of the current navigation area; The nautical chart environmental data includes: the number of obstacles in the chart's water area, the total number of grid cells, and the obstacle density; S2. Construct a dynamic elliptical ship domain model based on the quaternion ship domain QSD model, which is used to dynamically adjust the domain size of the dynamic elliptical ship domain model for different encounter situations; calculate the Euclidean distance from other ships to the ship, and at the same time, calculate the Euclidean distance from other ships to the boundary of the dynamic elliptical ship domain of the ship according to the dynamic elliptical ship domain model, and quantify the ship collision risk, i.e., NCRI, based on the calculation results. S3. Improved DWA algorithm: Based on the modification of the original DWA algorithm's velocity evaluation function and azimuth evaluation function, a new path yaw evaluation function and collision avoidance rule evaluation function are added; wherein, the path yaw evaluation function is used to evaluate the rationality of attitude changes in ship trajectory tracking; the collision avoidance rule evaluation function is used to constrain the generated path to conform to COLREGs rules; S4. The evaluation function of the improved DWA algorithm is weighted and fused using a weight allocation method to obtain a weighted evaluation function; S5. Based on the nautical chart environment data in S1, the NCRI in S2, and the improved DWA algorithm, the ship completes local collision avoidance and generates an optimized ship route.
2. The ship dynamic collision avoidance decision-making method based on the improved DWA algorithm according to claim 1, characterized in that, The specific steps for constructing the dynamic elliptical ship domain model are as follows: S21. Based on the aforementioned quaternion-based QSD model for ship domains, the elliptical domain surrounding the ship is divided into four unequal regions, centered on the ship. Using the Kijima blocking region estimation formula and incorporating the influence coefficient s of the encounter situation, the four axial radii of these unequal regions are optimized and calculated. The calculation expressions are as follows: In the formula, L and v are the ship's length and speed, respectively; s is a coefficient that takes into account the effects of different encounter situations; T 90 It is the time required for the ship to turn 90°; D T It is the tactical diameter of the ship's turning; where s and T are calculated. 90 The expression is: In the formula, α is the angle between the course of the ship and the other ship, in radians; v t For the speed of other ships; A D This represents the longitudinal distance of the ship; A D and D T The value of is estimated using an approximate formula, which is expressed as: S22. Establish Cartesian coordinates with the ship's center as the origin, the starboard transverse direction as the positive x-axis, and the bow direction as the positive y-axis. Using the endpoints of the four axis radii as the coordinates of the four vertices, and combining with formula (1), obtain the major and minor axis parameters and offset parameters of the dynamic elliptical ship domain model. The expressions are as follows: Based on the major and minor axis parameters and offset parameters, the boundary equations of the dynamic elliptical ship domain model in the hull coordinate system are as follows: In the formula, a and b are the major and minor axis parameters of the respective domains; Δa is the offset of the ship along the major axis of the ellipse from the center of the ellipse to the stern; Δb is the offset of the ship along the minor axis of the ellipse to the port side.
3. A ship dynamic collision avoidance decision-making method based on an improved DWA algorithm according to claim 1 or 2, characterized in that, The process of calculating the Euclidean distance from other vessels to the vessel itself, and simultaneously calculating the Euclidean distance from other vessels to the boundary of the dynamic elliptical vessel domain of the vessel itself, based on the aforementioned dynamic elliptical vessel domain model, and quantifying the vessel collision risk based on the calculation results, is as follows: The Euclidean distance from another ship to this ship is calculated using the following expression: In the formula, D OT It is the Euclidean distance between his vessel and this vessel; x TS His ship's x-coordinate; y TS His ship's longitudinal coordinate; x OS y is the x-coordinate of this ship; OS This is the longitudinal coordinate of the ship; The Euclidean distance from another vessel to the boundary of the dynamic elliptical vessel domain of this vessel is calculated using the following expression: In the formula, The radius of the dynamic elliptical vessel domain, defined by the dynamic elliptical vessel domain in the direction from the vessel to another vessel; d OT x is the Euclidean distance from the other vessel to the boundary of the dynamic elliptical vessel domain of this vessel; P The x-coordinate of the intersection of the lines is y. P It is the ordinate of the intersection point of the lines; The expression for calculating NCRI is as follows, based on the Euclidean distance from other vessels to this vessel and the Euclidean distance from other vessels to the boundary of this vessel's dynamically elliptical vessel domain:
4. The ship dynamic collision avoidance decision-making method based on the improved DWA algorithm according to claim 1, characterized in that, The steps in step S3 to improve the DWA algorithm are as follows: S31. Improved azimuth evaluation function of the original DWA algorithm: Select an intermediate distance point that is not at the end of the ship's trajectory, and evaluate the state of the ship's trajectory at that intermediate distance point; calculate the corresponding time interval based on the intermediate distance point and the ship's speed, and its expression is: In the formula, d mid is the selected intermediate distance point; v is the ship speed; The deviation is calculated based on the pose over time intervals, and the expression for the azimuth evaluation function is obtained as follows: Heading(v,ω)=180°-abs[(θ(n dt,h ,aim)-ψ(n dt,h ))] (14) In the formula, θ(n) dt,h (,aim) is the nth dt,h The azimuth angle of the position pointing towards the target at any given moment; ψ(n dt,h ω is the heading angle of the ship at that position; ω is the angular velocity. v is velocity; S32. The velocity evaluation function of the original DWA algorithm is improved by introducing a velocity oscillation evaluation index, wherein the velocity oscillation evaluation index is: u=k0×|2u n -in n-1 -in n-2 | (15) In the formula, k0 is the velocity oscillation penalty weight; u n The velocity of the trajectory at the current moment; u n-1 u n-2 These are the velocities of the trajectories at the previous two moments and respectively. Substituting the velocity oscillation evaluation index into the velocity evaluation function of the original DWA algorithm, the expression of the velocity evaluation function is obtained as follows: Velocity(v,ω)=k1×|u|+k2×|2u n -in n-1 -in n-2 | (16) In the formula, k1 is the speed weighting coefficient, adjusting the preference for speed magnitude; k2 is the weighting coefficient for the smoothness of speed changes; |u| is the absolute value of the speed, maintaining navigation efficiency; |2u| n -u n-1 -u n-2 To measure speed fluctuations and ensure a smooth trajectory; S33. Add a path yaw evaluation function: Based on global path planning, a navigable path is obtained connecting local sub-target points; based on the coordinates of the predicted trajectory points at the current time, the coordinates of the navigable path nodes, and the distance between the predicted trajectory points and the path nodes, the path yaw evaluation function is calculated, and its expression is: In the formula, d represents the coordinates of the navigable path node and the distance between the trajectory point and the path node. The expression for calculating d is: In the formula, (x t ,y t (x) represents the coordinates of the predicted trajectory point at the current moment; d ,y d ) represents the coordinates of nodes on the path; S34. Additional Collision Avoidance Rule Evaluation Function: Based on the NCRI (National Collision Reference Institute) determining the vessel's avoidance opportunity, the collision avoidance rule evaluation function is calculated, and its expression is as follows:
5. The ship dynamic collision avoidance decision-making method based on the improved DWA algorithm according to claim 1, characterized in that, The expression for weighted fusion of the evaluation function of the improved DWA algorithm using a weight allocation method is as follows: In the formula, Dist(v,ω) is the obstacle distance evaluation function of the original DWA algorithm; α is the weight coefficient of the azimuth evaluation function; β is the weight coefficient of the obstacle distance evaluation function; γ is the weight coefficient of the velocity evaluation function; μ is the weight coefficient of the path yaw evaluation function; and η is the weight coefficient of the collision avoidance rule evaluation function.
6. The ship dynamic collision avoidance decision-making method based on the improved DWA algorithm according to claim 5, characterized in that, The weight coefficients of the overall evaluation function of the improved DWA algorithm are allocated based on experimental data and expert experience to achieve a comprehensive quantitative evaluation of the path's merits.
Citation Information
Cited By
Ship trajectory prediction method and device based on deep learning
CN121479282A
Intelligent ship personnel takeover quality quantification and optimal takeover opportunity inference method
CN121849319A
Method for quantifying quality of intelligent ship personnel takeover and inferring optimal takeover time
CN121849319B