An unmanned aerial vehicle attitude control method based on intelligent optimization algorithm

By improving the Osprey optimization algorithm to optimize the fractional-order PID control of UAV attitude, and by utilizing dynamic population size and adaptive search parameters, the challenges of weather-related factors and parameter setting in UAV attitude control over elevated power grids were solved, thereby improving the robustness and inspection accuracy of the system.

CN117706908BActive Publication Date: 2025-11-18STATE GRID FUJIAN ELECTRIC POWER RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311672567.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2025-11-18
Estimated Expiration
2043-12-07

AI Technical Summary

Technical Problem

The attitude control system of UAVs on elevated power grids is greatly affected by weather factors such as wind, rain, and snow, which limits the inspection accuracy and stability. Fractional-order PID parameter tuning is complex and the noise suppression capability is weak. Osprey optimization algorithm is prone to getting trapped in local optima and the parameter settings are difficult to determine.

Method used

An improved Osprey optimization algorithm is adopted, which optimizes the UAV attitude fractional-order PID controller through a dynamic population size strategy and adaptive search parameters, thereby achieving adaptive optimization adjustment of UAV attitude.

Benefits of technology

It improves the robustness of attitude control and the level of intelligent inspection of UAVs in elevated power grids, solves the problem of local optimal solutions and parameter setting difficulties, and enhances the stability and accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117706908B_ABST
    Figure CN117706908B_ABST
Patent Text Reader

Abstract

The present application provides a kind of unmanned aerial vehicle attitude control method based on intelligent optimization algorithm, belong to unmanned aerial vehicle attitude fractional order PID control field, specifically includes: step one, build power grid safety inspection unmanned aerial vehicle attitude control system, including unmanned aerial vehicle body, attitude sensor, fractional order PID controller and fish eagle optimization algorithm module;Step two, according to the environment of power grid safety inspection, establish unmanned aerial vehicle attitude control dynamics mathematical model;Step three, for the disturbance requirement of unmanned aerial vehicle, improve fish eagle optimization algorithm;Step four, use improved fish eagle optimization algorithm to optimize power grid safety inspection unmanned aerial vehicle attitude fractional order PID controller;Step five, the unmanned aerial vehicle attitude control dynamics mathematical model and improved fish eagle optimization algorithm and best fractional order PID control parameter are applied to power grid safety inspection unmanned aerial vehicle attitude control system;Algorithm automatically adjusts fractional order PID control parameter, realizes unmanned aerial vehicle system attitude self-adapting optimization adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fractional-order PID control technology for UAV attitude, and in particular to a UAV attitude control method based on intelligent optimization algorithms. Background Technology

[0002] Attitude control of overhead power grids by drones is an important development direction in the power industry. In recent years, with the continuous development of drone technology, drones have been increasingly widely used in fields such as transmission line inspection and power emergency repair. In drone inspections, a high-precision attitude control system can achieve precise inspection of transmission lines, improving inspection quality and efficiency.

[0003] Despite significant progress in the attitude control technology of UAVs for elevated power grids, some challenges remain. First, the attitude control system is significantly affected by weather conditions such as wind, rain, and snow, limiting inspection accuracy and stability. Second, the algorithms and data processing techniques of the attitude control system require further optimization to improve the intelligence level of the inspection process.

[0004] Fractional-order PID control has wide applications in attitude control, but several optimization issues remain. First, parameter tuning for fractional-order PID is complex, requiring fine-tuning for different systems, which increases the difficulty and complexity of control. Second, fractional-order PID has weak noise suppression capabilities, making it susceptible to disturbances that affect control stability and accuracy. Furthermore, for some nonlinear systems, the control effect of fractional-order PID may be unsatisfactory, requiring improvement or combination with other control methods. Therefore, to address these optimization issues, further research and development of more advanced and flexible control strategies are needed to improve the performance and robustness of attitude control.

