Unmanned aerial vehicle control method and system

By combining the whale optimization algorithm and fuzzy PID control, and using CRICLE chaos mapping initialization to dynamically adjust the PID parameters of the UAV control system, the problem of overshoot and long adjustment time of the UAV under dynamic flight conditions is solved, and the system's robustness is improved. The stickiness and response speed improve flight performance and reliability.

CN118534932APending Publication Date: 2024-08-23SHANXI AGRI UNIV
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202410509961.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing UAV control systems have problems with overshoot and long adjustment times under dynamic flight conditions, are difficult to cope with complex nonlinear dynamics, and cannot fully address rapid environmental changes and high robustness requirements.

Method used

The improved whale optimization algorithm is combined with fuzzy PID control, and the PID control parameters are dynamically adjusted by collecting flight data. CRICLE chaos mapping is used to initialize the whale optimization algorithm model, and the PID parameters are optimized to improve the stability and response speed of the control system.

Benefits of technology

It significantly reduces the overshoot of the system, shortens the adjustment time, enhances the adaptability to environmental changes and external interference, and improves the flight performance and reliability of the drone.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118534932A
    Figure CN118534932A
Patent Text Reader

Abstract

The invention relates to an unmanned aerial vehicle control method and system. The method comprises the following steps: collecting flight data of an unmanned aerial vehicle; combining fuzzy logic, dynamically adjusting PID control parameters of the unmanned aerial vehicle according to the flight data, and obtaining initial PID control parameters; the initial PID control parameters are iteratively optimized through a whale optimization algorithm model, optimal PID parameters are obtained, flight of the unmanned aerial vehicle is controlled according to the optimal PID parameters, and the whale optimization algorithm model is initialized through CRICLE chaotic mapping. According to the invention, the improved whale optimization algorithm is combined with the strategy of the fuzzy PID controller, and the method is used for optimizing the control system of the quad-rotor unmanned aerial vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle flight control, and in particular to a control method and system for an unmanned aerial vehicle. Background Art

[0002] Quadrotors usually use PID controllers to manage flight control. Although the traditional PID controller is the basis of UAV control architecture, it faces challenges such as severe overshoot and long adjustment time, which affects its effectiveness in dynamic flight conditions. These limitations hinder the performance of UAVs in precision missions and their responsiveness to environmental variables.

[0003] Existing control systems, while widely used, have difficulty coping with the complex nonlinear dynamics of UAVs, which can severely affect their operational efficiency, which is particularly difficult in environments that require high precision and stability. Existing traditional methods, such as linear robust control and nonlinear backoff, still cannot address the full range of UAV dynamics, especially under various unpredictable conditions.

[0004] Various methods exist to enhance PID controllers, ranging from integrating fuzzy logic systems to adopting adaptive control strategies. Examples include the use of sliding mode controllers and adaptive fuzzy PID methods, which attempt to alleviate the problems found in traditional PID systems. However, these methods often fail to adequately address the rapid environmental changes and high robustness required for advanced UAV operations.

[0005] Therefore, there is still a major gap in the ability of existing UAV control systems to adapt and effectively manage flight dynamics. Clearly, a system is needed that can dynamically adjust to changing conditions while maintaining high accuracy and stability. Existing systems often require complex recalibration or are unable to adequately handle disturbances caused by sudden environmental changes.

[0006] Existing technologies provide a solid foundation, but are insufficient to meet all the challenges posed by modern UAV applications, especially in terms of efficiency, response time and adaptability to different operating environments. Therefore, the present invention proposes a control method and system for UAVs, moving towards a more integrated and adaptive control system, overcoming these limitations, combining an enhanced whale optimization algorithm with fuzzy PID control, aiming to significantly improve the performance and reliability of quadrotors. Summary of the invention

[0007] The purpose of the present invention is to solve the deficiencies of existing PID control systems in terms of dynamic optimization and parameter adjustment. Specifically, the present invention provides a control method and system for a drone, which is used to optimize the control system of a quadrotor drone by combining an improved whale optimization algorithm with a fuzzy PID controller strategy.

[0008] To achieve the above object, the present invention provides the following solutions:

[0009] A method for controlling a drone, comprising:

[0010] Collecting flight data from drones;

[0011] In combination with fuzzy logic, the PID control parameters of the UAV are dynamically adjusted according to the flight data to obtain initial PID control parameters;

[0012] The initial PID control parameters are iteratively optimized using a whale optimization algorithm model to obtain optimal PID parameters, and the flight of the drone is controlled according to the optimal PID parameters, wherein the whale optimization algorithm model is initialized using a CRICLE chaotic map.

[0013] Optionally, obtaining the initial PID control parameters includes:

[0014] The flight data is processed by the fuzzy logic to obtain errors and error change rates in the flight data, and the PID control parameters of the UAV are adjusted according to the errors and error change rates to obtain initial PID control parameters; wherein the fuzzy logic includes: fuzzy sets, membership functions and fuzzy rule bases.

[0015] Optionally, initialization using the CRICLE chaotic map includes:

[0016] Defining initialization boundaries and sizes; the boundaries include: upper boundaries and lower boundaries; the sizes include: circular mapping parameters;

[0017] Establish upper and lower limits of whale optimization algorithm model parameters, and correspond the whale optimization algorithm model parameters to the problem dimensions;

[0018] The upper and lower bounds of each variable in the whale optimization algorithm model parameters are detected. If each variable has different upper and lower bounds, the problem dimension corresponding to each variable is calculated separately to obtain the search agent position.

[0019] Optionally, obtaining the search proxy location includes:

[0020] According to the problem dimension corresponding to each variable, a random number within an upper limit and a lower limit is generated to provide an initial position for each search agent;

[0021] The initial position is adjusted based on the circular mapping parameters, and nonlinear dynamic changes are added through a sine function to obtain the search agent position.

[0022] Optionally, obtaining the optimal PID control parameter includes:

[0023] S1. updating each search agent position based on the shrinkage, encirclement and spiral of the whale optimization algorithm model, wherein the search agent position includes: PID control parameters;

[0024] S2, setting a maximum number of iterations and a convergence condition, repeatedly iterating the S1 until the maximum number of iterations and the convergence condition are reached, and obtaining the fitness of each updated search agent position;

[0025] S3. Select the search agent position with the best fitness as the optimal PID parameter.

[0026] Optionally, the method for updating the position of each search agent based on the shrinkage and envelopment of the whale optimization algorithm model is:

[0027]

[0028]

[0029] A=2a·r1-a

[0030] C=2·r2

