An optimization method for automatic cruise control of unmanned aerial vehicles based on Beidou positioning

By improving the crayfish algorithm and optimizing the heading angle PID controller of the UAV automatic cruise control system, the problem of response speed and accuracy of the traditional PID control method in complex environments is solved, and the response speed of the UAV in the aerial environment is improved. and security.

CN118466530BActive Publication Date: 2024-10-25WUXI XINENG REAL ESTATE MANAGEMENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410529738.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-10-25
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

The traditional PID control method has insufficient response speed and low control accuracy in UAV automatic cruise, especially in complex aerial environments, it lacks safety and response speed.

Method used

Improve the crayfish algorithm by introducing Tent mapping to improve the initialization position formula, adaptive weight to improve parameter C, introducing a spiral search strategy to improve the position update formula in the foraging phase, and optimizing the heading angle PID controller of the UAV automatic cruise control system.

Benefits of technology

It improves the response speed and safety of the UAV automatic cruise control system in complex environments, solves the problems of difficulty in parameter tuning and insufficient accuracy of traditional PID controllers, and enhances the convergence speed and search efficiency of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118466530B_ABST
    Figure CN118466530B_ABST
Patent Text Reader

Abstract

The invention discloses an automatic cruise control optimization method for an unmanned aerial vehicle based on Beidou positioning, which belongs to the technical field of PID control optimization. The specific steps are as follows: step one, designing an automatic cruise control system for an unmanned aerial vehicle, and establishing a simulation model for a heading angle PID controller of the unmanned aerial vehicle; step two, improving a crayfish algorithm, wherein the improvements include: (1) introducing tent mapping to improve an initialization formula of the crayfish algorithm; (2) introducing an adaptive weight to improve a parameter C; (3) introducing a spiral search strategy to improve a position update formula in a crayfish foraging stage; step three, establishing a mathematical model for the improved crayfish algorithm; and step four, after the algorithm iteration is completed, assigning an optimal solution found by the improved crayfish algorithm to three parameters of a heading angle PID controller of the unmanned aerial vehicle, and running a simulation model of the heading angle PID controller of the unmanned aerial vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of PID control optimization, and in particular relates to an automatic cruise control optimization method for a UAV based on Beidou positioning. Background Art

[0002] Automatic cruise has always been the research focus of drone technology, and it is also the core of making a drone safe and intelligent. In recent years, with the continuous improvement of the Beidou satellite navigation system, a Beidou-based drone application ecosystem is gradually taking shape, enabling drones to play their unique value in various application scenarios, such as agriculture, forestry, geological surveys, and emergency rescue.

[0003] During the automatic cruising process of a UAV, the heading angle control of the UAV is an important part. It ensures that the UAV can fly stably according to the predetermined route, or make flexible turns as needed. The heading angle of the UAV generally adopts the PID control method to ensure that the UAV can stably and accurately track the desired trajectory or perform specific flight missions. The traditional PID control method is not only difficult to manually adjust the parameters, but also has low control accuracy, especially lacking in safety and response speed when facing complex aerial environments.

[0004] In recent years, intelligent algorithm optimization PID control has become a research hotspot. This control method can not only automatically tune PID parameters, but also adaptively adjust parameters according to real-time working conditions and environmental changes, so that the control system can better adapt to different working conditions and external interference; the crayfish algorithm (COA) is a new type of swarm intelligent optimization algorithm proposed in 2023. It is inspired by the foraging, summer escape and competitive behaviors of crayfish. Among them, foraging behavior and competitive behavior are the development stage of COA, and summer escape behavior is the exploration stage of COA. As a swarm intelligent optimization algorithm, the crayfish algorithm has strong global search capabilities and can effectively balance the advantages of global search and local search, but it also has the problem of slow convergence in the early stage and easy to fall into local optimal solutions in the later stage. Summary of the invention

[0005] The purpose of the present invention is to propose an optimization method for automatic cruise control of unmanned aerial vehicles based on Beidou positioning, and optimize the three parameters of the heading angle PID controller of the automatic cruise control system of the unmanned aerial vehicle by improving the crayfish algorithm, so as to solve the problems of insufficient response speed and low control accuracy when the traditional PID controller is applied to the automatic cruise control system of unmanned aerial vehicles based on Beidou positioning in complex environments, thereby enhancing the reaction speed and safety of the automatic cruise control system of unmanned aerial vehicles based on Beidou positioning in the complex aerial environment during operation.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] An optimization method for automatic cruise control of a UAV based on Beidou positioning, the specific steps are as follows:

[0008] Step 1: Design an automatic cruise control system for a UAV and establish a simulation model for the heading angle PID controller of the automatic cruise control system for a UAV.

[0009] Step 2: Improve the crayfish algorithm. The improvements include: (1) Introducing Tent mapping to improve the initialization position formula of the crayfish algorithm; (2) Introducing adaptive weights to improve parameter C; (3) Introducing a spiral search strategy to improve the position update formula during the crayfish foraging phase.

[0010] Step 3: Establish a mathematical model for the improved crayfish algorithm.

[0011] Step 4. After the algorithm iteration is completed, the optimal solution found by the improved crayfish algorithm is assigned to the three parameters of the heading angle PID controller of the UAV automatic cruise control system, and the heading angle PID controller simulation model is run to verify the superiority of the improved crayfish algorithm.

[0012] Furthermore, in the step one, the automatic cruise control system of the unmanned aerial vehicle includes: an output angle module, an angle deviation calculation module, a heading angle PID controller module, an improved crayfish algorithm module, a speed PID controller module, a speed deviation calculation module, a motor module, and an angle and speed information acquisition module.

[0013] Furthermore, in the step 1, the output angle module transmits the longitude and latitude of the target position through the Beidou positioning device of the drone, calculates the longitude difference △x and the latitude difference △y through the longitude and latitude of the target position and the longitude and latitude of the drone, and obtains the angle deviation between the target position and the initial position of the drone according to the angle calculation formula, which is as follows:

[0014]

[0015] Where w is the angular velocity of the UAV when it turns toward the target position during automatic cruising.

[0016] Furthermore, in the step one, a simulation model is established in Simulink software for the heading angle PID controller of the automatic cruise control system of the UAV, the heading angle control problem is converted into a mathematical model to be optimized, and a second-order nonlinear transfer function is designed to simulate the working condition of the UAV during automatic cruising.

[0017] Furthermore, in step 2, the crayfish algorithm is improved, and the specific steps are as follows:

[0018] Step 1. Introduce Tent mapping to improve the initialization position formula of the crayfish algorithm. The Tent mapping is as follows:

[0019] X 1,j =lb j +r*(ub j -lb j );

[0020]

[0021]

[0022] In the formula, X 1,j is the value of the jth dimension of the individual with sequence 1 in the population generated by the pseudo-random number method, i = 1, ..., N, j = 1, ..., dim, dim is the individual dimension of the population, N is the number of populations, lb j is the value of the jth dimension of the individual lower bound, ub j is the value of the jth dimension of the individual upper bound, x i+1,j is the value of the jth dimension of the i+1th individual, x i,j is the value of the jth dimension of the ith individual, μ is a random number between (0, 2], and b is the value of the jth dimension of the ith individual mapped to the interval (0, 1];

[0023] Step 2: Introduce adaptive weight to improve parameter C. The formula of improved C is as follows:

[0024]

[0025] Where C is a value that decreases nonlinearly from 2 to 1, k is the current number of iterations, and T is the maximum number of iterations;

[0026] Step 3: Introduce the spiral search strategy to improve the position update formula of the crayfish in the foraging stage. The improved position update formula of the crayfish in the foraging stage is as follows:

[0027]

[0028] A = 2r*aa;

[0029]

[0030] D=|X food,j -x i,j (k)|;

[0031] In the formula, x i,j(t+1) is the value of the jth dimension of the individual's new position calculated by the improved position update formula of the crayfish foraging stage, D is the distance between the position of the ith individual and the food position, expressed in absolute value, z is a constant used to define the shape of the logarithmic spiral, l is a random number in the interval [-1, 1], X food,j is the value of the jth dimension of the food position, x i,j (k) is the value of the jth dimension of the i-th individual in the current iteration, p is a nonlinear function simulating the movement of the crayfish claw, Q is 2, A is a coefficient between [-1, 1], a is a value that decreases linearly from 2 to 1 related to the number of iterations, k is the current number of iterations, T is the maximum number of iterations, and i, j and r have the same meanings as above;