[0005] The Osprey Optimization (OOO) algorithm is a nature-inspired optimization algorithm inspired by the hunting behavior of ospreys. In the algorithm, the osprey symbolizes the optimal solution in the search process, while the fish represents the potential solutions to the problem. The OOO OOS algorithm simulates the hunting behavior of ospreys, employing a swarm search strategy to iteratively find the optimal solution. However, it also has some drawbacks. First, the algorithm is prone to getting trapped in local optima and cannot find the global optimum. Second, the parameter settings of the OOO OOS algorithm have a significant impact on the search performance, and it is difficult to determine suitable parameter values. Furthermore, the algorithm has a long search time, and its efficiency for solving large-scale problems needs improvement. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a UAV attitude control method based on intelligent optimization algorithm. By implementing a dynamic population size strategy in the algorithm exploration stage, and then using dynamic search parameters and algorithm fitness values ​​in the exploration stage, an adaptive search parameter is introduced to improve the Osprey optimization algorithm. The improved Osprey optimization algorithm is used to optimize the fractional-order PID control of UAV attitude, thereby improving the robustness of UAV attitude control for elevated power grids and enhancing the level of intelligence in inspection.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: a UAV attitude control method based on intelligent optimization algorithms, which utilizes an improved Osprey optimization algorithm to optimize the UAV attitude fractional-order PID controller, and the specific steps are as follows:

[0008] Step 1: Build an attitude control system for the power grid safety inspection drone, including the drone itself, attitude sensors, fractional-order PID controller, and Osprey optimization algorithm module;

[0009] Step 2: Based on the power grid safety inspection environment, establish a mathematical model for the attitude control dynamics of the UAV;

[0010] Step 3: Improve the Osprey optimization algorithm to meet the disturbance requirements of drones;

[0011] Step 4: Optimize the attitude fractional-order PID controller of the power grid safety inspection UAV using the improved Osprey optimization algorithm to obtain the optimal fractional-order PID control parameters;

[0012] Step 5: Apply the UAV attitude control dynamics mathematical model, the improved Osprey optimization algorithm, and the optimal fractional-order PID control parameters to the attitude control system of the power grid safety inspection UAV; based on the real-time feedback information from the UAV, the algorithm automatically adjusts the fractional-order PID control parameters to achieve adaptive optimization adjustment of the UAV system attitude.

[0013] In a preferred embodiment, in step one, a simulation model is built using Simulink to test the attitude control system of the power grid safety inspection UAV. The simulation model includes a UAV attitude target value module, a UAV real-time attitude data input module, a UAV attitude target data and input data difference calculation module, an algorithm-optimized fractional-order PID controller module, a UAV attitude control dynamics mathematical model module, and an actual attitude data acquisition module.

[0014] In a preferred embodiment, in step two, the mathematical model formula for the UAV attitude control dynamics is as follows:

[0015]

[0016] In the formula, These are the roll rate, pitch rate, and yaw rate of the power grid inspection drone, respectively. These are the roll acceleration, pitch acceleration, and yaw acceleration of the power grid inspection drone, respectively. J1, J2, and J3 are the moments of inertia of the power grid inspection drone around the X, Y, and Z coordinate systems, respectively. K1, K2, and K3 are drag coefficients, all with a value of 0.5. u1(t), u2(t), and u3(t) are the control inputs of the power grid inspection drone, respectively. l is the distance from the wing axis to the center of the drone. d1, d2, and d3 are the total disturbance vector of internal uncertainties and external disturbance terms.

[0017] In a preferred embodiment, step three specifically includes the following steps:

[0018] S1: Improve the search strategy of the Osprey optimization algorithm and propose a method to realize dynamic population size by introducing dynamic search parameters;

[0019] S2: By utilizing the dynamic search parameter N(t) and the algorithm fitness value, an adaptive search parameter is introduced to improve the Osprey algorithm's exploration strategy; the formula is as follows:

[0020]

[0021] In the formula, ψ is the adaptive factor, f(t) is the random fitness value of the population in the current iteration, f(best) is the optimal fitness value of the population in the current iteration, and ψ1 is the adaptive factor of the previous iteration.

[0022] In a preferred embodiment, in step three, a method for achieving dynamic population size is defined by the formula:

[0023]

[0024] In the formula, N(t) is the dynamic search parameter, N max N represents the maximum search parameter. min is the minimum search parameter, with a value of 2; N0 is the minimum search parameter, with a value of 0; a is a constant that controls the adjustment speed of the search parameters, with a value of 0.6; t is the current iteration number; and T is the total number of iterations.

[0025] In a preferred embodiment, step four specifically includes the following steps:

[0026] Step 1: Based on the attitude requirements of the UAV for power grid inspection, select a suitable objective function, i.e., the fitness function. The specific formula is as follows:

[0027] f(u,t)=(e(t)-e(0)) 2 +∑[e(k)-e(0)] 2(t-k) ;

[0028] In the formula, e(t) is the error between the actual attitude of the UAV and the target attitude, e(0) is the initial attitude error of the UAV, t is the current iteration number, u is the control input of the UAV, and e(k) represents the error between the actual attitude of the UAV and the target attitude at a certain discrete time.

[0029] Step 2: Design a Simulink simulation transfer function to address disturbances in the power grid environment;

[0030]

[0031] In the formula, K is the power grid environmental disturbance gain, which takes the value of 2, and s is a complex frequency variable;

[0032] Step 3: Encode the fractional-order PID control parameters Kp, Ki, Kd and λ, μ of the power grid inspection UAV into the solution of the Osprey search space. As the algorithm iterates, the position of the Osprey is the solution of the fractional-order PID control parameters of the UAV.

[0033] Step 4: Initialize and improve the osprey optimization algorithm, including population size N, problem dimension D, number of prey n, upper bound of the algorithm search space ub, lower bound of the algorithm search space lb, maximum number of iterations T, and initial position of the osprey.

[0034] Step 5: Calculate the fitness value of individuals in the current iteration of the osprey population according to the fitness function, record the minimum fitness value as f(best), which is the optimal fitness value, and compare it with the optimal fitness value of the population in the previous iteration, and retain the optimal fitness value.

[0035] Step 6: Based on the population position update formula of the improved Osprey optimization algorithm in the search and exploration phases, solve for the optimal individual position and determine the optimal solution of the attitude fractional-order PID controller parameters of the power grid safety inspection UAV.

[0036] Step 7: In the search phase of the improved Osprey optimization algorithm, firstly, the dynamic population size is implemented, and then the fractional-order PID control parameters are updated according to the population position update strategy. The formula for the population position update strategy is shown below:

[0037]

[0038] In the formula, Let X be the latest position of the i-th osprey, which is a fractional-order PID control parameter solution. i Let r be the position of the i-th osprey in the previous iteration. i SF is a random number between [0,1]. i I is a constant parameter with a value of 1. i Let be any integer in the set {1, 2};

[0039] Step 8: Determine if the current position in the search phase is better than the optimal position in the previous iteration. If so, replace the optimal position from the previous iteration.

[0040]

[0041] Step 9: In the exploration phase of improving the Osprey optimization algorithm, using the dynamic search parameter N(t) and the algorithm fitness value, an adaptive search parameter is introduced to design the Osprey position update strategy and determine the fractional-order PID control parameters of the UAV. The formula is as follows:

[0042]

[0043] In the formula, r is a random number between [0,1], and t is the current iteration number;

[0044] Step 10: Calculate the fitness value. Compare the current best fitness value with the previous best fitness value, and keep the smaller fitness value to determine the best target object.

[0045] Step 11: Increment the current iteration count t, t = t + 1. Check if the current iteration count has reached the maximum iteration count T. If it has, exit the loop, output the global optimal solution, and assign it to the parameters of the fractional PID. Otherwise, return to step 4.

[0046] Compared with existing technologies, this invention has the following beneficial effects: By implementing a dynamic population size strategy in the algorithm exploration stage, and then, in the exploration stage, using dynamic search parameters and algorithm fitness values, an adaptive search parameter is introduced to improve the Osprey optimization algorithm. This improved Osprey optimization algorithm optimizes the fractional-order PID control of the UAV's attitude, improving the robustness of the UAV's attitude control over elevated power grids and enhancing the intelligence level of inspection. This solves the problem mentioned in the background description that the attitude control of existing UAVs over elevated power grids is greatly affected by weather factors such as wind, rain, and snow, leading to limitations in inspection accuracy and stability. Simultaneously, the improved Osprey optimization algorithm addresses the problem mentioned in the background description that the standard Osprey optimization algorithm is prone to getting trapped in local optima during the search process, failing to find the global optimum. Furthermore, it solves the problem that the parameter settings of the standard Osprey optimization algorithm have a significant impact on the search effect, making it difficult to determine suitable parameter values. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating the steps of a UAV attitude control method based on an intelligent optimization algorithm, according to a preferred embodiment of the present invention.

[0048] Figure 2 This is a block diagram of the attitude control system of a power grid safety inspection drone according to a preferred embodiment of the present invention.

