Mobile Robot Path Planning Algorithm Based on NSGA-II

.


Introduction
With the development of society, mobile robot technology is increasingly prevalent in our lives, and path planning for mobile robots is a key technology enabling them to function properly.Mobile robot path planning involves finding the optimal collision-free path according to specified constraints, which may include factors such as distance, safety, and smoothness [1].Depending on whether the environment is known, path planning for mobile robots can be divided into global path planning [2] and local path planning [3].
Currently, the commonly used traditional path planning algorithms include the A* algorithm [4], RRT algorithm [5], Dijkstra's algorithm [6], and artificial potential field method [7].Intelligent path planning algorithms mainly include the ant colony algorithm [8], particle swarm algorithm [9], and genetic algorithm [10].Intelligent algorithms are designed to mimic biological principles and are widely applied.However, they often suffer from issues such as a poor convergence precision and susceptibility to falling into local optima.Therefore, scholars both domestically and internationally have conducted extensive research on the application of intelligent algorithms.You Dazhang [11] proposed a grey wolf algorithm based on the grey wolf optimizer and grey wolf optimizer with a hybrid genetic algorithm and simulated annealing algorithm.The algorithm utilizes a nonlinear convergence factor that can be adjusted to balance the early and late stages of the algorithm.Additionally, the optimization algorithm employs an adaptive genetic crossover strategy to generate new individuals with a certain probability, thereby enhancing the diversity of the grey wolf population.In the later stages of iteration, the wolf is selected using a simulated annealing operation, to avoid the algorithm falling into local optimum.Hao Kun [12] proposed an adaptive particle swarm path planning method based on regional search to address premature convergence and local optima issues.This method preprocesses the original map using a regional search approach and adaptively adjusts the inertia weight factor and acceleration factor, allowing particles to quickly escape from adverse regions.Additionally, a dynamic obstacle avoidance strategy is employed to ensure safe navigation for the robot.Chang Jian [13] introduced an improved genetic algorithm by incorporating insertion and smoothing operators into the traditional genetic algorithm and by further integrating it with the niche method to prevent premature convergence.Davoodi [14] utilized NSGA-II to optimize the path length and clearance in grid environments, constructing both single and multi-objective optimization models for efficient path planning.Huang Zhifeng [15] proposed an enhanced lion algorithm to improve the quality of initial solutions and algorithm diversity.They employed a dualpopulation lion structure to enhance search capabilities and utilized fourth-order Bezier curves for path smoothing.Li [16] combined third-order Bezier curves with an improved artificial fish swarm algorithm.They initially performed morphological operations such as obstacle expansion and utilized a range of artificial fish movements based on a 16direction, 24-field Dijkstra algorithm during the path planning process.This reduced the number of turning points, while enhancing the planning accuracy.Furthermore, they reduced the computational frequency of the fusion algorithms by incorporating a sharing mechanism and employed feedback visual fields to avoid oscillations resulting from overly large visual fields in the later stages of the algorithm.Finally, they used third-order Bezier curves to ensure directional and curvature continuity.Xue [17] used path length, path smoothness, and path safety as objective functions, and augmented the original NSGA-II algorithm with operators including an invalid solution operator and shortness operator.They systematically studied the parameters of the algorithm and compared it with an effective multi-objective evolutionary algorithm.The comparative results indicated that the improved NSGA-II generated non-dominated solutions with excellent characteristics in the solution space.Jia [18] proposed a new method for global time-varying path planning (GTVP).This method obtains center points based on the real-time shape and position information of obstacles, and extracts feature points representing obstacle information.Then, it scales up the obstacle surface to generate center points and Bezier curve feature points.Finally, it outputs curves corresponding to the real-time motion trajectory of the robotic arm.The Non-dominated Sorting Genetic Algorithms II (NSGA-II) [19] improves upon the limitations of traditional genetic algorithms, which are primarily designed for single-objective problems.Derived from genetic algorithms, NSGA-II introduces the concept of Pareto optimality and incorporates an elitist selection strategy, making it one of the most popular multi-objective genetic algorithms.It offers advantages such as a fast execution speed and good convergence of solutions, enabling it to compute better solution strategies for complex problems.As a result, this paper designed a path planning algorithm based on this method.
Bezier curves possess excellent geometric properties and find widespread application in computer graphics.They succinctly and accurately describe free-form curves and surfaces, serving as effective curve-fitting tools.Therefore, this paper proposed to utilize Bezier curves in designing a smooth path algorithm.
Addressing the challenges of mobile robot path planning, namely the tendency to fall into local optima and the issue of non-smooth paths.This study improved the NSGA-II algorithm and used this method to solve the mobile robot path planning problem.The contributions of this paper are as follows:

•
This paper presents a mobile robot path planning algorithm based on NSGA-II.The initialization of the population is improved by limiting the generation positions of path nodes using a search window, thereby enhancing the quality of the initial path population.Practical selection operators are proposed, and optimization is performed on two objective functions: path length and path smoothness.This optimization enhances the algorithm's ability to escape local optima.
• This study systematically investigated the conditions that smooth paths need to satisfy.It employed Bezier curves to smooth the planned paths, and the experimental results indicated that this approach could enhance the smoothness of the paths.

•
Experimental comparisons were conducted between the proposed algorithm and different algorithms.The results of the comparisons demonstrated that the paths obtained by the proposed algorithm were shorter and smoother.
The rest of this work is outlined below.Section 2 introduces the improved mobile robot path planning algorithm based on the NSGA-II algorithm.Section 3 introduces the path smoothing algorithm based on a Bessel curve.Section 4 details the simulations, and Section 5 summarizes this article.

Global Path Planning
The traditional NSGA-II algorithm exhibits strengths such as robustness and strong global optimization capabilities when addressing path planning problems.However, it also suffers from drawbacks such as a slow convergence speed, susceptibility to local optima, and the low quality of the initial population.In response to these issues, this paper proposed the following improvements:

Population Initialization
The process of population initialization aims to generate a set of initial paths, serving as the foundation for algorithm iteration.Improving the efficiency of initialization is beneficial for enhancing path planning efficiency and influencing algorithm convergence.The quality of the initial paths also impacts the calculation of optimal paths.Most scholars opt for a random method during population initialization.In this approach, random path nodes are initially generated within the feasible region of the map.Subsequently, the usefulness of these randomly generated path nodes is assessed based on whether they can form a feasible path.However, this process often results in numerous ineffective nodes and paths, significantly increasing the computational overheads and decreasing algorithm efficiency.Moreover, the random distribution of the generated paths may lead to uneven distribution.If the random solution set predominantly lies in local optimal positions, this may inadvertently steer the algorithm towards local optima.This is one of the reasons why the NSGA-II algorithm is prone to local optima.
To address these issues, this paper introduces the concept of a search window to constrain the generation of random points.The search window is a fixed-size square region, within which new nodes are generated.The position of the search window changes continuously based on the location of the generated nodes, always facing towards the target point.Specifically, when the target point is directly above the mobile robot, the robot should be positioned at the bottom center of the search window.When the target point is to the top right of the mobile robot, the robot should be positioned on the left side of the bottom of the search window.Similar adjustments are made for other target point positions relative to the robot.The search window continuously moves towards the target point direction based on the mobile robot's position, until a complete path from the start point to the target point is generated.By constraining the range and orienting the search window towards the target point, this paper improves the efficiency of generating initial paths, reduces the number of redundant nodes, and avoids misguiding the initial path set.The specific steps of the improved population initialization method can be summarized as follows: 1.
Generate a search window from the robot's position towards the target point, using the robot's position and the target point as reference points, as shown in Figure 1.

2.
Generate a random path node within the feasible area in the search window where there is no robot present.

3.
Determine whether the robot can move directly to the position of this path node.
Since the mobile robot can move directly to the grid in eight directions adjacent to its position, the judgment condition expression is as follows: where (x i , y i ) represents the coordinates of the grid where the mobile robot is located, and (x i+1 , y i+1 ) represents the coordinates of the generated path node.
If δ takes the value 1, i.e., δ = 1, this means the generated path node is located within the eight grids that the mobile robot can directly move to, so the node's position is updated directly to the robot's position.Otherwise, δ ̸ = 1, which indicates that the generated node position is not within the eight grids the mobile robot can directly move to, so intermediate nodes need to be supplemented.In this text, we use the method of interpolation to supplement the path nodes.The expression for selecting intermediate path nodes is as follows: , where int denotes rounding.After calculation, if the position is obstructed, it is necessary to choose another grid.When selecting a new grid, priority is given to the four grids surrounding the obstructed position, and they are traversed in the order up, down, left, and right.A grid belonging to the feasible area is selected as the intermediate path node and inserted into the path, updating the path node to the robot's position.If it is not possible to insert an intermediate path node using the above method, the path is abandoned, and Step 2 is repeated to regenerate.

4.
Check if the robot's coordinates are the same as the target point's coordinates.If they are, save the entire obstacle-free continuous path as a population individual.If not, repeat Step 2.

5.
Calculate the number of individuals in the population.If the total number of individuals in the population equals the maximum value, end the iteration.If not, repeat Step 1 to continue the iteration.

