A ship collision avoidance route planning method, device, storage medium and system

By constructing a ship collision avoidance path model using an improved genetic algorithm, adding a speed change process and considering ship dynamics constraints, the problem of large discrepancies between the trajectory and the actual flight path in existing technologies is solved, and more accurate course prediction and collision avoidance decisions are achieved.

CN116793363BActive Publication Date: 2026-03-24JILIN UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing ship collision avoidance path planning methods cannot effectively incorporate ship kinematic constraints into the trajectory, resulting in a large difference between the trajectory and the actual course and low accuracy of heading prediction.

Method used

An improved genetic algorithm is used to construct a collision avoidance path model for ships, which includes three stages: straight-line navigation, collision avoidance, and reversal. A speed change process is added to each stage, and combined with ship dynamics constraints, a path that conforms to the actual motion trajectory is generated.

Benefits of technology

It improves the matching degree between the trajectory and the actual track, enhances the accuracy of course prediction, and makes collision avoidance decisions closer to actual ship motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116793363B_ABST
    Figure CN116793363B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of ship collision avoidance technology, and provides a ship collision avoidance route planning method, device, storage medium and system. The ship collision avoidance route planning method comprises the following steps: constructing a ship collision avoidance path model based on a genetic algorithm; the ship collision avoidance path model comprises at least three stages, which are a straight sailing stage, an avoidance stage and a resuming sailing stage in sequence; the straight sailing stage comprises a straight sailing acceleration process l1 and a straight sailing constant speed process l2; the avoidance stage comprises an avoidance acceleration process l3 and an avoidance constant speed process l4; the resuming sailing stage comprises a resuming sailing acceleration process l5 and a resuming sailing constant speed process l6; and a route is adjusted according to the path generated by the ship collision avoidance path model to realize collision avoidance. The application realizes a multi-section variable speed collision avoidance trajectory, the trajectory point position can strictly correspond to the sailing time, the previous uniform speed trajectory coding mode is improved, and a path conforming to the ship dynamics constraint is generated, so that the planned path is more consistent with the real motion trajectory of the ship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ship collision avoidance technology, and particularly relates to a ship collision avoidance route planning method, device, storage medium and system. Background Technology

[0002] Reducing maritime traffic accidents to minimize loss of life and property, and optimizing ship routes to save transportation costs, have always been key research areas in the maritime industry. Analysis of numerous ship collision accidents reveals that human factors are the primary cause. Therefore, in recent years, minimizing human involvement in ship navigation has become a hot topic in collision avoidance, with the traditional roles of sailors and captains gradually being replaced by various autonomous navigation algorithms.

[0003] The main task of intelligent ship navigation using algorithms is to plan the ship's navigation path, and the challenge lies in designing the collision avoidance algorithm. Existing methods for obtaining ship collision avoidance paths based on genetic algorithms have relatively simple chromosome construction and cannot incorporate ship kinematic constraints. They often rely on post-processing to fit trajectories on simple paths.

[0004] Therefore, the trajectory obtained by the current ship collision avoidance path planning method differs greatly from the actual ship track, and the accuracy of the course prediction is low. Summary of the Invention

[0005] The purpose of this application is to provide a ship collision avoidance route planning method, which aims to solve the problem that the trajectory obtained by relying on the existing ship collision avoidance path planning method differs greatly from the actual ship track and the accuracy of the course prediction is low.

[0006] This application implements a ship collision avoidance route planning method as follows: the method includes the following steps: constructing a ship collision avoidance path model based on a genetic algorithm, the ship collision avoidance path model comprising at least three stages, namely a straight-ahead stage, a collision avoidance stage, and a retracing stage; the straight-ahead stage includes a straight-ahead acceleration process l1 and a straight-ahead constant speed process l2; the collision avoidance stage includes a collision avoidance acceleration process l3 and a collision avoidance constant speed process l4; the retracing stage includes a retracing acceleration process l5 and a retracing constant speed process l6; and performing route adjustments based on the path generated by the ship collision avoidance path model to achieve collision avoidance.

[0007] Another objective of this application is to provide a ship collision avoidance route planning device, the device comprising: a ship collision avoidance path model acquisition module, used to construct a ship collision avoidance path model based on a genetic algorithm, the ship collision avoidance path model comprising at least three stages, namely a straight-ahead stage, a collision avoidance stage, and a retracing stage; the straight-ahead stage comprising a straight-ahead acceleration process l1 and a straight-ahead constant speed process l2; the collision avoidance stage comprising a collision avoidance acceleration process l3 and a collision avoidance constant speed process l4; the retracing stage comprising a retracing acceleration process l5 and a retracing constant speed process l6; and a route adjustment execution module, used to perform route adjustments based on the path generated by the ship collision avoidance path model to achieve collision avoidance.

[0008] Another objective of this application is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above-described ship collision avoidance route planning method.

[0009] Another objective of this application is to provide a ship collision avoidance route planning system, which, when running, executes the steps of the ship collision avoidance route planning method described above.

[0010] The ship collision avoidance route planning method provided in this application accurately and realistically incorporates speed and time into the trajectory, improving upon the previous method of only encoding uniform speed trajectories and generating a path that conforms to ship dynamics constraints. This makes the planned path more consistent with the actual motion trajectory of the ship, and makes the collision avoidance decision algorithm more realistic. Attached Figure Description

[0011] Figure 1 An application environment diagram for a ship collision avoidance route planning method provided in this application embodiment;