[0049] Figure 3 The flowchart illustrates the optimization of attitude control parameters of a power grid safety inspection drone using the improved Osprey optimization algorithm, which is a preferred embodiment of the present invention. Detailed Implementation

[0050] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0051] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0052] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations according to this application; as used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise; furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0053] A method for UAV attitude control based on intelligent optimization algorithms, referenced Figure 1-3 The specific steps are as follows.

[0054] Step 1: Build an attitude control system for the power grid safety inspection drone, including the drone itself, attitude sensors, fractional-order PID controller, and Osprey optimization algorithm module.

[0055] Step 2: Based on the power grid safety inspection environment, establish a mathematical model of UAV attitude control dynamics.

[0056] Step 3: To address the disturbance requirements of drones, the Osprey optimization algorithm is improved, as follows;

[0057] S1: Improve the search strategy of the Osprey optimization algorithm and propose a method to realize dynamic population size by introducing dynamic search parameters;

[0058] S2: By utilizing the dynamic search parameter N(t) and the algorithm fitness value, an adaptive search parameter is introduced to improve the Osprey algorithm's exploration strategy; the formula is as follows:

[0059]

[0060] In the formula, ψ is the adaptive factor, f(t) is the random fitness value of the population in the current iteration, and f(best) is the optimal fitness value of the population in the current iteration.

[0061] Step 4: Optimize the attitude fractional-order PID controller of the power grid safety inspection UAV using the improved Osprey optimization algorithm to obtain the optimal fractional-order PID control parameters.

[0062] Step 5: Apply the UAV attitude control dynamics mathematical model, the improved Osprey optimization algorithm, and the optimal fractional-order PID control parameters to the attitude control system of the power grid safety inspection UAV; based on the real-time feedback information from the UAV, the algorithm automatically adjusts the fractional-order PID control parameters to achieve adaptive optimization adjustment of the UAV system attitude.

[0063] Furthermore, in step one, a simulation model was built using Simulink to test the attitude control system of the power grid safety inspection drone. The simulation model mainly includes a drone attitude target value module, a drone real-time attitude data input module, a drone attitude target data and input data difference calculation module, an algorithm-optimized fractional-order PID controller module, a drone attitude control dynamics mathematical model module, and an actual attitude data acquisition module.

[0064] Furthermore, in step one, the mathematical model formula for the fractional-order PID controller is:

[0065]

[0066] In the formula, Kp is the proportional coefficient, Ki is the integral coefficient, Kd is the differential coefficient, λ is the integral order, μ is the differential order, S is the function variable, and G(S) is the output value of the fractional-order PID formula.

[0067] Furthermore, in step two, the mathematical model formula for the UAV attitude control dynamics is as follows:

[0068]

[0069] In the formula, These are the roll rate, pitch rate, and yaw rate of the power grid inspection drone, respectively. These are the roll acceleration, pitch acceleration, and yaw acceleration of the power grid inspection drone, respectively. J1, J2, and J3 are the moments of inertia of the power grid inspection drone around the X, Y, and Z coordinate systems, respectively. K1, K2, and K3 are drag coefficients, all with a value of 0.5. u1(t), u2(t), and u3(t) are the control inputs of the power grid inspection drone, respectively. l is the distance from the wing axis to the center of the drone. d1, d2, and d3 are the total disturbance vector of internal uncertainties and external disturbance terms.

[0070] Furthermore, the steps for establishing the mathematical model of UAV attitude control dynamics are as follows: First, determine the attitude of the UAV. The attitude of the UAV refers to the angles of the UAV relative to the three axes (roll angle, pitch angle, and yaw angle). These angles can describe the direction of the UAV and are usually represented by Euler angles.

[0071] Further, the steps for establishing the dynamic mathematical model of UAV attitude control are as follows: Then, the motion equations of the UAV are defined. The motion equations of the UAV consist of dynamic equations and kinematic equations. In the kinematic equations, angular velocity, i.e. the rate of change of angle, is represented by a vector. In the dynamic equations, the motion of the UAV is described, including mechanical, gravitational, and aerodynamic drag.

[0072] Furthermore, in step three, a method for achieving dynamic population size is defined by the following formula:

[0073]

