Stability constraint LQR single-rotor unmanned aerial vehicle trajectory tracking control method based on GWO-PSO optimization
By using a stability-constrained LQR control method based on GWO-PSO optimization, the trajectory tracking problem of a single-rotor UAV under model uncertainty and external disturbances was solved, achieving high-precision and robust trajectory control.
Patent Information
- Application Number
- CN202511719788.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-06
AI Technical Summary
The trajectory tracking control of single-rotor UAVs faces model uncertainty and external disturbance problems. Existing control methods are not robust enough in the face of these challenges and are difficult to achieve accurate trajectory tracking.
A stability-constrained LQR control method based on GWO-PSO optimization is adopted. By defining the hovering point as the equilibrium point, a linearized model is constructed. The weight matrix is optimized by combining the GWO-PSO hybrid optimization algorithm, and a feedforward feedback control law is designed to suppress model uncertainty and external disturbances.
It significantly improves the trajectory tracking accuracy and anti-interference capability of single-rotor UAVs, and enhances the robustness and control performance of the system.
Smart Images

Figure CN121477928A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of trajectory tracking control technology, and in particular to a stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization. Background Technology
[0002] Unmanned Aerial Vehicles (UAVs), as intelligent unmanned platforms, have demonstrated enormous application potential in numerous fields such as agricultural plant protection, logistics distribution, aerial photography, and emergency rescue due to their flexible maneuverability, low operating costs, and diverse mission adaptability. Among various UAV configurations, multi-rotor UAVs (especially quadcopters) have been widely researched and applied due to their symmetrical structure and simple control. However, multi-rotor platforms also have inherent limitations such as relatively low energy efficiency and limited payload capacity. In contrast, single-rotor UAVs use a single main rotor to provide lift, and their aerodynamic efficiency is far higher than that of multi-rotor systems of the same size. They have significant advantages in terms of endurance and payload capacity, making them highly sought after in long-endurance, high-payload applications. However, this unique structure also brings severe control challenges. Unlike symmetrical multi-rotors where rotor torques can cancel each other out, the torque generated by the deflection of the rudder blades of a single-rotor UAV acts directly on the airframe, resulting in its dynamic model exhibiting strong nonlinearity, strong coupling, and underactuated characteristics. Furthermore, due to their small size and light weight, single-rotor UAVs are extremely sensitive to environmental disturbances (such as gusts and airflow changes), and their system parameters (such as mass and moment of inertia) are subject to uncertainty due to factors such as load changes and battery consumption. These factors make the design of high-performance, highly robust trajectory tracking control algorithms a core challenge and key issue in single-rotor UAV research. Therefore, researching control strategies that can effectively handle model uncertainties, suppress external disturbances, and achieve accurate trajectory tracking has significant theoretical and practical value for advancing single-rotor UAVs from the laboratory to complex real-world applications.
[0003] The control problem of single-rotor UAVs is essentially about designing a controller for a complex nonlinear system. Existing research mainly focuses on addressing its nonlinearity, coupling, and uncertainty. Model linearization-based control methods, due to the direct handling of the complexity of nonlinear systems, often linearize the system dynamics around the equilibrium point (usually the hovering state), thus applying mature linear control theory. Proportional-Integral-Derivative (PID) control is widely used due to its simple structure and ease of implementation, but its fixed parameters often lead to performance degradation under large-scale maneuvers or strong disturbances. Linear Quadratic Regulators (LQRs), as an optimal control method, design a state feedback controller by optimizing a given performance index, offering superior control quality compared to PIDs and possessing a certain degree of robustness. However, traditional LQRs are based on an accurate linearized model, and their control performance deteriorates sharply when the system has significant model uncertainties or external disturbances. To address these issues, researchers have proposed improvements, such as introducing an integral term to eliminate steady-state errors or combining it with feedforward control to compensate for deterministic disturbances. Nevertheless, how to systematically incorporate model uncertainties and external disturbances into the LQR design framework and ensure the stability of the closed-loop system remains a topic that needs further in-depth research. Summary of the Invention
[0004] This invention provides a stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization to overcome the aforementioned technical problems.
[0005] To achieve the above objectives, the technical solution of this invention is: a stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization, specifically including the following steps: S1: Construct a nonlinear dynamic model of a single-rotor UAV; S2: Define the hovering point as the only stable equilibrium point for the single-rotor UAV, and obtain a linearized model around the equilibrium point based on the nonlinear dynamic model; S3: Establish an optimization model considering model uncertainty and external disturbances based on the linearized model; S4: Design an initial feedforward feedback LQR control law based on stability constraints based on the optimization model; S5: Use the weight matrix Q and weight matrix R in the initial feedforward feedback LQR control law as a set of parameter variables, and optimize the parameter variables based on the constructed GWO-PSO hybrid optimization algorithm to obtain the optimal variables; obtain the optimal feedforward feedback LQR control law based on the optimal variables; S6: Implement trajectory tracking control of the single-rotor UAV based on the optimal feedforward feedback LQR control law.
[0006] Beneficial Effects: This invention provides a stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization. It defines a hovering point as the unique equilibrium point for stable operation of the single-rotor UAV and obtains a linearized model around the equilibrium point based on a nonlinear dynamic model. An optimization model considering model uncertainty and external disturbances is established based on the linearized model. An initial feedforward feedback LQR control law based on stability constraints is designed. The optimal feedforward feedback LQR control law is obtained by optimizing the parameter variables using the constructed GWO-PSO hybrid optimization algorithm. During PSO iteration, the population particles trigger GWO optimization with a certain probability. The hierarchical search strategy of GWO guides the particles to escape local optima, thereby synergistically improving the optimization accuracy and efficiency of the algorithm. The LQR control performance index is used as the fitness function, and the weight matrix Q and weight matrix R are automatically optimized through this hybrid algorithm to obtain the optimal controller parameters. The control method proposed in this invention exhibits significant advantages in trajectory tracking accuracy, anti-interference capability, and robustness. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0008] Figure 1 This is a flowchart of the stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization according to the present invention; Figure 2 This is a flowchart of the GWO-PSO hybrid optimization algorithm in this embodiment; Figure 3 This is a comparison chart of algorithm iterations in this embodiment; Figure 4 This is a comparison chart of the three-dimensional trajectory tracking curves in this embodiment; Figure 5 This is a comparison chart of the x-axis trajectory tracking curves in this embodiment; Figure 6 This is a comparison chart of the trajectory tracking curves along the y-axis in this embodiment; Figure 7 This is a comparison chart of the trajectory tracking curves along the z-axis in this embodiment; Figure 8 This is a comparison chart of the tracking error curves in the x-axis direction in this embodiment; Figure 9 This is a comparison chart of the tracking error curves in the y-axis direction in this embodiment; Figure 10 This is a comparison chart of the tracking error curves in the z-axis direction in this embodiment; Figure 11 This is a comparison chart of the roll angle tracking error curves in this embodiment; Figure 12 This is a comparison chart of pitch angle tracking error curves in this embodiment; Figure 13This is a comparison chart of yaw angle tracking error curves in this embodiment; Figure 14 The angle of attack in this embodiment α 1. Comparison chart of control input curves; Figure 15 The angle of attack in this embodiment α 3. Comparison chart of control input curves; Figure 16 The angle of attack in this embodiment α 2. Comparison chart of control input curves; Figure 17 The angle of attack in this embodiment α 4. Comparison chart of control input curves; Figure 18 Rotational speed in this embodiment Comparison chart of control input curves; Figure 19 This is a comparison chart of the three-dimensional trajectory tracking curves under model uncertainty and external interference in this embodiment; Figure 20 This is a comparison chart of the x-axis trajectory tracking curves under model uncertainty and external disturbances in this embodiment; Figure 21 This is a comparison chart of the y-axis trajectory tracking curves under model uncertainty and external disturbances in this embodiment; Figure 22 This is a comparison chart of the z-axis trajectory tracking curves under model uncertainty and external disturbances in this embodiment; Figure 23 This is a comparison chart of the x-axis tracking error curves under model uncertainty and external disturbances in this embodiment; Figure 24 This is a comparison chart of the y-axis tracking error curves under model uncertainty and external disturbances in this embodiment; Figure 25 This is a comparison chart of the z-axis tracking error curves under model uncertainty and external disturbances in this embodiment; Figure 26 This is a comparison chart of roll angle tracking error curves under model uncertainty and external disturbances in this embodiment; Figure 27 This is a comparison chart of pitch angle tracking error curves under model uncertainty and external disturbances in this embodiment; Figure 28 This is a comparison chart of yaw angle tracking error curves under model uncertainty and external disturbances in this embodiment; Figure 29 The angle of attack in this embodiment is subject to model uncertainty and external disturbances. α 1. Comparison chart of control input curves; Figure 30 The angle of attack in this embodiment is subject to model uncertainty and external disturbances. α 3. Comparison chart of control input curves; Figure 31 The angle of attack in this embodiment is subject to model uncertainty and external disturbances. α 2. Comparison chart of control input curves; Figure 32 The angle of attack in this embodiment is subject to model uncertainty and external disturbances. α 4. Comparison chart of control input curves; Figure 33 The rotational speed in this embodiment is subject to model uncertainty and external disturbances. Comparison chart of control input curves. Detailed Implementation
[0009] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0010] This embodiment provides a stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization, such as... Figure 1 As shown, the specific steps include: S1: Constructing a nonlinear dynamic model of a single-rotor UAV; specifically, the single-rotor UAV provides its lift through motor rotation. In this embodiment, the position and attitude of the single-rotor UAV are described by establishing a world coordinate system and the body coordinate system of the single-rotor UAV. The single-rotor UAV is modeled as a rigid body, and its translational motion is generated by the thrust of the rudder blades. Driven by torque, rotational motion Generate; cause and Represent the position and linear velocity relative to the world coordinate system; let... For pitch, roll, and yaw, three Euler angles and Let be the angular velocity expressed in body coordinates, and let the orthogonal rotation matrix be derived from... express, This represents the rotation matrix from the world coordinate system to the body coordinate system; m For drone quality; g It is the gravitational constant; Here is the rotational inertia matrix of the UAV; The resultant force of the drone on the three axes, Based on the Newton-Euler formula and Newton's second law, the nonlinear dynamic model of a single-rotor UAV is as follows: (1) (2) (3) (4) In the formula: This represents the thrust generated by the four rudders of a single-rotor UAV and ; Indicates torque and ; These represent pitch torque, roll torque, and yaw torque, respectively. Indicates the position state relative to the preset world coordinate system and ; Represents the linear velocity relative to the preset world coordinate system and ; Describes Euler angle vectors and ; These represent pitch angle, roll angle, and yaw angle, respectively. Describes the angular velocity vector and ; These represent the pitch rate, roll rate, and yaw rate in the preset body coordinate system, respectively. Represents an orthogonal rotation matrix; m Indicates the quality of the drone; This represents the rotation matrix from the world coordinate system to the body coordinate system; g Represents the gravitational constant; Describe the rotational inertia matrix of the UAV and ; The moment of inertia represents the pitch, roll, and yaw directions. This represents the resultant force of the drone on its three axes; Indicate design parameters and ; Indicates transpose; l This indicates the distance between the rotor center and the rudder blade; r This indicates the distance the rudder blade is offset along the z-axis; F t This indicates the lift provided by the motor, expressed as a function of the rotor speed. Second-order polynomial and constant scaling factor K t To describe; This indicates the downward drag force generated by the rudder blade; Indicates the rotor speed; Indicates a constant scaling factor; Represents the lift constant; Represents the resistance constant; Indicates the first Angle of attack of each rudder blade; express The first derivative; in summary, the simplified equations of motion describing the dynamics of the three attitude angles and three positions can be obtained from this embodiment as follows: (5) in, Let these represent the cosine and sine functions, respectively. Indicates the roll angle; S2: Define the hovering point as the only stable equilibrium point for a single-rotor UAV, and obtain a linearized model around the equilibrium point based on the nonlinear dynamics model. This includes the following steps: S21: The nonlinear dynamic model is rewritten as follows:
[0011] In the formula: This represents the state vector describing the UAV and It describes the drone's position, velocity, attitude, and other states; The function representing the nonlinear coupling relationship of a single-rotor UAV; Represents the control vector of the UAV and ; S22: Define the hovering point as the only stable equilibrium point for the single-rotor UAV. and ; It represents the state of the drone's equilibrium point and obtains a linearized model around the equilibrium point based on the nonlinear dynamics model. The thrust generated by the rudder in this embodiment Received and The nonlinear coupling between the two inputs makes it difficult to design an effective nonlinear controller. To simplify the complex coupling terms and other nonlinear characteristics of the system, it is necessary to linearize the system into a linear time-invariant model. To obtain such a model, it will be... The given nonlinear system dynamics model at the system equilibrium operating point Linearization is performed on the vicinity, and the linearization approximates the system dynamics, specifically: Define the equilibrium point Nearby small disturbances and for: (6) (7) For a single-rotor drone model, the hovering point is set as the only stable equilibrium operating point. In this stable state, the drone is completely horizontal and its speed and angular velocity are both 0. The lift provided by the motor is equal to the weight of the drone, and the linearized model around the equilibrium point is: (8) Here, matrices A and B are composed of the linearized dynamics of the system, and the linearized system matrix is calculated from the Jacobian matrix as follows: (9) The matrices A and B are obtained as follows: (10) (11) In the formula: Indicates the current state of the drone With equilibrium state The state increment caused by the difference between them; These represent the attitude angle increment, angular velocity increment, position increment, and linear velocity increment between the actual state of the UAV and its equilibrium point state, respectively. Indicates actual control input Control input at equilibrium The difference causes an increment in the control input; This represents the control input when the drone is at its equilibrium point; This represents the control inputs of the four rudders and rotor of the UAV at its equilibrium point; A and B represent the system matrix; C represents the output matrix. express The abbreviated form; express The abbreviated form; Represents a 3×3 zero matrix and a 3×3 identity matrix; It is a zero matrix with dimensions of 3×2, 3×1, 2×1, and 1×2; Indicates the rotor speed at equilibrium; S3: Establish an optimization model that considers model uncertainty and external disturbances based on the linearized model; Specifically, in this embodiment, the single-rotor UAV is small in size and light in weight, making it susceptible to external interference, such as changes in wind speed and airflow. Furthermore, due to its unique structure, unlike the symmetrical rotor layout of a quadcopter, the rotor torque of a single-rotor UAV is not counteracted by other rotors. Therefore, the torque generated by the rotor directly affects the attitude control of the UAV, making rotor torque interference non-negligible. In this embodiment, the external interference affecting the UAV system is represented as: (12) Furthermore, the single-rotor UAV system is also a typical uncertain system. Its uncertainties include not only external random disturbances but also parameter disturbances, such as external random disturbances caused by wind speed and airflow, and uncertainties in the inertia coefficient resulting from variations in the UAV's mass distribution with load and battery power. Considering these uncertainties, the dynamic model of the single-rotor UAV can be modified to reflect the impact of external disturbances and parameter changes. An optimization model for the single-rotor UAV system with model uncertainties and external disturbances is established as follows: (13) In the formula: This represents a state vector that describes the dynamic characteristics of the actual disturbance vector; M and N Represents a constant matrix; express The first derivative; This represents the actual disturbance vector acting on the single-rotor unmanned aerial vehicle system; G This represents a real matrix acting on the actual disturbance vector; and The unknown time-varying function matrix represents the uncertainty of the model, which includes multiple factors such as mass uncertainty, rotational inertia uncertainty, battery power variation, and external environmental disturbances. These uncertainties affect the state equation and control input of the UAV, making the dynamic behavior of the system difficult to predict and control.
[0012] Assumption 1: It is fully observable, and the matrix M All eigenvalues of the matrix are less than 0. When the real part of the eigenvalues is zero, it is a matrix. M The presence of a minimal polynomial root indicates that the system is stable under external disturbances, but not necessarily asymptotically stable. Assumption 2: and A bounded matching condition exists that satisfies the following formula, and an unknown function matrix exists. and This makes the following matching condition equation hold: (14) This embodiment is based on a real flight environment. and The uncertainty of the model and external disturbances are bounded. The maximum value of uncertainty is closely related to the flight environment and system parameter disturbances. If the uncertainty is bounded, the matching condition can be met. If the uncertainty and disturbance meet the matching condition, the influence of uncertainty and disturbance can be suppressed by adopting appropriate control strategies, thereby achieving the robustness of the closed-loop system.
[0013] The control objective in this embodiment is to achieve the desired trajectory tracking by designing a tracking controller that considers model uncertainties and external disturbances in a single-rotor UAV; assuming... p d and Given the desired trajectory position and desired attitude angle, the position error vector and attitude error vector are defined as follows: (15) Control objectives include design electric speed rudder blade angle of attack The deflection angle ensures that the error trajectory satisfies the definition of a eventually consistent bounded signal, meaning the controller should guarantee: (16) In the formula: a and b are positive real numbers, representing the upper bounds of the initial error and the tracking error; It is a convergence time function dependent on a and b, representing the maximum time required for the system to converge from the initial state to within the steady-state error boundary b. ; Let be the initial values of the position error vector at time t, the initial values of the attitude error vector at time t, the position error vector at time t, and the attitude error vector at time t. In this embodiment, to achieve consistent eventual boundedness of the aforementioned errors, the Input-to-State Stability (ISS) theoretical framework is used for stability analysis of the system subjected to external disturbances. If it exists Class function and Class function Such that for any initial state and bounded interference input The system state satisfies: (17) Then the system can be considered to be in The input to the state is stable when it is used as input.
[0014] Definition: For the above system, if a smooth function It is considered an ISS-Lyapunov function if it meets the following conditions: 1): It is positive definite and radially unbounded, that is, it exists. Class function , , so that: (18) 2): Existence Class function , , so that: (19) A system is said to be ISS if and only if it has a smooth ISS-Lyapunov function.
[0015] In this embodiment, it should be noted that for a single-rotor UAV system, the input-state stability (ISS) is not a local stability concept for small external disturbances; its core lies in introducing... Class function As a stability margin, the feedback control law satisfies the constraints. Under these constraints, even if the UAV dynamics suffer from unmodeled aerodynamic effects or nonlinear disturbances such as actuator saturation, ISS can still ensure that the state trajectory converges to the equilibrium point through global asymptotic stability. This global robustness is similar to the exponential stability of linear systems: even if the system dynamics are disturbed, the ISS method can still guarantee the global asymptotic stability of the UAV in maintaining its equilibrium point.
[0016] S4: Design an initial feedforward feedback LQR control law based on stability constraints according to the optimization model; including the following steps: S41: In this embodiment, the linear quadratic regulator (LQR) is an optimal controller for linear systems. The goal of LQR control is to find a feedback gain matrix. K This optimizes the performance of the closed-loop system; and ,in Let the state matrix and input matrix represent the uncertainties, respectively. Then the optimization model can be rewritten as: (20) LQR minimizes the cost of state error and control input by minimizing the cost function. J Design an optimal state feedback controller to achieve the desired control performance under stability constraints. J Defined as: (twenty one) In the formula: weight matrix Q and weight matrix R are positive semi-definite and positive definite matrices, respectively. Given a known scalar function, i.e., the stability constraint factor, the optimal control problem is to find an optimal control law. Minimize the value of the performance index; S42: By introducing a stability constraint factor and >0; make in Let represent the exponential weighting function, and let be the expression for the optimization model based on stability constraints. (twenty two) The control performance index obtained at this time is: (twenty three) Therefore, the problem of improving the optimal regulator for a single-rotor UAV system and its performance indicators is transformed into a new problem of optimal regulator for the system and its performance indicators. In this embodiment, the LQR optimal control law includes the following lemmas and theorems: Lemma 1: If , It is completely controllable and completely observable, then , It is completely controllable and completely observable; Proof: Let ,in For the expression of the lower-order sub-K, we can obtain:
[0017] (twenty four)
[0018] Having completed the proof, the observability can be proven by analogy.
[0019] Lemma 2: Let , , , The matrix equation can be obtained: (25) If and only if When, there is a unique solution X; where Represents the eigenvalues of a matrix; Theorem 1: Assume It is completely controllable. It is completely observable. Under the assumptions 1 and 2, considering the LQR problem of a single-rotor UAV system under model uncertainty and external disturbances, the optimal control law exists and is unique, and its form is as follows: (26), of which: yes The unique solution to the matrix equation: (27) It is the unique solution to the matrix differential equation: (28), of which: .
[0020] Proof: Due to the optimal control problem of the system with the above control performance indices, the following TPBV problem arises: (29) The optimal control law can then be expressed as: (30) make: Taking the derivative of the above TPBV problem, we can obtain: (31) Substituting equation (31) into the first expression of equation (29), we get: (32) Since this equation applies to any state variable and All of these are true, therefore we can obtain information about , The matrix differential equation. From Lemma 1, we know: , It is completely controllable and observable, therefore yes The matrix equation (27) has a unique semi-definite solution. By Lemma 2, the matrix equation (28) has a unique definite solution. Therefore, it is possible to obtain Then, from equation (30), we can obtain: (33) S43: Therefore, by combining Theorem 1, Theorem 2, and Theorem 3, and based on the optimization model with stability constraints, an initial feedforward LQR control law is constructed; and the initial feedforward LQR control law The formula for obtaining it is (34) In the formula: This represents the feedforward gain for the disturbance; Indicates the state feedback gain; Represents intermediate variables; Q represents the positive semi-definite matrix, i.e., the state error weight matrix; R represents the positive definite matrix, i.e., the control input weight matrix; This embodiment differs from traditional LQR design in terms of feedback gain. It introduces a stability design concept based on LQR, incorporating relative stability into the control design. By constructing new control performance index functions to redesign the optimal control system, the closed-loop poles of the system can be reconfigured, thereby giving the closed-loop system a specific stability. That is, the attenuation rate is not less than This results in good system response characteristics. The LQR controller designed in this embodiment compensates for the influence of disturbances in the system model through feedforward control terms. This feedforward law is based on the disturbance dynamic model and calculates the required compensation torque by solving the matrix equations, forming a composite control structure with the state feedback term. This feedforward-feedback architecture can effectively suppress deterministic disturbances (such as rotor torque disturbances and constant wind disturbances) under the matching condition assumption. Its compensation mechanism is reflected in the effect of offsetting the influence of the feedforward term on the disturbance in the system dynamic equations.
[0021] S5: Take the weight matrix Q and weight matrix R in the initial feedforward LQR control law as a set of parameter variables, and optimize the parameter variables based on the constructed GWO-PSO hybrid optimization algorithm to obtain the optimal variables; obtain the optimal feedforward LQR control law based on the optimal variables; In this embodiment, the performance of the LQR controller is mainly determined by the weight matrix. In engineering applications, the weight matrix is often determined based on experience or extensive experiments, which wastes time and resources. This embodiment employs a hybrid optimization algorithm combining particle swarm optimization and gray wolf algorithm. This algorithm combines the fast convergence speed of particle swarm optimization with the full set search capability of gray wolf algorithm, enabling it to search for the optimal Q and R matrices, thereby improving controller performance. Figure 2 As shown, the specific steps include: S51: In the Particle Swarm Optimization (PSO) algorithm, the position of each particle represents a possible solution. By simulating swarm intelligence and individual experience, the algorithm searches in a D-dimensional solution space and finds the optimal solution after a finite number of iterations. In the LQR controller optimization model of this embodiment, the position of the particle is specifically represented by the weight parameters of the LQR controller. The weight matrix Q and weight matrix R in the initial feedforward LQR control law are used as a set of parameter variables, and these parameter variables are defined as swarm particles. ,in This represents a set of parameter variables corresponding to the j-th population particle; Represents the weight matrix Elements in; Represents the weight matrix Elements in; S52: Initialize the algorithm parameters for the swarm particle algorithm, wherein the algorithm parameters include at least the initial population size and the maximum number of iterations; and assume that when the number of iterations is k, the initial particle population Pop consists of NP particles: (35) in, Indicates the first j The particle in the first k The position of the next iteration and (36) S53: Based on the stability constraint-based optimization model, construct the optimal control law for obtaining the LQR controller. The corresponding control performance function is expressed as follows: (37) In this embodiment, the first in the population j The position vector of each particle The diagonal elements of a complete set of Q and R matrices corresponding to the particle are encoded. Since the fitness value of the particle reflects the quality of the solution, the design of the fitness function is related to the performance index of the LQR control system. Assuming there are N sampling points in the trajectory tracking process, the fitness function is established using the performance index of equation (37), i.e. Assuming N trajectory sampling points are pre-set during the trajectory tracking process of a single-rotor UAV, the fitness function is defined based on the control performance function. Its expression is: (38) In the formula: Indicates that the drone is at the sampling point State quantity at State quantities at the equilibrium point The state increment caused by the difference between them; Indicates that the drone is at the sampling point Actual control input at the location Control input at equilibrium The difference causes an increment in the control input; S54: Based on the fitness function, obtain the fitness values of all population particles in the initial population to obtain the optimal population particle, and determine whether the maximum number of iterations has been reached; If so, output the optimal population particle obtained at this time, i.e., the optimal values of weight matrix Q and weight matrix R; if not, update the population particles based on the position and velocity update formula, obtain the next generation particle population and the corresponding current random number output. ; The position and velocity update formulas are as follows: (39)
[0022] In the formula: These represent individual and group learning factors, respectively. Represents a random value between [0 and 1]; Indicates inertia weight; Indicates the first j The particle in the first k The optimal position in the next iteration; This represents the globally optimal position at the k-th iteration. As shown in the position and velocity update formulas, particle velocity affects the algorithm's convergence efficiency. Excessively high velocity, while increasing the convergence rate, may cause the search to stray outside the effective region of the global optimum; conversely, excessively low velocity will slow the convergence process and increase the risk of getting trapped in local optima. Meanwhile, particle velocity is closely coupled with inertia weights and learning factors. Therefore, as the number of iterations increases, each particle should narrow its search range to obtain the optimal solution. Based on this idea, the inertia weights of the particle swarm optimization algorithm should be gradually reduced to enhance the particle's local search capability. According to the evolutionary state of the particle swarm, the following adaptive inertia weight calculation formula is designed: (40) in a and b These are parameters that can adjust the algorithm's performance. The estimated value of the evolutionary state at the k-th iteration is calculated by the following formula: (41) in They represent the first k The maximum and minimum fitness values in the particle swarm during the next iteration; In the initial stage of the optimization process, particles are randomly dispersed in the search space, resulting in significant differences in their fitness values. This leads to a large gap between the maximum and minimum fitness values. However, in the final stage of the optimization process, particles converge to a region near the optimal solution. Therefore, the particle fitness values become similar to the optimal values, meaning the difference between the maximum and minimum fitness values can be sufficiently small. Based on these considerations, the estimation scheme in equation (41) effectively reflects the evolutionary state of the particle swarm. In the particle swarm optimization algorithm, the individual learning factor... Social learning factors These are used to adjust the degree to which a particle depends on its own experience and the collective experience during the search process. When the value is higher, particles are more inclined to search independently within their neighborhood, enhancing their individual exploration capabilities; while If the value is too high, it can easily lead to a decrease in population diversity, causing the algorithm to converge to a local extremum prematurely. Therefore, it is necessary to assign a certain value to the algorithm in the initial stage. Higher values Lower values, and during the iteration process Dynamic decay Gradually increasing. This mechanism helps guide the search process smoothly from extensive exploration to refined search, ultimately leading the population to approach the global optimum, cognitive and social learning factors. , The specific value can be determined by the following formula: (42) (43) In the formula: express The initial value; express The termination value; Indicates the maximum number of iterations; S55: Determine if the preset probability prob is greater than the current random number. If the probability prob is greater than the current random number If the result is positive, proceed to step S56; otherwise, use the next generation of particle population as the initial population and repeat step S54. S56: For the parameter variables corresponding to each swarm of particles in the next generation particle swarm, execute the Grey Wolf Optimization Algorithm. In this embodiment, although the particles in the PSO algorithm can maintain their historical and current states, the PSO algorithm is easily trapped in local optima due to random fluctuations in the later stages, thus reducing the optimization accuracy. The Grey Wolf Optimization Algorithm, on the other hand, simulates the hunting behavior of a grey wolf and has a stronger global search capability, which can effectively avoid the algorithm from getting trapped in local optima. Specifically, it includes: S561: Set the hyperparameters of the gray wolf optimization algorithm and define the position of each gray wolf in the initial gray wolf population as a feasible solution for a set of parameter variables; S562: The fitness function The fitness function of the gray wolf optimization algorithm is used to obtain the fitness value of each gray wolf in the initial gray wolf population based on the fitness function, and the gray wolf individuals are sorted in descending order according to the fitness value to obtain the sequence list. The first three gray wolf individuals in the sequence list were selected as Alpha wolves, Beta wolves, and Delta wolves, respectively. S334: Confirm whether the current iteration count has reached the maximum iteration count; If so, the average position of the Alpha wolf, Beta wolf, and Delta wolf at this time is used as the replacement parameter variable, and the replacement parameter variable is replaced with the individual position of the population particles, and S54 is repeated; if not, the initial population is iteratively updated according to the positions of the Alpha wolf, Beta wolf, and Delta wolf to obtain a new generation of gray wolf population; the method of iteratively updating the initial population in the gray wolf optimization algorithm in this embodiment is a well-known existing technology, and will not be described in detail here. Define the new generation of gray wolf pack as the initial gray wolf pack, and repeat step S562.
[0023] S6: Achieve trajectory tracking control for a single-rotor UAV based on the optimal feedforward feedback LQR control law.
[0024] This implementation combines the advantages of PSO and GWO (Grey Wolf) optimization algorithms to improve optimization performance and reduce the risk of getting trapped in local optima. In the traditional PSO algorithm, particles avoid local optima by occasionally moving randomly, but this can lead to deviations from the global optimum. Therefore, GWO-PSO replaces the random movement in PSO with GWO's global search capability, guiding particles towards a more optimal search direction. In this embodiment, the GWO-PSO hybrid optimization algorithm does not change the general operation of PSO and GWO algorithms. While PSO introduces randomness, allowing particles to escape the current search region, randomly adjusting particle positions helps escape local minima, it also carries the risk that particles may deviate from the global minimum, making the optimization process more unstable. Therefore, using PSO alone may introduce uncertainty. By guiding these particles to positions improved by the GWO algorithm rather than random positions, the randomness risk in the PSO algorithm can be effectively reduced. The GWO algorithm is used to support the PSO algorithm to reduce the possibility of getting trapped in local minima. By outputting the optimal individual and fitness, the optimization of the LQR coefficient matrix is finally achieved. Table 1 shows the pseudocode of the GWO-PSO hybrid optimization algorithm.
[0025] Table 1. Pseudocode of the GWO-PSO hybrid optimization algorithm
[0026] The strategies for designing the optimal feedforward feedback LQR control law are summarized in Table 2: Table 2. Strategies for Optimal Feedforward LQR Control Law
[0027] The beneficial effects of the method described in this embodiment are as follows: By defining the hovering point as the only stable equilibrium point for a single-rotor UAV, and obtaining a linearized model around the equilibrium point based on the nonlinear dynamics model; establishing an optimization model considering model uncertainty and external disturbances based on the linearized model; designing an initial feedforward feedback LQR control law based on stability constraints; obtaining the optimal feedforward feedback LQR control law by optimizing the parameter variables based on the constructed GWO-PSO hybrid optimization algorithm; during the PSO iteration process, the population particles trigger GWO optimization with a certain probability, and the hierarchical search strategy of GWO guides the particles to jump out of local optima, thereby synergistically improving the optimization accuracy and efficiency of the algorithm; using the LQR control performance index as the fitness function, the weight matrix Q and weight matrix R are automatically optimized through the hybrid algorithm to obtain the controller parameters with optimal performance. The control method proposed in this invention shows significant advantages in trajectory tracking accuracy, anti-interference ability, and robustness.
[0028] This embodiment also includes stability analysis: Theorem 4.1: Consider a single-rotor unmanned aerial vehicle system (13) with an error state LQR control law (32), then the system error... The asymptotic convergence to zero indicates the actual state of the drone. It asymptotically converges to the desired trajectory, thereby achieving the tracking of the complete trajectory.
[0029] Proof: Let , but Substituting the optimal control law (26) into the system equations: From this, the system state equation is obtained as follows: (44) make , According to the matching criteria, we know that: (45) Let the Lyapunov function be: (46) but: (47) in: (48) For the nominal term, substitute the Riccati equation into the nominal term. We can obtain: (49) make The smallest eigenvalue of the Q matrix can be obtained according to the properties of quadratic forms: (50) For uncertainties Using symmetry, we can obtain: (51) According to Young's inequality, the uncertainty term is: (52) According to the matching criteria, and It is bounded, assuming the uncertainty satisfies , Then the norm of the composite uncertainty matrix is bounded: (53) Substituting the boundedness of the norm into Young's inequality: (54) Then the uncertainty term satisfies: (55) For interference items Using Young's inequality, we can obtain: (56) Combining the nominal term, the uncertainty term, and the interference term, we can obtain: (57) Assume the selected parameters satisfy: (58) Then there exist positive definite coefficients. , , so that: (59) According to the ISS theoretical framework, the system satisfies input-to-state stability, and the state convergence is described by the following equation: (60) Simulation verification analysis in this embodiment: A. Simulation parameter settings: In order to verify the effectiveness of the method described in this embodiment, a MATLAB / SIMULINK co-simulation model was built for simulation verification. The parameters of the single-rotor UAV are shown in Table 3.
[0030] Table 3. Parameters of Single-rotor UAVs
[0031] The reference trajectory for the drone flight is set as follows: (61) The total runtime is set to 30 seconds, the G matrix is chosen as an identity matrix of appropriate dimensions, and the stability constraint factor parameters are... Set to 0.5; B. Verification of the computational efficiency of the method described in this embodiment: To verify the effectiveness of the method described in this embodiment, the optimization effects of the GWO-PSO hybrid optimization algorithm, the PSO algorithm, and traditional algorithms such as MPSO were compared and tested. Regarding the algorithm parameter settings, the initial population size was set to 80, and the number of iterations was 150. For the GWO-PSO hybrid optimization algorithm, the randomness parameter prob was set to 0.35, and the initial values for individual and social learning factors were... Termination values of individual learning factor and social learning factor Algorithm performance parameters and In this embodiment, five algorithms are run 10 times each, and the iteration curves are compared as follows: Figure 3 As shown in Table 4, the algorithm's execution data is as follows.
[0032] Table 4. Comparison of Algorithm Running Data
[0033] according to Figure 3 The convergence curves and the algorithm performance comparison data in Table 4 verify the superiority of the method described in this embodiment. As shown in Table 4, in 10 independent experiments, the GWO-PSO hybrid optimization algorithm exhibits a significant performance advantage over traditional PSO, MPSO, and FMSPSO. Figure 3 As can be seen from the convergence curves, in the early stages of iteration, the GWO-PSO hybrid optimization algorithm converges rapidly at a similar rate as MPSO and FMPSO, indicating that the GWO-PSO hybrid optimization algorithm retains the rapid convergence characteristic of the PSO algorithm. However, in the middle stages of iteration, when algorithms such as PSO get stuck in local optima, the GWO-PSO hybrid optimization algorithm overcomes the local extremum limitation by introducing the hierarchical search mechanism of the Grey Wolf algorithm. Experimental results show that the GWO-PSO hybrid optimization algorithm, by integrating the collaborative search mechanism of PSO and GWO, has stronger convergence accuracy in solving the LQR weight matrix optimization problem.
[0034] C-tracking performance test: Scenario 1: Helical trajectory tracking performance test under interference-free conditions To fully verify the trajectory tracking performance of the method described in this embodiment, the tracking performance of traditional LQR, existing improved-LQR (i-LQR), and the method described in this embodiment are compared as follows: Figures 4 to 18 As shown. Figures 4 to 7 Trajectory tracking in the x, y, and z axes is presented. Figures 8 to 10 Position tracking error curves in the x, y, and z axes are given. Figures 11 to 13 The attitude tracking error curve is given. Figures 14 to 18The control input curves and speed curves for angles of attack α1, α3 and α2, α4 are given.
[0035] As can be seen from the figure, the simulation results of the method described in this embodiment have better tracking performance compared with traditional LQR and i-LQR. Figures 4 to 7 The trajectory tracking curves show that the controller (s-LQR) corresponding to the method described in this embodiment has significantly reduced phase lag in the abrupt change segment of the spiral trajectory compared to the traditional LQR and i-LQR. The three-dimensional trajectory overlap verifies the improvement of the cooperative control capability by the GWO-PSO optimized weight matrix. Figures 8 to 13 The error curves show that the method described in this embodiment effectively suppresses the oscillation phenomenon of traditional LQR. In position tracking, the maximum tracking error of s-LQR in the x-direction (0.47 m) is reduced by 43.4% compared to i-LQR (0.83 m), and by 59.1% compared to traditional LQR (1.15 m). In y-direction tracking, the peak error of s-LQR (0.47 m) is reduced by 38.2% compared to i-LQR (0.76 m), and by 59.8% compared to LQR (1.17 m). This indicates that traditional LQR is prone to chattering. i-LQR solves the steady-state error problem of traditional LQR through a feedforward-feedback composite control architecture, but it cannot adaptively adjust its parameters. The s-LQR controller proposed in this embodiment adjusts the control parameters through the GWO-PSO hybrid optimization algorithm, solving the steady-state error oscillation problem caused by parameter mismatch in i-LQR. Figures 14 to 18 The control input curves show that s-LQR fluctuates significantly in the initial stage of the rudder angle input curve. This phenomenon stems from the inherent physical delay of a single-rotor UAV: unlike quadcopters which directly adjust angular momentum through motor differential speed, single-rotor UAVs have zero lateral force reserve in hovering. When the trajectory changes abruptly, they need to undergo a chain response of servo deflection → angle of attack establishment → aerodynamic force generation, forcing the controller to increase the command amplitude to compensate for the lack of initial acceleration. This indicates that the method described in this embodiment, compared to the other two methods, has a higher rotational speed ω. t The better narrowing of fluctuations in the later stage indicates that the method described in this embodiment can enhance the control effect to reduce the physical constraints of the single rotor system in the initial response stage, and has better robust performance in the later steady-state stage.
[0036] Scenario 2: Performance testing of spiral trajectory tracking under scenarios considering model uncertainty and external disturbances. To verify the effectiveness and stability of the method described in this embodiment in more complex environments, simulations comparing three methods were conducted considering model uncertainties and external interference. Regarding interference experienced by the UAV: set up w ( t)=[0,0,0,0.3sin(0.05t),0.3sin(0.05t),0.3sin(0.05t),0,0,0,0.3sin(0.05t), 0.3sin(0.05t), 0.3sin(0.05t), 0.3sin(0.05t)]. Let... N The matrix is an identity matrix. Model uncertainty is achieved through parameter perturbation and dynamic reconstruction mechanisms: for the mass of the UAV... m Moment of inertia , , and lift constant Apply a 15% boundary perturbation and re-derive the thrust based on the perturbation parameters. and torque The model uncertainty is calculated using the Jacobian matrix difference. and The comparison chart of the three methods is as follows: Figures 19 to 33 As shown, Figures 19 to 22 It can be seen that, compared with traditional LQR and i-LQR, s-LQR can better suppress the dynamic response overshoot of the system when there are drastic changes in the x-axis and y-axis trajectories. Traditional LQR produces large overshoot and fluctuations at the point of abrupt change in the target trajectory, reflecting its poor adaptability to model uncertainty and external disturbances; i-LQR exhibits significant phase lag and cannot respond to trajectory changes in a timely manner, affecting the overall tracking accuracy. In contrast, the control trajectory generated by s-LQR shows a high degree of overlap with the actual trajectory in multiple test scenarios, demonstrating excellent trajectory-keeping performance. This result shows that the proposed feedforward feedback control strategy can significantly enhance the controller's compensation and robustness against system uncertainties and disturbances. Figures 23 to 33In the x-axis and y-axis directions of the position tracking error curves, the maximum position tracking error of s-LQR is only 0.51 m, which is about 42% lower than i-LQR's 0.88 m, and about 59% lower than the traditional LQR's 1.27 m. Furthermore, the trend of error over time also reveals that traditional LQR exhibits more pronounced system output oscillations when facing system model uncertainties and external disturbances; while i-LQR, despite introducing an improved strategy, still suffers from significant position tracking errors due to the lack of a dynamic weight adjustment mechanism. In contrast, s-LQR maintains low levels in both position and attitude errors, and its performance is similar to that in Scenario 1, fully validating the strong robustness and good practical adaptability of the proposed method in this embodiment. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization, characterized in that, Specifically, the following steps are included: S1: Construct a nonlinear dynamic model of a single-rotor UAV; S2: Define the hovering point as the only stable equilibrium point for a single-rotor UAV, and obtain a linearized model around the equilibrium point based on the nonlinear dynamics model. S3: Establish an optimization model that considers model uncertainty and external disturbances based on the linearized model; S4: Design an initial feedforward feedback LQR control law based on stability constraints according to the optimization model; S5: Take the weight matrix Q and weight matrix R in the initial feedforward LQR control law as a set of parameter variables, and optimize the parameter variables based on the constructed GWO-PSO hybrid optimization algorithm to obtain the optimal variables; obtain the optimal feedforward LQR control law based on the optimal variables; S6: Achieve trajectory tracking control for a single-rotor UAV based on the optimal feedforward feedback LQR control law.
2. The trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization with stability constraints and LQR as described in claim 1, characterized in that, The formula for constructing the nonlinear dynamics model of the single-rotor UAV in S1 is as follows: In the formula: This represents the thrust generated by the four rudders of a single-rotor UAV and ; Indicates torque and ; These represent pitch torque, roll torque, and yaw torque, respectively. Indicates the position state relative to the preset world coordinate system and ; Represents the linear velocity relative to the preset world coordinate system and ; Describes Euler angle vectors and ; These represent pitch angle, roll angle, and yaw angle, respectively. Describes the angular velocity vector and ; These represent the pitch rate, roll rate, and yaw rate in the preset body coordinate system, respectively. Represents an orthogonal rotation matrix; m Indicates the quality of the drone; This represents the rotation matrix from the world coordinate system to the body coordinate system; g Represents the gravitational constant; Describe the rotational inertia matrix of the UAV and ; The moment of inertia represents the pitch, roll, and yaw directions. This represents the resultant force of the drone on its three axes; Indicate design parameters and ; Indicates transpose; l This indicates the distance between the rotor center and the rudder blade; r This indicates the distance the rudder blade is offset along the z-axis; F t This indicates the lift provided by the motor; This indicates the downward drag force generated by the rudder blade; Indicates the rotor speed; Indicates a constant scaling factor; Represents the lift constant; Represents the resistance constant; Indicates the first Angle of attack of each rudder blade; express The first derivative.
3. The trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization with stability constraints and LQR as described in claim 2, characterized in that, S2 specifically includes the following steps: S21: The nonlinear dynamic model is rewritten as follows: In the formula: This represents the state vector describing the UAV and ; The function representing the nonlinear coupling relationship of a single-rotor UAV; Represents the control vector of the UAV and ; S22: Define the hovering point as the only stable equilibrium point for the single-rotor UAV. and ; This indicates the state of the drone's equilibrium point; And based on the equilibrium point, a linearized model around the equilibrium point is obtained according to the nonlinear dynamic model; And the linearized model around the equilibrium point is: In the formula: Indicates the current state of the drone With equilibrium state The state increment caused by the difference between them; These represent the attitude angle increment, angular velocity increment, position increment, and linear velocity increment between the actual state of the UAV and its equilibrium point state, respectively. Indicates actual control input Control input at equilibrium The difference causes an increment in the control input; This represents the control input when the drone is at its equilibrium point; This represents the control inputs of the four rudders and rotor of the UAV at its equilibrium point; A and B represent the system matrix; C represents the output matrix. express The abbreviated form; express The abbreviated form of .
4. The stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization as described in claim 3, characterized in that, In S3, an optimization model considering model uncertainty and external disturbances is established based on the linearized model. Its expression is: In the formula: This represents a state vector that describes the dynamic characteristics of the actual disturbance vector; M and N Represents a constant matrix; express The first derivative; This represents the actual disturbance vector acting on the single-rotor unmanned aerial vehicle system; G This represents a real matrix acting on the actual disturbance vector; and The unknown time-varying function matrix represents the uncertainty of the model, which includes at least the uncertainty of mass, the uncertainty of rotational inertia, the change in battery charge, and the disturbance of the external environment.
5. The stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization as described in claim 4, characterized in that, S4 specifically includes the following steps: S41: Order and ,in Let the state matrix and input matrix represent the uncertainties, respectively. Then the optimization model can be rewritten as: S42: By introducing a stability constraint factor and >0; make in Let represent the exponential weighting function, and let be the expression for the optimization model based on stability constraints. S43: Construct the initial feedforward feedback LQR control law based on the stability-constrained optimization model; And the initial feedforward feedback LQR control law The formula for obtaining it is In the formula: This represents the feedforward gain for the disturbance; Indicates the state feedback gain; represents the intermediate variable; Q represents the positive semi-definite matrix, i.e., the state error weight matrix; R represents the positive definite matrix, i.e., the control input weight matrix.
6. The stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization as described in claim 5, characterized in that, S5 specifically includes the following steps: S51: The weight matrix Q and weight matrix R in the initial feedforward LQR control law are taken as a set of parameter variables, and the parameter variables are defined as population particles: ,in This represents a set of parameter variables corresponding to the j-th population particle; Represents the weight matrix Elements in; Represents the weight matrix Elements in; S52: Initialize the algorithm parameters of the population particle algorithm, wherein the algorithm parameters include at least the initial population size and the maximum number of iterations; And assume that the initial particle population Pop consists of NP particles: ,in Indicates the first j The particle in the first k The position of the next iteration and S53: Based on the stability constraint-based optimization model, construct the optimal control law for obtaining the LQR controller. The corresponding control performance function; And the expression for the control performance function is: Assuming N trajectory sampling points are pre-set during the trajectory tracking process of a single-rotor UAV, the fitness function is defined based on the control performance function. Its expression is: In the formula: Indicates that the drone is at the sampling point State quantity at State quantities at the equilibrium point The state increment caused by the difference between them; Indicates that the drone is at the sampling point Actual control input at the location Control input at equilibrium The difference causes an increment in the control input; S54: Based on the fitness function, obtain the fitness values of all population particles in the initial population to obtain the optimal population particle; Determine if the maximum number of iterations has been reached; If so, output the optimal population particle obtained at this time, i.e., the optimal values of weight matrix Q and weight matrix R; if not, update the population particles based on the position and velocity update formula, obtain the next generation particle population and the corresponding current random number output. ; S55: Determine if the preset probability prob is greater than the current random number. ; If the probability prob is greater than the current random number If so, then continue executing S56; Otherwise, use the next generation of particle population as the initial population and repeat step S54; S56: For the parameter variables corresponding to each swarm of particles in the next generation particle population, execute the Gray Wolf optimization algorithm, specifically including: S561: Set the hyperparameters of the gray wolf optimization algorithm and define the position of each gray wolf in the initial gray wolf population as a feasible solution for a set of parameter variables; S562: The fitness function The fitness function of the gray wolf optimization algorithm is used to obtain the fitness value of each gray wolf in the initial gray wolf population based on the fitness function, and the gray wolf individuals are sorted in descending order according to the fitness value to obtain the sequence list. The first three gray wolf individuals in the sequence list were selected as Alpha wolves, Beta wolves, and Delta wolves, respectively. S563: Confirm whether the current iteration count has reached the maximum iteration count; If so, the average position of Alpha Wolf, Beta Wolf and Delta Wolf at this time is used as the replacement parameter variable, and the replacement parameter variable is replaced with the individual position of the population particle, and S54 is executed repeatedly. If not, the initial group is iteratively updated based on the locations of Alpha wolves, Beta wolves, and Delta wolves to obtain a new generation of gray wolf group; Define the new generation of gray wolf pack as the initial gray wolf pack, and repeat step S562.
7. The stability-constrained LQR trajectory tracking control method for a single-rotor UAV based on GWO-PSO optimization as described in claim 6, characterized in that, The position and velocity update formulas described in S54 are as follows: In the formula: These represent individual and group learning factors, respectively. Represents a random value between [0 and 1]; Indicates inertia weight; Indicates the first j The particle in the first k The optimal position in the next iteration; This represents the globally optimal position at the k-th iteration. a and b Parameters that indicate adjustable algorithm performance; This represents the estimated value of the evolutionary state at the k-th iteration; They represent the first k The maximum and minimum fitness values in the particle swarm during the next iteration; express The initial value; express The termination value; This indicates the maximum number of iterations.