Unmanned ship collision avoidance decision-making method and system fusing captain experience
Through the deep reinforcement learning algorithm based on the captain's experience, the collision avoidance decision-making of unmanned ships is improved, which solves the problems of insufficient collision avoidance rules and high computational cost in the existing technology, and realizes the avoidance of unmanned ships in the case of direct ships and give-way ships. Safe sailing.
Patent Information
- Application Number
- CN202410725251.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-06-05
AI Technical Summary
Existing unmanned ship collision avoidance algorithms are difficult to meet the requirements of the International Maritime Collision Avoidance Regulations (COLREGs) in the case of direct ships and give-way ships. Moreover, the calculation cost is high and the real-time performance is poor, making it difficult to ensure navigation safety.
A deep reinforcement learning algorithm based on the captain's experience is used to obtain the captain's quantitative understanding of COLREGs through a questionnaire. The data is fitted to improve the reward function and action space of the proximal strategy optimization algorithm. It is combined with the GRU neural network to process environmental information to achieve the goal of unmanned ships. Intelligent collision avoidance decision-making.
It improves the intelligent collision avoidance decision-making ability of the unmanned ship, ensures that its collision avoidance behavior meets the requirements of COLREGs, and can promptly take reasonable avoidance measures in the case of direct ships and give-way ships to ensure navigation safety, and improves the generalization ability and efficiency of the algorithm.
Smart Images