[0012] Figure 2 A flowchart illustrating a ship collision avoidance route planning method provided in this application embodiment;

[0013] Figure 3 A collision avoidance route map provided in this application embodiment for a ship collision avoidance route planning method;

[0014] Figure 4 A flowchart illustrating another ship collision avoidance route planning method provided in this application embodiment;

[0015] Figure 5 Collision avoidance route map for another ship collision avoidance route planning method provided in this application embodiment;

[0016] Figure 6 Collision avoidance route map for another ship collision avoidance route planning method provided in this application embodiment;

[0017] Figure 7 Collision avoidance route map for another ship collision avoidance route planning method provided in this application embodiment;

[0018] Figure 8 A structural block diagram of a ship collision avoidance route planning device provided in this application embodiment;

[0019] Figure 9 This is a block diagram of the internal structure of a computer device in one embodiment. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0021] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.

[0022] Figure 1 An application environment diagram for a ship collision avoidance route planning method provided in this application embodiment is shown, such as... Figure 1 As shown, this application environment includes an execution terminal 110 and a computer device 120.

[0023] Computer device 120 can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers. It can be a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN. The ship collision avoidance route planning method in this solution can run on this device or terminal.

[0024] The execution terminal 110 may be a ship controller, control cabinet, electrical control components, navigation control unit, or unit group, but is not limited thereto. The execution terminal 110 and the computer equipment 120 can be connected via a network, which is not limited herein. The computer equipment 120 can control the execution terminal 110 and exchange data.

[0025] like Figure 2 As shown, in one embodiment, a ship collision avoidance route planning method is proposed. This embodiment mainly applies this method to the above-mentioned... Figure 1 Taking computer equipment 120 as an example, a ship collision avoidance route planning method may specifically include the following steps:

[0026] Step S202: Construct a ship collision avoidance path model based on a genetic algorithm. The ship collision avoidance path model includes at least three stages, namely, a straight-ahead stage, a collision avoidance stage, and a return-to-navigation stage. The straight-ahead stage includes a straight-ahead acceleration process l1 and a straight-ahead constant speed process l2. The collision avoidance stage includes a collision avoidance acceleration process l3 and a collision avoidance constant speed process l4. The return-to-navigation stage includes a return-to-navigation acceleration process l5 and a return-to-navigation constant speed process l6.

[0027] Step S204: Adjust the route according to the path generated by the ship collision avoidance path model to achieve collision avoidance.

[0028] In this embodiment of the application, to make the algorithm more consistent with actual navigation processes and practically applicable, a speed-changing process is added before the constant-speed process in each of the straight-ahead phase, the avoidance phase, and the retracing phase. For example... Figure 3 The diagram shows six straight segments: acceleration process l1 and constant speed process l2 during the straight flight phase, acceleration process l3 and constant speed process l4 during the avoidance phase, and acceleration process l5 and constant speed process l6 during the return flight phase.

[0029] In this embodiment, the classic genetic algorithm encoding method for ship trajectory optimization uses four genes to encode the time t during the uniform speed process in the straight-line phase. d Avoidance range θ a The time t of the uniform velocity process during the avoidance phase a and the extent of resumption of navigation θ r .

[0030] This application adds three accelerations and three corresponding acceleration times to the existing encoding. It can be observed that even if all acceleration stages are removed from this encoding method, the entire route in this paper is still uniquely determined by four genes. However, the difference is that the genes in this embodiment consider the ship's maneuverability during turns when expressed. That is, although the classic encoding method can be considered a special case of this paper, the collision avoidance decision algorithm proposed in this application is actually closer to reality. This application implements multi-segment variable-speed collision avoidance trajectories, and the trajectory point positions can strictly correspond to the sailing time, improving upon the previous method of encoding only uniform-rate trajectories. It also generates paths that conform to ship dynamics constraints, making the planned path more consistent with the ship's actual motion trajectory.

[0031] In one embodiment, such as Figure 4As shown, a flowchart of another ship collision avoidance route planning method is given. The ship collision avoidance path model also includes the following three stages: avoidance turning stage m1, return turning stage m2, and cut-back turning stage m3. The avoidance turning stage m1 is connected between the straight constant speed process l2 and the avoidance acceleration process l3. The return turning stage m2 is connected between the avoidance constant speed process l4 and the return acceleration process l5. The cut-back turning stage m3 is connected after the return constant speed process l6.

[0032] In this embodiment, to make the algorithm more consistent with actual navigation and practically applicable, a speed-changing process is added before each stage of the constant-speed process. Furthermore, considering the ship's maneuverability, three arcs are used to connect the three path segments and the path after returning to the original route; therefore, the path trajectory in this paper consists of nine segments. Figure 3 As shown, there are six straight segments: acceleration process l1 and constant speed process l2 during the straight flight phase; acceleration process l3 and constant speed process l4 during the avoidance phase; and acceleration process l5 and constant speed process l6 during the return flight phase. There are also three arc segments from straight flight to avoidance, from avoidance to return flight, and from return flight to the original route.

[0033] Those skilled in the art will recognize that in previous studies, paths obtained using genetic algorithms typically consist of three segments: a straight-ahead phase, a collision avoidance phase, and a retracing phase. For ease of calculation, it is usually assumed that these three segments are uniform-speed processes, and the kinematic constraints of the ship itself are not considered at the path connections. The collision avoidance algorithm based on an improved adaptive genetic algorithm proposed in this application optimizes the chromosome encoding form, not only incorporating the variable-speed process but also fully considering the ship's dynamic constraints, accurately representing the turning path, making it directly applicable to real ships.

