Intelligent car path planning method based on improved genetic algorithm

By introducing adaptive crossover and mutant operators in traditional genetic algorithms, the improved genetic algorithm solves the problems of low solution quality and slow convergence speed in intelligent small car path planning, achieving more efficient path planning and faster convergence speed.

CN114995413BActive Publication Date: 2025-05-06NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210588765.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-05-06
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

Traditional genetic algorithms have problems such as low quality and slow convergence speed in intelligent car path planning, and it is difficult to effectively obtain the global optimal solution.

Method used

The improved genetic algorithm is adopted to improve the convergence speed and optimal solution quality by constructing raster maps, initializing populations and parameters, adaptive crossover and mutant operators.

Benefits of technology

The improved genetic algorithm can effectively improve the global optimal solution quality of intelligent trolley path planning, significantly improve the convergence speed and reduce the number of iterations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114995413B_ABST
    Figure CN114995413B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for intelligent car path planning based on improved genetic algorithm. Aiming at the shortcomings of traditional genetic algorithm, such as slow convergence speed, poor local search ability, and easy target unreachability and easy to fall into local minimum point in path planning field, the crossover, mutation operator and fitness function of traditional genetic algorithm are improved, the total path length of intelligent car with different weight proportions and the smoothness of intelligent car driving path are added to the fitness function, and the improved crossover operator is determined by roulette method, which greatly improves the smoothness of intelligent car driving path. The convergence speed of the algorithm is accelerated, the number of iterations when the algorithm reaches the global optimal solution is reduced, and the efficiency of the algorithm is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of intelligent car path planning, and in particular to an intelligent car path planning method based on an improved genetic algorithm. Background Art

[0002] Path planning technology is an important part of the research field of mobile intelligent cars. Its main purpose is to find an optimal or suboptimal safe and collision-free path from the starting position node to the target position node in an environment with obstacles according to certain criteria (such as shortest path, fewest turning points, shortest time, etc.).

[0003] Genetic Algorithm (GA) is a type of evolutionary algorithm. It seeks the optimal solution by imitating the mechanism of selection and inheritance in nature. Genetic algorithm has three basic operators: selection, crossover and mutation. Compared with other optimization algorithms, genetic algorithm has the advantages of fast random search capability that is independent of the problem domain, search using evaluation function inspiration, simple process, scalability, and easy combination with other algorithms. But at the same time, the shortcomings of genetic algorithm are also very obvious, such as the algorithm has a certain dependence on the selection of the initial population, requires reasonable encoding of the problem, and the selection of several parameters of the three operators. In view of these shortcomings, many scholars at home and abroad have tried to improve the traditional genetic algorithm. Li Dongdong et al. proposed a genetic algorithm (CN113917925A) that combines the ant colony algorithm with the genetic algorithm to improve the convergence speed of the algorithm; Jin Jin et al. (CN105988468A) of the People's Public Security University of China proposed an improved genetic algorithm combined with the grid method, which effectively improved the convergence speed of the algorithm.

[0004] However, the crossover and mutation operators of traditional genetic algorithms are still the important factors that affect the convergence speed, number of iterations and accuracy of the optimal solution of genetic algorithms. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide an intelligent car path planning method based on an improved genetic algorithm to address the defects involved in the background technology, which can overcome the shortcomings of the traditional genetic algorithm such as low quality of the initial solution and slow convergence speed, and not only improve the global optimal solution for the intelligent car path planning, but also improve the convergence speed.

[0006] The present invention adopts the following technical solutions to solve the above technical problems:

[0007] An intelligent car path planning method based on an improved genetic algorithm comprises the following steps:

[0008] Step 1), construct a grid map and establish a coordinate system with the first grid in the lower left corner of the map as the origin;

[0009] Step 2), initialize the population and the following parameters of the genetic algorithm: population size NP, maximum number of iterations max_gen;

[0010] Step 3), generate an initial feasible path:

[0011] Step 3.1), first randomly select an obstacle-free grid in each row in order to form an intermittent path containing M grids, where M is the number of grids in the path, and let i = 1;

[0012] Step 3.2), calculate the D value between the i-th grid and the i+1 grid according to the following formula:

[0013] D = max{abs(x i+1 -x i ),abs(y i+1 -y i )}

[0014] In the formula, (x i ,y i ) is the coordinate of the ith grid, (x i+1 ,y i+1 ) is the coordinate of the i+1th grid;

[0015] Step 3.3), determine whether the D value is equal to 1:

[0016] Step 3.3.1), if D = 1, the i-th grid and the i+1 grid are continuous grids, let i = i+1, and determine the size of i and M;

[0017] Step 3.3.1.1), if i≥M-1, the path at this time is the feasible path after initialization, jump to step 4);

[0018] Step 3.3.1.2), if i<M-1, jump to step 3.2);

[0019] Step 3.3.2), if D is not equal to 1, there is a discontinuity between the ith grid and the i+1 grid, then the coordinates of the midpoint grid between the ith grid and the i+1 grid are calculated according to the following formula (x c ,y c ):

[0020]

[0021] Step 3.3.2.1), if there is no obstacle on the midpoint grid, insert the midpoint grid between the i-th grid and the i+1-th grid, so that the midpoint grid becomes the new i+1-th grid, set M=M+1, update the path and jump to step 3.2);

[0022] Step 3.3.2.2), if there is an obstacle on the midpoint grid, then determine whether there are obstacles on the grids above, below, left, and right of the midpoint grid in turn. If there are obstacles on all of them, jump to step 3.1); if there is an unobstructed grid on it, select the first unobstructed grid as the new midpoint grid, and then insert the new midpoint grid between the i-th grid and the i+1-th grid, so that the new midpoint grid becomes the new i+1-th grid, let M=M+1, update the path and jump to step 3.2);

[0023] Step 4), construct the fitness function fitness, consider the length and smoothness of the planned path and add them into the fitness function fitness;

[0024] Step 4.1), the total length d of the planned path is equal to the sum of the distances between two adjacent grids. The specific formula is as follows:

[0025]

[0026] Step 4.2), the smoother the path, the larger the angle formed by the three adjacent points, and the larger the angle, the larger the distance between the three adjacent points. Therefore, the distances of all three adjacent points in the path are calculated as the second part of the fitness function. Considering the kinematic and dynamic constraints of the smart car during driving, the calculation formula for the turning angle ph of the planned path is as follows:

[0027]

[0028] Step 4.3), select different weights to construct the corresponding fitness function according to the requirements of path length and path smoothness;

[0029] Step 5), selection operation: calculate the fitness value of each individual according to the fitness function, and then calculate the proportion of the fitness value of each individual to the sum of the fitness values ​​of all individuals; according to the probability ratio of each individual, use the probability-based roulette method to select the next generation of individuals;

[0030] Step 6), crossover operation:

[0031] Step 6.1), first start from the first individual to compare the fitness values ​​of two adjacent individuals, then keep the individual with the larger fitness value and record its fitness value as f′, then calculate the specific crossover probability Pc in this crossover operation according to the crossover probability formula, and then randomly select a number between 0 and 1 as the crossover comparison probability Pcc, j=1;

[0032] Step 6.2), starting from the jth population, compare the crossover probability Pc and Pcc of the jth population. If the crossover probability of the jth population is less than Pcc, randomly select a grid from the same grids contained in the j and j+1 populations, and exchange all the paths behind this same grid; then let j=j+1, and determine whether j is less than the number of populations. If the j value is less than the number of populations, repeat step 6.2) to continue the cycle, otherwise end the crossover operation; the crossover probability Pc formula is as follows:

[0033]

[0034] where f max is the maximum fitness value in the entire iterative cycle, f is the average fitness value in the entire iterative cycle, and f′ is the larger fitness value in this crossover operation;

[0035] Step 7), mutation operation:

[0036] Step 7.1), first start from the first individual to compare the fitness values ​​of two adjacent individuals, then keep the individual with the larger fitness value and record its fitness value as f′, then calculate the specific mutation probability Pm in this mutation operation according to the crossover probability formula, and then randomly select a number between 0 and 1 as the crossover comparison probability Pmm, k = 1;

[0037] Step 7.2), starting from the kth population, compare the crossover probability Pm of the kth population. If the mutation probability of the jth population is less than k+1, randomly select a grid from the same grids contained in the k and k+1 populations, and exchange all the paths behind this same grid; then set k=k+1, and determine whether k is less than the number of populations. If the k value is less than the number of populations, repeat step 7.2). The mutation probability Pm formula is as follows:

[0038]

[0039] Step 8), repeat steps 5) to 7) max_gen times, obtain the iterative average path length and the optimal path length, and output the convergence curve graph of the genetic algorithm.

[0040] As a further optimization scheme of the intelligent car path planning method of an improved genetic algorithm of the present invention, the population size NP=200, and the maximum number of iterations max_gen=100.