[0031] in, Searching for the next generation of agents, is the position of the current optimal solution, A is the coefficient vector controlling the movement of the search agent, r1 and r2 are random vectors between [0,1], a is a linear decrease, D is the distance between the current position and the target position, b is a constant defining the spiral shape, l is a random number between [-1,1], is the coefficient that determines the nature of the whale's movement toward the prey or target, and C is the coefficient that controls the movement of the search agent toward the target or prey.

[0032] Optionally, the method for updating each search agent position based on the spiral of the whale optimization algorithm model is:

[0033]

[0034]

[0035] in, Searching for the next generation of agents, is the position of the current optimal solution, D′ is the distance between the current position and the target position, l is a random number between [-1,1], e is the control vector, b is the adjustment coefficient, is the current position of the search agent at time t.

[0036] Optionally, the method for obtaining the fitness of each updated search agent position is:

[0037] J(K p ,K i ,K d ,X)=w1·TSE+w2·ITSE+w3·TV+w4·CE

[0038] Among them, TSE is the total square error, ITSE is the time-weighted square error, TV is the total change of the control variable, CE is the control effort, w1, w2, w3, w4 are the weight factors of the items, K p , K i , K d are proportional, integral and differential gains respectively, X is other parameters or state variables of the system, and J is the fitness function.

[0039] To achieve the above object, the present invention further provides a control system for an unmanned aerial vehicle, comprising:

[0040] Data acquisition module, used to collect the flight data of the drone;

[0041] A search agent position acquisition module is used to dynamically adjust the PID control parameters of the UAV according to the flight data in combination with fuzzy logic to obtain initial PID control parameters;

[0042] The optimal parameter acquisition module is used to iteratively optimize the initial PID control parameters using the whale optimization algorithm model to obtain the optimal PID parameters, and control the flight of the drone according to the optimal PID parameters, wherein the whale optimization algorithm model is initialized using CRICLE chaotic mapping.

[0043] The beneficial effects of the present invention are:

[0044] Reducing the overshoot of the system: The present invention accurately adjusts the control parameters through the improved whale optimization algorithm to reduce the overshoot in the response process, thereby improving the stability and safety of the system.

[0045] Shorten adjustment time: The present invention optimizes the control algorithm to speed up the response speed and achieve faster system stabilization, thereby improving the operating efficiency of the UAV in a changing environment.

[0046] Enhance the robustness of the system: The present invention enhances the system's adaptability to environmental changes and external interferences through the integration of fuzzy logic and chaos mapping initialization.

[0047] Chaotic mapping initialization: The present invention uses CRICLE chaotic mapping technology to initialize the whale optimization algorithm, thereby improving the global search capability of the algorithm and the initialization effect of parameters, which is not available in the traditional whale optimization algorithm.

[0048] Fuzzy PID control integration: The present invention integrates fuzzy logic control into the PID control system and uses fuzzy rules to dynamically adjust PID parameters to adapt to rapidly changing flight environments and complex operating conditions.

[0049] Through the comprehensive application of these technologies, the present invention not only significantly improves the flight performance and safety of the quadrotor drone, but also improves its applicability and reliability in diverse application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0051] Figure 1 This is a flow chart of a control method for a drone according to an embodiment of the present invention;

[0052] Figure 2 This is a fuzzy PID control flow chart of the whale optimization algorithm according to an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of initial optimal parameters of an embodiment of the present invention;

[0054] Figure 4 is the Kp gain adjustment surface of the fuzzy PID in an embodiment of the present invention;

[0055] Figure 5 is the Ki gain adjustment surface of the fuzzy PID in an embodiment of the present invention;

[0056] Figure 6 It is the Kd gain adjustment surface of the fuzzy PID according to the embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] The present invention discloses a control method for a drone, comprising: collecting flight data of the drone; processing the flight data based on fuzzy logic to dynamically adjust PID control parameters of the drone, iteratively optimizing the initial PID control parameters using a whale optimization algorithm model to obtain optimal PID parameters, and controlling the flight of the drone according to the optimal PID parameters, wherein the whale optimization algorithm model is initialized using a CRICLE chaotic map, specifically:

[0060] like Figure 1 As shown, Pdes: represents the vector of the desired position, that is, the target position that the drone intends to move to. Vdes: represents the vector of the desired velocity, indicating the target velocity and direction of the drone. Dw: represents wind disturbance, representing the external force acting on the drone due to wind. Dn: represents sensor noise interference, reflecting the inaccuracy or error of sensor readings. Δm: represents the mass change caused by the change of payload or fuel consumption. U: represents the control force or control signal (controller output), which is used to adjust the execution force of the drone. "X": represents the position of the drone fixed on the front axis of the body in the earth reference system, or the horizontal displacement in the east direction. "Y": represents the position of the drone fixed on the lateral axis of the body in the earth reference system, or the horizontal displacement in the north direction. "Z": represents the position of the drone fixed on the vertical axis of the body in the earth reference system, or the vertical displacement (height). "Xa": represents the rate of change of position along the fixed front axis of the body, which can be understood as the forward speed of the drone. "Ya": represents the rate of change of position along the fixed lateral axis of the body, which can be understood as the lateral speed of the drone. "Za": represents the rate of change of position along the fixed vertical axis of the body, which can be understood as the vertical speed or climb / descent rate of the drone. In the quadcopter drone control architecture of the present invention, "X", "Y" and "Z" represent the spatial coordinates of the drone in the earth reference system, corresponding to longitudinal, lateral and vertical displacements, respectively. The variables "Xa", "Ya" and "Za" represent the velocity of the body frame, providing data on the instantaneous translational motion of the drone along the vehicle axis. This separated control strategy uses an outer loop for position guidance, where Pdes and Vdes serve as input set points for the desired position and velocity, coordinating the trajectory of the drone toward the target coordinates. The inner loop responds to the direction and rotation rate specified by the outer loop, generating the necessary torque to achieve the commanded attitude, including compensation for disturbances (Dw and Dn) and mass changes (Δm). The resulting control force, represented by U, adjusts the execution of the drone propulsion system to facilitate coordination between the current state and the desired flight path.

[0061] The expected position and expected speed are both input parameters of the control task, which are usually specified by the flight planning system, automatic navigation system, or manual settings. These parameters define the target position and speed of the drone, and set specific goals and paths for the movement of the drone. The role of the PID controller is to output a control signal based on these preset goals and the current state of the drone (current position, speed, etc.) by calculating the control error (the difference between the expected value and the actual value). This control signal is to operate the drone's actuators (such as thrusters, servos, etc.) to adjust its flight posture so that it is as close to or as close to the preset target as possible. In this process, the PID controller uses three gain parameters, namely proportional, integral, and differential, to optimize the control signal, thereby improving the response speed and stability of the system, reducing overshoot and steady-state errors, and thus achieving precise control of the drone. These gain parameters need to be adjusted according to the actual control requirements and system dynamic performance to achieve the best control effect.