[0034] In one embodiment, such as Figure 3 As shown, the 10 genes encoded by the chromosome are: the acceleration value a during the acceleration process in the direct flight phase. d acceleration time t da The time t of the uniform motion process d Avoidance range θ a ; Acceleration value a during the acceleration process in the avoidance phase a acceleration time t aa The time t of the uniform motion process a ; Resumption range θ r ; Acceleration value a during the acceleration process of the resumption of navigation r acceleration time t ra .

[0035] In this embodiment, a trajectory with the aforementioned motion characteristics can be uniquely determined using 10 genes, the original route, and the ship's current navigation state. Based on these 10 genes, the ship's current motion state and original route can be uniquely reconstructed into a collision avoidance trajectory. Unlike the classic method of obtaining ship collision avoidance trajectories through genetic algorithms, some of the 10 genes in this embodiment are closely related; the value of one gene may affect the boundary conditions of subsequent genes. However, setting constraints for each individual would significantly impact the algorithm's computational speed. Due to the lack of additional constraints, some generated schemes may be infeasible. Therefore, during genotype expression, necessary screening must also be performed, and the survival rate of individuals in the screened population can be used as a coefficient to adjust the population size in the next iteration.

[0036] In one embodiment, such as Figure 5 As shown, the straight-line phase consists of two parts: the straight-line acceleration process and the straight-line constant speed process. During this phase, the heading remains at the original heading C. o After acceleration time t da The magnitude of the velocity v afterward d The distances l1 and l2 during the straight-line acceleration phase and the straight-line constant speed phase, respectively, can be calculated using the following formulas:

[0037] v d =v o +a d ·t da

[0038] l1=(v o +v d )·t da / 2

[0039] l2 = v d ·t d

[0040] Where v o My ship's original speed, a d For acceleration during the direct flight phase, t d This represents the time for the straight-line, constant-speed flight process.

[0041] via my ship's original position p o (p ox p oy ), heading C o And the sailing distances l1 and l2 can be used to calculate the ship's position p after the straight-line phase ends, based on the above formula. a1 (p a1x p a1y ).

[0042]

[0043] During this stage, the decision-making module needs to output [a] to the control module. o , t oa , t o This refers to the magnitude of acceleration, the acceleration time, and the constant speed time during this phase. The path for the straight-line phase is obtained using the above method.

[0044] It is understandable that generating a unique arc based on two points and a diameter is not unique. Therefore, the relative position of the center of the circle on the chord can be determined by avoiding the amplitude of the arc. That is, the relative position of the center of the circle containing the trajectory and the arc corresponding to the trajectory can be determined, thus making the trajectory unique.

[0045] In one embodiment, the transition between the straight-ahead phase and the avoidance phase is denoted as the avoidance and turning phase m1, such as... Figure 5 As shown, this process begins at position p after the direct flight phase ends. a1 Starting from point p, the tangent point when cutting into the avoidance path. a2 The endpoint is [location to be filled in]. To comply with the ship's dynamic constraints, the turning radius of this process should not be less than the ship's turning radius at this speed. For safety, the initial turning diameter, which is usually slightly larger than the turning diameter, is used here as the ship's minimum turning diameter. The speed v of the ship at this position is [determined]. d Using the empirical formula for calculating the turning diameter DT shown below, we can calculate the initial turning diameter DT1 here, where L is the length of my ship and v is the current speed of the ship.

[0046] DT = L·10 0.5441·lg v-0.0795

[0047] In this embodiment, the initial diameter of the cyclic rotation is used instead of the cyclic diameter, and the tangent point p is connected according to geometric relationships. a1 and tangent point p a2 chord length l ch1 The tangent point p can be calculated using the following formula. a2 (p a2x p a2y The position of ) can be calculated using the following formula:

[0048] l ch1 =DT1·sin(θ) a / 2)

[0049]

[0050] Assume that the speed remains constant during the turn, i.e., the linear velocity is constant at v. d The turning rate τ1 at this stage can be calculated using the following formula:

[0051]

[0052] Where, θ a The avoidance range is τ1, which is the turning rate during the avoidance phase.

[0053] During this stage, the decision-making module needs to output [θ] to the control module. a [τ1], which represents the avoidance radius and turning rate. Besides the turning radius being constrained by ship speed and maneuverability, the turning rate is limited by boundary conditions due to ship maneuverability. Using the above method, the trajectory connecting the straight-ahead phase and the avoidance phase is obtained, denoted as the avoidance-turning phase m1.

[0054] In one embodiment, such as Figure 6 As shown, the avoidance phase includes an avoidance acceleration process and an avoidance constant speed process.

[0055] In this embodiment of the application, similar to the straight flight phase, the heading is maintained at C during this phase. o +θ a After acceleration time t aa Then, the magnitude of the velocity v a The acceleration phase distance l3 and the constant velocity phase distance l4 can be calculated using the following formulas:

[0056] v a =v d +a a ·t aa

[0057] l3=(v d +v a )·t aa / 2

[0058] l4 = v a ·t a

[0059] Among them, t a The time required for the uniform speed process during the avoidance phase.

[0060] Based on the position p of my ship when it entered the avoidance course a2 (p a2x p a2y ) and my ship's current course C o +θ a The position p of my ship after the avoidance phase can be calculated using the following formula. r1 (p r1x p r1y ).