Designing the Fitness Function
In the algorithm, the fitness function is primarily used to quantitatively describe individuals.Therefore, the design of the fitness function is crucial.If the fitness function is not appropriate, this may lead to deception phenomena.In the early stages of the algorithm, individual extraordinary individuals may emerge due to their outstanding fitness, leading to a strong competitiveness.This may result in the dominance of this individual in the selection process, thereby significantly affecting the global optimization of the algorithm.Alternatively, in the later stages of the algorithm, after multiple iterations, the fitness differences among individuals in the population are small, leading to a decrease in individual diversity and possibly causing the algorithm to fall into local optima.
In the path planning process of mobile robots, path length is an important consideration.Path length is directly related to the energy consumption of the mobile robot.Since the battery capacity of mobile robots is limited, efficiently completing tasks with limited energy is an important criterion for evaluating robot efficiency.Therefore, in feasible situations, shorter paths for mobile robots are preferred.In addition to path length, path smoothness is an important evaluation criterion for mobile robot path planning.Due to the constraints of kinematics and dynamics, and for safety reasons during robot motion, the turning angle of the robot should not be too large, and the number of turns should not be too high.Therefore, in this paper, path length and path smoothness are considered as the objective functions for path planning.
Considering a path L j , where j = 1, 2, . . ., M and M represents the maximum number of individuals contained in the population, L j can be denoted as L j = {O 1 , O 2 , . . . ,O m }, where m signifies the number of nodes in path L j , O i represents a node within path L j , O 1 denotes the starting point of path L j , and O m signifies the target point.
The sum of distances between all adjacent nodes, including the starting point and the target point, constitutes the path length.The expression for the path length function f 1 is where O i represents the ith node in a path, m denotes the total number of nodes in that path, and l i signifies the distance between adjacent nodes in the path.The expression is as follows: where x 1 and y i represent the horizontal and vertical coordinates of the nodes, respectively.Path smoothness reflects the smoothness of the mobile robot's trajectory.The path smoothness function f 2 is defined as where θ i represents the angle formed between the path segment from node O i to node O i+1 and the path segment from node O i+1 to node O i+2 , as depicted in Figure 2, and m is the number of nodes in the path.When the path angle is right, the path is the smoothest, and f 2 is minimized.Conversely, when the path angle is acute, the path is the least smooth, and f 2 is maximized.Therefore, in this paper, the objective function of path planning is

Selection Operators
Selection operations are used to determine how individuals are chosen from the parent population according to a certain method, followed by crossover operations to generate new individuals.When designing selection operators, it is necessary to ensure that excellent individuals are retained, while also maintaining diversity and randomness among individuals.Therefore, this paper proposes a probability-based selection strategy.Initially, the probability of each individual being chosen is calculated based on its nondominated rank and crowding distance.A higher probability of being chosen indicates a greater likelihood of the individual being an optimal solution, whereas a lower probability of being chosen suggests a smaller likelihood of the individual being an optimal solution.
When selecting individuals based on probability, it is necessary to calculate the probability of each individual being chosen.Let us denote the probability of each individual being selected as P j , where j = 1, 2, . . ., M and M represents the maximum number of individuals in the population.The probability of each individual being chosen consists of two parts: one is calculated based on the crowding distance, denoted P d , and the other is calculated based on the non-dominated rank, denoted P r .
When computing the probability based on the crowding distance, the crowding distance values of individuals are normalized to obtain the probability P d calculated based on crowding distance, as follows: where d(j) represents the crowding distance value of an individual j.
The probability P r calculated based on non-dominated rank is where r j is the non-dominated rank of an individual j, and λ is a calculation parameter.Therefore, the probability of an individual being chosen is given by Based on the probabilities of individual selection, the entire population is divided into two sets: one suitable for entering the offspring population, and the other not suitable for entering the offspring population.Proportionally, individuals are selected from both sets.Randomly selecting a few individuals with lower selection probabilities can enhance the population diversity.When the algorithm is trapped in local optima, this provides opportunities for the algorithm to escape local optima and find better solutions, thus improving the algorithm's ability to escape local optima.

Algorithm Workflow
To enhance the efficiency of path planning, increase population diversity, and avoid falling into local optima, this paper introduces the concept of a search window to improve population initialization, designs a new fitness function, and combines probabilistic methods to design a selection operator, proposing a global path planning algorithm.The specific steps of the path planning algorithm are as shown in Algorithm 1.