[0074] In the formula, N(t) is the dynamic search parameter, N max N is the maximum search parameter, with a value of 2; N0 is the minimum search parameter, with a value of 0; a is a constant that controls the adjustment speed of the search parameters, with a value of 0.6; t is the current iteration number; and T is the total number of iterations.

[0075] Furthermore, in step three, a method for achieving dynamic population size involves dynamically adjusting the population size based on the search progress and population performance to improve search efficiency and performance. A larger population size is used in the early stages of the search, and the population size is gradually reduced as the search progresses, thereby increasing population diversity and improving search concentration.

[0076] Furthermore, in step three, an adaptive search parameter is introduced in the exploration phase of the Osprey optimization algorithm. This parameter can be dynamically adjusted based on the fitness value, thereby improving search efficiency, enhancing robustness, reducing the risk of getting trapped in local optima, and optimizing algorithm performance.

[0077] Furthermore, in step four, the attitude fractional-order PID controller of the power grid safety inspection UAV is optimized using the improved Osprey optimization algorithm to obtain the optimal fractional-order PID control parameters. The steps are as follows:

[0078] Step 1: Based on the attitude requirements of the UAV for power grid inspection, select a suitable objective function, i.e., the fitness function. The specific formula is as follows:

[0079] f(u,t)=(e(t)-e(0)) 2 +∑[e(k)-e(0)] 2(t-k) ;

[0080] In the formula, e(t) is the error between the actual attitude of the UAV and the target attitude, e(0) is the initial attitude error of the UAV, t is the number of iterations, u is the control input of the UAV, and e(k) represents the error between the actual attitude of the UAV and the target attitude at a certain discrete time.

[0081] Step 2: Design a Simulink simulation transfer function to address disturbances in the power grid environment;

[0082]

[0083] In the formula, K is the power grid environmental disturbance gain, which takes the value of 2, and s is a complex frequency variable;

[0084] Step 3: Encode the fractional-order PID control parameters Kp, Ki, Kd and λ, μ of the power grid inspection UAV into the solution of the Osprey search space. As the algorithm iterates, the position of the Osprey is the solution of the fractional-order PID control parameters of the UAV.

[0085] Step 4: Initialize and improve the osprey optimization algorithm, including population size N, problem dimension D, number of prey n, upper bound of the algorithm search space ub, lower bound of the algorithm search space lb, maximum number of iterations T, and initial position of the osprey.

[0086] Step 5: Calculate the fitness value of individuals in the current iteration of the osprey population according to the fitness function, record the minimum fitness value as f(best), which is the optimal fitness value, and compare it with the optimal fitness value of the population in the previous iteration, and retain the optimal fitness value.

[0087] Step 6: Based on the population position update formula of the improved Osprey optimization algorithm in the search and exploration phases, solve for the optimal individual position and determine the optimal solution of the attitude fractional-order PID controller parameters of the power grid safety inspection UAV.

[0088] Step 7: In the search phase of the improved Osprey optimization algorithm, firstly, the dynamic population size is implemented, and then the fractional-order PID control parameters are updated according to the population position update strategy. The formula for the population position update strategy is shown below:

[0089]

[0090] In the formula, Let X be the latest position of the i-th osprey, which is a fractional-order PID control parameter solution. i Let r be the position of the i-th osprey in the previous iteration. i SF is a random number between [0,1]. i I is a constant parameter with a value of 1. i Let be any integer in the set {1, 2};

[0091] Step 8: Determine if the current position in the search phase is better than the optimal position in the previous iteration. If so, replace the optimal position from the previous iteration.

[0092]

[0093] Step 9: In the exploration phase of improving the Osprey optimization algorithm, using the dynamic search parameter N(t) and the algorithm fitness value, an adaptive search parameter is introduced to design the Osprey position update strategy and determine the fractional-order PID control parameters of the UAV. The formula is as follows:

[0094]

[0095] In the formula, ψ is the self-adaptive search parameter, r is a random number between [0,1], and t is the current iteration number;

[0096] Step 10: Calculate the fitness value. Compare the current best fitness value with the previous best fitness value. Record the smaller fitness value and retain the best target object.

[0097] Step 11: Increment the current iteration count t, t = t + 1. Check if the current iteration count has reached the maximum iteration count T. If it has, exit the loop, output the global optimal solution, and assign it to the parameters of the fractional PID. Otherwise, return to step 4.

[0098] Furthermore, in step 1, the objective function takes into account the UAV attitude control error and control input.