[0061]

[0062] During this stage, the decision-making module needs to output [a] to the control module.a , t aa , t a This refers to the magnitude of acceleration during the avoidance phase, the time of acceleration during the avoidance phase, and the time of constant speed travel during the avoidance phase. The trajectory during the avoidance phase is obtained using the above method.

[0063] In one embodiment, the transition segment between the avoidance phase and the return phase is denoted as the return-to-course turning phase m2.

[0064] In this embodiment of the application, this process ends at position p after the avoidance phase. r1 Starting from point p, the tangent point when entering the resumed route. r2 The endpoint is [the point where the ship's speed v is located]. a Using the empirical formulas described above, the initial diameter of the cycle DT2 can be calculated here. Replacing the diameter of the cycle with the initial diameter of the cycle, and connecting the tangent point p according to geometric relationships... r1 and tangent point p r2 chord length l ch2 The tangent point p can be calculated using the following formula. r2 (p r2x p r2y The position of ) can be calculated using the following formula:

[0065] l ch2 =DT2·sin(θ) r / 2)

[0066]

[0067] Similarly, it is assumed that the speed remains constant during the turn, i.e., the linear velocity is constant at v. a The turning rate τ2 at this stage can be calculated using the following formula:

[0068]

[0069] During this stage, the decision module needs to output [θ] r [τ2], which refers to the turning radius and turning rate. Besides the turning radius being constrained by ship speed and maneuverability, the turning rate is limited by boundary conditions due to ship maneuverability. Using the above method, the transition segment between the avoidance phase and the turning phase can be denoted as the turning phase m2.

[0070] It's understandable that generating a unique arc based on two points and a diameter isn't truly unique; therefore, the location of the center on the chord can be determined by factors such as the degree of curvature. For example, using θ... r The value of is used to determine the relative positional relationship between the center of the circle containing the trajectory and the arc corresponding to the trajectory, thereby determining the relative position of the center of the circle and making the trajectory unique.

[0071] In one embodiment, such as Figure 7 As shown, the resumption phase includes two processes: resumption acceleration and resumption at a constant speed.

[0072] In this embodiment, unlike the two straight-line phases in the previous embodiments, the time for the uniform speed process in the retracing phase is uniquely determined under the combined constraints of the ship's accelerated speed, current heading, and original route. In this phase, the heading remains at C. o +θ a +θ r The time for the uniform motion process needs to be calculated using the distance l6 during the uniform motion process and the magnitude of the velocity v after acceleration. r Calculation. After acceleration time t ra Afterwards, the speed v r 1. Distance traveled during acceleration (l5) 2. Position at the end of acceleration (p) ra (p rax p ray It can be calculated using the following formula:

[0073] v r =v a +a r ·t ra

[0074] l5=(v a +v r )·t ra / 2

[0075]

[0076] Where, p r2 (p r2x p r2y ) represents the initial position of our ship before the acceleration process of resuming navigation begins, t ra v represents the acceleration time during the resumption of operations. r a is the speed of my ship after accelerating after resuming navigation. r This is to accelerate the process of resuming operations.

[0077] Due to the constraints, the position p at the end of the uniform velocity phase needs to be derived through geometric relationships. b1 The intersection point p of the two routes can be calculated based on their positions and directions. vb (p vbx p vby ), and the angle θ at which our ship switched back to the original route from the resumed route. b Based on geometric relationships, the intersection point p can be calculated using the following formula. vb to the tangent point p b1 distance l vb Then calculate the tangent point p. b1 (p b1xp b1y Location of )

[0078]

[0079]

[0080] Where DT3 is the initial diameter of the rotation. Based on distance l6 and velocity v r The time t during the uniform velocity phase can be calculated. r However, in the actual calculation process, chromosome decoding l vb The length of the ship is constrained only by its motion characteristics, not by its actual position during navigation, therefore p may occur. b1 Located in the acceleration phase or even p r2 Such unreasonable situations, such as those related to previous positions, need to be removed separately in the decoding program.

[0081] At this stage, the decision-making module needs to output [a] to the execution module. r , t ra , t r This refers to the magnitude of acceleration during the reentry phase, the time of accelerated reentry, and the time of constant-speed reentry. The constant-speed reentry time here is not obtained by reading genes on chromosomes, but rather through calculation. Using the above method, the reentry phase path is obtained.

[0082] In one embodiment, the transition phase between the resumption phase and the original route is denoted as the turnaround phase m3.

[0083] In this embodiment of the application, this process is performed at position p after the resumption phase ends. b1 Starting from point p, the tangent point when switching back to the original route. b2 The endpoint is [the point where the ship's speed v is located]. r Using the empirical formula above, the initial diameter of the cycle DT3 can be obtained. Replacing the diameter of the cycle with the initial diameter of the cycle, and based on geometric relationships, connect the point of tangency p. b1 (p b1x p b1y ) and tangent point p b2 (p b2x p b2y The chord length l ch3 tangent point p b2 The position can be calculated using the following formula:

[0084] l ch3 =DT3·sin(θ) b / 2)

[0085]

[0086] Assume that the speed remains constant during the turn, i.e., the linear velocity is constant at v. r The turning rate τ3 at this stage can be calculated using the following formula:

[0087]