Smooth Path Planning
The optimal path generated by path planning algorithms is typically composed of polygons or polylines, which may include complex situations such as sharp turns.In such cases, to follow these paths, a mobile robot may need to switch between different motion states, such as "stop", "rotate", and "restart" [20].In this scenario, the switching of motion states will undoubtedly lead to discontinuities in velocity and acceleration, resulting in slippage and overdriving of the mobile robot during high-speed motion [21].This is a time-consuming and energy-consuming process, which not only reduces the efficiency but also shortens the lifespan of the mobile robot.Therefore, this paper proposes a path smoothing algorithm combined with Bézier curves.

Bézier Curve
In 1962, French mathematician Pierre Bézier was the first to study this method of vector drawing curves and provided detailed calculation formulas.Consequently, curves drawn according to such formulas are named after his surname and known as Bézier curves [22].
The nth degree parametric curve segment, known as a Bézier curve, is defined as follows, given n + 1 spatial vectors Q i (i = 1, 2, . . ., n): where t represents the normalized time variable, (x i , y i ) represents the coordinate vector of the ith control point Q i , and B i,n (t) are the Bernstein polynomials, serving as the basis functions in the expression of the Bézier curve.

Path Smoothing Algorithm
A key step in using Bézier curves to smooth path planning is selecting control points.During path planning, it is essential to ensure the continuity of the planned path, meaning that the curvature needs to be continuous when two segments of Bézier curves are concatenated.Simultaneously, it is crucial to avoid intersections between the planned path and obstacles, which would render the path invalid.The selection of control points directly affects the curvature and shape of the Bézier curve, making the position of control points critical.
The position of control points determines the curvature of the curve and the continuity of the fitted path.Using the path nodes directly from the planned path may result in the planned path overlapping with obstacles, leading to an invalid fitted path, as shown in Figure 3. Therefore, the fitted path must meet the following three requirements: 1.
The fitted path must not collide with obstacles, i.e., where || represents the distance from the line segment to the nearest obstacle, and w represents the obstacle coordinates.

2.
The fitted path must satisfy the smoothness requirement.To ensure the continuous smoothness of the path, it is necessary to ensure that the curvature is continuous at the junction of two Bézier curves.Due to the properties of Bézier curves, the tangent direction at the starting and ending points of the Bézier curve and the first and last edges of the characteristic polygon, respectively, are tangential.Therefore, it is only necessary to ensure that the first and last edges of the characteristic polygons of two Bézier curves lie on the same straight line.

3.
The fitted path should be shorter, i.e., the fitted path should be as close as possible to the source path, i.e., min|q(t) − D|, where D is the planned path.
To meet these three requirements, this paper combines geometric methods and optimization algorithms to design a point selection algorithm for selecting control points.Then, a third-order Bézier curve is used to fit the path, ultimately generating a collision-free smooth path.A flowchart of the path planning algorithm is shown in Figure 4.The specific steps of the path smoothing algorithm are as shown in Algorithm 2. Calculate gradient; 6: Update momentum; 7: Update control point location; 8: Gen = Gen + 1; 9: end 10: Generate third-order Bezier curve; 11: Output: Smoothed path;

Environment Setup
In the path planning of mobile robots, map establishment is an important step.Commonly used map representation methods include grid representation, geometric representation, and topological map representation.This paper adopts the grid map representation method.Grid map representation has the advantage of a simple structure, which can simplify complex terrain and facilitate model establishment.In the grid map, and white areas represent feasible areas, while black areas represent infeasible areas, i.e., obstacles, as shown in Figure 5.Let the map model be represented as In grid maps, commonly used encoding methods include real number encoding, binary encoding, and floating-point encoding.Among them, real number encoding is simple to operate and easy to calculate.Therefore, in this experiment, real number encoding was used to encode each grid in the map.According to the 20 × 20 grid map used in the experiment, grids are encoded sequentially from left to right and from bottom to top as 0, 1, 2, ..., 399.The relationship between the grid with the number O and its coordinates in the map is: where ⌊⌋ denotes the floor function, mod denotes the modulo function, and G size represents the number of grids per row.
To verify the correctness and effectiveness of the algorithm, two grid maps of different complexity levels were selected, as shown in Figure 6.Simulation tests were conducted using MATLAB R2016a and compared with the standard NSGA-II algorithm and genetic algorithm.

Parameter Settings
In the standard NSGA-II algorithm and GA algorithm, the initial population was randomly generated, and the selection operator adopted a tournament selection strategy.Specific parameters are shown in Table 1.