[0041] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0042] 1. The present invention uses crossover and mutation operators with adaptive properties on the basis of traditional genetic algorithms, which effectively solves the problems of slow convergence and "premature maturity" caused by fixed crossover and mutation operators in traditional genetic algorithms;

[0043] 2. The crossover and mutation operators with adaptive properties used in the present invention based on the traditional genetic algorithm effectively improve the quality of the optimal solution of the traditional genetic algorithm;

[0044] 3. The crossover and mutation operators with adaptive properties used in the present invention on the basis of the traditional genetic algorithm can be combined with other algorithms to form a hybrid genetic algorithm, which has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a control flow chart of the intelligent car path planning method of the present invention that improves the traditional genetic algorithm;

[0046] Figure 2 To improve the genetic algorithm running result graph;

[0047] Figure 3 To improve the genetic algorithm convergence graph;

[0048] Figure 4 This is the result diagram of the traditional genetic algorithm operation;

[0049] Figure 5 This is the convergence curve of the traditional genetic algorithm. DETAILED DESCRIPTION

[0050] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings:

[0051] The present invention can be implemented in many different forms and should not be considered to be limited to the embodiments described herein. On the contrary, these embodiments are provided to make this disclosure thorough and complete, and will fully express the scope of the present invention to those skilled in the art. In the accompanying drawings, components are enlarged for clarity.

[0052] like Figure 1 As shown, the present invention discloses a smart car path planning method based on an improved genetic algorithm, comprising the following steps:

[0053] Step 1), construct a grid map and establish a coordinate system with the first grid in the lower left corner of the map as the origin;

[0054] Step 2), initialize the population and the following parameters of the genetic algorithm: population size NP, maximum number of iterations max_gen;

[0055] Step 3), generate an initial feasible path:

[0056] Step 3.1), first randomly select an obstacle-free grid in each row in order to form an intermittent path containing M grids, where M is the number of grids in the path, and let i = 1;

[0057] Step 3.2), calculate the D value between the i-th grid and the i+1 grid according to the following formula:

[0058] D = max{abs(x i+1 -x i ),abs(y i+1 -y i )}

[0059] In the formula, (x i ,y i ) is the coordinate of the ith grid, (x i+1 ,y i+1 ) is the coordinate of the i+1th grid;

[0060] Step 3.3), determine whether the D value is equal to 1:

[0061] Step 3.3.1), if D = 1, the i-th grid and the i+1 grid are continuous grids, let i = i+1, and determine the size of i and M;

[0062] Step 3.3.1.1), if i≥M-1, the path at this time is the feasible path after initialization, jump to step 4);

[0063] Step 3.3.1.2), if i<M-1, jump to step 3.2);

[0064] Step 3.3.2), if D is not equal to 1, there is a discontinuity between the ith grid and the i+1 grid, then the coordinates of the midpoint grid between the ith grid and the i+1 grid are calculated according to the following formula (x c ,y c ):

[0065]

[0066] Step 3.3.2.1), if there is no obstacle on the midpoint grid, insert the midpoint grid between the i-th grid and the i+1-th grid, so that the midpoint grid becomes the new i+1-th grid, set M=M+1, update the path and jump to step 3.2);

[0067] Step 3.3.2.2), if there is an obstacle on the midpoint grid, then determine whether there are obstacles on the grids above, below, left, and right of the midpoint grid in turn. If there are obstacles on all of them, jump to step 3.1); if there is an unobstructed grid on it, select the first unobstructed grid as the new midpoint grid, and then insert the new midpoint grid between the i-th grid and the i+1-th grid, so that the new midpoint grid becomes the new i+1-th grid, let M=M+1, update the path and jump to step 3.2);

[0068] Step 4), construct the fitness function fitness, consider the length and smoothness of the planned path and add them into the fitness function fitness;

[0069] Step 4.1), the total length d of the planned path is equal to the sum of the distances between two adjacent grids. The specific formula is as follows:

[0070]

[0071] Step 4.2), the smoother the path, the larger the angle formed by the three adjacent points, and the larger the angle, the larger the distance between the three adjacent points. Therefore, the distances of all three adjacent points in the path are calculated as the second part of the fitness function. Considering the kinematic and dynamic constraints of the smart car during driving, the calculation formula for the turning angle ph of the planned path is as follows:

[0072]

[0073] Step 4.3), select different weights to construct the corresponding fitness function according to the requirements of path length and path smoothness;