[0099] Furthermore, in step 3, the improved Osprey optimization algorithm uses the parameters of the fractional-order PID controller as the solution to the problem to be optimized, and then searches by simulating the predation behavior of the Osprey. In each iteration, the quality of each solution is evaluated according to the fitness function, and the optimal solution is selected as the basis for the next iteration. Through continuous iteration, the improved Osprey optimization algorithm can find the optimal combination of UAV attitude controller parameters, thereby achieving the optimization of complex systems.

[0100] Furthermore, in step 4, the improved Osprey optimization algorithm is initialized, with the following formula:

[0101] Xi = lb + r·(ub - lb);

[0102] In the formula, X i Let ub be the initial position of the individual, lb be the upper boundary of the optimization, lb be the lower boundary of the optimization, and r be a random number between [0,1]. The upper boundary of the optimization ub is the upper boundary of the parameters of the fractional-order PID controller for the UAV attitude, and the lower boundary of the optimization lb is the lower boundary of the parameters of the fractional-order PID controller for the UAV attitude.

[0103] In practice, we first tested it in Matlab and Simulink, setting the osprey population size to N=100, iterating 100 times, the problem dimension to d=3, the upper search bound to ub=0, and the lower search bound to lb=100.

[0104] The performance of the improved Osprey optimization algorithm and the standard Osprey optimization algorithm was tested using Matlab. The fitness function was used as the numerical form. The smaller the fitness, the better the algorithm performance. The fitness value of the improved Osprey optimization algorithm changes faster, indicating that the algorithm finds the best solution faster. The smaller fitness value also indicates that the algorithm finds the best solution more accurately.

[0105] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for controlling the attitude of a UAV based on an intelligent optimization algorithm, characterized in that, The following are the specific steps for optimizing the fractional-order PID controller for UAV attitude using an improved Osprey optimization algorithm: Step 1: Build an attitude control system for the power grid safety inspection drone, including the drone itself, attitude sensors, fractional-order PID controller, and Osprey optimization algorithm module; Step 2: Based on the power grid safety inspection environment, establish a mathematical model for the attitude control dynamics of the UAV; Step 3: Improve the Osprey optimization algorithm to meet the disturbance requirements of drones; Step 4: Optimize the attitude fractional-order PID controller of the power grid safety inspection UAV using the improved Osprey optimization algorithm to obtain the optimal fractional-order PID control parameters; Step 5: Apply the UAV attitude control dynamics mathematical model, the improved Osprey optimization algorithm, and the optimal fractional-order PID control parameters to the attitude control system of the power grid safety inspection UAV; based on the real-time feedback information from the UAV, the algorithm automatically adjusts the fractional-order PID control parameters to achieve adaptive optimization adjustment of the UAV system attitude. 2.The unmanned aerial vehicle attitude control method based on intelligent optimization algorithm of claim 1, wherein, In step one, a simulation model was built using Simulink to test the attitude control system of the power grid safety inspection drone. The simulation model includes a drone attitude target value module, a drone real-time attitude data input module, a drone attitude target data and input data difference calculation module, an algorithm-optimized fractional-order PID controller module, a drone attitude control dynamics mathematical model module, and an actual attitude data acquisition module. 3.The unmanned aerial vehicle attitude control method based on intelligent optimization algorithm of claim 1, wherein, In step two, the mathematical model formula for the UAV attitude control dynamics is as follows: In the formula, respectively are the roll angle velocity, the pitch angle velocity and the yaw angle velocity of the power grid inspection unmanned aerial vehicle, respectively are the roll angle acceleration, the pitch angle acceleration and the yaw angle acceleration of the power grid inspection unmanned aerial vehicle, J1, J2 and J3 are respectively the rotational inertia of the power grid inspection unmanned aerial vehicle around the body coordinate system X, Y and Z, K1, K2 and K3 are resistance coefficients, all of which are 0.5, u1(t), u2(t) and u3(t) are respectively the control input of the power grid inspection unmanned aerial vehicle, l is the distance from the wing shaft of the unmanned aerial vehicle to the center of the machine, and d1, d2 and d3 are total disturbance vectors of internal uncertainty and external disturbance terms.