[0062] Design of fuzzy PID controller: Use fuzzy PID to self-tune the parameters and optimize the controller's command response capability through the incremental PID strategy. The output of the controller is generated by the following formula:

[0063]

[0064] Among them, K p , K i and K d Represent the proportional gain, integral gain and differential gain respectively, and modulate according to the following proportions, e(t) is, d is the symbol describing the rate of change of the error, representing the derivative of the error, that is, the rate of change of the error. This is the core of the differential part, which helps the control system resist interference and respond quickly to changes in the error. Differential control is predictive because it not only pays attention to the current error, but also pays attention to the trend of error changes, so as to respond in advance to suppress the sharp change of the error and enhance the dynamic responsiveness and stability of the system.

[0065] K p =K p0 +δK p

[0066] K i =K i0 +δK i

[0067] K d =K d0 +δK d

[0068] Where u(t) is the control drive; E(t) is the error signal; K p0 , K i0 , K d0represents the basic gain of the PID controller, δK p ,δK i ,δK d It can be adjusted as needed. δ refers to an adjustment factor, which is used to dynamically adjust the gain parameters of the PID controller according to the fuzzy logic rules, that is, the adjustment amount of the corresponding proportional, integral, and differential gains. These adjustments are calculated based on the current performance indicators of the control system (such as error size and change rate), so that the controller can better adapt to the needs of dynamic changes in the system.

[0069] The adjustment factor δ is determined by a fuzzy control system, which outputs the gain adjustment value through a series of fuzzy rules based on factors such as the input error E(t) and the error change rate.

[0070] These adjustment values ​​δKp, δKi, δKd are used to adjust the basic gains Kp0, Ki0, Kd0 of the PID controller in real time to adapt to different control environments and system states.

[0071] Calculate δKp, δKi, δKd: In a fuzzy control system, based on the size and trend of the error, the fuzzy logic will evaluate the urgency of the response and the required control effort, and then output the gain adjustment factor.

[0072] For example, if the system error suddenly increases, the fuzzy controller may increase Kp and Kd to quickly reduce the error, while it may adjust Ki to prevent overshoot.

[0073] Application example: In a specific control task, if the system is very sensitive to errors, fuzzy logic may increase the proportional gain to make the control more intense. In situations where fine tuning is required, such as temperature control, fuzzy logic may increase the integral gain to eliminate steady-state errors.

[0074] This adaptive approach enables the controller to adapt to fluctuations in system dynamics and external disturbances, maintaining stability and performance efficiency.

[0075] The present invention adopts a control method combining fuzzy PID control and whale optimization algorithm, and its structure is as follows: Figure 2 As shown in the figure. Chaotic whale can adjust δKp, δKi, δKd of PID controller, so as to realize the control of the controller over the controlled object. The results show that the combination of chaotic mapping, whale algorithm, fuzzy rules and PID control has a good control effect.

[0076] Whale Algorithm Optimizing Fuzzy Control Rules: In the design of fuzzy PID controller based on Whale Optimization Algorithm (WOA), the number of control rules increases significantly due to the complexity of seven fuzzy state variables and the two-input-three-output system. Specifically, when using fuzzy logic methods, the number of control rules alone can reach hundreds. Determining these rules usually relies on the experience and knowledge of experts. To solve this problem, the present invention introduces the whale optimization algorithm to optimize the rule set in the fuzzy controller.

[0077] In this study, the present invention uses the time integral multiplied absolute error (ITAE) as a performance evaluation criterion to evaluate the optimization process. This criterion is implemented by calculating the time integral of the error of the control quantities X1 and X2. In the whale optimization algorithm, the fitness function is defined as Where H(t) represents the control error. The optimization goal is to maximize this fitness function, which means that the larger the value of the fitness function, the better the control performance achieved. This method can effectively reduce the dependence on expert knowledge and provide an efficient rule selection mechanism for the fuzzy PID controller.

[0078] Whale algorithms have been applied in various fields, including control systems, such as fuzzy PID (proportional-integral-derivative) controllers, which are used to stabilize quadcopters. In this case, WOA can optimize the parameters of the PID controller to improve performance and stability.

[0079] The algorithm achieves its function by simulating the bubble net hunting strategy of humpback whales as follows:

[0080] Surrounding prey: Whales locate and surround their prey before initiating bubble net hunting, and this behavior is modeled as:

[0081]

[0082]

[0083] A=2a·r1-a

[0084] C=2·r2

[0085] in, Searching for the next generation of agents, is the position of the current optimal solution, A is the coefficient vector controlling the movement of the search agent, r1 and r2 are random vectors between [0,1], a is a linear decrease, D is the distance between the current position and the target position, b is a constant defining the spiral shape, l is a random number between [-1,1], To determine the nature of the whale's movement towards the prey or target, C is the coefficient that controls the search agent's movement towards the target or prey, which plays a very critical role in the optimization algorithm. This coefficient is usually used to regulate the behavior of the search agent so that it can appropriately adjust its search path or direction of travel according to the requirements of the algorithm. In many optimization algorithms based on swarm intelligence, such as the Whale Optimization Algorithm (WOA), C is a random coefficient vector, which helps the algorithm balance between exploration and exploitation. Exploration refers to the ability of the search agent to explore unknown areas in the search space, while exploitation refers to the ability to find the optimal solution in a known area.

[0086] Specifically, each element of the C vector is usually randomly generated during the calculation process, which ensures that the search agent has randomness and diversity in the process of moving to the target location, thereby avoiding premature convergence to the local optimal solution and ignoring the global optimal solution. The value of C usually determines the specific moving direction and distance of the search agent together with some algorithm parameters (such as the A vector and other control parameters). During the execution of the algorithm, the randomness of the C vector allows the search agent to conduct extensive exploration in the global search space, and its adjustment usually depends on the number of iterations, the specific requirements of the task, or the preset algorithm strategy. In this way, the drone can effectively approach the target location while maintaining adaptability to environmental changes and continuous tracking of potential optimal solutions.

[0087] In this equation, is the position vector of the target, which is the best solution found so far, is the whale's position vector, and are coefficients that help determine the nature of the whale's movement toward its prey or target, t is the current iteration, is the distance vector calculated between the whale's position and the target's position.