[0032] The formula for p is as follows:

[0033]

[0034] temp = 15r + 20;

[0035] Where temp is the temperature of the environment where the crayfish lives, σ and C1 are constants used to control the amount of food consumed by crayfish at different temperatures, μ is the temperature most suitable for crayfish to eat, and r is a random number between (0, 1].

[0036] Furthermore, in step three, a mathematical model is established for the improved crayfish algorithm, and the specific steps are as follows:

[0037] S1. Given the algorithm population size N, the maximum number of iterations T, the individual dimension dim, and the upper and lower bounds of the individual position ub, lb and other parameters, the ITAE function is selected as the algorithm's fitness function. ITAE is used to measure the dynamic response performance of the control system. It can comprehensively consider the influencing factors of response time and error, so that the control system can maintain stable performance under various conditions. The formula of ITAE is as follows:

[0038]

[0039] In the formula, J is the fitness value calculated by the algorithm as a function, e(t) is the deviation between the automatic cruise heading angle of the UAV and the real-time steering angle of the UAV, and t is the response time of the control system;

[0040] S2. Chaotic mapping is introduced to improve the initial position formula of the crayfish algorithm, the initial position of the crayfish population individuals and the fitness of the initial position are calculated, and the individual with the smallest fitness is recorded as the best individual;

[0041] S3, through the change of temperature temp, the crayfish algorithm is controlled to enter the summer heat escape, foraging or competition stage. The calculation formula of temp is as follows:

[0042] temp = 15r + 20;

[0043] Where temp and r have the same meaning as above;

[0044] S4. When temp>30 and r<0.5, r is a random number between (0, 1], the algorithm enters the summer vacation stage. The position update formula of crayfish in the summer vacation stage is as follows:

[0045] X i,j (t+1)=X i,j (t)+C2*r*(X shade,j -X i,j (t));

[0046] X shade,j =(X G,j +X L,j ) / 2;

[0047] In the formula, x i,j (t+1) is the value of the new position of the individuals in the summer period of the crayfish population after updating in the jth dimension, X shade,j is the value of the cave position in the jth dimension, X G,j is the value of the best position of the crayfish individual in the jth dimension since the algorithm iteration, X L,j is the value of the best individual of the crayfish population in the last iteration on the jth dimension, and j has the same meaning as above;

[0048] S5. When temp>30 and r≥0.5, the algorithm enters the foraging stage. The spiral search strategy is introduced to improve the position update formula of the crayfish foraging stage. The improved position update formula of the crayfish foraging stage is the same as above:

[0049] S6. When temp<30, the algorithm enters the competition stage. The position update formula of the crayfish in the competition stage is as follows:

[0050] X i,j (t+1)=X i,j (t)-X m,j (t)+X shade,j ;

[0051] In the formula, x i , j (t+1) is the value of the new position of the individual after updating in the competition stage of the crayfish population in the jth dimension, X shade,j is the value of the cave position in the jth dimension, X m,j (t) is the value of the position of a crayfish randomly selected from the population in the jth dimension, m is a random number between (0, N], and N is the population size;

[0052] S7, check whether the position of each individual in the population is out of bounds, and select the best individual X in the current iteration according to the size of the fitness value. L Generally, the individual with the smallest fitness is the best individual in the current iteration. The best position of the crayfish individuals in the population since the algorithm iteration is determined by greedy selection. The formula for greedy selection is as follows:

[0053]

[0054] In the formula, fit(X L ) is the fitness of the best individual in the current iteration calculated by the fitness function, fit(X G ) is the fitness of the best position of the individual crayfish in the population since the algorithm iteration calculated by the fitness function;

[0055] S8. Determine whether the current number of iterations t reaches the maximum number of iterations T. If so, the algorithm stops iterating and outputs the optimal solution. Otherwise, return to S3 to continue optimizing.

[0056] Further, in step 4, after the algorithm iteration is completed, the optimal solution found by the improved crayfish algorithm iteration is assigned to the three parameters of the heading angle PID controller of the automatic cruise control system of the UAV, and the heading angle PID controller simulation model is run. The specific steps are:

[0057] Q1. The three dimensional values ​​of the optimal solution are passed into the three parameters Kp, Ki, and Kd of the heading angle PID controller;