[0074] Step 5), selection operation: calculate the fitness value of each individual according to the fitness function, and then calculate the proportion of the fitness value of each individual to the sum of the fitness values ​​of all individuals; according to the probability ratio of each individual, use the probability-based roulette method to select the next generation of individuals;

[0075] Step 6), crossover operation:

[0076] Step 6.1), first start from the first individual to compare the fitness values ​​of two adjacent individuals, then keep the individual with the larger fitness value and record its fitness value as f′, then calculate the specific crossover probability Pc in this crossover operation according to the crossover probability formula, and then randomly select a number between 0 and 1 as the crossover comparison probability Pcc, j=1;

[0077] Step 6.2), starting from the jth population, compare the crossover probability Pc and Pcc of the jth population. If the crossover probability of the jth population is less than Pcc, randomly select a grid from the same grids contained in the j and j+1 populations, and exchange all the paths behind this same grid; then let j=j+1, and determine whether j is less than the number of populations. If the j value is less than the number of populations, repeat step 6.2) to continue the cycle, otherwise end the crossover operation; the crossover probability Pc formula is as follows:

[0078]

[0079] where f max is the maximum fitness value in the entire iterative cycle, is the average fitness value during the entire iterative cycle, and f′ is the larger fitness value in this crossover operation;

[0080] Step 7), mutation operation:

[0081] Step 7.1), first start from the first individual to compare the fitness values ​​of two adjacent individuals, then keep the individual with the larger fitness value and record its fitness value as f′, then calculate the specific mutation probability Pm in this mutation operation according to the crossover probability formula, and then randomly select a number between 0 and 1 as the crossover comparison probability Pmm, k = 1;

[0082] Step 7.2), starting from the kth population, compare the crossover probability Pm of the kth population. If the mutation probability of the jth population is less than k+1, randomly select a grid from the same grids contained in the k and k+1 populations, and exchange all the paths behind this same grid; then set k=k+1, and determine whether k is less than the number of populations. If the k value is less than the number of populations, repeat step 7.2). The mutation probability Pm formula is as follows:

[0083]

[0084] Step 8), repeat steps 5) to 7) max_gen times, obtain the iterative average path length and the optimal path length, and output the convergence curve graph of the genetic algorithm.

[0085] The population size NP is preferably set to 200, and the maximum number of iterations max_gen is preferably set to 100.

[0086] The specific algorithm operation results are as follows Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown, according to MATLAB simulation, it can be concluded that Figure 5 The traditional genetic algorithm shown in the figure takes 80 iterations to get the optimal solution. Figure 3The improved genetic algorithm shown in the figure can obtain the optimal solution with only 40 iterations, and the optimal path value obtained by the improved genetic algorithm is slightly smaller than that of the traditional genetic algorithm. In summary, it can be concluded that the improved genetic algorithm can effectively reduce the number of iterations, improve the convergence speed, and obtain a better optimal solution.

[0087] In view of the slow convergence speed caused by the fixed crossover and mutation operators of the traditional genetic algorithm, the present invention provides an improved adaptive crossover and mutation operator calculation method. By linking the specific calculation method of the crossover and mutation operators with the fitness value of the individual during each crossover and mutation operation, it is ensured that individuals with large fitness values ​​are retained as much as possible while avoiding the algorithm from converging in advance and the "precocious" phenomenon, ensuring that individuals always mutate in a good direction, effectively improving the convergence speed of the algorithm, reducing the number of iterations, and improving the optimal solution of the traditional genetic algorithm.

[0088] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.