[0088] Bubble net attack method (development stage): This stage includes two methods: shrinking encirclement and spiral position update.

[0089] Chaotic Mapping Optimization Whale Algorithm:

[0090] Bubble net attack method (development stage): This stage includes two methods: shrinking encirclement and spiral position update.

[0091] Shrinking ring mechanism: This is achieved by reducing the value to achieve this.

[0092] Spiral Position Update: The spiral equation (optimal solution) between the whale and its prey is defined as:

[0093]

[0094]

[0095] in, represents the location of the next generation search agent, represents the position of the current optimal solution, A and C are coefficient vectors that control the movement of the search agent. r1 and r2 are random vectors between [0,1], a decreases linearly from 2 to 0, D and D′ are the distances between the current position and the target position, b is a constant that defines the shape of the spiral, l is a random number between [-1,1], e is the control vector, and b is the adjustment coefficient. is the current position of the search agent at time t. It is the core component of the algorithm and is used to determine the specific spatial position of the search agent at each time step. This position information is continuously updated during the algorithm iteration, and each update is based on the previous position, the current environment conditions, and the objective function of the algorithm. Specifically, X → (t) is used to calculate the new position X in each iteration → (t+1), which is achieved by the following steps:

[0096] Calculate distance D: This is the current position X → (t) and the target position or optimal position X → (t). This distance is usually a measure of the straight-line distance between two points, and sometimes other types of distance measurement methods can be used according to the needs of the specific algorithm.

[0097] Use algorithm parameters: such as random number l, control vector e, adjustment coefficient b. These parameters help the algorithm adjust the direction and speed of the search agent so that it can explore the search space more efficiently or locate the potential optimal solution more accurately. Update position: Based on the above calculations and parameters, the algorithm will generate a new position X → (t+1), which is the position of the next generation of search agents. The updating methods may include but are not limited to moving directly to the optimal solution, randomly exploring the surrounding area, or moving along some predetermined path.

[0098] In the scenario described above, is the distance between the whale and its prey. The spiral shape is defined by a constant b and l is a random number in the range [-1,1].

[0099] Searching for prey (exploration phase): To simulate random search for prey, WOA uses the vector A → -l2 → , where the search agent is located in The algorithm updates the solution in real time, allowing the whale to search outside the area of ​​the current best solution. This mechanism ensures the global optimization capability and the exploration of the search space.

[0100] In WOA, vector A → It is usually calculated according to the following formula: → =2a → r → -a → Among them, a → is a coefficient that decreases linearly from 2 to 0 as the number of iterations decreases, r → is a random vector in the range [0,1]. This calculation method ensures that A → The value of can be greater than 1 or less than -1, thereby achieving exploration outside the current optimal solution area.

[0101] Vector l2 → Generation of:

[0102] l2 → This is usually another random vector whose elements are also in the range [0,1], or in the range [-1,1]. The purpose of this vector is to increase the randomness and diversity of the search behavior.

[0103] Vector A → -l2 → Use: When |A → When |>1, it indicates that the current exploration needs to go beyond the area around the current optimal solution. At this time, A → -l2 → The location that will be used to update the search proxy: X → (t+1)=X → rand-(A → -l2 → )· Among them, X → rand is the position of a randomly selected search agent, and D is the distance from the current position to X. → The distance vector of rand, this update formula increases the randomness and globality of exploration.

[0104] In the exploration phase, the algorithm uses the vector A → and random number l2 to update the position of the search agent. It can be clearly stated that when |A → When |>1, the update formula for the search agent position is used, so that the whale can search outside the area of ​​the current best solution.

[0105] Add how to calculate A → The formula, for example, A → =2a → r → -a →, where a → Linearly decreases from 2 to 0 across iterations, r → is a random vector between [0,1]. This description will help us understand A → How to influence the randomness of the search agent's position and exploration behavior.

[0106] Parameter adaptation mechanism: The algorithm adjusts key parameters according to the search situation or performance feedback, such as a → b, l, etc. The adaptive adjustment of these parameters is to optimize the search efficiency and adapt to complex optimization problems. For example, it can be mentioned that the adjustment of b is based on the success rate of the previous iterations. If the optimal solution fails to be improved after multiple consecutive iterations, the value of b may be increased to increase the width of the spiral, thereby enhancing exploration.

[0107] Parameter adaptation: The algorithm adaptively adjusts parameters during the entire optimization process Balance exploration and exploitation to ensure that the algorithm converges to the global optimum.

[0108] In quadcopter control, WOA is usually used to optimize PID control parameters (Kp, Ki, Kd) to achieve the desired performance criteria such as minimum overshoot, settling time and steady-state error. The optimization process is as follows:

[0109] 1. Define the cost function based on the dynamic response characteristics of the quadcopter.

[0110] 2. Initialize the population of candidate solutions (whales) using random PID parameters.

[0111] 3. Iteratively apply the WOA step to adjust the PID parameters to the optimal set of minimum cost function.

[0112] This approach makes it possible to design a quadcopter control system that responds adaptively to dynamic changes and external disturbances, thereby improving stability and maneuverability.

[0113] The Whale Optimization algorithm enhanced by chaos mapping is a method for adjusting PID controllers, which is essential for achieving the desired dynamic response in control systems. Its theoretical basis is to use complex models of chaos theory to increase the diversity of initial potential solutions, making the exploration of the solution space more thorough. The mathematical basis of the enhancement is based on the application of logical mapping, expressed as x K+1 =4x k (1-x k)When the parameter values ​​are within a certain range, it becomes more refined due to its chaotic behavior. By incorporating chaotic sequences, the algorithm is less likely to fall into the local optimum trap and can obtain a more robust and reliable PID controller because the optimization process explores all possible parameter settings, ensuring the responsiveness and stability of the control system. In practice, chaotic WOA first generates an initial population using chaotic sequences to ensure a good distribution in the potential solution space. Each individual in the population represents a set of PID parameters. The algorithm then iteratively updates the position of each individual in the population using the original WOA equation and the chaotic sequence to navigate to the optimal set of PID parameters. This process involves evaluating the performance of each group using a predefined cost function that reflects the expected results of the control system, such as minimum overshoot, fast settling time, and low steady-state error. Using chaotic maps to initialize the Whale Optimization Algorithm (WOA) has several advantages over traditional WOA. Due to its inherent irregularity and randomness, chaotic maps can cover the search space more evenly and avoid candidate solutions from converging to local optima. This leads to a more diverse initial population, enhances global search capabilities, and enables faster convergence to the global optimum. Therefore, incorporating chaos mapping into WOA can enhance the algorithm's ability to escape local minima, making the exploration of the solution space more thorough and helping to solve complex optimization problems such as tuning PID controllers. Therefore, the present invention integrates chaos mapping into the optimization process, aiming to enhance the performance and reliability of PID controllers by improving global search capabilities and preventing premature convergence.