4. The unmanned aerial vehicle attitude control method based on intelligent optimization algorithm according to claim 1, characterized in that, Step three specifically includes the following steps: S1: Improve the search strategy of the Osprey optimization algorithm and propose a method to realize dynamic population size by introducing dynamic search parameters; S2: By utilizing the dynamic search parameter N(t) and the algorithm fitness value, an adaptive search parameter is introduced to improve the Osprey algorithm's exploration strategy; the formula is as follows: In the formula, ψ is the adaptive factor, f(t) is the random fitness value of the population in the current iteration, f(best) is the optimal fitness value of the population in the current iteration, and ψ1 is the adaptive factor of the previous iteration.

5. The method of claim 4, wherein the method further comprises: In step three, a method for achieving dynamic population size is described by the following formula: In the formula, N(t) is a dynamic search parameter, N max is a maximum search parameter, N min is a minimum search parameter, and is 2, N0 is a minimum search parameter, and is 0, a is a constant for controlling the adjustment speed of the search parameter, and is 0.6, t is a current iteration number, and T is a total iteration number.

6. The unmanned aerial vehicle attitude control method based on intelligent optimization algorithm according to claim 1, characterized in that, Step four specifically includes the following steps: Step 1: Based on the attitude requirements of the UAV for power grid inspection, select a suitable objective function, i.e., the fitness function. The specific formula is as follows: f(u,t) = (e(t) - e(0)) 2 +∑[e(k)-e(0)] 2(t-k) ; In the formula, e(t) is the error between the actual attitude of the UAV and the target attitude, e(0) is the initial attitude error of the UAV, t is the current iteration number, u is the control input of the UAV, and e(k) represents the error between the actual attitude of the UAV and the target attitude at a certain discrete time. Step 2: Design a Simulink simulation transfer function to address disturbances in the power grid environment; In the formula, K is the power grid environmental disturbance gain, which takes the value of 2, and s is a complex frequency variable; Step 3: Encode the fractional-order PID control parameters Kp, Ki, Kd and λ, μ of the power grid inspection UAV into the solution of the Osprey search space. As the algorithm iterates, the position of the Osprey is the solution of the fractional-order PID control parameters of the UAV. Step 4: Initialize and improve the osprey optimization algorithm, including population size N, problem dimension D, number of prey n, upper bound of the algorithm search space ub, lower bound of the algorithm search space lb, maximum number of iterations T, and initial position of the osprey. Step 5: Calculate the fitness value of individuals in the current iteration of the osprey population according to the fitness function, record the minimum fitness value as f(best), which is the optimal fitness value, and compare it with the optimal fitness value of the population in the previous iteration, and retain the optimal fitness value. Step 6: Based on the population position update formula of the improved Osprey optimization algorithm in the search and exploration phases, solve for the optimal individual position and determine the optimal solution of the attitude fractional-order PID controller parameters of the power grid safety inspection UAV. Step 7: In the search phase of the improved Osprey optimization algorithm, firstly, the dynamic population size is implemented, and then the fractional-order PID control parameters are updated according to the population position update strategy. The formula for the population position update strategy is shown below: In the formula, Let X be the latest position of the i-th osprey, which is a fractional-order PID control parameter solution. i Let r be the position of the i-th osprey in the previous iteration. i SF is a random number between [0,1]. i I is a constant parameter with a value of 1. i Let be any integer in the set {1, 2}; Step 8: Determine if the current position in the search phase is better than the optimal position in the previous iteration. If so, replace the optimal position from the previous iteration. Step 9: In the exploration phase of improving the Osprey optimization algorithm, using the dynamic search parameter N(t) and the algorithm fitness value, an adaptive search parameter is introduced to design the Osprey position update strategy and determine the fractional-order PID control parameters of the UAV. The formula is as follows: In the formula, r is a random number between [0,1], and t is the current iteration number; Step 10: Calculate the fitness value. Compare the current best fitness value with the previous best fitness value, and keep the smaller fitness value to determine the best target object. Step 11: Increment the current iteration count t, t = t + 1. Check if the current iteration count has reached the maximum iteration count T. If it has, exit the loop, output the global optimal solution, and assign it to the parameters of the fractional PID. Otherwise, return to step 4.

Citation Information

Patent Citations

  • Engine control system of tilt-rotor unmanned aerial vehicle

    CN113075879A

  • Fire-fighting unmanned aerial vehicle attitude control method based on improved active disturbance rejection controller

    CN115657703A