[0089] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. The intelligent car path planning method based on improved genetic algorithm is characterized by: The following steps are involved: Step 1), construct a grid map, and establish a coordinate system with the first grid in the lower left corner of the map as the origin; Step 2), initialize the population and the following parameters of the genetic algorithm: population size NP, maximum number of iterations max_gen; Step 3), generate an initial feasible path: Step 3.1), first randomly select an obstacle-free grid in each row in order to form an intermittent path containing M grids, where M is the number of grids in the path, and let i = 1; Step 3.2), calculate the D value between the i-th grid and the i+1 grid according to the following formula: D=max{abs(x i+1 -x i ),abs(y i+1 -y i )} In the formula, (x i ,y i ) is the coordinate of the ith grid, (x i+1 ,y i+1 ) is the coordinate of the i+1th grid; Step 3.3), determine whether the D value is equal to 1: Step 3.3.1), if D = 1, the i-th grid and the i+1 grid are continuous grids, let i = i+1, and determine the size of i and M; Step 3.3.1.1), if i≥M-1, the path at this time is the feasible path after initialization, jump to step 4); Step 3.3.1.2), if i<M-1, jump to step 3.2); Step 3.3.2), if D is not equal to 1, there is a discontinuity between the ith grid and the i+1 grid, then the coordinates of the midpoint grid between the ith grid and the i+1 grid are calculated according to the following formula (x c ,y c ): Step 3.3.2.1), if there is no obstacle on the midpoint grid, insert the midpoint grid between the i-th grid and the i+1-th grid, so that the midpoint grid becomes the new i+1-th grid, set M=M+1, update the path and jump to step 3.2); Step 3.3.2.2), if there is an obstacle on the midpoint grid, then determine whether there are obstacles on the grids above, below, left, and right of the midpoint grid in turn. If there are obstacles on all of them, jump to step 3.1); if there is an unobstructed grid on it, select the first unobstructed grid as the new midpoint grid, and then insert the new midpoint grid between the i-th grid and the i+1 grid, so that the new midpoint grid becomes the new i+1-th grid, let M=M+1, update the path and jump to step 3.2); Step 4), construct the fitness function fitness, consider the length and smoothness of the planned path and add them into the fitness function fitness; Step 4.1), the total length d of the planned path is equal to the sum of the distances between two adjacent grids. The specific formula is as follows: Step 4.2), the smoother the path, the larger the angle formed by the three adjacent points, and the larger the angle, the larger the distance between the three adjacent points. Therefore, the distances of all three adjacent points in the path are calculated as the second part of the fitness function. Considering the kinematic and dynamic constraints of the smart car during driving, the calculation formula for the turning angle ph of the planned path is as follows: Step 4.3), select different weights to construct the corresponding fitness function according to the requirements of path length and path smoothness; Step 5), selection operation: calculate the fitness value of each individual according to the fitness function, and then calculate the proportion of the fitness value of each individual to the sum of the fitness values ​​of all individuals; according to the probability ratio of each individual, use the probability-based roulette method to select the next generation of individuals; Step 6), crossover operation: Step 6.1), first start from the first individual to compare the fitness values ​​of two adjacent individuals, then keep the individual with the larger fitness value and record its fitness value as f′, then calculate the specific crossover probability Pc in this crossover operation according to the crossover probability formula, and then randomly select a number between 0 and 1 as the crossover comparison probability Pcc, j=1; Step 6.2), starting from the jth population, compare the crossover probability Pc and Pcc of the jth population. If the crossover probability of the jth population is less than Pcc, randomly select a grid from the same grids contained in the j and j+1 populations, and exchange all the paths behind this same grid; then let j=j+1, and determine whether j is less than the number of populations. If the j value is less than the number of populations, repeat step 6.2) to continue the cycle, otherwise end the crossover operation; the crossover probability Pc formula is as follows: where f max is the maximum fitness value in the entire iterative cycle, is the average fitness value during the entire iterative cycle, and f′ is the larger fitness value in this crossover operation; Step 7), mutation operation: Step 7.1), first start from the first individual to compare the fitness values ​​of two adjacent individuals, then keep the individual with the larger fitness value and record its fitness value as f′, then calculate the specific mutation probability Pm in this mutation operation according to the crossover probability formula, and then randomly select a number between 0 and 1 as the crossover comparison probability Pmm, k = 1; Step 7.2), starting from the kth population, compare the crossover probability Pm of the kth population. If the mutation probability of the jth population is less than k+1, randomly select a grid from the same grids contained in the k and k+1 populations, and exchange all the paths behind this same grid; then set k=k+1, and determine whether k is less than the number of populations. If the k value is less than the number of populations, repeat step 7.2). The mutation probability Pm formula is as follows: Step 8), repeat steps 5) to 7) max_gen times, obtain the iterative average path length and the optimal path length, and output the convergence curve graph of the genetic algorithm.

2. The intelligent vehicle path planning method based on improved genetic algorithm according to claim 1 is characterized in that: The population size NP=200, and the maximum number of iterations max_gen=100.

Citation Information

Patent Citations

  • Improved genetic algorithm-based mobile robot path planning method

    CN105988468A

  • Mobile robot path planning method based on improved genetic algorithm

    CN113917925A

  • Path planning method for multiple mobile robots based on improved genetic algorithm

    CN107092255A

  • Mobile robot path planning method based on improved genetic algorithm

    CN110275526A