[0088] During this stage, the decision module needs to output [θ] r [τ3]. This refers to the cut-back angle and cut-back turning rate. However, due to the combined constraints of the motion state at the previous position and the original route, the cut-back process may fail. Using this method, the connection between the retracing phase and the original route is denoted as the cut-back turning phase m3. It is understandable that generating a unique arc based on two points and a diameter is not unique; therefore, the turning angle, etc., can be used to determine which side of the chord the center of the circle is on. For example, using θ... b The value of is used to determine the relative positional relationship between the center of the circle containing the trajectory and the arc corresponding to the trajectory, thereby determining the relative position of the center of the circle and making the trajectory unique.

[0089] In one embodiment, the chromosomes in the foregoing embodiments need to be initialized.

[0090] In this embodiment, the purpose of rationally encoding genes on chromosomes is to obtain a concise and feasible search structure, while rationally setting search boundaries is beneficial for achieving efficient and accurate searches. Although this embodiment does not set too many boundaries for genes on chromosomes in order to expand the search range and improve population diversity, a reasonable boundary determination method is still needed for the initialization of genes in the first generation population and for genes with fixed boundaries. This approach allows the algorithm to have a certain degree of scenario-based heuristics. In previous genetic algorithms, genes were often independent of each other, making genetic operations on independent genes more convenient without having to consider the coupling problem between multiple genes. In this embodiment, related gene pairs are used, and genetic operations are performed sequentially to improve search efficiency. In this embodiment, genes are treated as independent during iteration. According to the schema theorem, this approach is reasonable.

[0091] The collision avoidance strategy proposed in this application is characterized by its ability to adapt to narrow waterways, where it is difficult to achieve collision avoidance paths with an amplitude exceeding 90 degrees. Therefore, the boundary conditions for the avoidance amplitude are... The rerouting range should at least allow the vessel to deviate from its original route while remaining parallel to it. The boundary condition for the rerouting range is: It can be observed that there is a causal relationship between the resumption range and the avoidance range, therefore they are a pair of related genes.

[0092] In this embodiment, the acceleration is initialized by uniformly distributing it within the range of maximum and minimum acceleration, and the acceleration time is also set from 0 to the TVOI value. An initialization method with uniform distribution between phases is proposed. Choosing the order of magnitude for the constant-speed phase navigation time is a challenging problem. Due to the complexity of narrow waterways and the potential for scenarios of various scales, setting a fixed value is not feasible. Setting different thresholds for different scenarios might offer higher accuracy, but this is difficult to implement. This application uses the TVOI value as the order of magnitude for the time scale. TVOI represents the shortest collision (or near-collision) time for a ship in its current state. Setting this value as the maximum value for the constant-speed phase can avoid collisions during the generated route, thereby improving search efficiency. The constant-speed time for other phases can also directly use this order of magnitude, reflecting the algorithm's partial adaptability. However, to improve avoidance efficiency and increase safety, the straight-line constant-speed phase should be as small as possible.

[0093] In one embodiment, the method of adjusting the course based on the path generated by the ship collision avoidance path model to achieve collision avoidance is as follows: filtering the path generated based on the ship collision avoidance path model to obtain a path solution; and adjusting the course based on the path solution to achieve collision avoidance; the filtering includes at least: removing paths that do not meet the boundary conditions and removing paths that do not meet the dynamic constraints.

[0094] In one embodiment, the boundary conditions include: position boundary conditions for defining the ship's navigation position, and velocity boundary conditions for limiting the ship's navigation speed and turning speed; the dynamic constraints are used to exclude solutions other than the ship's motion capabilities.

[0095] In this embodiment, not all chromosomes of individuals in the population can necessarily express a collision avoidance route that meets the requirements. There are two main types of non-compliant paths: one is the inability to generate a path, and the other is the inability to generate a valid path. The former usually occurs because the chromosome decoding program only decodes for a specific scenario, neglecting complex situations outside of that scenario, resulting in some generated chromosomes being unable to be correctly expressed. Such chromosomes can be filtered out from the population by setting reasonable discrimination conditions. The latter occurs when a chromosome is successfully decoded into a seemingly reasonable collision avoidance route, but some parameters do not meet the constraints of the environment, such as the trajectory exceeding the riverbank boundary or not satisfying dynamic constraints. Solutions beyond mobility can refer to situations such as reversing for too long, reversing too quickly, or instantaneously switching from forward speed to reverse speed. By eliminating solutions that do not conform to the actual situation, the obtained path becomes closer to the actual application.

[0096] In this embodiment, a speed change process is added to all three stages. When the acceleration direction is opposite to the velocity direction and lasts for a long time, the velocity direction will change. Prolonged reverse movement of the ship is not a reasonable situation, therefore this situation is not considered in chromosome decoding. When the velocity direction changes before and after the speed change, the chromosome is determined to be dead in the population. Due to the ship's maneuverability, after completing the speed change during the return-to-course phase, it is impossible to return to the original route via a tangent. The main reason for this is that the avoidance angle is too small. This can be determined by judging point p. b1 The location is determined by the position of point p. ra Closer to point p r2 If this occurs, the chromosome is considered dead in the population. Finally, due to crossover and mutation in genetic operations, the absolute value of the avoidance angle on a chromosome may be greater than the absolute value of the return angle, preventing the ship from returning to its original course. When this happens, the chromosome is considered dead in the population.

[0097] In this embodiment, solutions that do not meet the constraints need to be eliminated. First, solutions exceeding boundary values, such as the maximum speed or maximum turning rate of the current flight segment, can be directly filtered out by comparing them with the boundary conditions. Additionally, it is necessary to check whether the trajectory crosses the riverbank boundary. r1 and p r2 The test checks whether it lies between two riverbanks. The boundary of the riverbank can be represented by the following formula:

[0098]

[0099] When a point (x, y) lies inside the riverbank, the following inequality should be satisfied, where k u b u k l b l It can be determined by points on the riverbank boundary:

[0100] (k u x+b u -y)(k l x+b l -y)<0

[0101] By eliminating solutions that do not conform to reality, the resulting path becomes closer to the actual situation.

[0102] like Figure 8 As shown, in one embodiment, a ship collision avoidance route planning device is provided. This device can be integrated into the aforementioned computer equipment 120, and may specifically include a ship collision avoidance path model acquisition module 510 and a route adjustment execution module 520.

[0103] The ship collision avoidance path model acquisition module 510 is used to construct a ship collision avoidance path model based on a genetic algorithm. The ship collision avoidance path model includes at least three stages, namely, a straight-ahead stage, a collision avoidance stage, and a return-to-course stage. The straight-ahead stage includes a straight-ahead acceleration process l1 and a straight-ahead constant speed process l2. The collision avoidance stage includes a collision avoidance acceleration process l3 and a collision avoidance constant speed process l4. The return-to-course stage includes a return-to-course acceleration process l5 and a return-to-course constant speed process l6.

[0104] The execution route adjustment module 520 is used to perform route adjustments based on the path generated by the ship collision avoidance path model in order to achieve collision avoidance.

[0105] In this embodiment, the description of the operation method of each module in the ship collision avoidance route planning device is the same as the description of a ship collision avoidance route planning method above, and will not be repeated here. In this embodiment, speed and time are accurately and realistically introduced into the trajectory, which improves the previous method of only uniform speed trajectory encoding, and generates a path that conforms to the ship dynamics constraints, making the planned path more consistent with the actual motion trajectory of the ship, and making the collision avoidance decision algorithm closer to reality.

[0106] Figure 9 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 The execution terminal 110 (or computer device 120) in the system. For example... Figure 9 As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a ship collision avoidance route planning method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a ship collision avoidance route planning method. The display screen may be an LCD screen, etc. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse, etc.

[0107] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0108] In one embodiment, the ship collision avoidance route planning device provided in this application can be implemented as a computer program, and the computer program can be implemented as follows: Figure 9 The computer device shown runs on this device. The computer device's memory can store the various program modules that make up this ship collision avoidance route planning device, for example... Figure 8 The diagram shows a ship collision avoidance path model acquisition module 510 and a route adjustment execution module 520. The computer program, comprised of these modules, causes the processor to execute the steps described in the ship collision avoidance route planning method of the various embodiments of this application as described in this specification.

[0109] For example, Figure 1 The computer equipment shown can be used as follows Figure 8 The collision avoidance path model acquisition module 510 in the ship collision avoidance route planning device shown executes step S202. The computer equipment can execute step S204 by executing the route adjustment module 520.

[0110] In one embodiment, a computer device is provided, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a ship collision avoidance route planning method.

[0111] In this embodiment, the description of the steps in a ship collision avoidance route planning method is provided above and will not be repeated here. In this embodiment, speed and time are accurately and realistically incorporated into the trajectory, improving upon the previous method of encoding only uniform-rate trajectories. This generates a path that conforms to ship dynamics constraints, making the planned path more consistent with the ship's actual motion trajectory and making the collision avoidance decision algorithm more realistic.

[0112] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the steps of a ship collision avoidance route planning method.

[0113] In this embodiment, the description of the steps in a ship collision avoidance route planning method is provided above and will not be repeated here. In this embodiment, speed and time are accurately and realistically incorporated into the trajectory, improving upon the previous method of encoding only uniform-rate trajectories. This generates a path that conforms to ship dynamics constraints, making the planned path more consistent with the ship's actual motion trajectory and making the collision avoidance decision algorithm more realistic.

[0114] It should be understood that although the steps in the flowcharts of the various embodiments of this application are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0115] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0116] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above 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.

[0117] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the protection scope of this invention.

Claims