[0058] Q2, run the heading angle PID controller, the output angle module outputs the target angle θ, calculates the angle deviation value e1(t), and transmits the angle deviation value e1(t) to the heading angle PID controller;

[0059] Q3, after the heading angle PID controller optimized by the improved crayfish algorithm is adjusted, the angle control value u(t) is output to the speed deviation calculation module to calculate the speed deviation value e2(t);

[0060] Q4, the speed deviation value e2(t) is transmitted to the speed PID controller module, and after adjustment by the speed PID controller module, the speed control value v(t) is output to the motor module;

[0061] Q5. The motor starts running after receiving the command. The angle and speed information acquisition module collects the deflection angle value θ(t) and the motor running speed y(t) of the drone during automatic cruising, and feeds them back to the deviation calculation module to complete the closed-loop cascade PID control of the drone heading angle PID controller.

[0062] By adopting the above technical solution, the present invention achieves the following beneficial effects:

[0063] The present invention proposes an optimization method for automatic cruise control of unmanned aerial vehicles based on Beidou positioning. The method improves the population initialization position formula by introducing Tent mapping, thereby increasing the diversity of solutions in the population and improving the convergence speed of the algorithm. The adaptive weight is introduced to improve the calculation formula of parameter C, so that C changes from linear reduction to nonlinear reduction, thereby enhancing the time autocorrelation of the algorithm. The spiral search strategy is introduced to improve the position update formula of crayfish foraging stage, thereby greatly improving the efficiency and breadth of the algorithm in the search process. The improved crayfish algorithm is used to optimize the heading angle PID controller of the unmanned aerial vehicle, thereby solving the problems of difficult parameter setting of traditional PID controllers and insufficient precision of manually adjusted parameters. Thus, the safety and reaction speed of the heading angle PID controller of the unmanned aerial vehicle automatic cruise control system in the face of nonlinear unmanned aerial vehicle automatic cruise control and complex air environments are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 Diagram of the steps to improve the crayfish algorithm to optimize the drone's automatic cruise control system.

[0065] Figure 2 This is a model diagram of the automatic cruise control system for drones.

[0066] Figure 3 Flowchart for improving the crayfish algorithm.

[0067] Figure 4 This is the simulation diagram of the UAV heading angle PID controller.

[0068] Figure 5 This is a comparison chart of the best fitness functions of the ordinary crayfish algorithm and the improved crayfish algorithm.

[0069] Figure 6 This is a comparison chart of the effects of optimizing the UAV heading angle PID controller using the ordinary crayfish algorithm and the improved crayfish algorithm. DETAILED DESCRIPTION

[0070] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. The following embodiments are only a part of the embodiments of the present invention and are used to more clearly illustrate the technical solutions of the present invention. It can be understood that the specific embodiments are only used to explain the present invention, but the implementation methods of the present invention are not limited thereto.

[0071] The present invention provides a method for optimizing automatic cruise control of a UAV based on Beidou positioning, such as Figure 1 As shown, it is divided into the following four steps:

[0072] Step 1: Design the UAV automatic cruise control system and establish a simulation model for the heading angle PID controller. Figure 2As shown, the automatic cruise control system of the UAV includes: an output angle module, an angle deviation calculation module, a heading angle PID controller module, an improved crayfish algorithm module, a speed PID controller module, a speed deviation calculation module, a motor module, and an angle and speed information acquisition module.

[0073] Furthermore, when the heading angle PID controller of the automatic cruise control system of the UAV is running, the output angle module outputs the target angle θ, calculates the angle deviation value e1(t), and transmits the angle deviation value e1(t) to the heading angle PID controller; after adjustment by the heading angle PID controller optimized by the improved crayfish algorithm, the angle control value u(t) is output to the speed deviation calculation module, and the speed deviation value e2(t) is calculated; the speed deviation value e2(t) is transmitted to the speed PID controller module, and after adjustment by the speed PID controller module, the speed control value v(t) is output to the motor module; the motor starts running after receiving the instruction, completing the automatic cruise process of the UAV from the initial position to the target position; the angle and speed information acquisition module collects the angle value θ(t) of the UAV deflection during the automatic cruise and the motor running speed y(t), and feeds them back to the deviation calculation module to complete the closed-loop cascade PID control of the automatic cruise control system of the UAV.

