A 3D-GA-based surface unmanned boat recovery path planning method and system
By introducing 3D-GA technology into unmanned boat path planning, we perform three-dimensional spatio-temporal modeling and dynamic constraint optimization, which solves the problems of low efficiency and poor planning quality of existing algorithms in complex environments, and achieves a more efficient and stable Path planning.
Patent Information
- Application Number
- CN202410961423.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-18
AI Technical Summary
In the case of complex terrain and dense obstacles, the existing path planning algorithm for unmanned vehicles has low efficiency, poor quality of planning solutions, and is easy to fall into a local minimum, and the fitness function cannot reflect the real path planning problem, resulting in inaccurate path planning. and instability.
A surface unmanned vehicle recovery path planning method based on 3D-GA is adopted, the time dimension is introduced for three-dimensional spatio-temporal environment modeling, the waypoint generation and encoding process is optimized, the initial population initialization and genetic operations are improved, and new fitness is designed based on dynamic constraints. function to increase obstacle avoidance fault tolerance and planning diversity.
It improves the accuracy and efficiency of path planning, enhances obstacle avoidance capabilities, ensures the stability and diversity of path planning, can quickly find the optimal solution in complex environments, and is suitable for dynamically changing water environments.
Smart Images

Figure CN118502450B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of navigation of unmanned water equipment, and in particular relates to a method and system for planning the recovery path of an unmanned watercraft based on 3D-GA. Background Art
[0002] With the rapid development of artificial intelligence technologies such as robotics, sensing and navigation, the research scope of disciplines such as meteorology, hydrology, and oceanography has gradually expanded. At the same time, the demand for environmental monitoring and safety prevention has also increased accordingly. As a new type of water detection tool with high efficiency, low cost and low risk, the development and research of unmanned surface vehicles (USVs) and related technologies have attracted widespread attention from the scientific community. USVs have the significant advantages of being small in size and agile in action. They can easily realize various functions by simply designing enough space to accommodate the necessary sensors and navigation aids. It is worth mentioning that due to its flexible autonomous operating system, USVs can operate in extreme environments and dangerous conditions, thereby ensuring the safety of operators.
[0003] Based on these outstanding characteristics, USV is favored in both civilian and military fields. In the research of unmanned boats, path planning problems undoubtedly occupy a core position. It relies on algorithm optimization and combines data collected in real time by sensors such as radar and optical cameras to output the best navigation path that can avoid obstacles in real time. Genetic Algorithm (GA) has good robustness and is very suitable for solving complex path planning problems. However, when performing map modeling, traditional genetic algorithms use a simple grid sequence method and use a single grid as an optional waypoint. In order to traverse all grids in detail, traditional genetic algorithms will generate lengthy compilation sequences, occupy a large amount of computer memory, limit the algorithm search efficiency, and reduce the efficiency of USV path planning. At the same time, the environmental modeling of two-dimensional sequence grids cannot effectively handle complex terrain structures. Therefore, the algorithm cannot reflect the correlation between obstacles, resulting in a lack of good execution of obstacle avoidance operations for dynamic obstacles. In addition, traditional genetic algorithms also have significant deficiencies in the generation of initial routes. Its population initialization process randomly generates a series of waypoints to form a complete planning path. This initialization method has two disadvantages: on the one hand, it is difficult to ensure the rationality of the randomly generated initial planning route; on the other hand, due to the strong randomness, the accuracy of the recovery path planned by the algorithm is difficult to improve, and the quality of the solution set of different examples varies significantly. During the genetic operation process, low-frequency random mutations lead to slow convergence of the algorithm and easy to fall into local minima. More importantly, the traditional genetic algorithm oversimplifies the design of the fitness function, often only penalizing the length of the planned path and the time spent, and using this standard to allocate the living space of individuals in the solution set. It lacks consideration of the actual planning task requirements and the unmanned boat's own dynamic characteristics, and cannot fully reflect the real path planning problem.
[0004] Through the above analysis, the problems and defects of the existing genetic algorithm applied to unmanned boat path planning are as follows: (1) Two-dimensional grid environment modeling, poor coding flexibility, low algorithm efficiency, and poor systematicity; (2) The population initialization process is highly random, which slows down the convergence process and the quality of the planning solution is low; (3) The algorithm structure causes the planning to take a long time, the diversity of the planning solution is low, and it is easy to fall into the local minimum; (4) The fitness function cannot reflect the real path planning problem, lacks consideration of task requirements and dynamic characteristics, and the planning results are unstable.
[0005] The defects and problems of the existing genetic algorithms used in unmanned boat path planning have brought about a series of technical problems in practical applications, including the following:
[0006] First, due to the limitations of two-dimensional grid environment modeling, the encoding method of the genetic algorithm is less flexible, which directly affects the efficiency of the algorithm. In the case of complex terrain and dense obstacles, the algorithm cannot effectively handle the correlation between obstacles, resulting in inaccurate path planning or failure to find a feasible path. This results in the inability of the unmanned boat to effectively avoid obstacles in practical applications, increasing the risk of collision.
[0007] Secondly, the population initialization process is too random, which not only slows down the convergence of the algorithm, but also leads to poor quality of the planning solution. In practical applications, this means that the path planning of the unmanned boat is unstable, and the results of each planning will vary greatly. The loss of stability in the planning results will reduce the reliability of the unmanned boat in practical applications.
[0008] Furthermore, the limitations of the algorithm structure lead to a long planning time, and the diversity of planning solutions is low, which is easy to fall into the local minimum. This means that when faced with complex path planning problems, the genetic algorithm cannot find the optimal solution in a short time, or the solution found is not the global optimal one. In practical applications, this leads to a decrease in the navigation efficiency of the unmanned boat, or even the inability to complete the scheduled task.
[0009] Finally, the design of the fitness function is too simplified and cannot reflect the actual path planning problem. The lack of consideration of the mission requirements and the dynamic characteristics of the unmanned boat itself makes the planning results unstable and difficult to meet the needs of practical applications. For example, the unmanned boat will be affected by natural factors such as wind, waves, and currents during navigation. These factors are often ignored in the simplified fitness function, resulting in the planned path not being applicable in actual navigation.
[0010] In summary, the defects and problems of the existing genetic algorithms used in unmanned boat path planning have brought many challenges in practical applications. In order to solve these problems, the algorithm needs to be improved and optimized to improve its performance and stability in practical applications. This includes improving the environment modeling method, optimizing the population initialization process, improving the algorithm structure, and designing a more reasonable fitness function. Through these improvement measures, it is expected to improve the accuracy and efficiency of unmanned boat path planning and promote the application and development of unmanned boats in more fields. Summary of the invention
[0011] In view of the problems existing in the prior art, the present invention provides a surface unmanned boat recovery path planning system based on 3D-GA.
[0012] The present invention is implemented as follows: a surface unmanned boat recovery path planning system based on 3D-GA (Three-Dimensional Genetic Algorithm, 3D-GA), wherein the surface unmanned boat real-time path planning method based on 3D-GA includes: on the basis of the traditional GA two-dimensional modeling method, the time dimension is introduced to establish a three-dimensional space-time environment modeling; setting the planning step length , ensure the uniformity of the generated arrangement of waypoints and optimize the encoding process; determine the obstacle representation as a plane enclosing circle, a three-dimensional oblique cylinder in space, and set the expansion coefficient , increase the radius of the obstacle encirclement circle, and improve the obstacle avoidance tolerance rate; in view of the shortcomings of the traditional GA method such as low planning efficiency and poor convergence, in terms of genetic operations, the initial population establishment process is improved to improve the quality of the parent genotype and the convergence speed; an elite retention strategy is added to prevent excellent genotypes from being eliminated during the screening process to ensure global convergence; a sacrifice strategy and intraspecific hybridization operation are introduced to reduce the number of iterations and increase the diversity of offspring genes; in terms of fitness function, combined with dynamic constraints and system requirements, quantitative indicators are improved, a new nonlinear penalty scheme is proposed, and the weight distribution of different quantitative indicators is established through simulation experiments. A multivariate evaluation mechanism is established to improve the quality of gene selection. Combined with the above measures, the convergence and robustness of the algorithm are improved, so that the planned path solution set has high-quality initial values and the optimal solution is obtained quickly.
[0013] Furthermore, the generation and encoding process of waypoints is as follows:
[0014] First, the task environment is determined as a three-dimensional geometric environment with a grid side length of h and a time dimension of seconds. In the algorithm design process, the individual gene loci of the genetic population are proposed as Points, and Points are three-dimensional waypoint coordinates (X, Y, T) that store real-time speed. The X-axis direction is proposed as the step direction, and the interval range generated by each waypoint is determined by the length of the step.
[0015] After that, assume that the starting point of the program input is PS and the end point is PE. According to different application scenarios, the step interval set for the smoothness and accuracy of the recycling planning path is , then the length N (number of gene loci) of the gene individual is calculated as follows:
[0016]
[0017] Among them, X PE is the horizontal coordinate of the end point; PS is the horizontal coordinate of the starting point; the n obtained by the equation is rounded to the nearest integer, which is the length of the gene individual N. After allocating the generation interval of the waypoint, the step length in the X-axis direction is modulo to obtain the compensation interval ; Among them, “\” is the remainder symbol, which compensates this interval to the step area generated by the first segment of gene sites.
[0018] The specific steps of the encoding process are as follows:
[0019] Step 1: Sort the different step length intervals in sequence according to the gene sequence of the gene individual, and Each unit is a step interval, and the subscript of the step interval number is i;
[0020] Step 2: Combine the map modeling range and limit the waypoint generation area. Suppose the map value range on the X axis is , and convert it into a new value range through the mapping relationship To perform binary encoding conversion. The mapping relationship and conversion requirements are as follows:
[0021]
[0022] in, is the horizontal coordinate value before mapping; is the horizontal coordinate value used to convert the binary code after mapping; It is a custom mapping rule, usually a linear mapping relationship. The horizontal coordinates of the waypoints in , after being converted to binary code for genetic operations (such as crossover and mutation), do not overflow when decoded into decimal values.
[0023] Step 3: The vertical coordinate value range of the waypoint The processing rules are as follows:
[0024]
[0025] in, is the ordinate value before mapping; is the ordinate value used to convert the binary code after mapping; is a custom mapping rule, usually a linear mapping relationship. Similarly, the vertical coordinate value range after mapping is After conversion to binary encoding for genetic operations (such as crossover and mutation), no overflow occurs when decoding to decimal values.
[0026] Step 4: Real-time speed range of waypoints The processing rules are as follows:
[0027]
[0028] in, is the real-time speed value before mapping; is the real-time speed value used to convert binary code after mapping; is a custom mapping rule, usually a linear mapping relationship. Since the change of speed in actual applications is less obvious than the change of coordinates, it is not conducive to binary code conversion, so the mapping is multiplied by the speed interval magnification factor k. Similarly, the real-time speed value range after mapping is After conversion to binary encoding for genetic operations (such as crossover and mutation), no overflow occurs when decoding to decimal values.
[0029] Step 5: Write the binary code in the order of gene loci. , , ) as an individual gene, that is, 14 binary numbers as a site, according to , ,……, Generate a binary gene sequence in the order of .
[0030] After the genetic operation completes a cycle, the real number decoding operation is performed. The specific formula is shown as follows:
[0031]
[0032] Among them, m is the number corresponding to the binary number n, and n is the number of bits in the binary sequence. is the i-th waypoint in the gene sequence; in the binary code sequence generated according to this setting, the horizontal axis corresponds to nx-bit binary numbers, the vertical axis corresponds to ny-bit binary numbers, and the real-time speed corresponds to n-nx-ny-bit binary numbers. After all gene individuals complete the genetic operation, the time corresponding to the waypoint is updated. Each navigation route is regarded as a uniform acceleration process, and the The formula is shown below.
[0033]
[0034] in, and They respectively represent the location information of the two waypoints that constitute this straight line navigation path.
[0035] Furthermore, obstacles are represented as follows:
[0036] The expression of obstacle space geometry is:
[0037]
[0038] Among them, X and Y are parameters representing spatial position information; , Represents the horizontal and vertical coordinates of the circular bounding box of the obstacle; Indicates the radius of the circular bounding box of the obstacle; , represents the moving speed of the obstacle in the x-direction and the y-direction. If the obstacle is static, then = 0m / s, = 0m / s. The recovery planning path is considered as a whole composed of each uniform acceleration process, combined with the heading angle Find out whether there is a positive integer solution about T to determine whether the obstacle is touched. The equation group is shown as follows.
[0039]
[0040] Among them, X and Y are parameters representing spatial position information; Indicates the current position of the unmanned boat; Indicates the average speed of the unmanned boat during the straight-line navigation process; and It represents the instantaneous speed of the unmanned boat at the two waypoints forming the straight line; and Represents the velocity components of the obstacle enclosing circle in the x and y directions.
[0041] Furthermore, the improved steps of population initialization are:
[0042] Step 1: When generating a single gene individual, obstacle avoidance judgment is performed in a loop, i.e., obstacle avoidance warm-up operation, to ensure that the generated path planning parent generation sample has a certain rationality;
[0043] Step 2: While generating waypoints in sequence according to the step interval, determine whether the navigation segment formed by the waypoint and the previous waypoint triggers an obstacle avoidance warning.
[0044] Step 3: If a warning is triggered, regenerate waypoints until the navigation route can safely pass through the waters within the step interval, otherwise loop until all N gene points contain a waypoint. Since the algorithm may have no solution during calculation, set the loop threshold for each gene individual in turn. , when the cycle exceeds The coordinates are randomly assigned to prevent the algorithm from crashing.
[0045] Step 4: Execute P for the above steps NUM Repeat the cycle (the number of individuals in the population set by the system) to ensure that all genetic individuals in the population are initialized;
[0046] Furthermore, the operation rules of elite retention are as follows:
[0047] When the first generation of population is generated, the fitness function of the gene individuals is calculated immediately, and some genes with good phenotypes are saved in the elite group sequence to prevent the good phenotypes of these excellent individuals from being changed during the selection process. During each generation of genetic operation, the individuals in the elite group sequence are copied to the next generation population with a probability of 1, and the elite sequence group can be continuously updated. Generally speaking, the retention ratio of the elite sequence is about 10%. The introduction of this method is conducive to improving the convergence speed of the genetic algorithm and reducing the number of iterations.
[0048] Furthermore, the improved fitness function is as follows:
[0049] (1) Quantitative indicators of planning distance
[0050]
[0051] in, is the length of a single-segment recovery path; and are the two-dimensional coordinates of the starting point and the end point respectively.
[0052] (2) Quantitative indicators of total time
[0053]
[0054] in, Planning time for a single-ended recycling path; is the time penalty for the number of step intervals.
[0055] (3) Quantitative indicators of centering
[0056]
[0057] in, is the ordinate corresponding to each waypoint.
[0058] (4) Quantitative indicators of turning angle
[0059]
[0060] in, Indicates the current heading angle of the surface unmanned vehicle.
[0061] (5) Fitness value
[0062]
[0063] in, Used to amplify the calibration effect of the fitness function; , , , are the penalty factors of their respective scalars; , , , which are obstacle avoidance constraints and dynamic constraints such as speed and acceleration for the unmanned boat.
[0064] (6) Constraints of hard indicators
[0065]
[0066] in, , , They are the set speed, maximum speed limit and minimum speed limit of the unmanned boat respectively; and The acceleration and acceleration ceiling set for the unmanned boat; This is the judgment procedure for the obstacle hitting the wall. If the above conditions are met, the corresponding penalty factor is 1, otherwise it is 0.
[0067] Furthermore, the steps of considering the sacrificial strategy and species hybridization with dynamic constraints are as follows:
[0068] Step 1: Calculate the fitness values of all individuals in the current population and select the top 10% as the elite sequence;
[0069] Step 2: Find the gene individuals whose fitness function is 0 due to failure to meet the dynamic conditions and delete their gene sequences, erase the individual information, and release the original memory;
[0070] Step 3: Combined with the obstacle avoidance condition, a new individual sequence is regenerated at the vacated position of the deleted gene individual;
[0071] Step 4: The new genetic individual follows other individuals in the population to undergo the next round of genetic hybridization.
[0072] Another object of the present invention is to provide a surface unmanned boat recovery path planning system based on 3D-GA, comprising:
[0073] The step length configuration module is used to ensure the generation and arrangement of waypoints, optimize the encoding process of waypoints, and set the coding anti-overflow rules to improve the efficiency and accuracy of path planning;
[0074] The obstacle recognition module is characterized in that the obstacle is represented in the form of a plane enclosing circle, which is expanded into an oblique cylinder in three-dimensional space. The radius of the obstacle enclosing circle is increased by setting the expansion coefficient to improve the error tolerance of obstacle avoidance.
[0075] The genetic operation module improves the initial population establishment process to improve the quality of the parent genotype and the convergence speed of the algorithm; an elite retention strategy is added to prevent excellent genotypes from being eliminated during the screening process to ensure global convergence;
[0076] The fitness function module combines dynamic constraints and system requirements, improves quantitative indicators, and proposes a new nonlinear penalty scheme. Through simulation experiments, the weight distribution of different quantitative indicators is established, and a multi-evaluation mechanism is established to improve the quality of gene selection.
[0077] The sacrifice strategy and intraspecific hybridization operation module are used to reduce the number of reproduction generations, increase the diversity of offspring genes, and improve the algorithm convergence speed and planning path quality.
[0078] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a surface unmanned boat recovery path planning method based on 3D-GA.
[0079] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0080] First, the traditional path planning algorithm is based on two-dimensional grid environment modeling, and obstacles and passable areas are represented by binary identifiers. The modeling principle dominated by the grid sequence method is simple and suitable for the algorithm simulation process, but it is not conducive to the representation of complex obstacles and related obstacle avoidance processing. Therefore, the encoding method based on this modeling requires a long genetic gene sequence, which occupies a large amount of memory and delays the calculation efficiency. In addition, the two-dimensional grid environment modeling also leads to the lack of calibration of the planned path in the time dimension, and can only be evaluated by the path driving time index, which cannot meet the real-time requirements. The present invention introduces the time dimension into the genetic algorithm, and adopts the coordinate relationship corresponding to the GPS acquisition dimension for environmental modeling. The waypoint expression form is standardized in combination with dynamic constraints, the gene sequence is simplified, and the corresponding relationship between it and the time coordinate is strengthened, thereby improving the calibration degree. For irregular obstacles in real scenes, the present invention adopts an enclosing circle with a compensation radius to represent them, which increases the obstacle avoidance tolerance while simplifying the calculation.
[0081] When the traditional genetic algorithm performs population initialization, a fixed number of random points are generated. Although this method is fast, it takes a huge amount of iteration time to compensate for obtaining the desired solution. In addition, when performing simulation experiments, the quality of the initial population generated by population initialization is positively correlated with the quality of the final output solution of the algorithm, and negatively correlated with the number of iterations required, indicating that the population initialization process will greatly affect the quality of the path planning solution. Therefore, based on the environmental modeling that introduces the time dimension, the present invention adds obstacle avoidance preheating during population initialization to improve the quality of the initial population. In order to prevent the algorithm from taking a long time to search for feasible solutions when generating the initial population, resulting in process delays, the present invention designs a cycle threshold when generating a single gene sequence. When a gene fragment has no solution found yet, the coordinates of each waypoint in the sequence are randomly generated. Simulation experiments show that the improvement of population initialization has a significant impact on the average value of the fitness function of the offspring.
[0082] The genetic operation process is the key mechanism for the genetic algorithm to iterate the solution set, reflecting the rules and processes of screening. Since the genetic algorithm is essentially an analogy process for the reproduction rules of biological communities, it has the characteristics of strong randomness and low probability when taking mutation operations on gene individuals. Under normal circumstances, only about 0.1% of the gene fragments of 1-2% of the gene individuals will change. Such rules lead to the low convergence speed of the genetic algorithm and the loss of high-quality gene sequences. In recent years, many researchers have increased this ratio and adopted an elite retention strategy to prevent gene individuals with excellent phenotypes from mutating during the screening process. On this basis, the present invention adds a screening rule based on the dynamic characteristic constraints of the unmanned boat on the water surface, and uses whether this rule is met as a criterion for whether the individual can adapt to the environment. The screening is carried out by simulating the idea of "survival of the fittest" in the biological world, and the memory of the dead individuals is released through the algorithm, and new individuals are regenerated and intraspecific hybridization is performed again. The present invention defines this method as a "sacrifice strategy". Through this method, the time and space complexity of the algorithm will not increase, the screening mechanism of genetic operations is more mature, and the generated solution set is more in line with practical dynamic applications. The introduction of sacrifice strategy and intraspecific hybridization also increases the species diversity of offspring, which is conducive to the expansion of the solution set and improves the convergence efficiency of the algorithm.
[0083] The fitness function provides the principle of solution set iteration for the genetic algorithm, which is related to the execution efficiency and solution set quality of the genetic algorithm. The design essence of the fitness function is to amplify the originally small differences between individuals in the population through calibration and dynamic mapping, so that it is easier to show the excellent differences in phenotypes between different individuals, and better select genetic individuals that meet the requirements. In view of the limitations of fitness function evaluation indicators and complex calculations in traditional genetic algorithms, the present invention improves the fitness function in form and content, adopts weight functions and customized dimensionless evaluation indicators, and comprehensively evaluates dynamic constraints, path length, time consumption and other aspects, which is conducive to selecting excellent genetic individuals from multiple indicators, ensuring that the generated planning path is not only superior in time and distance, thereby promoting the planning of high-quality paths. In other application environments, the evaluation indicators in the fitness function can be modified, and the appropriate weight coefficients can be determined through simulation experiments to meet the task requirements under different conditions.
[0084] Second, the present invention introduces the time dimension into the rectangular coordinate grid map to construct a three-dimensional environmental modeling, simplifies the generation method of genetic algorithm population individuals and trajectories, and further optimizes the encoding method by combining reasonable step size allocation and anti-overflow base conversion, laying the foundation for the simplification of genetic operations. On this basis, combined with the obstacle modeling of the circular bounding box, the idea of size expansion and radius compensation is added to ensure the safety of path generation. In terms of the movement rules and obstacle avoidance of the surface unmanned boat, different collision avoidance strategies are designed for dynamic and static obstacles respectively, which optimizes the safety of the trajectory and ensures the real-time performance of the genetic algorithm planning process.
[0085] The present invention optimizes the operation process of genetic algorithm in path planning application on the basis of improving the probability of gene mutation and adding elite retention strategy. Through obstacle avoidance preheating, the genotype quality of the first-generation population individuals generated in the population initialization process is improved, the population convergence speed is accelerated, and the foundation for good quality path planning solutions is laid. By simulating the principle of natural survival and elimination in biological communities, a sacrifice strategy is proposed in combination with adaptability indicators and dynamic constraints, which effectively releases the memory of poor gene individuals and regenerates new individuals for intraspecific hybridization, thereby improving the convergence rate and the diversity of offspring gene individuals.
[0086] The present invention sets a new linear fitness relationship based on the penalty of the total distance, time, alignment and turning angle of the recovery planning, combined with the constraint obstacle avoidance conditions and the surface unmanned boat dynamics constraints. It solves the problem of single evaluation index of the traditional recovery planning algorithm for multi-task purposes and improves the quality of the planning solution.
[0087] Third, the technical solution proposed by the present invention improves the time calibration of the genetic algorithm in the path planning problem by improving the environmental modeling, and overcomes the problem of poor real-time performance of the genetic algorithm in path planning. By improving the operation process of the genetic algorithm, the convergence and iteration speed of the genetic algorithm is accelerated, the genotype quality of the parent generation of the population and the genotype diversity of the offspring are improved, and the storage space of the gene individuals with poor phenotypes is effectively released, overcoming the problems of slow convergence speed and large computing memory when the genetic algorithm is applied to path planning.
[0088] Fourth, the real-time path planning system for unmanned surface boats based on 3D-GA has brought the following technological advances:
[0089] 1. Three-dimensional environment modeling: Traditional genetic algorithms use grid methods, which affect computing memory and planning efficiency and are not conducive to dynamic planning. This system introduces three-dimensional environment modeling combined with the representation of moving obstacles in space, improves planning accuracy, and achieves real-time dynamic planning.
[0090] 2. Improvement of the genotype quality of the first-generation population: An obstacle avoidance warm-up step is added during the population initialization process to improve the genotype quality of the first-generation population, thereby increasing the convergence speed of the algorithm.
[0091] 3. Anti-overflow of coding conversion: Taking the planning task distance within 100 meters as an example, this paper designs a set of coding conversion rules applied to the three-dimensional coordinate system to ensure that after the genetic algorithm mutates, the binary gene sequence is converted into actual coordinates without overflow. This provides a way to ensure the robustness of the system when the genetic algorithm is applied to path planning, making the planning results more stable.
[0092] 4. Sacrifice strategy and intraspecific hybridization: Simulate the process of “birth, aging, illness and death” of individuals in natural biological populations, add dynamic constraint control, ensure that the generated recycling planning path is practical and operational, and improve the diversity of planning solutions.
[0093] 5. Improvement of fitness function: Introduce dynamic constraints, design multiple evaluation indicators, and combine weight distribution to transform non-single linear problems into linear problems, effectively deal with the planning tasks of the target, and improve planning accuracy.
[0094] The 3D-GA-based surface unmanned boat recovery path planning method provided by the present invention improves the efficiency, accuracy and stability of the unmanned boat path planning system.
[0095] Fifth, the 3D-GA-based surface unmanned boat recovery path planning system provided by the present invention introduces the time dimension to perform three-dimensional space-time environment modeling and optimizes various operations and fitness functions of the genetic algorithm, thereby bringing about technical effects in industrial applications, including:
[0096] 1. Improve path planning efficiency: By setting the planning step size and optimizing the encoding process, the uniformity of waypoint generation is ensured, which significantly improves the efficiency of path planning. At the same time, the optimized genetic operation and the introduced elite retention strategy and sacrifice strategy reduce the number of iterations and accelerate the search process for the optimal solution.
[0097] 2. Enhanced obstacle avoidance capability: Determine the three-dimensional oblique cylindrical representation of obstacles and set the expansion coefficient, which effectively increases the obstacle avoidance tolerance rate. This means that the unmanned boat has higher safety in complex water environments and can effectively avoid collisions with obstacles.
[0098] 3. Improve the quality of path planning: Through the improved initial population establishment process and the introduction of intraspecific hybridization operations, the diversity of offspring genes is increased, so that the planned path solution set has high-quality initial values. Combining dynamic constraints with system requirements, improved quantitative indicators and new nonlinear penalty schemes, the fitness function is optimized, so that the quality of gene selection is improved.
[0099] 4. Optimize dynamic planning capabilities: The introduction of three-dimensional spatiotemporal environment modeling with time dimension and three-dimensional waypoint coordinate setting with real-time speed enables the algorithm to perform real-time path planning for dynamically changing environments, thus improving the adaptability of the unmanned boat to environmental changes and the flexibility of task execution.
[0100] 5. Enhance the robustness and global convergence of the algorithm: The elite retention strategy prevents excellent genotypes from being eliminated during the screening process. The sacrificial strategy and intraspecific hybridization operation work together to ensure the robustness and global convergence of the algorithm, effectively improving the algorithm's ability to solve practical problems.
[0101] 6. Broad application prospects: This path planning system is not only suitable for the recovery mission of surface unmanned boats, but can also be applied to other marine operations, search and rescue, marine observation and other fields, and has broad industrial application prospects.
[0102] Through the improvement of these technical effects, the surface unmanned boat recovery path planning system based on 3D-GA provided by the present invention has significant advantages in improving safety, efficiency, path planning quality and dynamic planning capabilities, and provides an efficient and robust solution for the path planning of surface unmanned boats and other marine equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] Figure 1 It is a schematic diagram of a method for planning a recovery path of an unmanned surface boat based on 3D-GA provided in an embodiment of the present invention;
[0104] Figure 2 It is a flow chart of a method for planning a recovery path of an unmanned surface boat based on 3D-GA provided in an embodiment of the present invention;
[0105] Figure 3 It is a comparison diagram of the number of population iterations and fitness function values of the surface unmanned boat recovery path planning method based on 3D-GA provided by an embodiment of the present invention and the traditional genetic algorithm;
[0106] Figure 4 is an execution flow chart of the genetic algorithm defined in the 3D-GA based surface unmanned boat recovery path planning method provided by an embodiment of the present invention;
[0107] Figure 5 It is the path planning result output by the simulation experiment of the method for surface unmanned boat recovery path planning based on 3D-GA provided in the embodiment of the present invention, wherein the dotted circle represents a dynamic obstacle and the solid circle represents a static obstacle;
[0108] Figure 6 It is a comparison diagram of the simulation experiment output results of the 3D-GA-based unmanned surface boat recovery path planning method (control group) and the unmodified genetic algorithm (experimental group) provided in an embodiment of the present invention;
[0109] Figure 7 It is a line graph showing the effect of population initialization improvement on the average fitness function value of offspring in the surface unmanned boat recovery path planning method based on 3D-GA provided in an embodiment of the present invention;
[0110] Figure 8 is a comparison diagram of the actual trajectory of the unmanned boat and the simulation result under the surface unmanned boat recovery path planning method based on 3D-GA provided by an embodiment of the present invention;
[0111] Fig. 9 It is a speed comparison diagram of the actual trajectory of the unmanned boat and the simulation result under the surface unmanned boat recovery path planning method based on 3D-GA provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0112] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0113] Two specific application examples of the embodiment of the present invention are:
[0114] Example 1: Dynamic obstacle avoidance path planning
[0115] In busy ports, unmanned surface vessels need to avoid moving vessels and other obstacles in real time when performing missions such as cargo transportation or search and rescue, without having to consider the International Regulations for Preventing Collisions at Sea (COLREGS).
[0116] Three-dimensional spatiotemporal environment modeling: First, based on real-time ocean and weather forecast data, a three-dimensional model including the time dimension is established, in which obstacles (such as other ships) are abstracted into dynamically changing three-dimensional oblique cylinders according to the modeling rules of algorithmic obstacles.
[0117] Path planning and optimization: Using the 3D-GA method, with the current position of the unmanned boat as the starting point and the target location as the end point, combined with the real-time information of other ships and moving obstacles, and according to the step-length division rule, the gene individual point position and waypoint coordinate allocation are reasonably designed to ensure the feasibility and safety of the path. Perform population initialization to generate the initial path solution set.
[0118] Genetic algorithm iterative optimization: Through the selection, crossover, mutation and other operations in the genetic algorithm, the path solution set is continuously optimized. The elite retention strategy is introduced to ensure that excellent genotypes are not eliminated. At the same time, the sacrifice strategy and intraspecific hybridization are applied to increase gene diversity and quickly converge to the optimal path.
[0119] Combined with the control module algorithm, the unmanned boat can adjust its path in real time to avoid suddenly appearing ships or other obstacles and maintain efficient and safe navigation, which is particularly suitable for complex and busy port water environments.
[0120] Example 2: Emergency recovery path planning
[0121] When an unmanned boat performing a mission at sea encounters an emergency (such as system failure or bad weather), it needs to return to the base or a designated safe area immediately.
[0122] 3D modeling in emergency situations: In emergency recovery mode, the system quickly obtains ocean and weather conditions by combining information collected by its own sensing equipment or information transmitted by the communication module, constructs a 3D environmental model including the time dimension, and identifies surrounding obstacles and accessible safe areas.
[0123] Fast path generation and optimization: Using the 3D-GA method, the starting point and target point of the path planning are determined based on the current position of the unmanned boat and the predetermined safety area, and the initial recovery path is generated. The algorithm optimizes the generation and encoding process of waypoints and combines the obstacle avoidance algorithm to ensure the effectiveness of the emergency evacuation route and ensure the rapid generation and reliability of the path in an emergency.
[0124] Adaptive path adjustment: Combined with dynamic constraints and system requirements, the fitness function takes into account the safety, shortest time and minimum energy consumption of the path. Based on the fitness function value, the genetic operation is repeatedly iterated to generate the current optimal path. Combined with the updated environmental information, the path is continuously adjusted and optimized to ensure that the unmanned boat arrives at the safe area safely and on time.
[0125] In view of the problems existing in the prior art, the technical solution adopted by the present invention is:
[0126] Three-dimensional spatiotemporal environment modeling with time dimension: Traditional path planning is usually based on a two-dimensional plane, taking into account the spatial distribution of obstacles and target points. This invention constructs a three-dimensional spatiotemporal model by adding the time dimension, which can better simulate path planning problems in dynamic environments, such as considering factors such as water flow changes and the movement of other ships.
[0127] Setting of planning step length and optimization of waypoint generation: By setting an appropriate step length, we can ensure the reasonable generation and arrangement of waypoints, optimize the encoding process, and improve the accuracy and efficiency of path planning.
[0128] 3D representation and expansion coefficient of obstacles: The obstacles are represented as 3D oblique cylinders, and the obstacle avoidance area around the obstacles is increased by setting the expansion coefficient, thereby improving the error tolerance of obstacle avoidance and enhancing the safety of path planning.
[0129] Improvement of genetic operations: By improving the process of establishing the initial population, the quality of the parent genotype and the convergence speed of the algorithm are improved; an elite retention strategy is introduced to prevent excellent genotypes from being eliminated during the screening process to ensure global convergence.
[0130] Improvement of fitness function and multi-evaluation mechanism: Combined with dynamic constraints and system requirements, the quantitative indicators in the fitness function are improved, and a new nonlinear penalty scheme is proposed. Through simulation experiments, the weight distribution of different quantitative indicators is determined, and a multi-evaluation mechanism is established to improve the quality of gene selection.
[0131] Sacrifice strategy and intraspecific hybridization operation: Introduce sacrifice strategy and intraspecific hybridization operation to reduce the number of reproduction generations, increase the diversity of offspring genes, and improve the algorithm's search ability and solution diversity.
[0132] In view of the problems existing in the prior art, the present invention provides a method, system, device and terminal for planning the recovery path of an unmanned surface boat based on 3D-GA. The present invention is described in detail below in conjunction with the accompanying drawings.
[0133] like Figure 1 As shown, the schematic diagram of the surface unmanned boat recovery path planning method based on 3D-GA provided in an embodiment of the present invention includes the following steps:
[0134] S101, introduce the time dimension T, initialize the planning map and input the obstacle motion information, determine the dynamic constraints and task planning indicators, divide the waypoint generation interval according to the step length, determine the number of individuals in the population, and initialize the population in combination with the obstacle avoidance warm-up measures;
[0135] S102, calculate the fitness values of individuals in the population, retain the gene information of the top 10% individuals in the fitness function value, conduct tournament selection, convert the gene sequence into binary for genetic mutation, and restore it to decimal after completion, calculate the new fitness value and sort;
[0136] S103, if the maximum fitness value is greater than the screening threshold, output the waypoint information of the gene individual; otherwise, perform the sacrifice strategy and intraspecific hybridization, and repeat S102;
[0137] Step 1: Initialize the planning map, set obstacle information, and clarify the starting and ending points.
[0138] The task environment is defined as a three-dimensional geometric environment with a grid side length of h and a time dimension of seconds. In the algorithm design process, the gene individual loci of the genetic population are defined as Point, which is a three-dimensional waypoint coordinate (X, Y, T) storing the real-time speed. The length N (number of gene loci) of the gene individual is calculated as follows:
[0139]
[0140] Among them, X PE is the horizontal coordinate of the end point, X PS is the horizontal coordinate of the starting point, is the step interval; the n obtained by the equation is rounded down to the smallest integer, which is the length N of the gene individual. After allocating the generation interval of the waypoint, the step length in the X-axis direction is modulo to obtain the compensation interval ; Among them, “\” is the remainder symbol, which compensates this interval to the step area generated by the first segment of gene sites.
[0141] The expression of obstacle space geometry is:
[0142]
[0143] Among them, X and Y are parameters representing spatial position information; , Represents the horizontal and vertical coordinates of the circular bounding box of the obstacle; Indicates the radius of the circular bounding box of the obstacle; , represents the moving speed of the obstacle in the x-direction and the y-direction. If the obstacle is static, then = 0m / s, = 0m / s.
[0144] The recovery planning path is considered as a whole composed of each uniform acceleration process, combined with the heading angle Find out whether there is a positive integer solution about T to determine whether the obstacle is touched. The equation group is shown as follows.
[0145]
[0146] Among them, X and Y are parameters representing spatial position information; Indicates the current position of the unmanned boat; Indicates the average speed of the unmanned boat during the straight-line navigation process; and It represents the instantaneous speed of the unmanned boat at the two waypoints forming the straight line; and Represents the velocity components of the obstacle enclosing circle in the x and y directions.
[0147] Step 2: Initialize the population and generate genetic individuals that have the ability to avoid obstacles. Place the three-dimensional coordinates of the waypoints into the gene sequence in sequence for chromosome encoding.
[0148] While generating waypoints in sequence according to the step interval, determine whether the navigation segment formed by this waypoint and the previous waypoint triggers an obstacle avoidance warning. If a warning is triggered, regenerate the waypoint until the navigation route can safely pass through the waters within the step interval, otherwise loop until all N gene points contain a waypoint. Since the algorithm may have no solution during calculation, set the loop threshold for each gene individual in turn. , when the cycle exceeds The coordinates are randomly assigned to prevent the algorithm from crashing.
[0149] Step 3: Calculate the fitness function value, perform elite retention operations and tournament selection.
[0150] According to the fitness function value, the top 10% of gene individuals are selected for elite retention to prevent the loss of excellent phenotypes in the later genetic operation process. Then, 2% of the samples are used as the number of genes contained in each group to compete in the championship, and the better individuals are selected as the new genetic population offspring.
[0151] Step 4: Perform genetic operations.
[0152] Perform binary encoding and operate in conjunction with an anti-overflow encoding mechanism.
[0153] Mutation operations are divided into random mutation and uniform mutation. The former is to randomly specify one or several gene sites and replace the coding numbers on them; the latter is similar to uniform crossover, and each gene site has the same probability P of code replacement.
[0154] The performance of selection, crossover, and mutation operations in genetic algorithms all depend on their probabilities to a certain extent. Taking the roulette wheel selection method as an example, if the fitness value is used as the criterion for selecting the winning gene individual, the probability P of each gene individual being selected is ti Then .in Indicates the fitness function value of a single individual. In crossover operations, the probability is usually set between 0.6 and 0.8. The probability of gene mutation is relatively small, generally around 0.001 to 0.03.
[0155] Decoding is performed after completing crossover, mutation and other recombination operations. The decoding relationship is as follows:
[0156]
[0157] Among them, m is the number corresponding to the binary number n, and n is the number of bits in the binary sequence. is the i-th waypoint in the gene sequence; in the binary code sequence generated according to this setting, the horizontal axis corresponds to an nx-bit binary number, the vertical axis corresponds to a ny-bit binary number, and the real-time speed corresponds to an n-nx-ny-bit binary number.
[0158] Step 5: Calculate the fitness function of all gene individuals, check the dynamic constraints of the surface unmanned vehicle, and determine whether there is an optimal solution that meets the conditions. If yes, output the optimal path; if not, execute step 6.
[0159] (1) Quantitative indicators of planning distance
[0160]
[0161] in, is the length of a single-segment recovery path; and are the two-dimensional coordinates of the starting point and the end point respectively.
[0162] (2) Quantitative indicators of total time
[0163]
[0164] in, Planning time for a single-ended recycling path; is the time penalty for the number of step intervals.
[0165] (3) Quantitative indicators of centering
[0166]
[0167] in, is the ordinate corresponding to each waypoint.
[0168] (4) Quantitative indicators of turning angle
[0169]
[0170] in, Indicates the current heading angle of the surface unmanned vehicle.
[0171] (5) Fitness value
[0172]
[0173] in, Used to amplify the calibration effect of the fitness function; , , , are the penalty factors of their respective scalars; , , , which are obstacle avoidance constraints and dynamic constraints such as speed and acceleration for the unmanned boat.
[0174] (6) Constraints of hard indicators
[0175] ;
[0176] in, , , They are the set speed, maximum speed limit and minimum speed limit of the unmanned boat respectively; and The acceleration and acceleration ceiling set for the unmanned boat; This is the judgment procedure for the obstacle hitting the wall. If the above conditions are met, the corresponding penalty factor is 1, otherwise it is 0.
[0177] Step 6: Implement sacrifice strategy and intraspecific hybridization.
[0178] like Figure 4 As shown, after selecting and preserving the elite group, find the gene individuals whose fitness function is 0 due to failure to meet the dynamic conditions and delete their gene sequences; combine the obstacle avoidance conditions to regenerate the sequence at the vacated position of the deleted gene individuals; the new gene individuals follow other individuals in the population for the next round of genetic hybridization.
[0179] Repeat steps three to five.
[0180] The specific steps of the 3D-GA unmanned boat emergency recovery path planning provided by the embodiment of the present invention are as follows:
[0181] Step 1: Initialize the planning map, set four dynamic and static obstacles respectively, and clarify the starting point and end point.
[0182] Set the map to a square water area with a side length of 100m, and the grid side length h is set to 1m. The north direction is set as the X direction, and the east direction is the Y axis. The Y axis is the left boundary of the water area, and the origin (0, 0) is located at the midpoint of the left boundary, which is set as the planning end point. In this example, the starting point is set to (85, 10). The obstacle information is shown in Table 1.
[0183] Table 1 List of obstacle location information and dynamic parameter design
[0184]
[0185] Step 2: Initialize the population and generate genetic individuals that have the ability to avoid obstacles. Place the three-dimensional coordinates of the waypoints into the gene sequence in sequence for chromosome encoding.
[0186] The operating constants for the genetic algorithm are set to: population size , maximum number of iterations , population initialization restriction parameter , crossover probability , where the ratio of the transformation probability of single-point crossover, two-point crossover and average crossover is , the probability of a single point mutation in a gene .
[0187] In chromosome encoding, the coordinate transformation mapping rule of waypoints is set as:
[0188]
[0189] The initial value range of the X axis is [0,100]; the initial value range of the Y axis is [-63,63], to ensure that the binary code is 7 bits and there is no overflow after decoding, but the vertical coordinate generation range of the waypoint is limited to [-50,50]; the real-time speed is [0.2,3.0] m / s according to the hardware requirements of the unmanned boat. nx=3, ny=7, n=11.
[0190] The formula for decoding binary code into decimal is as follows:
[0191]
[0192] Step 3: Calculate the fitness function value, perform elite retention operations and tournament selection.
[0193] The fitness function parameters are set as: , , , , . Number of genetic individuals in the tournament competition group , the elite retains a group of ten genetic individuals.
[0194] Step 4: Perform genetic operations.
[0195] This part performs gene mutation, single point, two point and average mutation. It is converted to binary before mutation. After mutation, it is converted to decimal.
[0196] Step 5: Calculate the fitness function of all gene individuals, check the dynamic constraints of the surface unmanned vehicle, and determine whether there is an optimal solution that meets the conditions. If yes, output the optimal path; if not, execute step 6.
[0197] In the dynamic constraints, the maximum speed is set to 3m / s, the maximum acceleration is set to 0.2m / s, and the minimum rotation angle constraint is not less than 100°.
[0198] Step 6: Implement sacrifice strategy and intraspecific hybridization.
[0199] The fitness function of individual genes that do not meet the dynamic constraints is 0. The algorithm releases this part of the memory and reallocates it to generate gene sequences.
[0200] Repeat steps three to five.
[0201] The present invention designs a systematic control experiment to verify the overall improvement effect of several optimization methods on the genetic algorithm. In order to prevent the observation difference caused by different modeling environments, the experimental examples are all based on three-dimensional environment and rectangular coordinate modeling.
[0202] The output results of the path planning simulation experiment implemented according to the method of the present invention are as follows: Figure 5 The comparison results of the simulation experiment are shown in Figure 6 As shown, the experimental group is the result output by the traditional genetic algorithm, and the control group is the result output by the complete 3D-GA method. Figure 7 This is the result of the impact of population initialization on the average fitness function value of individuals in the offspring population. Figure 8 The comparison between the planned path and the actual application water scene is shown. Fig. 9 The relationship between the actual planned speed and the simulated speed is shown.
[0203] Depend on Figure 6 It can be seen that the unimproved genetic algorithm has a more scattered longitudinal distribution of waypoints due to the strong randomness of the initialization process. Especially in the process of aligning with the stern slide, the rear end of the path generated by the unimproved genetic algorithm does not tend to gradually approach the central axis of the stern slide, which is not conducive to the execution of the recovery action. In terms of path length, due to the large number of corners, the length of the planned path is greatly increased and does not converge to the expected range.
[0204] Figure 7It shows that the example using population initialization optimization has a better average fitness function value in the first generation (iteration number is 1), and the qualitative change occurs earlier than the experimental group.
[0205] The results of multiple simulation experiments show that the average calculation time used by 3D-GA is 2.067s, and the average calculation time consumed by the experimental group is 10.846s, which improves the calculation efficiency by 80.9423%. The average corresponding indicators of each fitness function are shown in Table 2.
[0206] Table 2 Comparison of average values of evaluation function indicators between the experimental group and the control group
[0207]
[0208] Depend on Figure 8 It can be seen that in the actual environment, the corner disadvantage of the planned path will be magnified. The part of the track from the starting point to the center axis of the stern slide has a larger corner than the planned path. In addition, due to the actual track process, the change of the heading angle and the actual path forward are in a coexistent relationship. After the track on one side of the corner is offset, it takes a certain amount of time to return to the original planned route. Therefore, there is a larger corner disadvantage than the planned path. Fig. 9 The actual track has a high degree of overlap with the planned track. Although part of the path is offset due to strong winds and waves, the overall speed tends to be stable at around 2.0m / s.
[0209] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0210] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A 3D-GA based method for planning the recovery path of an unmanned surface vehicle, characterized in that: include: Step 1: Initialize the planning map, set obstacle information, and clarify the starting and ending points; Step 2: Initialize the population, generate genetic individuals that have the ability to avoid obstacles, and sequentially place the three-dimensional coordinates of the waypoints into the gene sequence for chromosome encoding; Step 3: Calculate the fitness function value, perform elite retention and tournament selection; Step 4: Perform genetic operations; Step 5: Calculate the fitness function of all gene individuals, check the dynamic constraints of the surface unmanned vehicle, and determine whether there is an optimal solution that meets the conditions; if so, output the optimal path; if not, execute step 6; Step 6: Perform sacrifice strategy and intraspecific hybridization; The process of generating and encoding waypoints is as follows: First, the task environment is determined as a three-dimensional geometric environment with a grid side length of h and a time dimension of seconds. In the algorithm design process, the gene individual loci of the genetic population are proposed as Points, which are three-dimensional waypoint coordinates (X, Y, T) storing real-time speed. The X-axis direction is proposed as the step direction, and the interval range generated by each waypoint is determined by the length of the step. After that, assuming that the starting point of the program input is PS and the end point is PE, according to different application scenarios, the step interval set for the smoothness and accuracy of the recycling planning path is , then the length N of the gene individual is calculated as follows: ; Among them, X PE is the horizontal coordinate of the end point; PS is the horizontal coordinate of the starting point; the n obtained by the equation is rounded to a smaller integer, which is the length N of the gene individual; after allocating the generation interval of the waypoint, the step length in the X-axis direction is modulo to obtain the compensation interval ; Wherein, "\" is the remainder symbol, which compensates the interval to the step length region generated by the first segment of gene loci; The specific steps of the encoding process are as follows: Step 1: Sort the different step length intervals in sequence according to the gene sequence of the gene individual, and Each unit is a step interval, and the subscript of the step interval number is i; Step 2: Combine the map modeling range and limit the waypoint generation area; let the map value range on the X-axis be , through the mapping relationship to convert it into a new value range To perform binary encoding conversion; the mapping relationship and conversion requirements are as follows: ; in, is the horizontal coordinate value before mapping; is the horizontal coordinate value used to convert the binary code after mapping; It is a custom mapping rule, which is a linear mapping relationship; it is located in the interval The horizontal coordinates of the waypoints in , after being converted into binary codes for genetic operations, do not overflow when decoded into decimal values; Step 3: The vertical coordinate value range of the waypoint The processing rules are as follows: ; in, is the ordinate value before mapping; is the ordinate value used to convert the binary code after mapping; is a custom mapping rule, which is a linear mapping relationship; similarly, the vertical coordinate value range after mapping After conversion to binary code for genetic operations, no overflow occurs when decoding to decimal values; Step 4: Real-time speed range of waypoints The processing rules are as follows: ; in, is the real-time speed value before mapping; is the real-time speed value used to convert binary code after mapping; is a custom mapping rule, which is a linear mapping relationship. Since the change of speed in actual application is less obvious than the change of coordinates, it is not conducive to binary code conversion. Therefore, the mapping is multiplied by the speed interval magnification factor k. Similarly, the real-time speed value interval after mapping is After conversion to binary code for genetic operations, no overflow occurs when decoding to decimal values; Step 5: Write the binary code in the order of gene loci. , , ) as a target as a whole, that is, 14 binary numbers as a site, according to , ,……, Generate a binary gene sequence in the order of; After the genetic operation completes a cycle, the real number decoding operation is performed. The specific formula is shown as follows: ; Among them, m is the number corresponding to the binary number n, and n is the number of bits in the binary sequence. is the i-th waypoint in the gene sequence; in the binary code sequence generated according to this setting, the horizontal axis corresponds to nx-bit binary numbers, the vertical axis corresponds to ny-bit binary numbers, and the real-time speed corresponds to n-nx-ny-bit binary numbers; after all gene individuals complete the genetic operation, the time corresponding to the waypoint is updated, and each navigation route is regarded as a uniform acceleration process to obtain the time corresponding to the waypoint The formula is as follows: ; in, and Respectively represent the location information of two waypoints constituting the straight line navigation path; The improved fitness function is as follows: (1) Quantitative indicators of planning distance ; in, is the length of a single-segment recovery path; and are the two-dimensional coordinates of the starting point and the end point respectively; (2) Quantitative indicators of total time ; in, Planning time for a single-ended recycling path; is the time penalty for the number of step intervals; (3) Quantitative indicators of centering ; in, is the ordinate corresponding to each waypoint; (4) Quantitative indicators of turning angle ; in, Indicates the current heading angle of the surface unmanned boat; (5) Fitness value ; in, Used to amplify the calibration effect of the fitness function; , , , are the penalty factors of their respective scalars; , , , which are obstacle avoidance constraints, speed and acceleration dynamics constraints for the unmanned boat respectively; (6) Constraints of hard indicators ; in, , , They are the set speed, maximum speed limit and minimum speed limit of the unmanned boat respectively; and The acceleration and acceleration ceiling set for the unmanned boat; This is the judgment procedure for the obstacle hitting the wall. If the above conditions are met, the corresponding penalty factor is 1, otherwise it is 0.
2. The 3D-GA-based surface unmanned boat recovery path planning method according to claim 1, characterized in that: Obstacles appear as follows: The expression of obstacle space geometry is: ; Among them, X and Y are parameters representing spatial position information; , Represents the horizontal and vertical coordinates of the circular bounding box of the obstacle; Indicates the radius of the circular bounding box of the obstacle; , represents the moving speed of the obstacle in the x-direction and the y-direction; if the obstacle is static, then =0m / s, = 0m / s, the recovery planning path is regarded as a whole composed of each uniform acceleration process, combined with the heading angle Solve the equations to see if there is a positive integer solution about T to determine whether the obstacle is touched. The equations are as follows: ; Among them, X and Y are parameters representing spatial position information; Indicates the current position of the unmanned boat; Indicates the average speed of the unmanned boat during the straight-line navigation process; and It represents the instantaneous speed of the unmanned boat at the two waypoints forming the straight line; and Represents the velocity components of the obstacle enclosing circle in the x and y directions.
3. The 3D-GA based unmanned surface boat recovery path planning method according to claim 1, characterized in that: The improved steps for population initialization are: Step 1: When generating a single gene individual, obstacle avoidance judgment is performed directly in the loop, and obstacle avoidance warm-up operation is performed to ensure that the generated path planning parent generation sample has a certain rationality; Step 2: while generating waypoints in sequence according to the step length interval, determine whether the navigation segment formed by the waypoint and the previous waypoint triggers an obstacle avoidance warning; Step 3: If a warning is triggered, regenerate waypoints until the navigation route can safely pass through the waters within the step interval. Otherwise, loop until all N gene points contain a waypoint. Since the algorithm may have no solution during calculation, set the loop threshold for each gene individual in turn. , when the cycle exceeds The second step is to randomly assign coordinates to prevent the algorithm from crashing; Step 4: Execute P for the above steps NUM Second cycle to ensure that all gene individuals in the population are initialized; P NUM The number of individuals in the population set for the system.
4. The method for planning the recovery path of an unmanned surface vehicle based on 3D-GA as claimed in claim 1, characterized in that: The operating rules of elite retention are as follows: When generating the first generation population, the fitness function of the gene individuals is calculated, and some genes with good phenotypes are saved in the elite group sequence to prevent the good phenotypes of these excellent individuals from being changed during the selection process. In each generation of genetic operations, the individuals in the elite group sequence are copied to the next generation population with a probability of 1, and the elite sequence group can be continuously updated.
5. The method for planning the recovery path of an unmanned surface vehicle based on 3D-GA as claimed in claim 1, characterized in that: The steps of the sacrificial strategy and intraspecific hybridization considering dynamic constraints are as follows: Step 1: Calculate the fitness values of all individuals in the current population and select the top 10% as the elite sequence; Step 2: Find the gene individuals whose fitness function is 0 due to failure to meet the dynamic conditions and delete their gene sequences; Step 3: Combined with the obstacle avoidance condition, regenerate the sequence at the vacated individual position of the deleted gene; Step 4: The new genetic individual follows other individuals in the population to undergo the next round of genetic hybridization.
6. A 3D-GA based water surface unmanned boat recovery path planning system according to the method of claim 1, characterized in that: include: The step length configuration module is used to ensure the generation and arrangement of waypoints, optimize the encoding process of waypoints, and set the coding anti-overflow rules to improve the efficiency and accuracy of path planning; Obstacle recognition module: obstacles are represented in the form of a plane enclosing circle, which is expanded into an oblique cylinder in three-dimensional space. The radius of the original obstacle enclosing circle is increased by setting the expansion coefficient to improve the error tolerance of obstacle avoidance. The genetic operation module improves the initial population establishment process to improve the quality of the parent genotype and the convergence speed of the algorithm; an elite retention strategy is added to prevent excellent genotypes from being eliminated during the screening process to ensure global convergence; The fitness function module combines dynamic constraints and system requirements, improves quantitative indicators, and proposes a new nonlinear penalty scheme. Through simulation experiments, the weight distribution of different quantitative indicators is established, and a multi-evaluation mechanism is established to improve the quality of gene selection. Sacrifice strategy and intraspecific hybridization operation module are used to reduce the number of reproduction generations and increase the diversity of offspring genes.
7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the surface unmanned boat recovery path planning method based on 3D-GA as claimed in claim 1.