1. A method for planning collision avoidance routes for ships, characterized in that, The method includes the following steps: A ship collision avoidance path model is constructed based on a genetic algorithm. The ship collision avoidance path model includes at least three stages, namely, the straight-ahead stage, the avoidance stage, and the retracing stage. The direct flight phase includes the direct flight acceleration process. and straight-line constant speed process The avoidance phase includes an avoidance acceleration process. and avoidance of uniform speed process The resumption phase includes a resumption acceleration process. and the process of resuming constant speed ; The route is adjusted based on the path generated by the aforementioned ship collision avoidance path model to achieve collision avoidance; The straight-line acceleration process of the ship collision avoidance path model Straight-line constant speed process and the avoidance and turning phase The trajectory construction method is as follows: The straight-line acceleration process is obtained using the following formula. and straight-line constant speed process Coordinates of my ship's position during the straight-line phase at the end of the trajectory : ; ; ; ; in, This is the original position of my ship. For the course of my ship, To accelerate the travel time during the direct flight phase, This refers to the time of uniform motion during the direct flight phase. To accelerate the direct flight phase, To the accelerated speed, This is my ship's original speed; Based on the acceleration process of direct flight and straight-line constant speed process Coordinates of my ship's position during the straight-line phase at the end of the trajectory Generate direct flight acceleration process and straight-line constant speed process The trajectory; The avoidance and steering phase is obtained using the following formula. The coordinates of our ship's position : Assuming the avoidance and turning phase The trajectory is an arc, and its diameter is... The length of the chord corresponding to the trajectory is During the turn, the magnitude of the speed remains constant, and the linear velocity is constant. , ; ; ; ; in, To avoid the extent of the impact, To avoid collisions, the turning rate is... He is the captain of my ship; The relative positional relationship between the center of the circle containing the trajectory during the avoidance and turning phase and the chord corresponding to the trajectory is determined based on the avoidance range. Based on the avoidance and steering phase The coordinates of our ship's position The relative positional relationship between the center of the circle containing the trajectory and the chord corresponding to the trajectory generates the avoidance and turning phase. The trajectory; The collision avoidance acceleration process of the ship collision avoidance path model Avoiding the uniform velocity process and the resumption of navigation and turning phase The trajectory construction method is as follows: The avoidance acceleration process is obtained using the following formula. and avoidance of uniform speed process Coordinates of my ship's position during the straight-line phase at the end of the trajectory : ; ; ; ; in, This is the initial position of my ship before the acceleration process for the avoidance maneuver began. To avoid the acceleration time during acceleration, To avoid the uniform motion time during the avoidance phase, To avoid acceleration during acceleration, This is the speed of my ship after accelerating to avoid the collision. Based on the avoidance acceleration process and avoidance of uniform speed process Coordinates of my ship's position during the avoidance phase at the end of the trajectory Generate avoidance acceleration process and avoidance of uniform speed process The trajectory; The re-entry turning phase is obtained using the following formula. The coordinates of our ship's position : Assuming the resumption of navigation and turning phase The trajectory is an arc, and its diameter is... The length of the chord corresponding to the trajectory is During the turn, the magnitude of the speed remains constant, and the linear velocity is constant. , ; ; ; ; in, To determine the extent of resumption of flights, This refers to the turning rate during the resumption of navigation. The relative positional relationship between the center of the circle containing the trajectory during the reversal and the chord corresponding to the trajectory is determined based on the reversal range. Based on the resumption of navigation and turning phase The coordinates of our ship's position The relative positional relationship between the center of the circle containing the trajectory and the chord corresponding to the trajectory generates the navigation turning phase. The trajectory; The ship collision avoidance path model's recovery acceleration process , Resumption of navigation at a constant speed and the turnaround phase The trajectory construction method is as follows: The acceleration process for resuming navigation is obtained using the following formula. , Resumption of navigation at a constant speed Coordinates of my ship's position at the end of the trajectory during the navigation phase : Assuming the turnaround phase It is an arc shape with a diameter of , For trajectory The corresponding chord length, the speed remains constant during the turn. These are the coordinates of the intersection point between the straight line containing the resumed route and the original route. ; ; ; ; ; ; in, The coordinates represent the starting point of the navigation reversal and turning phase. This is the initial position of our ship before the acceleration process begins. To accelerate the resumption of flights, To accelerate during the resumption of operations, This refers to the speed of my ship after accelerating upon resuming navigation. The angle at which our ship cuts back to its original route from the resumption phase; Based on the accelerated resumption of flights , Resumption of navigation at a constant speed Coordinates of my ship's position during the recovery phase at the end of the trajectory Generate a process to accelerate the resumption of flights , Resumption of navigation at a constant speed The trajectory; The shear-back turning phase is obtained using the following formula. The coordinates of our ship's position : Assuming the turnaround phase The trajectory is an arc, and its diameter is... The length of the chord corresponding to the trajectory is During the turn, the magnitude of the speed remains constant, and the linear velocity is constant. , ; ; ; in, The steering rate during the turnaround phase; The relative positional relationship between the center of the circle containing the trajectory during the turn-back phase and the chord corresponding to the trajectory is determined based on the turn-back angle. Based on the cutback and steering phase The coordinates of our ship's position The relative positional relationship between the center of the circle containing the trajectory and the chord corresponding to the trajectory generates the tangent-turning phase. The trajectory.

2. The ship collision avoidance route planning method according to claim 1, characterized in that, The ship collision avoidance path model also includes the following three stages: avoidance and turning stage. Resumption of navigation and turning phase and the turnaround phase ; The avoidance and steering phase Connected to the straight-line constant speed process and the aforementioned avoidance acceleration process between; The resumption of navigation and turning phase Connected to the constant speed process of avoidance and the aforementioned acceleration process of resuming navigation between; The cutback and turning phase Connected to the constant speed process of the return journey after.

3. The ship collision avoidance route planning method according to claim 1, characterized in that, The method for adjusting the route based on the path generated by the ship collision avoidance path model to achieve collision avoidance is as follows: The path solutions are obtained by filtering the paths generated based on the ship collision avoidance path model. The flight path is adjusted according to the path solution to achieve collision avoidance; The filtering includes at least: removing paths that do not meet the boundary conditions and removing paths that do not meet the dynamic constraints.

4. The ship collision avoidance route planning method according to claim 3, characterized in that, The boundary conditions include: position boundary conditions for defining the ship's navigation position and speed boundary conditions for limiting the ship's navigation speed and turning speed; The dynamic constraints are used to exclude solutions other than the ship's motion capabilities.