[0074] Step 2: Improve the crayfish algorithm. The specific steps are as follows:

[0075] Step 1. Introduce Tent mapping to improve the initialization position formula of the crayfish algorithm. The Tent mapping is as follows:

[0076] X 1,j =lb j +r*(ub j -lb j );

[0077]

[0078]

[0079] In the formula, X 1,j is the value of the jth dimension of the individual with sequence 1 in the population generated by the pseudo-random number method, i = 1, ..., N, j = 1, ..., dim, dim is the individual dimension of the population, N is the number of populations, lb j is the value of the jth dimension of the individual lower bound, ub j is the value of the jth dimension of the individual upper bound, x i+1,j is the value of the jth dimension of the i+1th individual, x i,j is the value of the jth dimension of the ith individual, μ is a random number between (0, 2], and b is the value of the jth dimension of the ith individual mapped to the interval (0, 1];

[0080] Step 2: Introduce adaptive weight to improve parameter C. The formula of improved C is as follows:

[0081]

[0082] Where C is a value that decreases nonlinearly from 2 to 1, k is the current number of iterations, and T is the maximum number of iterations;

[0083] Step 3: Introduce the spiral search strategy to improve the position update formula of the crayfish in the foraging stage. The improved position update formula of the crayfish in the foraging stage is as follows:

[0084]

[0085] A = 2r*aa;

[0086]

[0087] D=|X food,j -x i,j (k)|;

[0088] In the formula, x i,j (t+1) is the value of the jth dimension of the individual's new position calculated by the improved position update formula of the crayfish foraging stage, D is the distance between the position of the ith individual and the food position, expressed in absolute value, z is a constant used to define the shape of the logarithmic spiral, l is a random number in the interval [-1, 1], X food,j is the value of the jth dimension of the food position, x i,j (k) is the value of the jth dimension of the i-th individual in the current iteration, p is a nonlinear function simulating the movement of the crayfish claw, Q is 2, A is a coefficient between [-1, 1], a is a value that decreases linearly from 2 to 1 related to the number of iterations, k is the current number of iterations, T is the maximum number of iterations, and i, j and r have the same meanings as above;

[0089] The formula for p is as follows:

[0090]

[0091] temp = 15r + 20;

[0092] Where temp is the temperature of the environment where the crayfish lives, σ and C1 are constants used to control the amount of food consumed by crayfish at different temperatures, μ is the temperature most suitable for crayfish to eat, and r is a random number between (0, 1].

[0093] Step 3: Establish a mathematical model for the improved crayfish algorithm, such as Figure 3 As shown, the specific steps to establish the model are as follows:

[0094] S1. Set the algorithm population size N to 100, the maximum number of iterations T to 200, the individual dimension dim to 10, the individual position upper and lower bounds ub to 100 and lb to -100, write the algorithm test code, select the appropriate test function, and verify that the improved crayfish algorithm performs better than the ordinary crayfish algorithm;

[0095] S2. Chaotic mapping is introduced to improve the initial position formula of the crayfish algorithm, the initial position of the crayfish population individuals and the fitness of the initial position are calculated, and the individual with the smallest fitness is recorded as the best individual;

[0096] S3, through the change of temperature temp, the crayfish algorithm is controlled to enter the summer heat escape, foraging or competition stage. The calculation formula of temp is as follows:

[0097] temp = 15r + 20;

[0098] Where temp and r have the same meaning as above;

[0099] S4. When temp>30 and r<0.5, r is a random number between (0, 1], the algorithm enters the summer vacation stage. The position update formula of crayfish in the summer vacation stage is as follows:

[0100] X i,j (t+1)=X i,j (t)+C2*r*(X shade,j -X i,j (t));

[0101] X shade,j =(X G,j +X L,j ) / 2;

[0102] In the formula, x i,j (t+1) is the value of the new position of the individuals in the summer period of the crayfish population after updating in the jth dimension, X shade,j is the value of the cave position in the jth dimension, X G,j is the value of the best position of the crayfish individual in the jth dimension since the algorithm iteration, X L,j is the value of the best individual of the crayfish population in the last iteration on the jth dimension, and j has the same meaning as above;

[0103] S5. When temp>30 and r≥0.5, the algorithm enters the foraging stage. The spiral search strategy is introduced to improve the position update formula of the crayfish foraging stage. The improved position update formula of the crayfish foraging stage is the same as above:

[0104] S6. When temp<30, the algorithm enters the competition stage. The position update formula of the crayfish in the competition stage is as follows:

[0105] X i,j (t+1)=X i,j (t)-X m,j (t)+X shade,j ;

[0106] In the formula, x i,j (t+1) is the value of the new position of the individual after updating in the competition stage of the crayfish population in the jth dimension, X shade,j is the value of the cave position in the jth dimension, X m,j (t) is the value of the position of a crayfish randomly selected from the population in the jth dimension, m is a random number between (0, N], and N is the population size;

[0107] S7, check whether the position of each individual in the population is out of bounds, and select the best individual X in the current iteration according to the fitness value. L Generally, the individual with the smallest fitness is the best individual in the current iteration. The best position X of the individual crayfish in the population since the algorithm iteration is determined by greedy selection. G , the formula for greedy selection is as follows:

[0108]

[0109] In the formula, fit(X L ) is the fitness of the best individual in the current iteration calculated by the fitness function, fit(X G ) is the fitness of the best position of the individual crayfish in the population since the algorithm iteration calculated by the fitness function;

[0110] S8. Determine whether the current number of iterations t reaches the maximum number of iterations T. If so, the algorithm stops iterating and outputs the optimal solution. Otherwise, return to S3 to continue optimizing.

[0111] After the algorithm iteration is completed, the superiority of the improved crayfish algorithm performance is verified. It can be seen that Figure 5 As shown in the figure, compared with the ordinary crayfish algorithm, the improved crayfish algorithm increases the diversity of solutions in the algorithm after introducing the tent mapping to initialize the population. During the algorithm iteration, due to the introduction of the adaptive weight improvement parameter C, the convergence speed of the improved crayfish algorithm is always higher than that of the ordinary crayfish algorithm. In the later stage of the iteration, the search depth of the improved crayfish algorithm is also much higher than that of the ordinary crayfish algorithm. After 200 iterations, the final fitness value of the improved crayfish algorithm is 1.1347×10 -216 , the final fitness value of the common crayfish algorithm is 3.0955×10 -158It can be seen that the convergence accuracy of the improved crayfish algorithm is higher than that of the ordinary crayfish algorithm, and it can be concluded that the performance of the improved crayfish algorithm is better than that of the ordinary crayfish algorithm. The improved crayfish algorithm can be used to optimize the UAV heading angle PID controller.

[0112] Step 4: After the algorithm iteration is completed, the optimal solution found by the improved crayfish algorithm is assigned to the three parameters of the heading angle PID controller of the UAV automatic cruise control system, and the heading angle PID controller simulation model is run. The specific steps are as follows:

[0113] Q1. Build a simulation model of the heading angle PID controller of the UAV automatic cruise control system, such as Figure 4 As shown, the model includes: a step signal module, a deviation calculation module, a PID controller module, an output limit module, a transfer function module, an oscilloscope module, an absolute value module, a timer module, a multiplier module, an integration module, and an output port and a hub module;

[0114] Q2. In order to simulate the working condition of the UAV during automatic cruising, a second-order nonlinear transfer function is designed to simulate the process of automatic cruising of the UAV. The second-order nonlinear transfer function is as follows:

[0115]

[0116] In the formula, s is a complex frequency domain variable, G is the output value of the transfer function, and represents the real-time steering angle value of the UAV in the UAV heading angle PID controller;

[0117] Q3, the simulation model of the heading angle PID controller is divided into two parts, one is the closed-loop control of the heading angle PID controller, and the other is the ITAE performance index part;

[0118] Q4. Set the simulation time of the heading angle PID controller to 10s, set the algorithm population size N to 30, the maximum number of iterations T to 30, the individual dimension dim to 3, the individual position upper and lower bounds ub to 10, and lb to 0;

[0119] Q5. Select the ITAE function as the fitness function of the algorithm. The formula of ITAE is as follows:

[0120]

[0121] Where J is the fitness value calculated by the fitness function, e(t) is the deviation between the heading angle of the UAV automatic cruise and the real-time steering angle of the UAV, and t is the response time of the control system;

[0122] Q6. The algorithm starts to iterate and the system starts to run to find the optimal parameters of the heading angle PID controller. After the iteration is terminated, the optimal parameters are output to the heading angle PID controller.