[0114] The present invention proposes an enhanced whale optimization algorithm (EWOA) for the optimization of fuzzy proportional-integral-derivative (Fuzzy PID) controllers, especially for the application in quadrotor unmanned aerial vehicles (UAVs). The present invention mainly improves the global search capability by introducing the CRICLE chaos map initialization process, and enhances the adaptability and robustness of the controller by fuzzy logic.

[0115] Key components of the technical solution and their roles:

[0116] CRICLE chaos map initialization function: improve the algorithm's search efficiency and avoid local optimal solutions, providing a more diverse initial population for the whale optimization algorithm. Position and connection relationship: This initialization module is located in the pre-processing stage of the algorithm and is directly connected to the subsequent search algorithm module.

[0117] Function of fuzzy PID controller: Dynamically adjust control parameters to adapt to complex and changing flight environments, and improve the accuracy and stability of UAV control systems. Structural features: The controller integrates a fuzzy logic processing unit, which adjusts PID parameters based on input flight status data (such as deviation and deviation change rate).

[0118] Whale Optimization Algorithm (WOA) Function: Optimize PID parameter settings, use a mathematical model that simulates whale hunting behavior to explore the solution space and find the optimal or near-optimal solution. Location and connection relationship: The WOA module receives the output from the chaos map as input and then optimizes the parameters of the fuzzy PID controller.

[0119] Initialization: Use the CRICLE chaos map whale optimization algorithm to generate an initial parameter set to provide initial values ​​for the fuzzy PID controller.

[0120] Data collection: The sensor module collects real-time flight data of the drone, including but not limited to position, speed, and acceleration.

[0121] Fuzzy logic processing: The fuzzy logic unit processes the input data and dynamically adjusts the PID control parameters.

[0122] Parameter optimization: Regularly optimize PID control parameters through the whale optimization algorithm to ensure that the control strategy is in the global optimal state.

[0123] Execute control commands: The adjusted PID parameters are used to control the flight status of the drone, including speed, direction, and altitude.