5. A ship collision avoidance route planning device, characterized in that, The device includes: The ship collision avoidance path model acquisition module is used to construct a ship collision avoidance path model based on a genetic algorithm. The ship collision avoidance path model includes at least three stages: a straight-ahead stage, a collision avoidance stage, and a retracing stage. The straight-ahead stage includes a straight-ahead acceleration process. and straight-line constant speed process The avoidance phase includes an avoidance acceleration process. and avoidance of uniform speed process The resumption phase includes a resumption acceleration process. and the process of resuming constant speed ; The route adjustment module is used to adjust the route based on the path generated by the ship collision avoidance path model in order to avoid collision. The straight-line acceleration process of the ship collision avoidance path model Straight-line constant speed process and the avoidance and turning phase The trajectory construction method is as follows: The straight-line acceleration process is obtained using the following formula. and straight-line constant speed process Coordinates of my ship's position during the straight-line phase at the end of the trajectory : ; ; ; ; in, This is the original position of my ship. For the course of my ship, To accelerate the travel time during the direct flight phase, This refers to the time of uniform motion during the direct flight phase. To accelerate the direct flight phase, To the accelerated speed, This is my ship's original speed; Based on the acceleration process of direct flight and straight-line constant speed process Coordinates of my ship's position during the straight-line phase at the end of the trajectory Generate direct flight acceleration process and straight-line constant speed process The trajectory; The avoidance and steering phase is obtained using the following formula. The coordinates of our ship's position : Assuming the avoidance and turning phase The trajectory is an arc, and its diameter is... The length of the chord corresponding to the trajectory is During the turn, the magnitude of the speed remains constant, and the linear velocity is constant. , ; ; ; ; in, To avoid the extent of the impact, To avoid collisions, the turning rate is... He is the captain of my ship; The relative positional relationship between the center of the circle containing the trajectory during the avoidance and turning phase and the chord corresponding to the trajectory is determined based on the avoidance range. Based on the avoidance and steering phase The coordinates of our ship's position The relative positional relationship between the center of the circle containing the trajectory and the chord corresponding to the trajectory generates the avoidance and turning phase. The trajectory; The collision avoidance acceleration process of the ship collision avoidance path model Avoiding the uniform velocity process and the resumption of navigation and turning phase The trajectory construction method is as follows: The avoidance acceleration process is obtained using the following formula. and avoidance of uniform speed process Coordinates of my ship's position during the straight-line phase at the end of the trajectory : ; ; ; ; in, This is the initial position of my ship before the acceleration process for the avoidance maneuver began. To avoid the acceleration time during acceleration, To avoid the uniform motion time during the avoidance phase, To avoid acceleration during acceleration, This is the speed of my ship after accelerating to avoid the collision. Based on the avoidance acceleration process and avoidance of uniform speed process Coordinates of my ship's position during the avoidance phase at the end of the trajectory Generate avoidance acceleration process and avoidance of uniform speed process The trajectory; The re-entry turning phase is obtained using the following formula. The coordinates of our ship's position : Assuming the resumption of navigation and turning phase The trajectory is an arc, and its diameter is... The length of the chord corresponding to the trajectory is During the turn, the magnitude of the speed remains constant, and the linear velocity is constant. , ; ; ; ; in, To determine the extent of resumption of flights, This refers to the turning rate during the resumption of navigation. The relative positional relationship between the center of the circle containing the trajectory during the reversal and the chord corresponding to the trajectory is determined based on the reversal range. Based on the resumption of navigation and turning phase The coordinates of our ship's position The relative positional relationship between the center of the circle containing the trajectory and the chord corresponding to the trajectory generates the navigation turning phase. The trajectory; The ship collision avoidance path model's recovery acceleration process , Resumption of navigation at a constant speed and the turnaround phase The trajectory construction method is as follows: The acceleration process for resuming navigation is obtained using the following formula. , Resumption of navigation at a constant speed Coordinates of my ship's position at the end of the trajectory during the navigation phase : Assuming the turnaround phase It is an arc shape with a diameter of , For trajectory The corresponding chord length, the speed remains constant during the turn. These are the coordinates of the intersection point between the straight line containing the resumed route and the original route. ; ; ; ; ; ; in, The coordinates represent the starting point of the navigation reversal and turning phase. This is the initial position of our ship before the acceleration process begins. To accelerate the resumption of flights, To accelerate during the resumption of operations, This refers to the speed of my ship after accelerating upon resuming navigation. The angle at which our ship cuts back to its original route from the resumption phase; Based on the accelerated resumption of flights , Resumption of navigation at a constant speed Coordinates of my ship's position during the recovery phase at the end of the trajectory Generate a process to accelerate the resumption of flights , Resumption of navigation at a constant speed The trajectory; The shear-back turning phase is obtained using the following formula. The coordinates of our ship's position : Assuming the turnaround phase The trajectory is an arc, and its diameter is... The length of the chord corresponding to the trajectory is During the turn, the magnitude of the speed remains constant, and the linear velocity is constant. , ; ; ; in, The steering rate during the turnaround phase; The relative positional relationship between the center of the circle containing the trajectory during the turn-back phase and the chord corresponding to the trajectory is determined based on the turn-back angle. Based on the cutback and steering phase The coordinates of our ship's position The relative positional relationship between the center of the circle containing the trajectory and the chord corresponding to the trajectory generates the tangent-turning phase. The trajectory.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the steps of a ship collision avoidance route planning method as described in any one of claims 1 to 4.

7. A ship collision avoidance route planning system, characterized in that, When the system is running, it performs the steps of a ship collision avoidance route planning method as described in any one of claims 1 to 4.