[0123] like Figure 6 As shown in the figure, from the comparison of the effects of the improved crayfish algorithm and the ordinary crayfish algorithm in optimizing the heading angle PID controller of the automatic cruise control system of the UAV, it can be seen that, first, the overshoot of the heading angle PID controller optimized by the improved crayfish algorithm is much smaller than that of the heading angle PID controller optimized by the ordinary crayfish algorithm. Secondly, the heading angle PID controller optimized by the improved crayfish algorithm reached dynamic balance at 4s, while the heading angle PID controller optimized by the ordinary crayfish algorithm reached dynamic balance at 6s. Finally, the ITAE value of the heading angle PID controller optimized by the improved crayfish algorithm is 0.54534, while the ITAE value of the heading angle PID controller optimized by the ordinary crayfish algorithm is 0.68109. Based on the principle that the smaller the ITAE value, the better the performance of the PID controller, it shows that the performance of the heading angle PID controller optimized by the improved crayfish algorithm is better than that of the heading angle PID controller optimized by the ordinary crayfish algorithm.

[0124] Based on the above specific implementation methods and experimental results, the patent of this invention proposes a method for optimizing automatic cruise control of unmanned aerial vehicles based on Beidou positioning, and the heading angle PID controller of the automatic cruise control system of unmanned aerial vehicles optimized by the improved crayfish algorithm has superior performance and sufficient innovation, which can greatly enhance the reaction speed and safety of the automatic cruise control system of unmanned aerial vehicles in the complex aerial environment during the automatic cruise control of unmanned aerial vehicles.

Claims

1. A method for optimizing automatic cruise control of unmanned aerial vehicles based on Beidou positioning, characterized in that: The specific steps are: Step 1: Design the UAV automatic cruise control system and establish a simulation model for the heading angle PID controller; Step 2: Improve the crayfish algorithm. The improvements include: (1) Introducing Tent mapping to improve the initialization position formula of the crayfish algorithm; (2) Introducing adaptive weights to improve parameter C; (3) Introducing a spiral search strategy to improve the position update formula of the crayfish foraging stage; Improve the crayfish algorithm. The specific steps are as follows: Step 1. Introduce Tent mapping to improve the initialization formula of the crayfish algorithm. The Tent mapping formula is: ; ; ; In the formula, is the value of the jth dimension of the individual with sequence 1 in the population generated by the pseudo-random number method, i = 1,…, N, j = 1,…, dim, N is the population size, dim is the individual dimension of the population, is the value of the jth dimension of the individual lower bound, is the value of the jth dimension of the individual upper bound, is the value of the jth dimension of the i+1th individual, is the value of the jth dimension of the ith individual, is a random number between (0, 2], and b is The value of is mapped to the value in the interval (0, 1]; r is a random number between (0, 1]; Step 2: Introduce the adaptive weight improvement parameter C. The formula of the improved C is: ; Where C is a value that decreases nonlinearly from 2 to 1, k is the current number of iterations, and T is the maximum number of iterations; Step 3, introduce the spiral search strategy to improve the position update formula of the crayfish in the foraging stage; the improved position update formula of the crayfish in the foraging stage is: ; ; ; ; In the formula, is the value of the jth dimension of the individual's new position calculated by the improved position update formula of the crayfish foraging stage, D is the distance between the position of the ith individual and the food position, expressed in absolute value, z is a constant used to define the shape of the logarithmic spiral, l is a random number in the interval [-1, 1], is the value of the j-th dimension of the food position, is the value of the jth dimension of the i-th individual in the current iteration, p is a nonlinear function simulating the movement of the crayfish claw, Q is 2, A is a coefficient between [-1, 1], a is a value that decreases linearly from 2 to 1 related to the number of iterations, k is the current number of iterations, T is the maximum number of iterations, and i, j and r have the same meanings as above; The formula for p is: ; ; In the formula, temp is the temperature of the environment where the crayfish is located. and C1 are constants used to control the amount of food intake by crayfish at different temperatures. is the temperature most suitable for crayfish to eat, r is a random number between (0, 1]; Step 3: Establish a mathematical model for the improved crayfish algorithm; the specific steps are: S1. Given the algorithm population size N, the maximum number of iterations T, the individual dimension dim, and the upper and lower bounds of the individual position ub, lb and other parameters, the ITAE function is selected as the algorithm's fitness function. The formula for ITAE is: ; In the formula, J is the fitness value calculated by the algorithm, e(t) is the deviation between the UAV automatic cruise heading angle and the UAV's real-time steering angle, and t is the response time of the control system; S2. Chaotic mapping is introduced to improve the initial position formula of the crayfish algorithm, the initial position of the crayfish population individuals and the fitness of the initial position are calculated, and the individual with the smallest fitness is recorded as the best individual; S3, control the crayfish algorithm to enter the summer heat escape, foraging or competition stage by changing the temperature temp, the calculation formula of temp is the same as above; S4, when temp > 30, and r < 0.5, r is a random number between (0, 1], and the algorithm enters the summer vacation stage; S5. When temp > 30 and r ≥ 0.5, the algorithm enters the foraging stage. The spiral search strategy is introduced to improve the position update formula of the crayfish foraging stage. The improved position update formula of the crayfish foraging stage is the same as above: S6, when temp <30, the algorithm enters the competition stage; S7. After the position update is completed, check whether the position of each individual in the population is out of bounds, calculate the fitness of each individual position, and select the best individual in the current iteration according to the size of the fitness value. The individual with the smallest fitness is the best individual in the current iteration. The best position of the crayfish individual in the population since the algorithm iteration is determined by greedy selection. ; S8, determine whether the current number of iterations t reaches the maximum number of iterations T, if so, the algorithm stops iterating and outputs the optimal solution, otherwise returns to S3 to continue searching for the optimal solution; Step 4: After the algorithm iteration is completed, the optimal solution found by the improved crayfish algorithm is assigned to the three parameters of the heading angle PID controller of the UAV automatic cruise control, and the heading angle PID controller simulation model is run.