Figure CN118746979A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of unmanned ship control and collision avoidance, and in particular relates to an unmanned ship collision avoidance decision method and system integrating the captain's experience. Background Art
[0002] An unmanned ship is an autonomous surface vessel, generally composed of a power control system, an intelligent collision avoidance decision system, a situational awareness system, and a ship-shore communication system. It is widely used in military fields (such as patrols, search and rescue operations, ocean detection, mine removal, anti-submarine warfare, anti-terrorism operations, and anti-piracy tasks) and civil fields (such as cargo transportation, channel measurement, and maritime patrols). In actual navigation, many static obstacles and dynamic ships are usually encountered. In order to successfully complete the mission, unmanned ships need to take reasonable and efficient avoidance measures for the obstacles encountered to ensure navigation safety.
[0003] In the research of unmanned ships, there are generally three types of algorithms used for collision avoidance: 1) Control-based collision avoidance algorithm: Use the mathematical model of ship motion to predict the behavior of the ship, and make collision avoidance decisions based on these prediction results. This algorithm is mainly based on model predictive control algorithm, which often requires a lot of computing cost and is difficult to meet the real-time requirements of ships. 2) Optimization-based collision avoidance algorithm: By considering multiple factors, such as the speed, distance, direction and environmental conditions of the ship, the best collision avoidance strategy is found. This algorithm is mainly based on artificial potential field method, genetic algorithm, etc., and there is a problem of ignoring the dynamic characteristics of the ship and easily falling into the local optimal solution. 3) Reinforcement learning-based collision avoidance algorithm: Allowing ships to learn the best behavior strategy through interaction with the environment and combining the dynamic characteristics of the ship, it can maximize the safety and adaptability of collision avoidance decisions, but the avoidance measures taken by the algorithm in many encounters do not conform to the collision avoidance habits of most captains and violate the International Regulations for Preventing Collisions at Sea (COLREGs).
[0004] Although great progress has been made in the research related to intelligent collision avoidance of ships in recent years, and the above algorithms can solve the problem of intelligent collision avoidance of unmanned ships facing static obstacles and dynamic ships to a certain extent, it is difficult to give reasonable avoidance plans for direct-flowing ships in a timely manner to ensure navigation safety in the special case where the way-giving ship does not take compliant avoidance measures.
[0005] After searching, it is found that the existing designs that are relatively close include the following documents:
[0006] Patent application number CN113687658A, "A model predictive control method for real-time automatic collision avoidance of multiple ships", published a model predictive control method for real-time automatic collision avoidance of multiple ships;
[0007] The patent application number CN115167404A "A collision avoidance decision-making method for autonomous surface ships at sea based on transfer reinforcement learning" publishes a collision avoidance decision-making method for autonomous surface ships at sea based on transfer reinforcement learning.
[0008] The patent application number CN114895673A "A ship collision avoidance decision-making method based on deep reinforcement learning under rule constraints" publishes a ship collision avoidance decision-making method based on deep reinforcement learning under rule constraints.
[0009] The patent application number CN116540698A "A ship collision avoidance path planning method based on an improved artificial potential field model" publishes a ship collision avoidance path planning method based on an improved artificial potential field model.
[0010] However, the existing technical solutions provided above cannot fully comply with COLREGs and do not consider the special situation where the straight-line ship does not take effective avoidance measures when the give-way ship. The model predictive control algorithm requires a lot of calculations in the avoidance decision-making process, which is difficult to meet the real-time requirements of the algorithm for real ships. The artificial potential field method does not adequately consider the constraints of the mechanical characteristics of the ship's own control system during the avoidance process. Deep reinforcement learning can comprehensively consider the kinematic characteristics of the ship and provide a safe solution to the collision avoidance problem in a complex marine environment, but it generally only solves the compliance problem of avoidance decisions when the ship is a give-way ship, and the degree of compliance with the collision avoidance rules is low. When the ship is a straight-line ship but the other ship does not take effective avoidance actions, it is difficult to ensure navigation safety. Summary of the invention
[0011] In order to solve the problem that the existing schemes do not fully comply with the collision avoidance method of COLREGs, and it is difficult to achieve the problem of safe navigation of unmanned ships at sea when they are located between straight-line ships and give-way ships respectively, it is considered necessary to study an unmanned ship collision avoidance decision algorithm that conforms to the captain's habits to achieve safe navigation of unmanned ships at sea. This invention proposes an unmanned ship collision avoidance decision scheme based on the captain's experience and proximal strategy optimization, and realizes the decision of unmanned ship collision avoidance based on a deep reinforcement learning algorithm based on the integration of the captain's experience.
[0012] In this scheme, by designing a questionnaire, the quantitative understanding of COLREGs by captains of ships of different lengths is statistically analyzed, the captains' experience is obtained, and the captains' experience is used to improve the reward function and action space of the proximal strategy optimization algorithm. By developing a new reward function based on the captain's experience, the present invention can adapt to a variety of encounter scenarios and solve the problem of insufficient consideration of COLREGs. Under the scheme proposed by the present invention, the unmanned ship can improve its ability of intelligent collision avoidance decision-making and fully meet the requirements of COLREGs.
[0013] The present invention specifically adopts the following technical solutions:
[0014] An unmanned ship collision avoidance decision-making method integrating captain's experience is proposed. The method obtains captain's experience by statistically analyzing the quantitative understanding of COLREGs by captains of ships of different lengths. The method also obtains the distance for the captain to take avoidance measures to meet COLREGs, the amplitude of course change, the safe encounter distance, and the relationship function between the distance at which the straight-line ship can take avoidance measures when the give-way ship does not take avoidance measures and the length of the ship by fitting data. The reward function and action space of the proximal strategy optimization algorithm are improved and trained to output the unmanned ship collision avoidance decision.
[0015] Furthermore, the captain’s experience includes: statistics on the distance between the captain and the ship in open waters that meets the requirement of “taking evasive action as soon as possible” in COLREGs, the amplitude of the course change that meets the requirement of “the course / speed change should be large enough to be observed”, and the distance between the two ships that meets the requirement of “if the give-way ship has not taken effective evasive measures, the direct-course ship needs to take evasive measures;
[0016] Data fitting was performed on the three parameters to obtain the functional relationship between them and the ship length.
[0017] Furthermore, the specific process of obtaining the captain's experience data is as follows:
[0018] The distance P1(x) and course change amplitude P2(x) of the captains driving different ships were counted respectively when the captain's ship was a give-way ship and the distance information P3(x) of the avoidance measures considered when the captain's ship was a straight-line ship; the least squares method was used to fit the data in combination with the captain's ship, and the fitting formula is as follows:
[0019]
[0020] Where x is the length of the ship, a0, a1, a2, ..., a n , b0, b1, b2, …, b n , c0, c1, c2, …, c n are all polynomial coefficients;
[0021] Considering that the avoidance process needs to comply with the requirements of "early, large, wide, and clear" in the rules, according to the different avoidance responsibilities of the unmanned ship, the reward function that conforms to the captain's experience is set as follows:
[0022] 1) When own vessel is a give-way vessel:
[0023] R cg =α1R cg1 +α2R cg2
[0024]
[0025] Where p1(x) and p2(x) represent the distance and course change range when the unmanned ship takes avoidance measures, respectively. α1 and α2 are the captain's preference weights for "early" and "large" in the rules, obtained from the questionnaire, and α1+α2=1; to ensure that the unmanned ship can get a greater reward when taking large-scale avoidance measures as early as possible;
[0026] 2) When the ship is a straight-line ship, the behavior of the ship is divided into three categories: 1. When the distance between the two ships is too large, the ship should take evasive measures to maintain speed and direction; 2. When the distance between the two ships is less than or equal to the distance at which the straight-line ship can take evasive measures, if the other ship takes effective evasive measures, the ship should still take evasive measures to maintain speed and direction; 3. When the distance between the two ships is less than or equal to the distance at which the straight-line ship can take evasive measures, if the other ship does not take effective evasive measures, the ship should take evasive measures to ensure the safety of the course; For the three cases, the reward functions are given as follows:
[0027] a) When the distance between the two ships is greater than P3(x):
[0028]
[0029] Where Δψ is the change in own ship’s heading, and Δv is the change in own ship’s speed;
[0030] b) When the distance between the two vessels is less than or equal to P3(x) and the give-way vessel takes effective measures:
[0031]
[0032] c) When the distance between the two vessels is less than or equal to P3(x) but the give-way vessel fails to take effective measures:
[0033]
[0034] Furthermore, the two unmanned ships are described by distribution functions p and q, and the training process of the proximal policy optimization algorithm includes the following steps:
[0035] Step 3.1, determine the position of own ship and opponent ship, navigation situation information and own ship's target point through the designed unknown environment;
[0036] Step 3.2, calculate the closest approach distance and closest approach time between the two ships, evaluate the current collision risk, and feed the results back to the proximal strategy optimization. The network π executes the action and updates the position state and action state to obtain the network parameter θ';
[0037] Step 3.3, Network π old Make decisions based on the environment and obtain network parameters θ;
[0038] Step 3.4, θ and θ' are updated by θ' to θ through KL divergence;
[0039] Step 3.5, if a collision risk is detected, change the course of the unmanned boat so that the unmanned boat avoids the obstacle;
[0040] Step 3.6: If the distance to the target point is getting farther and farther, a lower reward value is fed back to adjust the direction of the unmanned boat to make it get closer to the target point;
[0041] Step 3.7, determine whether the collision avoidance is completed, if not completed, return to step 3.1;
[0042] Step 3.8, determine whether the target point has been reached. If the target point has been reached, the basic collision avoidance route is obtained. Otherwise, the iteration update continues until the unmanned ship reaches the target point.
[0043] Step 3.9, train several times to generate the optimal collision avoidance route algorithm training and obtain the training model.
[0044] Furthermore, assuming that the unmanned ship is a single-propeller, single-rudder, underactuated unmanned ship, the maneuverability of the unmanned ship is described according to the separated structure model. The model is as follows:
[0045]
[0046] Where (x, y, ψ) represents the position and heading of the unmanned ship in the inertial coordinate system; (u, v, r) represents the linear speed and bow speed of the unmanned ship in the appendage coordinate system; m x is the additional mass of the unmanned ship on the x-axis; m y is the additional mass of the unmanned ship on the y-axis; I ZZ is the moment of inertia of the unmanned ship around the z axis; J ZZ Add the mass moment of inertia of the unmanned ship; (X H ,Y H ,N H ) represents the forces and moments acting on the hull; (X P ,Y P ,N P ) represents the force and moment acting on the propeller; (X R ,Y R ,N R ) represents the force and moment acting on the rudder; (X E ,Y E ,N E ) represents the force and moment of external environmental disturbance acting on the ship; x c Indicates the coordinate of the ship center on the x-axis in the attached coordinate system; δ c is the command rudder angle; δ is the actual rudder angle; T E is the servo time constant; n c is the propeller command speed; n is the propeller actual speed; T Mis the propeller characteristic constant.
[0047] Furthermore, based on the training model, the model is tested through a variety of encounter scenarios based on the test environment and the current basic information of the unmanned ship to verify the effectiveness of the model; the surrounding environment information is uniformly represented by vectors and used as model input for decision making;
[0048] In order to solve the problem that the environment around the unmanned ship will continue to change during navigation and the model input dimension will also change accordingly, the GRU neural network is used to process the input information into the same dimension, extract and retain the data information of each ship.
[0049] Furthermore, during the test, the sensor of the unmanned boat is set with a maximum detection range, and when there is an opposing ship within the detection range, it is determined whether avoidance measures need to be taken; when the risk of collision between the two ships exceeds the threshold, a collision avoidance decision is calculated and executed; and based on the distance between the current state of the unmanned boat and the target point, rewards are fed back to guide the decision-making behavior of the unmanned boat at the next moment; the model learns action strategies by continuously interacting with the environment, and the learning effect is represented by the cumulative reward value of each training event, and the total reward value and result are calculated; at the end of the test, it is determined whether the unmanned boat has reached the target point based on the test results and the feedback reward value.
[0050] Furthermore, the closest approach distance DCPA and the closest approach time TCPA are calculated according to the navigation status of the two ships, and the ship collision risk CRI is calculated in combination with the fuzzy comprehensive evaluation. When CRI>0.5, the model enables the give-way ship to take a collision avoidance decision in time; the ship collision risk calculation formula is as follows:
[0051] CRI=β1R DCPA +β2P TCPA
[0052]
[0053] Where D is the DCPA between the two ships; T is the TCPA between the two ships; d1 is the safe encounter distance of the ships; d2 is the absolute safe encounter distance of the ships; V is the relative speed of the two ships; R DCPA , R TCPA are the membership functions of DCPA and TCPA respectively; β1 and β2 are the membership functions of R DCPA , R TCPA The weight of .
[0054] Furthermore, a reward evaluation function is set for each step of action. Positive rewards are given for approaching the target point and avoiding obstacles, and negative rewards are given otherwise, so that it can reach the target point in the shortest time and optimal path. The reward function is set as follows:
[0055]
[0056] R c =(1-μ)R cs +μR cg
[0057] Among them, p1, p2, p3, p4, p5, and p6 are constant parameters, which are used to adjust the reward function according to the environment settings; d represents the change in the distance between the unmanned ship and the destination within the time interval t, v represents the speed of the unmanned ship, and R dd is the distance reward function, which is set in the range of (0, 1) and is proportional to the distance change. That is, the closer the unmanned ship is to the target point, the greater the distance reward value is. t is the time reward function, which is set in the range of (0, 1) and is inversely proportional to time, that is, the shorter the time, the greater the reward value; t min is the estimated shortest time for the unmanned boat to collide with an obstacle at the current speed; R c is the captain's experience reward function, which is set in the range of (0, 1). The more consistent the captain's experience is, the greater the reward is. μ is a Boolean variable. When the ship is a give-way ship, μ=1, otherwise μ=0.
[0058] And, an unmanned ship collision avoidance decision system that integrates the captain's experience, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the algorithm model obtained and trained by the decision method described above is used to output the unmanned ship collision avoidance decision.
[0059] Compared with the prior art, the collision avoidance algorithm provided by the present invention and its preferred embodiment is based on the proximal strategy optimization algorithm. It makes collision avoidance decisions by integrating the captain's experience to improve the reward function, evaluates the risk of ship collision according to the position and navigation status information of the ship and the other ship, and calculates the collision avoidance decision in accordance with COLREGs according to the risk risk, so as to ensure that the unmanned ship completes the collision avoidance and safe navigation mission.
[0060] The algorithm combines proximal strategy optimization and captain's experience, which can not only ensure that the distance and avoidance range of the avoidance measures taken when the ship is a give-way ship are more in line with the requirements of COLREGs, but also ensure that when the ship is a straight-line ship and faces the situation that the give-way ship fails to take effective avoidance measures, it can take avoidance actions in time to ensure navigation safety. It improves the algorithm's collision avoidance efficiency for special situations and has good generalization ability, ensuring the safety of unmanned ships sailing at sea. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0062] Figure 1 The following is a flow chart of the collision avoidance decision-making of an unmanned ship according to an embodiment of the present invention.
[0063] Figure 2 This is a structural diagram of the proximal strategy optimization algorithm according to an embodiment of the present invention.
[0064] Figure 3 The data processing flow chart of the embodiment of the present invention.
[0065] Figure 4 This is a schematic structural diagram of a single-propeller, single-rudder unmanned boat according to an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows:
[0067] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0068] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0069] An embodiment of the present invention proposes an unmanned ship collision avoidance decision-making scheme, which is based on a proximal strategy optimization algorithm, and statistically analyzes the captain's experience by designing a questionnaire, fitting the data to obtain the captain's distance for taking avoidance measures to meet COLREGs, the amplitude of course change, the safe encounter distance, and the relationship function between the distance at which the straight-line ship can take avoidance measures when the give-way ship does not take avoidance measures and the length of the ship, thereby improving the reward function of the proximal strategy optimization algorithm and solving the problem that the existing collision avoidance algorithm does not fully consider the requirements of COLREGs.
[0070] Among them, the unmanned ship collision avoidance decision-making process refers to Figure 1 The steps include:
[0071] Step 1: Count the captain’s experience;
[0072] Step 2, constructing a collision avoidance decision model;
[0073] Step 3: Model training;
[0074] Step 4: Design the test environment;
[0075] Step 5: Environmental perception;
[0076] Step 6, data processing;
[0077] Step 7, determine whether there is a risk of ship collision;
[0078] Step 8: According to step 7, if there is a collision risk, determine the collision avoidance responsibility of the own ship and execute the corresponding collision avoidance decision;
[0079] Step 9, calculating the reward value according to step 8;
[0080] Step 10, determine whether the destination has been reached or the avoidance has been completed and return the reward value and result.
[0081] For step 1, statistics are mainly collected on three aspects: the distance between the captain and the ship that meets the requirement of "taking evasive action as early as possible" in COLREGs, the amplitude of the course change that meets the requirement of "the course / speed change should be large enough to be observed", and the distance between the two ships that the direct-navigation ship needs to take evasive measures to meet the requirement of "if the give-way ship has not taken effective evasive measures, the direct-navigation ship can take evasive measures alone to ensure navigation safety".
[0082] For step 1, the specific steps are as follows:
[0083] For step 1.1, design questionnaire questions according to the survey content
[0084] For step 1.2, a questionnaire was generated and the questionnaire link was forwarded to three groups of people: captains, crew members, and teachers from maritime universities, and questionnaire data was collected through the background.
[0085] For step 1.3, the questionnaire data were used to fit the three parameters of “the distance between the two ships when taking avoidance measures”, “the amplitude of course change” and “the distance between the ships at which the straight-line ship can take avoidance measures”, and the functional relationship between them and the ship length was obtained.
[0086] For step 2, the proximal strategy optimization algorithm is a three-network structure, and the algorithm structure is as follows: Figure 2 As shown in the figure, the algorithm sets up two actor networks with two layers and 256 neurons in each layer. old Update. During the training cycle, π receives the current environment information, selects actions based on the information to update the state s and returns the reward r. The two actor networks use adaptive KL penalty, and the critic network structure is two layers, with 256 neurons in each layer. s and r are used to evaluate the quality of the action and update π. The fitting function obtained in step 3 is combined with the length of the test ship to obtain the parameter value. The reward function is designed so that the avoidance behavior that meets the captain's experience can obtain higher rewards, thereby improving the compliance of the collision avoidance decision model with the collision avoidance rules.
[0087] For step 3, the goal of the proximal policy optimization algorithm is to obtain the maximum expected reward. The expected calculation formula is as follows:
[0088]
[0089] The distribution functions p and q describe two unmanned ships. q can be any distribution. In the algorithm, p and q are similar. The distribution variance is calculated as follows:
[0090] Var x~p [f(x)]=E x~p [f(x) 2 ]-(E x~p [f(x)]) 2 (2)
[0091]
[0092] When the sampled data is sufficient, p(x)=q(x).
[0093] Importance sampling is used to convert online strategies to offline strategies. In the strategy gradient, the expected solution
[0094]
[0095] Translates to:
[0096]
[0097] in It is a correction item.
[0098] Apply to the actual environment and update the gradient
[0099]
[0100]
[0101] Among them A θ (s t ,a t ) is an evaluation function that evaluates the quality of action a selected in state s at time t.
[0102] New optimization functions
[0103]
[0104] From the above formula, we can get the definition of proximal strategy optimization:
[0105]
[0106] Where β is the weight coefficient, and the role of KL divergence is to describe the difference between θ and θ'. The difference refers to the difference in the behavior (actor) corresponding to the parameter. βKL(θ,θ') is the restriction condition.
[0107] For step 3, the operation process of the algorithm training model is specifically divided into the following steps:
[0108] Step 3.1, determine the position of own ship and opponent ship, navigation situation information and own ship's target point through the designed unknown environment;
[0109] Step 3.2, calculate the closest approach distance and closest approach time between the two ships, evaluate the current collision risk, and feed the results back to the proximal strategy optimization. The network π executes the action and updates the position state and action state to obtain the network parameter θ';
[0110] Step 3.3, Network π old Make decisions based on the environment and obtain network parameters θ;
[0111] Step 3.4, θ and θ' are updated by θ' to θ through KL divergence;
[0112] Step 3.5, if a collision risk is detected, change the course of the unmanned boat so that the unmanned boat avoids the obstacle;
[0113] Step 3.6: If the distance to the target point is getting farther and farther, a lower reward value is fed back to adjust the direction of the unmanned boat to make it get closer to the target point;
[0114] Step 3.7, determine whether the collision avoidance is completed, if not, return to step 3.1;
[0115] Step 3.8, determine whether the target point has been reached. If the target point has been reached, the basic collision avoidance route is obtained. Otherwise, the iteration update continues until the unmanned ship reaches the target point.
[0116] Step 3.9, train several times to generate the optimal collision avoidance route algorithm training and obtain the training model.
[0117] For step 4, design the test environment and obtain the basic information of the test environment and the current unmanned ship.
[0118] For step 5, the unmanned ship information is monitored in real time.
[0119] For step 6, the GRU neural network processes the input information into the same dimension.
[0120] For step 7, the sensor of the unmanned ship needs to set a maximum detection range, and determine whether to take avoidance measures when there is an opponent ship within the detection range.
[0121] For step 8, the unmanned ship executes the collision avoidance decision given by the algorithm.
[0122] For step 9, based on the distance between the current state of the unmanned boat and the target point, the reward is fed back to guide the decision-making behavior of the unmanned boat at the next moment.
[0123] For step 10, the model learns the action strategy by continuously interacting with the environment. The learning effect is represented by the cumulative reward value of each training event, and the total reward value and result are calculated.
[0124] Furthermore, the content of the present invention is further demonstrated and introduced in combination with a specific design case as follows:
[0125] In view of the fact that the existing algorithms do not adequately consider the International Regulations for Preventing Collisions at Sea, the embodiments of the present invention first consider improving the proximal strategy optimization algorithm by adding the captain's experience.
[0126] One of the technical challenges that needs to be solved to achieve autonomous navigation of unmanned ships is to avoid collisions between ships. In complex sea environments, a good collision avoidance decision is needed to ensure the safe navigation of unmanned boats. The proximal strategy optimization algorithm is applied to the intelligent collision avoidance of unmanned ships. However, the constraints of the International Maritime Collision Avoidance Regulations need to be considered during the collision avoidance process. Through a questionnaire survey, the captain's navigation experience when the ship is a give-way ship and a straight-line ship is obtained, and the reward function is improved to solve the intelligent collision avoidance problem under the constraints of the collision avoidance rules.
[0127] The process of obtaining captain experience data through questionnaire survey is as follows:
[0128] The distance P1(x) and course change amplitude P2(x) of the captains driving different ships are counted respectively when the ship is a give-way ship and the distance information P3(x) at which the avoidance measures can be considered when the ship is a straight-line ship. The least squares method is used to fit the data in combination with the captain's length of the ship, and the fitting formula is as follows:
[0129]
[0130] Where x is the length of the ship, a0, a1, a2, ..., a n , b0, b1, b2, …, b n , c0, c1, c2, …, c n are polynomial coefficients.
[0131] In actual navigation, unmanned ships need to avoid the ships they encounter according to the International Regulations for Preventing Collisions at Sea, and the avoidance process needs to comply with the requirements of "early, large, wide, and clear" in the regulations. In order to make the collision avoidance decision of unmanned ships more in line with this specification, according to the different avoidance responsibilities of unmanned ships, a reward function that conforms to the captain's experience is added as follows:
[0132] 1) When own vessel is a give-way vessel:
[0133] R cg =α1R cg1 +α2R cg2 (10)
[0134]
[0135] Among them, p1(x) and p2(x) represent the distance and course change range when the unmanned ship takes avoidance measures, respectively. α1 and α2 are the captain's preference weights for "early" and "large" in the rules, obtained from the questionnaire, and α1+α2=1. This formula can ensure that the unmanned ship can get a greater reward when taking large-scale avoidance measures as early as possible.
[0136] 2) When the ship is a straight-line ship, the behavior of the ship can be divided into three categories: 1. When the distance between the two ships is too large, the ship should take evasive measures to maintain speed and direction; 2. When the distance between the two ships is less than or equal to the distance at which the straight-line ship can take evasive measures, if the other ship takes effective evasive measures, the ship should still take evasive measures to maintain speed and direction; 3. When the distance between the two ships is less than or equal to the distance at which the straight-line ship can take evasive measures, if the other ship does not take effective evasive measures, the ship should take evasive measures to ensure the safety of the course. For the three cases, the designed reward functions are given as follows:
[0137] a) When the distance between the two ships is greater than P3(x):
[0138]
[0139] Among them, Δψ is the change of the ship's heading, and Δv is the change of the ship's speed. This formula allows the ship to obtain greater rewards by maintaining speed and heading when the unmanned ship is a straight-line ship and the two ships are too far apart.
[0140] b) When the distance between the two vessels is less than or equal to P3(x) and the give-way vessel takes effective measures:
[0141]
[0142] This method enables the ship to obtain greater rewards by maintaining speed and heading.
[0143] c) When the distance between the two vessels is less than or equal to P3(x) but the give-way vessel fails to take effective measures:
[0144]
[0145] This method enables the vessel to obtain greater rewards for taking necessary evasive action.
[0146] The improved algorithm flow chart provided by the embodiment of the present invention is as follows: Figure 1 As shown, the operation steps are as follows:
[0147] 1. Design a questionnaire based on the survey content and collect survey data for data fitting.
[0148] 2. Build a decision model. The neural network structure is 2 layers, with 256 neurons in each layer.
[0149] 3. Training model. To facilitate the construction of the model, it is assumed that the unmanned ship is a single-propeller, single-rudder, under-actuated unmanned ship with the following structure: Figure 4 shown.
[0150] The maneuvering of this unmanned ship is described according to the separated structure model (MMG model), and the model is as follows:
[0151]
[0152] Where (x, y, ψ) represents the position and heading of the USV in the inertial coordinate system; (u, v, r) represents the linear speed and bow speed of the USV in the appendage coordinate system; m x is the additional mass of USV on the x-axis; m y is the additional mass of USV on the y-axis; I ZZ is the moment of inertia of USV around z axis; J ZZ is the additional mass moment of inertia of the USV; (X H ,Y H ,N H ) represents the forces and moments acting on the hull; (X P ,Y P ,N P ) represents the force and moment acting on the propeller; (X R ,Y R ,N R ) represents the force and moment acting on the rudder; (X E ,Y E ,N E ) represents the force and moment of external environmental disturbance acting on the ship; x c Indicates the coordinate of the ship center on the x-axis in the attached coordinate system; δ c is the command rudder angle; δ is the actual rudder angle; T E is the servo time constant; n c is the propeller command speed; n is the propeller actual speed; T M is the propeller characteristic constant.
[0153] 4. Design a variety of encounter scenarios to test the model and verify its effectiveness.
[0154] 5. The surrounding environment information is uniformly represented by vectors and used as model input for decision making.
[0155] 6. Since the environment around the unmanned ship will continue to change during the voyage, the model input dimension will also change accordingly. In this case, the GRU algorithm is used to extract effective information. The GRU algorithm process is as follows: Figure 3 As shown. In the figure, O1, O2, O3, O n is the observation value of the surrounding ships within the detection range, O self is its own state, which is connected with the ship's own state value to form a fixed-length observation value O. The algorithm can retain the data information of each ship, and the use of normalized observation data can speed up the training process.
[0156] 7. According to the navigation status of the two ships, the closest approach distance DCPA and the closest approach time TCPA are calculated, and the ship collision risk CRI is calculated in combination with fuzzy comprehensive evaluation. When CRI>0.5, the model will enable the give-way ship to take collision avoidance decisions in time. The ship collision risk calculation formula is as follows:
[0157] CRI=β1R DCPA +β2R TCPA (17)
[0158]
[0159] Where D is the DCPA between the two ships; T is the TCPA between the two ships; d1 is the safe encounter distance of the ships; d2 is the absolute safe encounter distance of the ships; V is the relative speed of the two ships; R DCPA , R TCPA are the membership functions of DCPA and TCPA respectively; β1 and β2 are the membership functions of R DCPA , R TCPA The weight of .
[0160] 8. When the collision risk between the two ships exceeds the threshold, the collision avoidance decision is calculated and executed;
[0161] 9. A reward evaluation function is set for each step of action. Positive rewards are given for approaching the target point and avoiding obstacles, and negative rewards are given for failing to reach the target point in the shortest time and the best path. The reward function of the present invention is set as follows:
[0162]
[0163] R c =(1-μ)R cs +μR cg (25)
[0164] Among them, p1, p2, p3, p4, p5, and p6 are constant parameters, which are used to adjust the reward function according to the environment settings in the experiment, thereby improving the performance of the policy function. d represents the change in the distance between the unmanned ship and the destination within the time interval t, v represents the speed of the unmanned ship, and R dd is the distance reward function, which is set in the range of (0, 1) and is proportional to the distance change, that is, the closer the unmanned ship is to the target point, the greater the distance reward value. t is the time reward function, which is set in the range of (0, 1) and is inversely proportional to time, that is, the shorter the time, the greater the reward value. min It is the shortest estimated time for the unmanned boat to collide with an obstacle at the current speed. c is the captain's experience reward function, which is set in the range of (0, 1). The more consistent the captain's experience is, the greater the reward is. μ is a Boolean variable. When the ship is a give-way ship, μ=1, otherwise μ=0.
[0165] 10. At the end of the test, determine whether the unmanned boat has reached the target point based on the test results and feedback reward value.
[0166] From the above, it can be seen that the embodiment of the present invention combines proximal strategy optimization and captain's experience, and combines the advantages of both, so that the unmanned ship can take avoidance decisions that are more in line with the international maritime collision avoidance regulations, thereby ensuring the safe navigation of the unmanned ship.
[0167] In the embodiment of the present invention, the algorithm uses the MMG model to describe the maneuvering of the unmanned ship, which is more practical and can accurately achieve collision avoidance of the unmanned ship.
[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0172] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
[0174] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of unmanned ship collision avoidance decision-making methods and systems that integrate the captain's experience under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.
Claims
1. A collision avoidance decision method for unmanned ships that integrates the captain's experience, characterized by: The captains' experience is obtained by statistically analyzing the quantitative understanding of COLREGs by captains of ships of different lengths. The distance for the captains to take avoidance measures to meet COLREGs, the amplitude of course change, the safe encounter distance, and the relationship function between the distance at which the straight-line ship can take avoidance measures when the give-way ship does not take avoidance measures and the length of the ship are obtained by fitting the data. The reward function and action space of the proximal strategy optimization algorithm are improved and trained to output the collision avoidance decision of the unmanned ship.
2. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 1 is characterized by: Said captain’s experience includes: statistics on the distance between the captain and the ship in open waters that meets the requirement of “taking evasive action as soon as possible” in COLREGs, the amplitude of the course change that meets the requirement of “the course / speed change should be large enough to be observed”, and the distance between the two ships that meets the requirement of “if the give-way vessel has not taken effective evasive measures, the direct-course vessel needs to take evasive measures”; Data fitting was performed on the three parameters to obtain the functional relationship between them and the ship length.
3. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 2 is characterized by: The specific process of obtaining captain experience data is as follows: The distance P1(x) and course change amplitude P2(x) of the captains driving different ships were counted respectively when the captain's ship was a give-way ship and the distance information P3(x) of the avoidance measures considered when the captain's ship was a straight-line ship; the least squares method was used to fit the data in combination with the captain's ship, and the fitting formula is as follows: Where x is the length of the ship, a0, a1, a2, ..., a n , b0, b1, b2, ..., b n , c0, c1, c2, ..., c n are all polynomial coefficients; Considering that the avoidance process needs to comply with the requirements of "early, large, wide, and clear" in the rules, according to the different avoidance responsibilities of the unmanned ship, the reward function that conforms to the captain's experience is set as follows: 1) When own vessel is a give-way vessel: R cg =α1R cg1 +α2R cg2 Where p1(x) and p2(x) represent the distance and course change range when the unmanned ship takes avoidance measures, respectively. α1 and α2 are the captain's preference weights for "early" and "large" in the rules, obtained from the questionnaire, and α1+α2=1; to ensure that the unmanned ship can get a greater reward when taking large-scale avoidance measures as early as possible; 2) When the ship is a straight-line ship, the behavior of the ship is divided into three categories:
1. When the distance between the two ships is too large, the ship should take evasive measures to maintain speed and direction; 2. When the distance between the two ships is less than or equal to the distance at which the straight-line ship can take evasive measures, if the other ship takes effective evasive measures, the ship should still take evasive measures to maintain speed and direction; 3. When the distance between the two ships is less than or equal to the distance at which the straight-line ship can take evasive measures, if the other ship does not take effective evasive measures, the ship should take evasive measures to ensure the safety of the course; For the three cases, the reward functions are given as follows: a) When the distance between the two ships is greater than P3(x): Where Δψ is the change in own ship’s heading, and Δv is the change in own ship’s speed; b) When the distance between the two vessels is less than or equal to P3(x) and the give-way vessel takes effective measures: c) When the distance between the two vessels is less than or equal to P3(x) but the give-way vessel fails to take effective measures:
4. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 1 is characterized by: Using distribution functions p and q to describe two unmanned ships, the training process of the proximal policy optimization algorithm includes the following steps: Step 3.1, determine the position of own ship and opponent ship, navigation situation information and own ship's target point through the designed unknown environment; Step 3.2, calculate the closest approach distance and closest approach time between the two ships, evaluate the current collision risk, and feed the results back to the proximal strategy optimization. The network π executes the action and updates the position state and action state to obtain the network parameter θ′; Step 3.3, Network π old Make decisions based on the environment and obtain network parameters θ; Step 3.4, θ and θ′ are updated by θ′ to θ through KL divergence; Step 3.5, if a collision risk is detected, change the course of the unmanned boat so that the unmanned boat avoids the obstacle; Step 3.6: If the distance to the target point is getting farther and farther, a lower reward value is fed back to adjust the direction of the unmanned boat to make it get closer to the target point; Step 3.7, determine whether the collision avoidance is completed, if not completed, return to step 3.1; Step 3.8, determine whether the target point has been reached. If the target point has been reached, the basic collision avoidance route is obtained. Otherwise, the iteration update continues until the unmanned ship reaches the target point. Step 3.9, train several times to generate the optimal collision avoidance route algorithm training and obtain the training model.
5. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 4 is characterized by: Assuming that the unmanned ship is a single-propeller, single-rudder, underactuated unmanned ship, the maneuverability of the unmanned ship is described according to the separated structure model. The model is as follows: Where (x, y, ψ) represents the position and heading of the unmanned ship in the inertial coordinate system; (u, v, r) represents the linear speed and bow speed of the unmanned ship in the appendage coordinate system; m x is the additional mass of the unmanned ship on the x-axis; m y is the additional mass of the unmanned ship on the y-axis; I ZZ is the moment of inertia of the unmanned ship around the z axis; J ZZ Add the mass moment of inertia of the unmanned ship; (X H , Y H , N H ) represents the forces and moments acting on the hull; (X P , Y P , N P ) represents the force and moment acting on the propeller; (X R , Y R , N R ) represents the force and moment acting on the rudder; (X E , Y E , N E ) represents the force and moment of external environmental disturbance acting on the ship; x c Indicates the coordinate of the ship center on the x-axis in the attached coordinate system; δ c is the command rudder angle; δ is the actual rudder angle; T E is the servo time constant; n c is the propeller command speed; n is the propeller actual speed; T M is the propeller characteristic constant.
6. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 1 is characterized by: On the basis of the training model, the model is tested through a variety of encounter scenarios based on the test environment and the basic information of the current unmanned ship to verify the effectiveness of the model; the surrounding environment information is uniformly represented by vectors and used as model input for decision making; In order to solve the problem that the environment around the unmanned ship will continue to change during navigation and the model input dimension will also change accordingly, the GRU neural network is used to process the input information into the same dimension, extract and retain the data information of each ship.
7. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 1 is characterized by: During the test, the unmanned boat's sensor sets a maximum detection range, and determines whether to take avoidance measures when there is an opposing ship within the detection range. When the risk of collision between the two ships exceeds the threshold, the collision avoidance decision is calculated and executed. Based on the distance between the current state of the unmanned boat and the target point, rewards are fed back to guide the unmanned boat's decision-making behavior at the next moment. The model learns action strategies by continuously interacting with the environment. The learning effect is represented by the cumulative reward value of each training event, and the total reward value and result are calculated. At the end of the test, the test results and feedback reward value are used to determine whether the unmanned boat has reached the target point.
8. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 1 is characterized by: According to the navigation status of the two ships, the closest approach distance DCPA and the closest approach time TCPA are calculated, and the ship collision risk CRI is calculated in combination with fuzzy comprehensive evaluation. When CRI>0.5, the model enables the give-way ship to take collision avoidance decisions in time; the ship collision risk calculation formula is as follows: CRI=β1R DCPA +β2R TCPA Where D is the DCPA between the two ships; T is the TCPA between the two ships; d1 is the safe encounter distance of the ships; d2 is the absolute safe encounter distance of the ships; V is the relative speed of the two ships; R DCPA , R TCPA are the membership functions of DCPA and TCPA respectively; β1 and β2 are the membership functions of R DCPA , R TCPA The weight of .
9. The unmanned ship collision avoidance decision-making method integrating the captain's experience according to claim 1 is characterized by: A reward evaluation function is set for each step of action. Positive rewards are given for approaching the target point and avoiding obstacles, and negative rewards are given otherwise, so that it can reach the target point in the shortest time and optimal path. The reward function is set as follows: R c =(1-μ)R cs +μR cg Among them, p1, p2, p3, p4, p5, and p6 are constant parameters, which are used to adjust the reward function according to the environment settings; d represents the change in the distance between the unmanned ship and the destination within the time interval t, v represents the speed of the unmanned ship, and R dd is the distance reward function, which is set in the range of (0, 1) and is proportional to the distance change. That is, the closer the unmanned ship is to the target point, the greater the distance reward value is. t is the time reward function, which is set in the range of (0, 1) and is inversely proportional to time, that is, the shorter the time, the greater the reward value; t min is the estimated shortest time for the unmanned boat to collide with an obstacle at the current speed; R c is the captain's experience reward function, which is set in the range of (0, 1). The more consistent the captain's experience is, the greater the reward is. μ is a Boolean variable. When the ship is a give-way ship, μ=1, otherwise μ=0.
10. An unmanned ship collision avoidance decision system integrating the captain's experience, based on a computer system, characterized by: The method comprises a memory, a processor and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, an algorithm model obtained and trained by an unmanned ship collision avoidance decision method integrating the captain's experience as described in any one of claims 1 to 9 is adopted to output an unmanned ship collision avoidance decision.
Citation Information
Patent Citations
Ship collision avoidance decision-making method
CN111063218A
Collision avoidance decision-making method for multiple unmanned ships
CN115718497A
Partially observable multi-ship collision avoidance method based on deep reinforcement learning
CN116107299A
Unmanned ship multi-ship collision avoidance decision-making method and system based on reinforcement learning
CN116954232A
Vessel collision avoiding method and system based on artificial potential field
US20210295708A1
Cited By
UMV man-machine cooperation asynchronous H-infinity control method based on fuzzy Semi-Markov theoretical modeling
CN121634849A
Evaporation waveguide channel map-oriented ship multi-waypoint path planning method
CN121809801A
A ship multi-waypoint path planning method for evaporation duct channel map
CN121809801B
