Unmanned ship path planning method and device and storage medium
By adopting the LFWWOA-BEFCA hybrid algorithm in unmanned ship path planning, the problems of poor path quality and low search efficiency in the prior art are solved, and a higher quality and higher efficiency path planning is achieved, ensuring the smoothness and safety of the path.
Patent Information
- Application Number
- CN202510122032.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing unmanned ship path planning methods have problems such as poor path quality and low search efficiency.
The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm is adopted, and the taxable flight strategy and two-way search mechanism are introduced by improving the basic whale optimization algorithm and elastic force shrinkage algorithm, and the unmanned ship kinematic model is used for path smoothing.
It improves the quality and search efficiency of path planning, reduces the length of planned paths, ensures the smoothness and security of paths, and reduces energy consumption.
Smart Images

Figure CN119984270A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned ships for environmental monitoring, and in particular to an unmanned ship path planning method, device and storage medium. Background Art
[0002] According to statistics, the cargo throughput of Ningbo-Zhoushan Port is 1.26 billion tons, ranking first in the world; in 2021, the number of ships entering and leaving Ningbo-Zhoushan Port reached 817,000, and there were 23,000 international ship import and export shorelines. However, the huge port throughput and intensive shipping activities have brought great pressure and risks to the nearby waters, such as species invasion caused by ship ballast water, oil spills, heavy metal pollution, and microplastic pollution. The 2022 Zhoushan Ecological Environment Status Bulletin pointed out that all-weather water quality monitoring will be carried out through drone beach patrols and unmanned ship (USV) navigation. Compared with drones, unmanned submersibles have stronger water monitoring coverage, richer monitoring content, longer endurance, and higher safety. Therefore, unmanned submersibles are used to monitor water more widely. In order to perform water monitoring tasks, USVs must autonomously and safely navigate to the mission point according to a predefined path. The purpose of path planning is to determine the collision-free path of the USV around many static or moving obstacles.
[0003] In the prior art, path planning can be achieved individually through Dijkstra algorithm, A* algorithm, artificial fish swarm algorithm, gray wolf optimization algorithm or sampling-based algorithm, but path planning using a single algorithm often has its own limitations. Therefore, relevant researchers proposed to make up for the limitations of a single algorithm by combining several existing algorithms, such as hybrid particle swarm optimization and coyote algorithm, hybrid whale optimization and cuckoo search optimization algorithm, etc. However, whether it is a single algorithm or a hybrid algorithm, the current path planning method still produces long and smooth paths, the planned path quality is poor, and the search efficiency is low. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of poor path quality and low search efficiency in the above-mentioned prior art and to provide an unmanned ship path planning method, device and storage medium, and to perform unmanned ship path planning based on the LFWWOA-BEFCA hybrid algorithm.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] According to a first aspect of the present invention, a method for unmanned ship path planning based on a LFWWOA-BEFCA hybrid algorithm is provided, comprising the following steps: obtaining environmental information of the unmanned ship; initializing parameters of the LFWWOA algorithm; using the LFWWOA-BEFCA hybrid algorithm to obtain a final unmanned ship path planning result according to the environmental information; wherein the LFWWOA-BEFCA hybrid algorithm includes a LFWWOA algorithm and a BEFCA algorithm, the BEFCA algorithm is used to plan a path, and the LFWWOA algorithm is used to optimize the step size parameters and swing angle parameters of the BEFCA algorithm; the acquisition process of the LFWWOA algorithm includes: based on the basic whale optimization algorithm, introducing a taxed flight strategy, modifying the calculation method of the variation coefficient and adding an adaptive weighting coefficient.
[0007] As a preferred technical solution, the modified variation coefficient calculation method is expressed as:
[0008]
[0009] In the formula, represents the coefficient changing from 2 to 0, k represents the adjustment factor, t represents the current number of iterations, and t max Indicates the maximum number of iterations.
[0010] As a preferred technical solution, the adaptive weighting coefficient is expressed as:
[0011] w=k 1 ×(1+cos(π×t / t max ) 4 )
[0012] In the formula, w is the weighting coefficient, k is 1 represents the adaptive factor, t represents the current iteration number, t max Indicates the maximum number of iterations.
[0013] As a preferred technical solution, in the LFWWOA algorithm, the improved whale surrounding prey model is expressed as follows:
[0014]
[0015] and
[0016]
[0017] In the formula, represents the position vector of the whale at the next iteration t+1, and each individual whale represents a path. represents the vector of the position of a randomly selected whale in the population at the current iteration number t, represents the position vector of the whale at the current iteration number t, and are different model coefficients, r 1 represents a randomly generated vector between [0, 1], and Levy(ρ) represents levy flight.
[0018] As a preferred technical solution, in the LFWWOA algorithm, the improved whale optimization iteration equation is:
[0019]
[0020] In the formula, Represents the position vector of the whale closest to the optimal path at the current iteration number t, P represents a random number in [0, 1], b is a preset constant, and 1 represents a random number in [-1, 1].
[0021] As a preferred technical solution, the acquisition process of the BEFCA algorithm includes: introducing a bidirectional search mechanism based on an elastic force contraction algorithm, and using a preset unmanned ship kinematic model to smooth the path.
[0022] As a preferred technical solution, the bidirectional search mechanism specifically includes, according to actual scene requirements, using a preset starting point or target point as the starting point of path planning.
[0023] As a preferred technical solution, the unmanned ship kinematic model is expressed as:
[0024]
[0025] Where v = [u, v, r] T The vectors representing the longitudinal velocity, transverse velocity and yaw rate of the ship in the fixed frame of the hull; η = [X, y, ψ] represents the vectors of position and heading in the earth-fixed inertial system; M, C (v), D (ν) represent the system inertia matrix, Coriolis force centripetal force matrix and damping coefficient matrix respectively; τ = [τ u , τ v , τ r ] represents the control input vector; ω=[ω u ,ω v ,ω r ] are the forces and moments generated by external environmental interference.
[0026] According to a second aspect of the present invention, there is provided an unmanned ship path planning device based on a LFWWOA-BEFCA hybrid algorithm, comprising a memory, a processor, and a program stored in the memory, wherein the processor implements the method when executing the program.
[0027] According to a third aspect of the present invention, there is provided a storage medium having a program stored thereon, wherein the program implements the method described above when executed.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. This invention improves the basic whale optimization algorithm, introduces a taxing flight strategy in the basic global exploration phase to increase the diversity of solutions, and modifies the variation coefficient The calculation method of and the adaptive weighting coefficient w are added to effectively improve the convergence speed of the algorithm as well as the global and local search capabilities. The LFWWOA algorithm is proposed, and the step size parameters and swing angle parameters of the BEFCA algorithm are optimized by the LFWWOA algorithm, thereby jointly realizing the path planning of the unmanned ship, which can effectively improve the search efficiency and improve the quality of path planning.
[0030] 2. The present invention improves the elastic force contraction algorithm (EFCA), introduces a bidirectional search mechanism, and uses a preset unmanned ship kinematic model to smooth the path, and proposes a bidirectional elastic force contraction algorithm (BEFCA), which can effectively improve the convergence speed of the elastic force contraction algorithm (EFCA). At the same time, the kinematic model of the unmanned ship is used. After the MSM method is optimized, the turning points in the BEFCA planning path are smoothed, which can not only reduce the workload of the smooth path and ensure the efficiency of the algorithm, but also make the final smooth path length not change too much;
[0031] 3. The present invention uses the LFWWOA algorithm to optimize the step length parameters and swing angle parameters of BEFCA, which can effectively reduce the length of the planned path and improve the adaptability of the path planning method;
[0032] 4. The present invention uses the USV kinematic model to smooth the planned path through the turning points in the path, which can provide a shorter and smoother driving path for the unmanned ship to monitor the environment in the port, effectively solve the difficulty of unmanned ship path tracking, avoid the risk of loss of control or accidents due to sharp turns, and save energy consumption during driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of an implementation flow of a method is provided for an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of EFCA node expansion provided by an embodiment of the present invention;
[0035] Figure 3 A schematic diagram of path redundancy optimization provided by an embodiment of the present invention;
[0036] Figure 4 The BEFCA solution provided for the embodiment of the present invention;
[0037] Figure 5 A schematic diagram of smoothing turning points using a USV kinematic model provided in an embodiment of the present invention;
[0038] Figure 6 A binary map of the research area provided by an embodiment of the present invention;
[0039] Figure 7 The path planning results of the method provided in the embodiment of the present invention are compared with those of other methods. DETAILED DESCRIPTION
[0040] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0041] Example
[0042] The present invention provides an unmanned ship path planning method based on a LFWWOA-BEFCA hybrid algorithm. After acquiring the environmental information of the unmanned ship and initializing the parameters of the LFWWOA-BEFCA hybrid algorithm, the method uses the initialized LFWWOA-BEFCA hybrid algorithm to obtain the final unmanned ship path planning result according to the environmental information; wherein the LFWWOA-BEFCA hybrid algorithm includes an LFWWOA algorithm and a BEFCA algorithm, the BEFCA algorithm is used for planning the path, and the LFWWOA algorithm is used for optimizing the step size parameter and the swing angle parameter of the BEFCA algorithm; the acquisition process of the LFWWOA algorithm includes: based on a basic whale optimization algorithm (WOA), introducing a taxed flight strategy (i.e., a Levy flight strategy), modifying a calculation method of a variation coefficient and adding an adaptive weighting coefficient; the acquisition process of the BEFCA algorithm includes: based on an elastic force contraction algorithm (EFCA), introducing a bidirectional search mechanism, and using a preset unmanned ship kinematic model to smooth the path.
[0043] Figure 1 One implementation of the aforementioned unmanned ship path planning method is shown:
[0044] Step S1, initializing LFWWOA algorithm parameters.
[0045] Step S2: Generate the state of a single whale. Each individual whale represents a path. Its state includes the step length step and the swing angle λ. The whale population is represented as X i (i=1,2,…,n),X * represents the position vector of the best search agent, that is, the whale that is closest to the optimal path.
[0046] Step S3, inputting a map as the environment information where the unmanned ship is located.
[0047] Step S4, based on the environmental information, use BEFCA to plan the path, and use the smoothed path length as the fitness of each whale, that is, [fitness, path] = BEFCA (map, X i ).
[0048] Step S5, judging based on the P value:
[0049] If P<0.5, execute step S6; if P≥0.5, execute step S9.
[0050] Step S6, judging based on |A|:
[0051] If |A|<1, execute step S7; if |A|≥1, execute step S8.
[0052] Step S7, entering the prey surrounding stage: using the improved whale surrounding prey model to update the position of the current search agent, the improved whale surrounding prey model is the formula (7) below.
[0053] Step S8, enter the global exploration phase: select random search agent X rand , the position of the current search agent is updated using the improved whale optimization iteration equation, the improved whale optimization iteration equation is the equation (12) below.
[0054] Step S9, entering the spiral bubble net feeding action stage: using the improved whale optimization iteration equation to update the position of the current search agent.
[0055] Step S10, check whether the preset termination condition is met. If it is met, end the iteration and output the path planning result; if it is not met, execute step S2 to continue iterating until the termination condition is met.
[0056] Next, the improvement process of LFWWOA and BEFCA algorithms is described in detail.
[0057] (1) Improved whale optimization algorithm
[0058] This embodiment proposes an improved whale optimization algorithm, namely, the taxed flight weighted whale optimization algorithm (LFWWOA). On the basis of the basic whale optimization algorithm, the taxed flight strategy (i.e., Levy flight strategy) and the improved The calculation method of and the adaptive weight coefficient w are increased to overcome the limitation of the basic whale optimization algorithm that is prone to fall into local optimality due to the lack of exploration ability.
[0059] (1.1) Basic whale optimization algorithm
[0060] The basic whale optimization algorithm, namely the WOA algorithm, consists of three stages: circling the prey, spiral bubble net feeding action, and global exploration.
[0061] In the circling prey phase, specifically:
[0062] The mathematical model of a whale encircling its prey is as follows:
[0063]
[0064] In the formula, represents the position vector of the whale closest to its prey, represents the current whale's position vector, and t represents the number of iterations. and represents the coefficient, which is calculated as follows:
[0065]
[0066] In the formula, and Represents two randomly generated vectors between [0,1]. represents the coefficient varying from 2 to 0 and is calculated as follows:
[0067]
[0068] Where, t max Indicates the maximum number of iterations.
[0069] In the spiral bubble net feeding action stage, specifically:
[0070] The mathematical modeling of the spiral bubble net feeding action is as follows:
[0071]
[0072] Where b is a constant with a value of 1, and l is a random number in the range [-1,1].
[0073] Based on this, WOA uses probability to determine whether the whale will perform a circling or spiral bubble net feeding action. The mathematical model is as follows:
[0074]
[0075] Where P represents a random number in [0,1].
[0076] In the global exploration phase, specifically:
[0077] when When , the whale uses formula (1) to circle the prey; when When individual whales conduct global exploration, the mathematical model is as follows:
[0078]
[0079] In the formula, A vector representing the position of a randomly selected whale in the current population.
[0080] (1.2) Improved whale optimization algorithm
[0081] Levy flights are random tours where the step length is drawn from a levy distribution. Therefore, levy flights are characterized by a mixture of long and short step moves, randomness, and a long-tailed distribution. Therefore, levy flight trajectories can improve the global search ability of the algorithm by improving reinforcement and diversity, overcoming the problem of premature convergence
[0082] The taxed flight trajectory used to update the humpback whale position, that is, the improved whale circling prey model, is expressed as follows:
[0083]
[0084] Where Levy(ρ) represents levy flight, and its random walk distribution conforms to u=t -ρ ,1<ρ≤3.
[0085] Since Levy(ρ) is complex to calculate, the Mantegna algorithm is usually used to calculate the step length of levy flight, which is the following formula:
[0086]
[0087] Where s is the step size of the taxed flight. It can also be understood as Levy(ρ): ρ=1+β. Among them, β=2, and All are normally randomly distributed:
[0088]
[0089] In addition to introducing taxed flights, the whale optimization algorithm provided in this embodiment also adjusts the parameters Improvements are made and the adaptive weight coefficient w is increased.
[0090] by The parameter vector affected Determines the choice of eating action, that is, when When the whale performs a circling maneuver, and when When , the whale performs global exploration phase actions. Exploration and exploitation seem to have reached a balance, but it can be seen from formula (2) that With the value As the value decreases from 2 to 1, the probability of being greater than 1 decreases. For example, when When 1.5, The probability of being greater than 1 is only one-fourth. Therefore, WOA has insufficient exploration capability and is prone to fall into local optimization. The improvement is expressed in the following mathematical formula:
[0091]
[0092] In the formula, k represents the adjustment factor with a value of 2, t represents the current number of iterations, and t max Indicates the maximum number of iterations.
[0093] By increasing The size of the whale increases the probability of the whale to conduct a global exploration phase. This method can improve the exploration performance of the algorithm, but the local search performance is relatively weak compared to WOA. Therefore, a weight is added to balance the global and local search performance of the algorithm, which is calculated as follows:
[0094] w=k 1 ×(1+cos(π×t / t max ) 4 ) (11)
[0095] In the formula, k 1 Represents an adaptivity factor of 0.6.
[0096] In the pre-iteration stage, the weight value decreases with the increase of iteration number to improve the search accuracy and convergence speed. In the late iteration stage, the weight value increases with the increase of iteration number to improve the local search performance.
[0097] After adding adaptive weights, the improved whale optimization iteration equation is as follows:
[0098]
[0099] (2) Improved elastic force contraction algorithm
[0100] (2.1) Elastic Force Contraction Algorithm (EFCA)
[0101] EFCA is a static path planning algorithm that considers the target point as one end of an elastic force and guides the path to the target point. The two parameters of EFCA are step size and swing angle, and its implementation process includes three parts: node calculation, node expansion, and redundant node optimization.
[0102] The first part is node calculation.
[0103] The guiding role of the target point on the planning node is achieved through virtual elastic force. Assume that node n i Planned child node n i+1 , where ni and the target point n goal The position coordinates are [x i ,y i ] and [x goal ,y goal ]. goal Acts on n i The elastic force vector on For [x goal -x i ,y goal -y i ].(x goal -x i ) and (y goal -y i ) respectively represent Components in the horizontal and vertical coordinates.
[0104] Choose the transverse unit vector as the reference vector, that is The angle between these two vectors is calculated using the inverse cosine function as follows:
[0105]
[0106] According to the initial angle θ init and node n i , n i+1 The position coordinates are calculated as follows:
[0107]
[0108] In the formula, x i+1 and i+1 Indicates n i+1 The horizontal and vertical coordinates of , step represents the step size parameter.
[0109] The second part is node expansion.
[0110] EFCA uses a simple pendulum collision detection method, a direction search strategy, and a preprocessing step to plan a collision-free path, such as Figure 2 As shown. Figure 2 The first node of the path is n i , the target point is n goal .
[0111] The simple pendulum collision detection method simulates the phenomenon of a simple pendulum swinging back and forth on both sides of the pituitary to find the path segment with the smallest angle and no collision with the virtual elastic force acting on the node of the target point. Figure 2 In the example, the target point n goal At node n i The virtual elastic force vector applied on i and n goalThe blue dotted line between them indicates the child nodes. can be calculated by the node calculation part of the first part, but the node Therefore, the simple pendulum collision detection recalculates the nodes by modifying the angles calculated by the nodes, as shown below:
[0112] θ′=θ init +T×λ 0 (15)
[0113]
[0114] Where n T is the number of angle modifications, and λ is the set swing angle. Since λ takes a positive value, when n T is an odd number, the value of θ′ changes counterclockwise, indicating a counterclockwise search; when n T When it is an even number, the value of θ′ changes clockwise, indicating a clockwise search.
[0115] Node n i According to the modified angle, use the following formula to recalculate the position coordinates of the child node
[0116]
[0117]
[0118] like Figure 2 As shown, After the fourth change, the recalculated nodes are not affected by the obstacles. Therefore, is used as a node in a path, and is used as a conflict-free path.
[0119] Directed search strategies are proposed to avoid deadlock caused by large convex obstacles. Figure 2 In the above example, only the simple pendulum collision detection method is used to find the collision-free path. Due to the influence of the virtual elastic force, the planning node will be located at n i+1 and The directional search strategy is to use the search direction when the node first contacts the obstacle after the simple pendulum collision detection method and successfully plans a collision-free node as the search direction before bypassing the obstacle, and the parent node of the node that first contacts the obstacle is called the intersection node, for example Figure 2 Node n in i .like Figure 2 As shown, n i Child nodes of appears in the clockwise search direction, so The child nodes of are searched only in clockwise direction, and the recalculated nodes are and This causes the node to be recalculated and However, the node is not within the planning range, which means that no valid path can be found in this direction. At this time, the previous intersection node n i Replaced The clockwise search is changed to a counterclockwise search. Finally, n i+1 Used as n i , and delete the node from the path node
[0120] The preprocessing aims to solve the deadlock problem caused by concave obstacles. Figure 2 In the example, since node n i+3 The search angle α exceeds 180°, and its child node n″ i+4 The downward search is not affected by obstacles, which leads to the deadlock problem. The implementation process of the preprocessing process is to recalculate the child nodes that are not affected by obstacles according to the search direction of the node when it is detected that the search angle of the node is greater than 180°, until the calculated child nodes are affected by obstacles, for example, Figure 2 n″ i+4 After preprocessing, we get n′ i+4 Then the node n′ i+4 Submit it to the subsequent simple pendulum collision detection and directional search strategy to obtain the collision-free subsequent node n i+4 to n i+8 .
[0121] The third part is the optimization of redundant nodes.
[0122] The minimum set method (MSM) is used to solve the problem of redundant nodes. The implementation process is as follows: Figure 3 As shown. Figure 3 The blue solid line indicates Figure 2 The final planned path is shown, and the red dotted line represents the optimized path.
[0123] The implementation of MSM is as follows: i The node with the largest index value that can be connected without conflict is n i+3 , and by n i+3 The node that can be connected without collision and has the smallest index value is n i Therefore, node n i and n i+3 is retained, redundant node n i+1 and n i+2 Deleted. By n i+3The node with the largest index value that can be connected without conflict is n. i+4 , and through n i+4 The node that can be connected without collision and has the smallest index value found by this method is n i+3 Therefore, node n i+4 is retained. The final path node set obtained is [n i , n i+3 , n i+4 , n i+6 , n goal ]. Redundant node n i+2 、n i+1 、n i+5 、n i+7 and n i+8 will be deleted.
[0124] (2.2) Bidirectional elastic force contraction algorithm
[0125] The method proposed in this embodiment provides a bidirectional elastic force contraction algorithm (ie, BEFCA). Based on EFCA, a bidirectional search mechanism is first introduced to overcome the problems of long planning paths and slow convergence of EFCA in some scenarios.
[0126] EFCA is constrained by virtual elastic forces, resulting in poor path quality in some cases. Figure 4 In the figure, the blue dotted line indicates the target point n goal Acting on the starting point n start The virtual elastic force on the surface is offset to the right. The blue solid line represents the path planned by EFCA, which starts from the starting point n. start , avoid obstacles from the right and reach the target point n goal ; At this time, if the planned target point n goal As the starting point of EFCA, the planned path is the path indicated by the red solid line. The red path is planned three times to plan a valid path, while the blue route needs to be planned eight times, so the path planning in the opposite direction converges faster.
[0127] However, if the target point is on the right side of the obstacle, the forward convergence speed will be faster. Therefore, in order to meet various scenarios, this embodiment adopts BEFCA.
[0128] (2.3) Smooth Path
[0129] The BEFCA adopted in this embodiment uses the kinematic model of the USV to achieve path smoothing based on the introduction of a bidirectional search mechanism. The kinematic model of the USV can be described as follows:
[0130]
[0131] Where ν = [u, ν, r] T The vectors representing the longitudinal velocity, transverse velocity and yaw rate of the ship in the fixed frame of the hull; η = [x, y, ψ] represents the vectors of position and heading in the earth-fixed inertial system; M, C (ν), D (ν) represent the system inertia matrix, Coriolis force centripetal force matrix and damping coefficient matrix respectively; τ = [τ u , τ v , τ r ] represents the control input variable; and ω=[ω u ,ω v ,ω r ] is the force and torque generated by external environmental interference. The correlation coefficient matrix in formula (19) is expressed as follows:
[0132]
[0133] Where m is the mass of the entire ship; I z is the moment of inertia; Y(·), X(·), N(·) are the hydrodynamic coefficients; x g is the longitudinal distance from the origin to the center of gravity.
[0134] The MSM method removes redundant nodes from the planned path, thereby significantly reducing the number of turning points in the path. Since adjacent nodes are connected by straight lines, when planning a path that satisfies USV tracking using the USV kinematic model (referred to as the USV model in the figure), the turning points in the path must be smooth (when the control input variable τ r When it is zero, the USV moves in a straight line. Figure 5 This smoothing method is more effective than the full process smoothing method.
[0135] exist Figure 5 In the path, there are two turning points, n i+1 and n i+2 .n i+1 First smooth the turning points. i+1 The position and yaw angle of the line segment |n i n i+1 | is used to form the initial value η. Use the USV kinematic model to plan a trajectory that conforms to USV tracking and change the control input variable τ r ,like Figure 5 In the trajectory planning process, if the yaw angle of the state point is the same as the azimuth angle of the state point, and the next node directly connected to it and the line segment directly connected to the next node will not be affected by obstacles, then stop the trajectory planning and use the trajectory before this state point and the trajectory directly connected to this node as the smooth path. For example, n i+2 exist Figure 5The turning point of the USV kinematic model is the green dotted curve. If the state point of the curve segment at the red triangle meets the above conditions, the path composed of the curve segment before the red triangle and the green solid line segment after it replaces the blue solid line path before smoothing. Finally, the yaw angle of the state point at the red triangle is used as the initial yaw angle of the next node to ensure the smooth continuity of the entire path. Figure 5 In the equation, the tangent point refers to the intersection of two state points, that is, the state points have equal azimuths.
[0136] exist Figure 5 In , it can be noted that the trajectory planned by the USV kinematic model only appears in the direction of the next node to reduce the number of invalid trajectories. r Controls the deflection direction of the trajectory. r When it is 0, the planned path is an extension of the current straight path, such as Figure 5 As shown by the green dotted line in r When it is negative, the planned trajectory will deflect to the right of the extension line, such as Figure 5 Middle turning point n i+1 The red dotted curve at is shown; when τ r When is positive, the planned trajectory will deflect to the left of the extension line, such as Figure 5 Middle turning point n i+2 In all smoothing cases, there are eight different deflection directions, as shown in Table 1.
[0137] Table 1. Subsequent node positions and τ r The corresponding relationship of the value
[0138]
[0139]
[0140] (3) LFWWOA and BEFCA hybrid algorithm
[0141] According to the above improvements, the method proposed in this embodiment uses the LFWWOA and BEFCA hybrid algorithm to plan the path for the USV, and uses LFWWOA to optimize the two parameters step and λ in BEFCA, so as to plan a higher quality path. The overall process of the hybrid algorithm is as follows:
[0142]
[0143]
[0144] In Algorithm 1, X iIt is represented as an individual consisting of two dimensions, step and λ. The fourth line indicates that the collision-free path of each individual is calculated using the BEFCA algorithm, and the planned path length is used as the fitness of the corresponding individual. Among them, the optimal individual represents the individual X with the smallest planned path length. i .
[0145] Next, we use the actual data Figure 1 The effectiveness of the implementation of steps S1 to S10 is verified.
[0146] First, the kinematic model of CyberShip II is used to smooth the turning points in the path. The mass of CyberShip II is 23.8 kg, the length is 1.255 m, the width is 0.29 m, and the other hydrodynamic coefficients and other main parameters are shown in Table 2. The study area includes the Jintang Port Area of Ningbo Zhoushan Port, which is located at the following coordinates: 29.9916°N, 121.8500°E. The binary map of the study area is shown in Figure 6 As shown in Table 3, the configuration of relevant algorithm parameters is listed.
[0147] Table 2 Hydrodynamic and other key simulation parameters of CyberShip II
[0148]
[0149] Table 3 Related algorithm parameter configuration
[0150]
[0151]
[0152] The path planning results are as follows: Figure 7 The results show that EFCA, the single BEFCA algorithm provided in this embodiment, and the LFWWOA-BEFCA hybrid algorithm provided in this embodiment can effectively plan the path from the starting point to the target point. Figure 7 Part (a) shows the simulation results of EFCA, where the blue solid line represents the path planned from the starting point and the red solid line represents the optimized path; Figure 7 Part (b) shows the simulation results of BEFCA without smoothing of the USV kinematic model, where the pink path represents the path planned from the target point; Figure 7 Part (c) shows the simulation results of BEFCA with smoothing of USV kinematic model; Figure 7 Part (d) shows the simulation results of the LFWWOA-BEFCA hybrid algorithm.
[0153] exist Figure 7In part (b), it can be seen that although the blue path has not yet bypassed the obstacle, the pink path has bypassed the obstacle and is about to reach the starting point, which shows that BEFCA is better than EFCA in terms of convergence speed. Figure 7 From the final path in part (c) and part (b), it can be seen that using the USV kinematic model to optimize the turning points in the path does not lead to a significant increase in the path length, which enables the path to save energy consumption caused by USV travel while ensuring ship tracking. Figure 7 From the simulation results in part (d), we can see that after optimizing the parameters of BEFCA through the LFWWOA algorithm, the final planned path not only meets the tracking requirements of the USV, but also further shortens the path length.
[0154] In summary, using BEFCA and LFWWOA-BEFCA after smoothing the USV kinematic model to plan the path for the unmanned ship can improve the convergence speed of the basic algorithm, reduce the length of the planned path, and ensure the quality of the planned path. The method provided in this embodiment can reduce the energy consumption required for driving while meeting the real-time requirements of USV tracking, thereby increasing the effective range of ultrasonic water quality detection.
[0155] Further, this embodiment also provides an unmanned ship path planning device based on the LFWWOA-BEFCA hybrid algorithm, including a memory, a processor, and a program stored in the memory, and the processor implements one or more steps of the aforementioned method when executing the program. The processor of the device includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or computer program instructions loaded from a storage unit to a random access memory (RAM). In the RAM, various programs and data required for the operation of the device can also be stored. The CPU, ROM, and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus. Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks. The processing unit performs the various methods and processes described above, such as one or more steps in the aforementioned embodiments.
[0156] Further, the present embodiment also provides a storage medium on which a program is stored, and one or more steps of the aforementioned method are implemented when the program is executed. The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine or completely on a remote machine or server. In the context of the present invention, a computer-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk-read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0157] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A path planning method for an unmanned ship based on the LFWWOA-BEFCA hybrid algorithm, characterized in that: The following steps are involved: Obtaining environmental information of the unmanned ship; Initialize the parameters of the LFWWOA algorithm; Using the LFWWOA-BEFCA hybrid algorithm, the final unmanned ship path planning result is obtained according to the environmental information; Among them, the LFWWOA-BEFCA hybrid algorithm includes the LFWWOA algorithm and the BEFCA algorithm, the BEFCA algorithm is used to plan the path, and the LFWWOA algorithm is used to optimize the step size parameters and swing angle parameters of the BEFCA algorithm; the acquisition process of the LFWWOA algorithm includes: based on the basic whale optimization algorithm, introducing the taxed flight strategy, modifying the calculation method of the variation coefficient and adding an adaptive weighting coefficient.
2. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 1 is characterized in that: The modified calculation method of the coefficient of variation is expressed as: In the formula, represents the coefficient changing from 2 to 0, k represents the adjustment factor, t represents the current number of iterations, and t max Indicates the maximum number of iterations.
3. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 2 is characterized in that: The adaptive weighting coefficient is expressed as: w=k1×(1+cos(π×t / t max ) 4 ) In the formula, w is the weighting coefficient, k1 is the adaptive factor, t is the current number of iterations, and t max Indicates the maximum number of iterations.
4. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 3 is characterized in that: In the LFWWOA algorithm, the improved whale surrounding prey model is expressed as follows: and In the formula, represents the position vector of the whale at the next iteration t 1, and each individual whale represents a path. represents the vector of the position of a randomly selected whale in the population at the current iteration number t, represents the position vector of the whale at the current iteration number t, and are different model coefficients, r1 represents a randomly generated vector between [0,1], and Levy (ρ) represents levy flight.
5. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 4 is characterized in that: In the LFWWOA algorithm, the improved whale optimization iteration equation is: In the formula, Represents the position vector of the whale closest to the optimal path at the current iteration number t, P represents a random number in [0,1], b is a preset constant, and l represents a random number in [-1,1].
6. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 1 is characterized in that: The acquisition process of the BEFCA algorithm includes: introducing a bidirectional search mechanism based on an elastic force contraction algorithm, and using a preset unmanned ship kinematic model to smooth the path.
7. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 6 is characterized in that: The bidirectional search mechanism specifically includes, according to actual scene requirements, using a preset starting point or target point as the starting point of path planning.
8. The unmanned ship path planning method based on the LFWWOA-BEFCA hybrid algorithm according to claim 6 is characterized in that: The kinematic model of the unmanned ship is expressed as: Where ν=[u,ν,r] R The vectors representing the longitudinal velocity, transverse velocity and yaw rate of the ship in the fixed frame of the hull; η = [x, y, ψ] represents the vectors of position and heading in the earth-fixed inertial system; M, C (ν), D (ν) represent the system inertia matrix, Coriolis force centripetal force matrix and damping coefficient matrix respectively; τ = [τ u ,τ v ,τ r ] represents the control input vector; ω=[ω u ,ω v ,ω r ] are the forces and moments generated by external environmental interference.
9. An unmanned ship path planning device based on LFWWOA-BEFCA hybrid algorithm, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 8 is implemented.