Path planning and tracking method combining FA algorithm and motion controller with sliding mode control
By combining the FA algorithm and motion controller with the sliding mode control method, the problem of untimely and unsmooth paths in mobile robot path planning is solved, and accurate, safe and efficient path planning and tracking is achieved, with excellent performance and adaptability. .
Patent Information
- Application Number
- CN202411446857.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-21
AI Technical Summary
The existing mobile robot path planning methods have limitations, which may lead to untimely, enlarged, repeated, time-consuming growth, inefficient, unsmooth paths, and do not meet the application needs of robots in actual environments.
The FA algorithm and motion controller are combined with the path planning and tracking method of sliding mode control. The FA algorithm is used to achieve accurate path generation, taking into account path length and safety goals. The motion controller and sliding mode control technology are used to track and optimize the path. smoothness and efficiency.
It achieves accurate, safe and efficient planning and tracking of mobile robot paths, avoids local minima, and has the advantages of flexibility, accuracy, stability, smoothness, rapidity and robustness.
Smart Images

Figure CN119334368A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of path planning and tracking methods for mobile robots. Background Art
[0002] With the development of industrial processes, mobile robots have attracted considerable interest due to their ability to perform complex tasks, especially dangerous ones, quickly and efficiently. Therefore, designing safe paths and controlling the motion of mobile robots are prerequisites for any such mobile robotic mission.
[0003] At present, there are many public methods for mobile robot path planning, but there are still many unresolved issues about how to make the mobile robot move from the starting position to the target position without collision and safely. For example, some path planning methods have certain limitations, and there may be situations where planning is not timely, the path is enlarged, the path is repeated, and the time consumption increases. The mobile robot is prone to inefficiency when used, the path is not smooth and there are a large number of turns. The increased path distance is not in line with the actual application of the robot in the real environment, etc.
[0004] In view of this, technical personnel in the industry are constantly developing, improving and updating methods based on the actual working experience of mobile robots, which led to this case. Summary of the invention
[0005] The purpose of the present invention is to provide a path planning and tracking method combining an FA algorithm and a motion controller with sliding mode control, which can realize planning and generating a relatively accurate mobile robot path and take into account both optimization of path length and path safety.
[0006] To achieve the above-mentioned purpose, the technical solution of the present invention is: a path planning and tracking method combining an FA algorithm and a motion controller with sliding mode control, the path planning and tracking method comprising S1, establishing a motion model and a dynamic model of a mobile robot; S2, processing the path planning calculation of the mobile robot based on the FA algorithm, and creating the path of the robot with the help of a spline interpolation method, thereby performing path planning; S3, performing path tracking by combining motion controller design with dynamic controller design based on sliding mode control.
[0007] The computational process of the FA algorithm is as follows: suppose it is the i-th candidate in the population, two fireflies x i and x j The formula for calculating the attraction between them is: In the formula, β(r ij ) represents the attraction of fireflies, β0 represents the attraction of fireflies when r = 0, γ is the light coefficient, r ij Represents x i With x j The distance betweenij The calculation formula is: Firefly x i With other candidates x in the population j Compare, if x j X i brighter, then it will be attracted and move towards x j Convergence, the expression of this attracted convergent motion is:
[0008] In the formula, the total number of iterations in the FA algorithm is represented by n, α is a random parameter, r is a random number, and i The light intensity I i By the cost function f(x i )Decide.
[0009] After randomly initializing the coordinates of the processing points, the main loop of the FA algorithm begins. The new positions of the selected processing points are updated according to the expression of the attracted convergent motion, and the cost function is calculated at each iteration. This is repeated until the termination criterion of the number of iterations is met. In this way, the FA algorithm determines the positions of the spline points using the spline interpolation method to create the optimal path curve trajectory from the starting point to the target point, where
[0010] The path of the mobile robot is expressed as PH = (S, p1, p2, pn_1..., T), where PH is the path, S is the starting point, T is the target point, p1, p2, pn_1 are the middle points connecting the starting point and the end point of the path, and the minimum trajectory length d(x, y) is obtained by the following formula: The calculation gives, where x = [x0, x1, ..., x T ],y=[y0,y1,…,y T ] are the x and y coordinates of the mobile robot path;
[0011] Path planning includes defining the collision avoidance constraints of the path curve and calculating the distance from the i-th point of the path curve trajectory to the j-th obstacle center. The distance L between the i-th point and the j-th point of the obstacle center can be calculated by the formula The calculation gives, where j = {1, 2, ..., n}, x objs ,y objs is the center coordinate of the jth obstacle; the feasibility of the i-th point of the trajectory after colliding with the j-th obstacle can be expressed as c j =max(1_d ij / r objs ,0), where r objs is the radius of the jth obstacle, and the trajectory violation from the collision to the jth obstacle is calculated as the average of all violations, given by v j =mean(c j ) is given, where v jrepresents the violation relative to the jth obstacle, mean represents the average value, c j represents the compromise vector violated by all points of the ith obstacle, repeat for all obstacles, and calculate the vector v c =[v1,v2,…,v n ],
[0012] After defining the path curve collision avoidance constraint, the cost function is obtained through the penalty function coefficient. The expression is the cost function f(x i )=L*(1+ε*v c ), where L represents the total path length and ε is the penalty coefficient.
[0013] The motion controller is designed as follows, and the motion control law formula is proposed as follows: Where Tx and Ty are positive tracking parameters, x r ,y r is the reference coordinate of point I, e x 、e y is the error between the robot and the reference trajectory, e x =x r -x, e y =y r -y; Stability analysis of motion controller using inverse kinematics formula Subtract the motion control law formula Get the formula: In the formula, formula Rewritten as: Using the Lyapunov function formula: The derivative of the Lyapunov function is given by the following expression:
[0014] Known T x >0,T y >0,
[0015] That is, V1<0, the tracking control error vector e(t) converges to zero in a finite time, and the tracking system is asymptotically stable at the equilibrium point.
[0016] The dynamic controller design based on sliding mode control is as follows. Sliding mode control uses the equivalent control term Ueq and the switching term U sw Establish and calculate the sliding surface using the following calculation process:
[0017] s=e v +k∫e v
[0018]
[0019] The formula for rewriting the dynamic model formula of the mobile robot is Substitution Get the formula: Equivalent control item U eq By setting (h = 0), the system dynamics is brought to the sliding surface, and the formula It is concluded that the arrival motion adopts the switching term U sw , so that the system dynamics approach the sliding surface, the expression is: U sw =B -1 sgn(x), where sgn is the sign function,
[0020] Will and U sw =B -1 sgn(x) and sgn(x) to obtain the control law formula of the sliding surface: U = U eq +K2U sws ;
[0021] The stability analysis of the dynamic controller based on sliding mode control adopts the Lyapunov function formula: After derivation, we get the formula: Substituting the control law U in the formula, we get the formula:
[0022] Assignment: K s >max(δ), we can get the formula: Select K s >max(δ), max(δ) is the maximum value of δ, and we get The state of the system will converge to the sliding surface in a finite time.
[0023] The FA algorithm is used to optimize the motion controller and the dynamic controller based on sliding mode control to achieve path tracking error minimization control. In the FA algorithm, the formula The cost function is executed as follows: x (i) and e y (i) is the error of the x-coordinate and y-coordinate of the trajectory obtained by the FA algorithm of the i-th sample, n is the number of samples, and the FA algorithm searches for the near-optimal parameters of the motion controller and the dynamic controller in a 6-dimensional space with parameters between 0 and 100. The algorithm first generates a random solution and then uses the formula The positions of the fireflies are updated, the cost function is calculated for each candidate and its best solution obtained at each iteration, and the algorithm repeats until the maximum iterations are reached.
[0024] By adopting the above technical scheme, the beneficial effects of the present invention are as follows: the method of the present invention firstly adopts the FA algorithm (firefly algorithm) to realize the accurate generation of the mobile robot path, taking into account both the path length and safety goals, and then proposes a method for accurately generating the mobile robot path based on the motion controller and the sliding mode control (SMC) technology, the motion controller is used for the posture tracking of the mobile robot, and provides the required speed, while the sliding mode control (SMC) is used for speed tracking, and provides sufficient control input for the dynamics of the autonomous robot, in addition, the algorithm also tunes the parameters of the applied method, designs the motion controller to eliminate the posture deviation, and provides the required speed to the sliding mode control (SMC), and then adopts the dynamic controller to minimize the speed error of the robot, so that the tracking error is minimized, and the route of the mobile robot is accurately and safely planned, in summary, the algorithm has the ability and flexibility to avoid local minima, and also has the advantages of accuracy, stability, smoothness, speed and good robustness. Thus, the above-mentioned purpose of the present invention is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The present invention is a schematic diagram of the geometric structure of a mobile robot.
[0026] Figure 2 It is a schematic diagram of a double-stage framework involved in the present invention.
[0027] Figure 3 It is a flowchart of the FA algorithm involved in the present invention.
[0028] Figure 4 The present invention relates to a schematic diagram of a path curve obtained by processing points and a spline method in path planning using an FA algorithm.
[0029] Figure 5 It is a structural schematic diagram of a controller system involved in the present invention.
[0030] Figure 6 It is a schematic diagram of a planning path for a rectangular obstacle scene involved in the present invention.
[0031] Figure 7 It is a schematic diagram of a planning path for a circular obstacle scene involved in the present invention.
[0032] Figure 8 It is a schematic diagram of the response of the solution involved in the present invention to a circle.
[0033] Fig. 9 It is a schematic diagram of the x and y coordinate errors of obtaining a circular shape involved in the present invention.
[0034] Fig.10 It is a schematic diagram of the response of the solution involved in the present invention to the 8-shape.
[0035] Fig.11 The present invention relates to a schematic diagram of the x and y coordinate errors of obtaining an 8-shaped image.
[0036] Fig.12 It is a schematic diagram of the path tracked by the proposed controller in the rectangular obstacle area involved in the present invention.
[0037] Fig.13 It is a schematic diagram of the path tracked by the proposed controller in the circular obstacle area involved in the present invention. DETAILED DESCRIPTION
[0038] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.
[0039] The embodiment of the present invention discloses a path planning and tracking method combining an FA algorithm and a motion controller with sliding mode control, which is used for path planning and tracking of a mobile robot. The FA algorithm (firefly algorithm) is used to achieve accurate generation of the path of the mobile robot, while taking into account the two goals of path length and safety. Then, a method for accurately generating the path of a mobile robot based on a motion controller and sliding mode control (SMC) technology is proposed. The specific method mainly includes modeling of a mobile robot and path tracking based on path planning and controller design of the FA algorithm. The method process is described in detail below.
[0040] The modeling part of the mobile robot is divided into establishing a motion model and establishing a dynamic model.
[0041] The mobile robot of this embodiment may be a common wheeled mobile robot including a robot chassis, two casters and a pair of coaxial steering wheels. The geometric structure of the mobile robot is as follows: Figure 1 As shown, G is the center point of the axis of the mobile robot, also called the center of mass, (x G ,y G ) is the coordinate of the center point G of the mobile robot on the xy plane, I is a simplified point located on the axis of symmetry, Δb is the distance between I and G, and C is the caster used to balance the mobile robot.
[0042] The motion model is established in this way. The mobile robot can reach the required position and direction by adjusting the angular velocity of the driving wheels. Therefore, the linear velocity and angular velocity formula of the autonomous mobile robot is Given, where v represents the linear velocity of the mobile robot, w represents the angular velocity of the mobile robot, and v R and v L Respectively represent the rotation speed of the left and right wheels of the mobile robot, and Respectively represent the rotation angles of the left and right wheels of the mobile robot, r represents the radius of each steering wheel, and 2L represents the width of the mobile robot body. The classic kinematic formula of point G is: Where (x, y) is the coordinate of the mobile robot in the fixed reference system, and θ is the heading angle of the mobile robot.
[0043] The dynamic model is established as follows: based on the torque analysis and force analysis of the mobile robot's center of mass G, the dynamic model formula of the mobile robot is:
[0044] In the formula, δ v and δ w is the uncertainty of v and w, [u v ,u w ] is the vector representing the control input of the mobile robot, and the dynamic parameters of the mobile robot The calculation formula is as follows:
[0045]
[0046] In the formula, m is mass, I z is the moment at point G, B e is the viscous friction torque, I e is the inertia coefficient, which is combined with the motor rotor, gearbox and wheel respectively, K a , K b is the motor torque voltage constant based on the transmission ratio, R t is the nominal radius of the tire, R a is the resistance constant. The dynamic model formula of the above mobile robot is rewritten as: In the formula, C is equivalent to a constant, indicating an uncertain value.
[0047] Under the mobile robot motion model and dynamic model established above, path planning and controller design based on FA algorithm are used for path tracking. In order to solve the path planning and path tracking problems, a two-stage framework is introduced here, such as Figure 2 and Figure 5 As shown in the figure, the FA algorithm is used to process the path planning in the first stage to solve the length and safety goals. In the second stage, the motion controller is combined with the sliding mode control (SMC) to perform path tracking, as shown in the figure. Figure 3 and Figure 5 shown.
[0048] In the first stage, the path planning goal is to find the optimal path for robot navigation. The present invention proposes the FA algorithm to solve the main goal of the robot path. FA is a meta-heuristic method, which belongs to the group-based technology and relies on a simple mathematical model. The algorithm uses many fireflies (candidates for solutions) to explore and find the best solution in a given search space, and these candidate fireflies converge to the attractive one regardless of their gender and brightness. The candidate that emits the highest light intensity is attractive (i.e., the best solution). Figure 2 and Figure 3 As shown in the specific process of the FA algorithm of this embodiment, it is assumed that it (emitting the highest light intensity) is the i-th candidate in the population, and two fireflies x i and x j The brightness (attractiveness) between them is calculated as: In the formula, β(r ij ) represents the attraction of fireflies, β0 represents the attraction of fireflies when r = 0, γ is the light coefficient, r ij Represents x i With x j The distance between ij The calculation formula is: Firefly x i With other candidates x in the population j Compare, if x j X i brighter (better), then it will be attracted and move towards x j Convergence, the expression of this attracted convergent motion is:
[0049] In the formula, the total number of iterations in the FA algorithm is represented by n, α is a random parameter, r is a random number, and i The light intensity I i By the cost function f(x i )Decide.
[0050] Based on the above FA algorithm, the path planning calculation is performed. In the current work, the FA algorithm is dedicated to finding the location of the handling point, and then the path of the robot is created with the help of spline interpolation method, such as Figure 4 As shown, select the main parameters related to the robot environment (the location of the starting point and the target point, the number and shape of obstacles, the location of obstacles, etc.) and the FA algorithm (number of iterations, population, handling points, etc.), as shown in Figure 3As shown. In the first step of the FA algorithm, the coordinates of the processing points are randomly initialized, and then the main loop of the algorithm is started. The new positions of the selected processing points are updated according to the above expression of attracted convergent motion, and the cost function is calculated at each iteration. This will be repeated until the termination criterion (number of iterations) is met. Here, the spline interpolation method is used to give the path curve from the starting point to the target point. The path planning can be solved by the proposed metaheuristic algorithm (FA). The main goal of the FA algorithm is to determine the position of the spline so that the curve provides the optimal (or near-optimal) trajectory through the spline points, such as Figure 4 The path of the mobile robot can be expressed as PH = (S, p1, p2, pn_1..., T), where PH is the path, S is the starting point, T is the target point, p1, p2, pn_1 are the middle points connecting the starting point and the end point of the path, and the minimum trajectory length d(x, y) is obtained by the following formula: The calculation gives, where x = [x0, x1, ..., x T ],y=[y0,y1,…,y T ] are the x and y coordinates of the robot path.
[0051] The path planning problem includes collision avoidance constraints. In order to define the collision degree of the path curve, it is necessary to calculate the distance from the i-th point of the trajectory to the center of the j-th obstacle. If the distance is less than the radius of the j-th obstacle, a collision occurs. Therefore, the i-th point of the path is not feasible. The distance L between the i-th point of the path and the center of the j-th obstacle can be calculated by the formula The calculation gives, where j = {1, 2, ..., n}, x objs ,y objs is the center coordinate of the jth obstacle. The feasibility of the i-th point of the trajectory after colliding with the j-th obstacle can be expressed as c j =max(1_d ij / r objs ,0), where r objs is the radius of the jth obstacle. The trajectory violation from the collision to the jth obstacle is calculated as the average of all violations, so v j =mean(c j ) is given, where v j represents the violation relative to the jth obstacle, mean represents the average value, c j represents the compromise vector violated by all points of the ith obstacle. This process will be repeated for all obstacles and the vector v will be calculated. c =[v1,v2,…,v n Finally, after defining the constraints (violations), the cost function can be obtained through the penalty function coefficients. The expression is cost function f(x i )=L*(1+ε*v c), where L represents the total path length and ε is the penalty coefficient.
[0052] In the second stage, this embodiment uses a method that combines a motion controller with a sliding mode control (SMC) to control the motion for path tracking. The controller architecture is as follows: Figure 5 As shown in the figure, the actual position (x, y) of the mobile robot is compared with the reference target trajectory (x r ,y r ) to obtain the posture deviation (e x ,e y ), and provide the designed torsion command (i.e. motion control law [v r ,w r ]). Secondly, the SMC controller is used to eliminate the velocity error of the mobile robot and generate the control input for stabilizing the mobile robot (i.e., the dynamic control law U = [u v ,u w ]T).
[0053] The specific design of the motion controller is as follows: Figure 5 As shown in the figure, in the control trajectory of the mobile robot, the trajectory generator provides the motion controller with reference signals such as the reference trajectory coordinates and their derivatives over time, and the motion controller also receives feedback signals, namely the current position and heading angle of the robot. The kinematic controller outputs a reference speed signal to the DC motor of the mobile robot. The mobile robot expands the kinematics at point I on the symmetry axis and can obtain the inverse kinematic formula: Therefore, in order to design the motion controller, the motion control law formula proposed here is: Where Tx and Ty are positive tracking parameters, x r ,y r is the reference coordinate of point I, e x 、e y is the error between the robot and the reference trajectory, e x =x r -x, e y =y r -y.
[0054] The stability analysis of the motion controller uses the above inverse kinematic formula Subtract the motion control law formula The formula can be obtained: In the formula, The goal of the motion controller is to quickly return Δv to zero (Δv→0), so the above formula Can be rewritten as: In order to study the stability of the motion controller, the Lyapunov function formula is considered here: The derivative of the Lyapunov function is given by the following expression: Known T x >0,T y >0, that is, V1<0, from which it can be deduced that the tracking system is asymptotically stable at the equilibrium point, that is, the tracking control error vector e(t) converges to zero in a finite time.
[0055] The dynamic controller design based on sliding mode control is as follows: Sliding mode control (SMC) is a control strategy that is established with the help of two control laws. The first control law is called the equivalent term (equivalent control term Ueq), which aims to bring the dynamics of the system to the selected sliding surface, while the second switching term (U sw ) then tries to maintain this dynamics along the given sliding surface in the future. In the dynamic control phase, the desired velocity v d With actual speed v c The difference between the two represents the tracking error e v =v d -v c In order to design the control law of the proposed controller, the sliding surface is calculated using the following calculation process:
[0056] s=e v +k∫e v
[0057]
[0058] The formula for rewriting the dynamic model formula of the mobile robot is Substitution Get the formula: As mentioned above, the equivalent control term (U eq ) intends to bring the system dynamics to the sliding surface by making (h = 0), so U eq By formula It is concluded that the arrival motion adopts the switching term (U sw ), so that the system dynamics approaches the sliding surface, the switching term expression is: U sw =B -1 sgn(x), where sgn is the sign function. Finally, the above two control laws are and U sw =B -1 sgn(x) and sgn(x) to obtain the control law formula of the sliding surface: U = U eq +K2U sws .
[0059] Stability analysis of dynamic controller of sliding mode control. In order to analyze the stability of dynamic controller, this algorithm adopts Lyapunov function formula: After derivation, we get the formula: By replacing the control law U in this formula, we can get the formula: Assignment: Ks>max(δ), the formula is: Select K s >max(δ) (max(δ) is the maximum value of δ), we get Therefore, the state of the system will converge to the sliding surface in a finite time.
[0060] The FA algorithm is used to optimize the motion and dynamic controllers. In order to achieve the control objective of minimizing the path tracking error, all parameters of the proposed motion controller (motion controller combined with SMC) are obtained in detail using the FA algorithm. In fact, the most important stage in the application of the FA algorithm is the selection of the best cost function, which is used to determine the fitness value of each candidate solution. The adjustment stage is subject to the minimization problem, which is given by the formula The cost function (MAE) is executed, where ex(i) and ey(i) are the errors of the x-coordinate and y-coordinate of the trajectory obtained by the FA algorithm of the i-th sample, and n is the number of samples. The FA algorithm searches for the near-optimal parameters of the two controllers in a 6-dimensional space with parameters between 0 and 100. The implemented algorithm first generates a random solution and then calculates the optimal solution according to the formula Update the position of the fireflies. The cost function (MAE) is calculated for each candidate and the best solution it obtains at each iteration. The implemented algorithm will be repeated until the maximum iteration is reached.
[0061] Through the above methods, the following provides the experimental results of path planning and path tracking of mobile robots in different scenarios. In path planning, in order to verify the performance of the algorithm (FA), two typical configurations are set, that is, the robot moves from a given current position to a target point in various environments with different obstacles. These two complex test cases are: rectangular obstacle scene and circular obstacle scene. Figure 6 , 7 The results obtained using the FA algorithm are shown, and the paths obtained under all different configurations. It can be clearly seen from the figure that the FA algorithm optimization technology proposed in the present invention provides a smooth trajectory without any collision, indicating good performance and good responsiveness.
[0062] In path tracking, the proposed control technique is first applied to two well-known reference trajectories (circular trajectory and figure-8 trajectory). For the circular trajectory, the initial pose of the robot is: d =[x0,y0,θ0]=[1.7,0.5,0], for the figure-8 trajectory, the initial position of the robot is: q d=[x0,y0,θ0]=[0.2,0,0]. The controller parameters used to perform the control task are: T x =5, T y =7, k=diag(10,10), k s =diag(5,5), k=diag(5,5), ε=diag(5,5). The results of the proposed controller on the considered trajectory are shown in Fig.10 , 11 As shown, the path tracking results of the two typical obstacle area configurations are shown in Fig.12 , as shown in 13. In addition, Figure 8 and Fig.10 The application results of the circular and figure-8 control schemes are given, and their convergence speed is faster. Fig. 9 and Fig.11 The tracking errors of the x and y coordinates of the circular and 8-shaped robots are shown. It is obvious from the simulation results that the maximum tracking errors ex and ey for the 8-shaped robot are 0.014 and 0.007, respectively, and the maximum tracking errors ex and ey for the circular robot are 0.005 and 0.003, respectively, which shows good tracking performance. The good tracking performances are as follows: 1. Accuracy. For the 8-shaped robot, the stable errors of the proposed method on the x and y coordinates are 1.4% and 0.7%, respectively, and for the circular robot, the stable errors on the x and y coordinates are 0.5% and 0.3%, respectively; 2. Speed. The robot controlled by the method combining motion controller and SMC reaches the reference value within 0.8s and 0.9s for the circular robot and the 8-shaped robot, respectively; 3. Robustness. Figure 8 , 9, 10, 11, it is evident that the proposed control architecture provides good performance during simulation even when varying the shape, initial conditions and applying random uncertainties with amplitudes between 0 and 2.
[0063] The above embodiments and drawings do not limit the product form and style of the present invention. Any appropriate changes or modifications made by ordinary technicians in the relevant technical field should be deemed to be within the patent scope of the present invention.
Claims
1. A path planning and tracking method combining FA algorithm and motion controller with sliding mode control, characterized in that: Path planning and tracking methods include S1. Establish the motion model and dynamic model of the mobile robot; S2, processing the path planning calculation of the mobile robot based on the FA algorithm, and creating the robot's path with the help of the spline interpolation method, so as to perform path planning; S3. Path tracking is performed by combining motion controller design with dynamic controller design based on sliding mode control.
2. The path planning and tracking method of a FA algorithm and a motion controller combined with sliding mode control as claimed in claim 1, characterized in that: The calculation process of the FA algorithm is as follows: Assume it is the i-th candidate in the population, and the attractive force between two fireflies xi and xj is calculated as: In the formula, β(rij) represents the attraction of fireflies, β0 represents the attraction of fireflies when r=0, γ is the light coefficient, rij represents the distance between xi and xj, and the calculation formula of rij is: Compare the firefly xi with other candidates xj in the population. If xj is brighter than xi, it will be attracted and converge to xj. The expression of this attracted convergence motion is: In the formula, the total number of iterations in the FA algorithm is represented by n, α is a random parameter, r is a random number, and i The light intensity I i Determined by the cost function f(xi).
3. The path planning and tracking method of a FA algorithm and a motion controller combined with sliding mode control as claimed in claim 2, characterized in that: After randomly initializing the coordinates of the processing points, the main loop of the FA algorithm begins. The new positions of the selected processing points are updated according to the expression of the attracted convergent motion, and the cost function is calculated at each iteration. This is repeated until the termination criterion of the number of iterations is met. In this way, the FA algorithm determines the positions of the spline points using the spline interpolation method to create the optimal path curve trajectory from the starting point to the target point, where The path of the mobile robot is expressed as PH = (S, p1, p2, pn_1..., T), where PH is the path, S is the starting point, T is the target point, p1, p2, pn_1 are the middle points connecting the starting point and the end point of the path, and the minimum trajectory length d(x, y) is obtained by the following formula: The calculation gives, where x = [x0, x1, ..., x T ],y=[y0,y1,…,y T ] are the x and y coordinates of the mobile robot path; Path planning includes defining the collision avoidance constraints of the path curve and calculating the distance from the i-th point of the path curve trajectory to the j-th obstacle center. The distance L between the i-th point and the j-th point of the obstacle center can be calculated by the formula The calculation gives, where j = {1, 2, ..., n}, x objs ,y objs is the center coordinate of the jth obstacle; the feasibility of the i-th point of the trajectory after colliding with the j-th obstacle can be expressed as c j =max(1_d ij / r objs ,0), where r objs is the radius of the jth obstacle. The trajectory violation from the collision to the jth obstacle is calculated as the average of all violations, given by vj = mean(cj), where vj represents the violation relative to the jth obstacle, mean represents the average, and cj represents the compromise vector of all points violated by the ith obstacle. Repeat for all obstacles and calculate the vector v c =[v1,v2,…,v n ], After defining the path curve collision avoidance constraint, the cost function is obtained through the penalty function coefficient. The expression is the cost function f(x i )=L*(1+ε*v c ), where L represents the total path length and ε is the penalty coefficient.
4. The path planning and tracking method of a FA algorithm and a motion controller combined with sliding mode control as claimed in claim 3, characterized in that: The motion controller is designed as follows, and the motion control law formula is proposed as follows: Where Tx and Ty are positive tracking parameters, x r ,y r is the reference coordinate of point I, e x 、e y is the error between the robot and the reference trajectory, e x =x r -x, e y =y r -y; Stability analysis of motion controllers using inverse kinematics formulas Subtract the motion control law formula Get the formula: In the formula, formula Rewritten as: Using the Lyapunov function formula: The derivative of the Lyapunov function is given by the following expression: Known T x >0,T y >0, That is, V1<0, the tracking control error vector e(t) converges to zero in a finite time, and the tracking system is asymptotically stable at the equilibrium point.
5. The path planning and tracking method of a FA algorithm and a motion controller combined with sliding mode control as claimed in claim 4, characterized in that: The dynamic controller design based on sliding mode control is as follows. Sliding mode control uses the equivalent control term Ueq and the switching term U sw Establish and calculate the sliding surface using the following calculation process: s=e v +k∫e v The formula for rewriting the dynamic model formula of the mobile robot is Substitution Get the formula: Equivalent control item U eq By setting (h = 0), the system dynamics is brought to the sliding surface, and the formula It is concluded that the arrival motion adopts the switching term U sw , so that the system dynamics approach the sliding surface, the expression is: U sw =B -1 sgn(x), where sgn is the sign function, Will and U sw =B -1 sgn(x) and sgn(x) to obtain the control law formula of the sliding surface: U = U eq +K2U sws ; The stability analysis of the dynamic controller based on sliding mode control adopts the Lyapunov function formula: After derivation, we get the formula: Substituting the control law U in the formula, we get the formula: Assignment: K s >max(δ), we can get the formula: Select K s >max(δ), max(δ) is the maximum value of δ, and we get The state of the system will converge to the sliding surface in a finite time.
6. The path planning and tracking method of combining FA algorithm and motion controller with sliding mode control as claimed in claim 5, characterized in that: The FA algorithm is used to optimize the motion controller and the dynamic controller based on sliding mode control to achieve path tracking error minimization control. In the FA algorithm, the formula The cost function is executed as follows: x (i) and e y (i) is the error of the x-coordinate and y-coordinate of the trajectory obtained by the FA algorithm of the i-th sample, n is the number of samples, and the FA algorithm searches for the near-optimal parameters of the motion controller and the dynamic controller in a 6-dimensional space with parameters between 0 and 100. The algorithm first generates a random solution and then uses the formula The positions of the fireflies are updated, the cost function is calculated for each candidate and the best solution it obtains at each iteration, and the algorithm repeats until the maximum iterations are reached.