[0124] First: The whale algorithm is a heuristic algorithm (efficient search capability: the whale algorithm can effectively switch between global search and local search. By simulating the whale's surrounding prey and spiraling upward predation behavior, it can effectively explore the space and quickly converge to the global optimal solution or approximate optimal solution. Flexibility and versatility: the whale algorithm is applicable to many types of optimization problems, including continuous, discrete, and multi-objective optimization problems. This versatility enables it to be widely used in engineering optimization, path planning, image processing, and machine learning. Robustness: The whale algorithm exhibits good robustness and can handle optimization problems with noise and dynamic changes. The algorithm has low dependence on the initial parameters and can be used even when the parameter selection is not optimal. Under normal circumstances, relatively stable optimization results can be obtained. A small number of control parameters: Compared with many other heuristic algorithms, the whale algorithm requires fewer parameters to be adjusted (mainly group size and maximum number of iterations). Secondly, enhance the global search capability: Due to its dynamic and complex behavioral characteristics, chaotic systems can conduct more extensive exploration in the search space. This helps the algorithm to jump out of the local optimal solution and increases the possibility of finding the global optimal solution. Improve the convergence speed: Chaotic mapping helps to speed up the convergence speed of the optimization algorithm due to its rapid coverage of the state space. This means that a satisfactory solution can be found in a shorter time, thereby improving the efficiency of the algorithm. Increase the diversity of solutions: Chaotic mapping can generate rich and varied initial species. Groups or sets of solutions that are widely distributed in the search space, thereby enhancing the algorithm's ability to handle complex problems and reducing the risk of the algorithm falling into local optimality. Avoid premature convergence: Introducing chaotic mutation in the iterative process can effectively prevent the algorithm from converging to non-global optimal solutions too early. Chaotic mutation maintains the diversity of the population by constantly introducing new information, thereby maintaining the algorithm's exploration ability. Strong adaptability: Chaotic mapping can adjust its parameters according to the characteristics of the problem, making the algorithm more adaptable. For example, the control parameters of the chaotic system can be dynamically adjusted according to the needs of the optimization process to adapt to the search needs at different stages. Finally, some key advantages of fuzzy logic in drone applications: handling uncertainty and ambiguity UAVs are very useful in performing tasks. UAVs are often faced with uncertain and ambiguous environmental conditions when performing missions, such as changing wind speeds, fluctuating temperatures, or obstacles that are not fully predictable. Fuzzy logic allows the system to handle these uncertainties in an approximate manner, making control decisions more robust and flexible. Fuzzy logic controllers can simplify the design process because they do not require precise mathematical models, but instead rely on descriptive language rules. This makes controller design more intuitive and easy to implement, while also being able to effectively handle complex or highly nonlinear systems. Improving robustness Fuzzy control systems are typically insensitive to small changes in parameters, which allows UAVs to maintain relatively stable performance in the face of external disturbances or internal parameter changes. This robustness is key to precise operation in dynamic and unpredictable environments.Fuzzy logic control can dynamically adjust its control strategy to adapt to environmental changes, such as flying under different wind and weather conditions. This adaptability is very useful for performing complex tasks such as disaster search and rescue, environmental monitoring, etc. Smooth control behavior Due to the gradual nature of fuzzy control rules, fuzzy logic controllers are able to provide smooth control instructions and avoid sudden changes in control output. This is especially important for applications such as drone video shooting and precise positioning that require smooth operation. Easy integration of prior knowledge and integration of operator experience and prior knowledge, directly applied in the control strategy in the form of fuzzy rules. This integration of knowledge can significantly improve system performance, especially in specific application areas. Rapid development and deployment Fuzzy controllers are usually developed faster than traditional control systems because their design relies more on empirical rules than strict mathematical modeling. This allows drone control systems to quickly adapt to new mission requirements or environmental changes.

[0125] Figure 4-6 As shown, the code representing the chaos map in the main program is:

[0126] if Boundary_no == 1;

[0127] Positions = rand (SearchAgents_no, dim). * (ub-lb) + lb; % Generate random numbers within the range;

[0128] Positions = mod (Positions + b - (a / 2 / pi) * sin (2 * pi * Positions), 1); % Cricle chaotic mapping to generate the initial group;

[0129] End

[0130] like Figure 3 As shown, the kinetic equation used is given below:

[0131] Equation 1:

[0132]

[0133]

[0134]

[0135] Equation 2:

[0136]

[0137]

[0138]

[0139] Where, φ, θ, ψ: These correspond to the roll angle, pitch angle, and yaw angle of the drone, respectively. In the linear velocity equation (Equation (1)), represents the rate of change of the position vector (X, Y, Z) in the ground coordinate system; Φ, θ, and ψ are the Euler angles, representing roll, pitch, and yaw, respectively; F1 is the total lift generated by the rotor; M is the mass of the quadrotor; and G is the acceleration of gravity. For the angular velocity equation (Equation (2)), ˙α˙, ˙β˙, and ˙γ˙ represent the rate of change of the yaw, pitch, and roll angular velocities, respectively; Jx, Jy, and Jz are the moments of inertia about the x, y, and z axes of the body, respectively; d is the distance from the motor to the center of the body; and F2, F3, and F4 are the distances from the motor to the center of the body.

[0140] Fuzzy rules used:

[0141]

[0142] Kp

[0143]

[0144] Ki

[0145]

[0146]

[0147] Kd

[0148] Where the control algorithm is located in the drone: The control algorithm is mainly integrated into the drone's flight control system, usually located on the drone's main control board. The main control board is the "brain" of the drone, responsible for processing data from various sensors and executing the flight control algorithm to adjust the drone's behavior.

[0149] Interaction with hardware: Sensor module: The drone is equipped with a variety of sensors (such as accelerometers, gyroscopes, GPS, etc.), which monitor the flight status of the drone (position, speed, attitude, etc.) in real time and send the data to the main control board.

[0150] Actuators (such as motor controllers): Based on the output of the control algorithm, the actuators adjust the flight of the drone, such as changing the speed of the propellers, thereby adjusting the speed and direction of the drone.

[0151] Implementation process:

[0152] Initialization and parameter setting: When the UAV is started, the control algorithm initializes the fuzzy PID control parameters through CRICLE chaos mapping to ensure that it starts from an appropriate parameter state.

[0153] Data collection: During flight, the sensor continuously collects flight data (such as speed, altitude, position, etc.) and transmits it to the main control board in real time. Based on the collected data, the control algorithm of the present invention evaluates the current flight status and dynamically adjusts the PID parameters.

[0154] Data processing and decision making: After the control algorithm receives the data, it uses the algorithm of the present invention to process the data and dynamically adjust the PID control parameters to adapt to the current flight conditions.

[0155] Executing control commands: The adjusted PID parameters are used to calculate control commands (such as adjusting motor speed). These commands are implemented through the motor controller to actually adjust the flight state of the drone.

[0156] Optimization and feedback: The Whale Optimized Fuzzy PID Control Algorithm re-optimizes the PID parameters regularly or as needed to ensure that the drone can maintain optimal performance under various flight conditions. At the same time, the algorithm adjusts the optimization strategy based on the actual flight results.

[0157] This process ensures that the UAV can respond quickly and accurately to environmental changes and control commands during flight, improving the operational flexibility and safety of the UAV.

[0158] Processing flight data based on fuzzy logic to dynamically adjust the PID control parameters of the UAV includes: processing flight data through fuzzy logic, obtaining errors and error change rates in the flight data, and adjusting the PID control parameters of the UAV according to the errors and error change rates; wherein the fuzzy logic includes: fuzzy sets, membership functions and fuzzy rule bases.

[0159] Initialization using CRICLE chaotic mapping includes: defining initialization boundaries and sizes; boundaries include: upper boundaries and lower boundaries; sizes include: circular mapping parameters; establishing upper and lower limits of whale optimization algorithm model parameters, and corresponding whale optimization algorithm model parameters to problem dimensions; detecting the upper and lower limits of each variable in the whale optimization algorithm model parameters. If each variable has different upper and lower limits, the problem dimension corresponding to each variable is calculated separately to obtain the search agent position.

[0160] In the control method of UAV, if each variable does not have different upper and lower bounds, a unified bound is usually used to process all variables. This means that if the upper and lower bounds of each variable are the same, then when initializing or adjusting the PID control parameters, this unified bound can be applied to all variables to simplify the calculation and processing process.

[0161] If uniform bounds are used, the following steps can be taken when generating search proxy locations:

[0162] Uniform bounds: Initialize the search space according to the given uniform upper and lower bounds. This bound sets the same search range for all variables.

[0163] Parameter mapping: Based on the uniform bounds, circular or other mapping parameters are applied to each variable to more precisely control the search process. This mapping can help evenly distribute agent positions within a given search space.

[0164] Position generation: In this initialized search space, specific positions of search agents are generated according to the required number and distribution characteristics of agents. These positions will be used to optimize the control parameters of the drone.

[0165] Dynamic Adjustment: In practical applications, these search agent positions can also be dynamically adjusted according to environmental changes or task requirements to adapt to changing conditions.

[0166] The specific method of initialization using CRICLE chaotic mapping is:

[0167] 1. Definition: a=0.58;% parameter of circular mapping, =0.3;% another circular mapping parameter;

[0168] 2. Check Dimensionality: The MATLAB code first checks the dimension of the ub (upper bound) array. It determines whether each variable has different upper and lower bounds based on the value of Boundary_no.

[0169] 3. Generate initial variables: If each variable has different upper and lower bounds (Boundary_no>1), calculate each dimension (dim) separately. For each dimension:

[0170] for i=1:dim;

[0171] ub_i=ub(i);

[0172] lb_i=lb(i);

[0173] Positions(:,i)=rand(SearchAgents_no,1).*(ub_i-lb_i)+lb_i;%Generate random numbers within the range;

[0174] Positions = mod (Positions + b - (a / 2 / pi) * sin (2 * pi * Positions), 1); % Apply circular chaos mapping;

[0175] End

[0176] Components: Random number generation (rand(SearchAgents_no,1).*(ub_i-lb_i)+lb_i): This step generates a random number between lb_i and ub_i, providing an initial position for each search agent.

[0177] Chaotic mapping application: (mod(Positions+b-(a / 2 / pi)*sin(2*pi*Positions),1)): This step uses circular mapping to adjust the positions to generate the initial population. Chaotic mapping increases nonlinear dynamic changes through sine functions, improving the diversity and exploration ability of the population.

[0178] Overall effect: The initial population generated by the chaotic map has high randomness and diversity, which helps the search algorithm avoid early convergence to the local optimal solution and improves the global search efficiency. In this code, the chaotic map enhances the algorithm's exploration ability by adjusting the position of each agent in each iteration and updating the position according to the results of the chaotic sequence.

[0179] Obtaining the search agent position includes: generating random numbers within the upper and lower limits according to the problem dimension corresponding to each variable, providing an initial position for each search agent; adjusting the initial position based on the circular mapping parameters, and increasing nonlinear dynamic changes through a sine function to obtain the search agent position.

[0180] Obtaining the optimal PID control parameter combination includes: S1, shrinking and surrounding and spirally updating each search agent position based on the whale optimization algorithm model, wherein the search agent position includes: PID control parameters; S2, setting the maximum number of iterations and convergence conditions, repeating S1 until the maximum number of iterations and convergence conditions are reached, and obtaining the fitness of each updated search agent position; S3, selecting the search agent position with the best fitness as the optimal PID parameter, specifically:

[0181] In the chaotic WOA fuzzy PID, the iterative update involves the following steps:

[0182] 1. Initialization: Use the CRICLE chaotic map initialization algorithm to generate a set of whale (search agent) positions. Each position corresponds to a set of parameters Kp, Ki, Kd of the fuzzy PID controller.

[0183] 2. Application of fuzzy control rules: For each search agent, fuzzy rules are used to determine the corresponding PID parameters according to the current error and error change rate.

[0184] 3. Dynamic model simulation: Using the determined PID parameters, run simulations on the dynamic model of the quadrotor drone and record the performance of the system, such as response time and overshoot.

[0185] 4. Fitness calculation: For each search agent, calculate the fitness (cost function) of its PID parameters, which may take into account tracking error, overshoot, response time and energy consumption.

[0186] 5. WOA position update: Update the position (PID parameter set) of each search agent according to WOA’s shrinking surround or spiral update formula. Use chaos mapping to guide the search process and prevent the algorithm from falling into a local optimum.

[0187] 6. Iteration and convergence: Repeat the above process until the predetermined convergence condition is met or the maximum number of iterations is reached.

[0188] Convergence conditions include: Maximum number of iterations: Usually used as one of the basic convergence conditions to prevent the algorithm from running indefinitely. The algorithm involves calculating the fitness of the PID parameters of each search agent, which takes into account factors such as tracking error, overshoot, response time and energy consumption. Therefore, convergence conditions may include the fitness (cost function) reaching a certain optimal value or falling below a certain threshold, indicating that the system performance reaches or exceeds the predetermined goal. Reduction in fitness improvement: If there is little or no improvement in fitness in several consecutive iterations, it may be set as a criterion for convergence. For example, if the fitness improvement for multiple consecutive iterations is less than a small threshold, the iteration may be terminated. Convergence conditions are a combination of them.

[0189] 7. Best solution selection: The PID parameter set with the best fitness is selected as the optimal solution for fuzzy PID control of the quadrotor drone.

[0190] Among them, the cost function is:

[0191] J(K p ,K i ,K d ,X)=w1·TSE+w2·ITSE+w3·TV+w4·CE

[0192] Among them: TSE is the total squared error, which is used to evaluate the tracking accuracy. ITSE is the time-weighted squared error, which emphasizes the stability and steady-state performance of the system. TV is the total change of the control variable, which is used to evaluate the smoothness of the control behavior. CE is the control effort, which represents the total amount of control input. (w_1, w_2, w_3, w_4) are the weight factors of these items, K p , K i , K dare proportional, integral and differential gains respectively, X is other parameters or state variables of the system, and J is the fitness function.

[0193] The present invention takes the following steps to utilize this cost function to conduct a systematic method evaluation process for testing and optimizing the performance of the UAV control system:

[0194] 1. Parameter initialization: For the improved strategy, use CRICLE chaos map to initialize the WOA search agent, that is, the fuzzy PID parameter set. For traditional PID and fuzzy PID controllers, standard parameter settings or random initialization may be used. Dynamic simulation: Run a flight simulation of the quadrotor drone and record the system response (e.g., position, velocity) under each control strategy.

[0195] 2. Performance index calculation: For each control strategy, the total square error (TSE), time-weighted square error (ITSE), total change of the controlled variable (TV) and control effort (CE) are calculated.

[0196] 3. Cost function evaluation: Apply the cost function J to evaluate the performance of each control strategy. Strategies with low cost functions indicate better control effects.

[0197] 4. Performance comparison: Compare the performance indicators of the improved strategy with those of the traditional PID and fuzzy PID controllers. By comparing the cost function values, evaluate the performance of the improved strategy in reducing overshoot and adjustment time.

[0198] 5. Optimization iteration: Use WOA to iteratively optimize the fuzzy PID parameters. After each iteration, re-evaluate the flight performance of the quadcopter using the new parameter set and calculate the new cost function value. Record the optimal controller parameters and corresponding cost function value for each iteration.

[0199] 6. Result analysis: Count and analyze the simulation results. Make charts and curves that clearly show how the performance of the quadcopter changes under different control strategies. Pay special attention to the improvement of control performance by the improved strategy, especially in terms of overshoot and adjustment time.

[0200] How the Chaos Map Enhanced Whale Optimization Algorithm (WOA) is used in conjunction with a fuzzy PID control strategy to dynamically adjust PID parameters in a UAV control system in real time: 1. Chaos Map Initialization: First, a population of whale agents is initialized, each representing a different set of PID parameters (Kp, Ki, Kd) for controlling the UAV. The CRICLE Chaos Map is applied to these initial sets to ensure a diverse and evenly distributed starting population. This step enhances the algorithm's exploration capabilities by preventing premature convergence to local optima. 2. Real-time System Monitoring: The performance metrics of the UAV are continuously monitored, focusing on error signals (the difference between desired and actual flight characteristics) and their rates of change. These error metrics are key inputs to the fuzzy logic system, which dynamically adjusts the PID parameters based on predefined fuzzy rules that relate error levels to necessary adjustments to control gains. 3. Fuzzy Logic Adjustment: The fuzzy logic controller interprets errors and rates of change using fuzzy sets and rules, and the output is designed to correct the observed errors. This process allows for adaptive and nuanced control adjustments to cope with complex, nonlinear dynamics and disturbances encountered during flight. 4. Whale Optimization Parameter Tuning: While fuzzy tuning is taking place, WOA runs in the background to further optimize PID parameters. It uses the UAV’s performance metrics such as overshoot, settling time, and steady-state error to evaluate the effectiveness of the current PID settings. Through whale behaviors such as encircling prey (exploiting near-optimal solutions) and spiral updates (exploring new potential solutions), the algorithm searches for the best PID settings that minimize the objective function, which is typically a composite measure of performance metrics. 5. Iterative Optimization and Convergence: Each iteration of WOA provides an opportunity to update the PID parameters based on the algorithm’s search mechanism. Parameters are adjusted to values ​​that produce better control results, as evaluated through simulation or actual flight data. The algorithm is monitored for convergence and iterations continue until the improvements stabilize or meet predefined criteria for acceptable performance. 6. Feedback Implementation: The PID parameters optimized through the fuzzy logic and whale optimization process are then implemented into the UAV’s control system in real time. This continuous cycle of monitoring, tuning, optimization, and implementation ensures that the UAV’s flight control remains stable, accurate, and robust, unaffected by internal and external disturbances. The detailed strategy exploits the adaptability of fuzzy control and the global optimization advantages of WOA to ensure that the UAV control system can dynamically adjust to changing conditions and achieve optimal performance with high reliability and efficiency.

[0201] The present invention also discloses a control system for an unmanned aerial vehicle, comprising: a data acquisition module, used for collecting flight data of the unmanned aerial vehicle; a search agent position acquisition module, used for combining fuzzy logic, dynamically adjusting the PID control parameters of the unmanned aerial vehicle according to the flight data, and obtaining initial PID control parameters; an optimal parameter acquisition module, used for iteratively optimizing the initial PID control parameters using a whale optimization algorithm model, obtaining optimal PID parameters, and controlling the flight of the unmanned aerial vehicle according to the optimal PID parameters, wherein the whale optimization algorithm model is initialized using CRICLE chaotic mapping.

[0202] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for controlling an unmanned aerial vehicle, characterized in that: include: Collecting flight data from drones; In combination with fuzzy logic, the PID control parameters of the UAV are dynamically adjusted according to the flight data to obtain initial PID control parameters; The initial PID control parameters are iteratively optimized using a whale optimization algorithm model to obtain optimal PID parameters, and the flight of the drone is controlled according to the optimal PID parameters, wherein the whale optimization algorithm model is initialized using a CRICLE chaotic map.

2. The method for controlling a drone according to claim 1, characterized in that: Obtaining the initial PID control parameters includes: The flight data is processed by the fuzzy logic to obtain errors and error change rates in the flight data, and the PID control parameters of the UAV are adjusted according to the errors and error change rates to obtain initial PID control parameters; wherein the fuzzy logic includes: fuzzy sets, membership functions and fuzzy rule bases.

3. The method for controlling a drone according to claim 1, characterized in that: Initialization using CRICLE chaotic mapping includes: Defining initialization boundaries and sizes; the boundaries include: upper boundaries and lower boundaries; the sizes include: circular mapping parameters; Establish upper and lower limits of whale optimization algorithm model parameters, and correspond the whale optimization algorithm model parameters to the problem dimensions; The upper and lower bounds of each variable in the whale optimization algorithm model parameters are detected. If each variable has different upper and lower bounds, the problem dimension corresponding to each variable is calculated separately to obtain the search agent position.

4. The method for controlling a drone according to claim 3, characterized in that: Obtaining the search proxy location includes: According to the problem dimension corresponding to each variable, a random number within an upper limit and a lower limit is generated to provide an initial position for each search agent; The initial position is adjusted based on the circular mapping parameters, and nonlinear dynamic changes are added through a sine function to obtain the search agent position.

5. The method for controlling a drone according to claim 1, characterized in that: Obtaining the optimal PID control parameters includes: S1. updating each search agent position based on the shrinkage, encirclement and spiral of the whale optimization algorithm model, wherein the search agent position includes: PID control parameters; S2, setting a maximum number of iterations and a convergence condition, repeatedly iterating the S1 until the maximum number of iterations and the convergence condition are reached, and obtaining the fitness of each updated search agent position; S3. Select the search agent position with the best fitness as the optimal PID parameter.

6. The method for controlling a drone according to claim 5, characterized in that: The method for updating the position of each search agent based on the shrinkage and envelopment of the whale optimization algorithm model is: A=2a·r1-a C=2·r2 in, Searching for the next generation of agents, is the position of the current optimal solution, A is the coefficient vector controlling the movement of the search agent, r1 and r2 are random vectors between [0,1], a is a linear decrease, D is the distance between the current position and the target position, b is a constant defining the spiral shape, l is a random number between [-1,1], is the coefficient that determines the nature of the whale's movement toward the prey or target, and C is the coefficient that controls the movement of the search agent toward the target or prey.

7. The method for controlling a drone according to claim 5, characterized in that: The method of spirally updating the position of each search agent based on the whale optimization algorithm model is: in, Searching for the next generation of agents, is the position of the current optimal solution, D′ is the distance between the current position and the target position, l is a random number between [-1,1], e is the control vector, b is the adjustment coefficient, is the current position of the search agent at time t.

8. The method for controlling a drone according to claim 5, characterized in that: The method to obtain the fitness of each updated search agent position is: <h2 style=";text-align:left;direction:ltr">J(K<h2 style=";text-align:left;direction:ltr"> p <h2 style=";text-align:left;direction:ltr"> K<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> K<h2 style=";text-align:left;direction:ltr"> d <h2 style=";text-align:left;direction:ltr"> ,X)=w1·TSE+w2·ITSE+w3·TV+w4·CE Among them, TSE is the total square error, ITSE is the time-weighted square error, TV is the total change of the control variable, CE is the control effort, w1, w2, w3, w4 are the weight factors of the items, K p , K i , K d are proportional, integral and differential gains respectively, X is other parameters or state variables of the system, and J is the fitness function.

9. A control system for an unmanned aerial vehicle, characterized in that: include: Data acquisition module, used to collect the flight data of the drone; A search agent position acquisition module is used to dynamically adjust the PID control parameters of the UAV according to the flight data in combination with fuzzy logic to obtain initial PID control parameters; The optimal parameter acquisition module is used to iteratively optimize the initial PID control parameters using the whale optimization algorithm model to obtain the optimal PID parameters, and control the flight of the drone according to the optimal PID parameters, wherein the whale optimization algorithm model is initialized using CRICLE chaotic mapping.

Citation Information

Cited By

  • Rotor unmanned aerial vehicle parameter adjustment method and device and related equipment

    CN119045319A

  • Unmanned aerial vehicle pitching control method and system based on fuzzy immune control optimization PID (Proportion Integration Differentiation)

    CN119247984A

  • Flight control method, device, equipment, storage medium and product

    CN119472466A

  • Data processing method, device and equipment and readable storage medium

    CN119474890A

  • High-altitude satellite station and flight and satellite tracking method thereof

    CN119659993A