2. The method for optimizing automatic cruise control of unmanned aerial vehicle based on Beidou positioning according to claim 1 is characterized in that: In step 3, the position update formula of the crayfish in the summer vacation stage is: ; ; In the formula, is the value of the new position of the individuals in the summer stage of the crayfish population after updating in the jth dimension, is the value of the cave position in the jth dimension, is the value of the best position of the crayfish individual in the jth dimension since the algorithm iteration, is the value of the best individual of the crayfish population in the last iteration in the jth dimension, and the meaning of j is the same as above.

3. The method for optimizing automatic cruise control of unmanned aerial vehicle based on Beidou positioning according to claim 1 is characterized in that: In step 3, the position update formula in the crayfish competition phase is: ; In the formula, is the value of the new position of the individual in the competition stage of the crayfish population after updating in the jth dimension, is the value of the cave position in the jth dimension, is the value of the position of a crayfish randomly selected from the population in the jth dimension, m is a random number in (0, N], and N is the population size.

4. The method for optimizing automatic cruise control of unmanned aerial vehicle based on Beidou positioning according to claim 1 is characterized in that: The formula for greedy selection in step 3 is: ; In the formula, is the fitness of the best individual in the current iteration calculated by the fitness function, The fitness of the best position of the individual crayfish in the population since the algorithm iteration calculated by the fitness function.

5. The method for optimizing automatic cruise control of unmanned aerial vehicle based on Beidou positioning according to claim 1 is characterized in that: In step 4, after the algorithm iteration is completed, the optimal solution found by the improved crayfish algorithm is assigned to the three parameters of the heading angle PID controller of the automatic cruise control system of the UAV, and the heading angle PID controller simulation model is run. In order to simulate the working condition of the UAV during automatic cruising, a second-order nonlinear transfer function is designed to simulate the process of automatic cruising of the UAV. The second-order nonlinear transfer function is: ; Where s is a complex frequency domain variable, G is the output value of the transfer function, and represents the real-time steering angle value of the UAV in the UAV heading angle PID controller.

Citation Information

Patent Citations

  • Unmanned aerial vehicle cluster combat game decision method based on quantum krill population evolution mechanism

    CN109460056A

  • PID controller optimization method based on improved meta-heuristic algorithm

    CN116610025A

  • Unmanned aerial vehicle attitude control method based on intelligent optimization algorithm

    CN117706908A

  • Airplane flight path planning method and device based on the pigeon-inspired optimization

    US20210020051A1