Global Path Planning Experiment and Analysis
To verify the effectiveness of the algorithms, each algorithm was independently run multiple times.Table 2 compares the results of multiple simulations on complex grid maps.*Coarsened text represents the optimal result.From Table 2, it can be seen that the average length of the optimal path of our algorithm was shorter than the other two algorithms, the path smoothness was better, and the number of times the optimal solution was found was higher.The stability of the algorithm was improved, indicating that our algorithm has a better global search capability in path planning.
To ensure the comprehensiveness of the simulation outcomes, the proposed algorithm, NSGA-II algorithm, and GA algorithm were each employed to address grid maps of differing complexity levels independently.The optimal paths and convergence curves derived by NSGA-II for the two maps are depicted in Figure 7. Similarly, the optimal paths and convergence curves yielded by GA for the two maps are illustrated in Figure 8.Additionally, the optimal paths and convergence curves attained by the proposed algorithm for the two maps are shown in Figure 9.The comparative experimental results of the simple map are detailed in Table 3, while those of the complex map are provided in Table 4.  *Coarsened text represents the optimal result.*Coarsened text represents the optimal result.The experimental results indicated that when using simple maps, both the NSGA-II algorithm and our algorithm yielded favorable outcomes.However, our algorithm exhibited significantly fewer iterations compared to the other two algorithms, and it also had fewer inflection points in the optimal path.Moreover, when dealing with maps in complex environments, the advantage of our algorithm became more pronounced.The paths planned by our algorithm were noticeably shorter than those generated by the other two algorithms.Moreover, both the iteration count and the number of inflection points in the optimal path were fewer than those of the other two algorithms.From the convergence curve graphs, it is evident that our algorithm was more stable and robust, demonstrating superior convergence and a better ability to escape local optima.Therefore, our path planning algorithm demonstrated superior overall performance and practical applicability.

Path Smoothing Experiments and Analysis
The simulation experiment results for path smoothing on maps of two different complexities are depicted in Figure 10.The smoothed paths conform to the principles of mobile robot motion, devoid of abrupt corners.The paths exhibit smooth curves overall, enabling the mobile robot to travel smoothly without the need to stop, turn, and restart at corner points.This is crucial for reducing wear and tear on the robot due to turning, thus extending its lifespan.

Conclusions
To address the issues of local optima and non-smooth paths in mobile robot path planning, this paper proposed a path planning method based on NSGA-II.In the path planning algorithm designed in this paper, the concept of a search window was introduced to optimize the population initialization process.This ensures that during population initialization, the algorithm avoids unnecessary nodes and excessive paths, thereby reducing the computational overheads and improving the path planning efficiency.Additionally, this prevents randomly generated paths from being concentrated near local optima, thus guiding the algorithm away from local optimal solutions.Furthermore, a selection operator was designed using a probability-based approach, to optimize the selection process.This enables the algorithm to select a diverse range of individuals during the selection process, thereby increasing the population diversity and positively impacting the subsequent crossover and mutation operations.The path planning algorithm designed in this paper demonstrated robustness and convergence.By simultaneously selecting individuals with both high and low selection probabilities during the selection process, the algorithm maintains good diversity within the population, while ensuring that excellent individuals smoothly transition to the next generation, thus possessing the ability to escape local optima effectively.
Moreover, a path smoothing algorithm was developed in this paper, which utilizes multi-segment Bézier curves to fit the optimal path.This approach ensures that the fitted path is free from abrupt corners, thereby guaranteeing path smoothness.The extensive experimental simulations conducted using the proposed algorithm demonstrated its effectiveness in addressing the problem of easily falling into local optima in path planning.The planned paths were smooth and continuous, indicating the practical applicability of the proposed method in real-world scenarios.
The research in this paper focused on studying the path planning problem for mobile robots; however, there are still some shortcomings.Therefore, there is room for improvement in this work, and the future directions for this research are outlined as follows: (1) Consideration of Multi-Robot Coordination or Swarm Robotics: Future research will explore the path planning problem for multiple robots operating collaboratively or in formation.This involves developing algorithms that enable coordination among multiple robots, to achieve collective objectives efficiently.(2) Extension to Dynamic Environments: While this paper primarily addressed path planning in static environments, real-world scenarios often involve dynamic elements such as moving obstacles, humans, or other robots.Therefore, future work will focus on studying path planning for mobile robots in dynamic environments, where the environment is subject to changes over time.

Figure 3 .
Figure 3.The planned path coincides with the obstacle.

Figure 6 .
Figure 6.Two types of grid maps.(a) complex map; (b) simple map.

Figure 10 .
Figure 10.Path of smoothing algorithm.(a) Smoothed path of simple map; (b) smoothed path of complex map.

Table 2 .
Comparison of effectiveness results.

Table 3 .
Comparison of effectiveness results of simple map.

Table 4 .
Comparison of effectiveness results of complex map.