Four-rotor unmanned aerial vehicle landing control method based on time optimization
By combining time optimal trajectory planning and MPC-PID control, the shortcomings of the traditional quadrotor UAV landing control method in dynamic model and control strategy are solved, and high-precision, rapid response and safe landing control are achieved.
Patent Information
- Application Number
- CN202510454381.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-11
AI Technical Summary
The traditional four-rotor drone landing control method is difficult to accurately describe the complex relationship between the force/moment and system state of the drone in the construction of dynamic models. The control strategy cannot take into account dynamic optimization and rapid response, the trajectory planning cannot generate the best time, and the lack of an effective state switching mechanism, which affects landing accuracy, safety and efficiency.
The time-optimal trajectory planning method is used to combine MPC-PID control. By establishing a quadrotor and differential car model, the dynamic optimal trajectory is designed, and the landing state machine is used to select the appropriate landing state, and the position is optimized online and the attitude control of PID is controlled by combining MPC to improve the bang-bang control rate to improve stability.
It improves control accuracy and landing speed, ensures the safety and efficiency of landing, realizes global optimal control and real-time requirements in dynamically changing scenarios, and makes up for the shortcomings of traditional methods.
Smart Images

Figure CN120295360A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of trajectory planning and autonomous landing, and particularly to a landing control method for a quadrotor unmanned aerial vehicle that combines a time-optimal trajectory planning algorithm and an MPC-PID control method. Background Art
[0002] Due to its advantages such as simple structure and strong maneuverability, quadrotor unmanned aerial vehicles have been widely used in many fields, such as logistics distribution, agricultural plant protection, aerial photography and mapping, etc. In practical applications, the autonomous landing of unmanned aerial vehicles is a key technology, and its landing accuracy, safety and efficiency directly affect the completion quality of the entire task and the system reliability.
[0003] Traditional landing control methods for quadrotor unmanned aerial vehicles have many limitations. On the one hand, in the construction of the dynamic model, it is difficult to accurately describe the relationship between the complex forces / moments of the unmanned aerial vehicle and the system state, resulting in inaccurate control of the unmanned aerial vehicle's movement. For example, in the face of a complex airflow environment or rapid attitude adjustment requirements, the traditional model cannot accurately reflect the actual movement of the unmanned aerial vehicle, thereby affecting the landing accuracy. On the other hand, in the application of control methods, a single control strategy often cannot take into account both the dynamic optimization and rapid response of control. For example, when using PID control alone, although it can quickly respond to system deviations, it is difficult to achieve the global optimal control input in the face of a dynamically changing landing scenario; while only using model predictive control, it may not be able to meet the requirements of rapid tracking control tasks in the case of high real-time requirements. At the same time, traditional trajectory planning methods cannot make full use of the landing platform information collected when solving the time-optimal problem, resulting in the generated trajectory not being time-optimal and affecting the landing efficiency. In addition, during the landing process, there is a lack of an effective state switching mechanism, and it is impossible to select the appropriate landing state in real time according to the real-time situation, making it difficult to ensure the safety of the entire landing process.
[0004] With the increasingly complex and diverse application scenarios of quadrotor unmanned aerial vehicles, higher requirements are put forward for their autonomous landing control technology. Therefore, it is of great practical significance to develop an autonomous landing method that can accurately model, combine dynamic optimization and rapid response, solve the time-optimal trajectory and ensure landing safety. Summary of the Invention
[0005] The purpose of the present invention is to provide a time-optimal quadrotor landing control method, which uses a time-optimal trajectory planning method to dynamically plan the trajectory of the quadrotor in combination with the relevant parameter information of the mobile platform, and uses an MPC-PID control method for the flight control of the quadrotor to achieve rapid response of the unmanned aerial vehicle while performing optimal control. For the landing process of the unmanned aerial vehicle, a landing state machine is adopted to enable the unmanned aerial vehicle to autonomously decide the landing state of the unmanned aerial vehicle, ensuring the safety of the unmanned aerial vehicle's landing.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A time-optimal quadrotor landing control method, characterized in that a time-optimal trajectory planning method is adopted to provide a dynamic optimal trajectory for the process of the quadrotor tracking a mobile platform and landing. At the same time, a control method based on MPC-PID is adopted to achieve fast response while achieving precise control, reducing the computational complexity of the algorithm. During the landing process, a landing state machine is used to select or switch appropriate landing states, and finally a time-optimal quadrotor landing control method is formed, which specifically includes the following steps:
[0008] S1. Describe the dynamic characteristics of the quadrotor UAV by establishing an inertial coordinate system and a body coordinate system, establish a quadrotor UAV dynamics model through Newton's second law and Euler's equations, and establish a differential trolley model at the same time.
[0009] S2. Convert the dynamics model of the quadrotor UAV into a state space form to establish the dynamic relationship between the system state and the input vector. Use MPC to optimize the position of the quadrotor UAV online under the premise of meeting the preset operation constraints, and use PID control for attitude control in order to quickly adjust and track the target.
[0010] S3. Solve the time-optimal trajectory planning problem through the mobile platform information to obtain the optimal trajectory. By improving the bang-bang control law, frequent switching is avoided to improve stability. The optimal trajectory is used in the control of the quadrotor UAV, which can improve the landing speed of the UAV.
[0011] S4. Establish different landing states by detecting the error between the quadrotor UAV and the mobile platform to construct a landing state machine.
[0012] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are:
[0013] By simultaneously establishing a quadrotor model and a differential drive vehicle model, the control accuracy is effectively improved, and the landing accuracy is guaranteed. A composite control method is used, which combines MPC for online optimization of position and PID for attitude control; this successfully balances the dynamic optimization and rapid response of control, enabling the UAV to achieve both global optimal control input and real-time requirements when facing dynamic landing scenarios, solve the time-optimal trajectory planning problem, and simultaneously improve the bang-bang control law. The use of the improved time-optimal trajectory can significantly increase the landing speed and efficiency of the UAV. Different landing states are set based on errors, and a landing state machine is constructed that can select the landing state according to real-time conditions. This effectively compensates for the lack of an effective state switching mechanism in traditional methods during the landing process and comprehensively ensures the safety of the entire landing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The present invention will be described by way of examples with reference to the accompanying drawings, where:
[0015] Figure 1 is a block diagram of a time-optimal quadrotor UAV landing control system
[0016] Figure 2 is a top view of the mobile platform and a circular motion diagram
[0017] Figure 3 is an acceleration waveform diagram of the bang-bang control in the x and y directions
[0018] Figure 4 is a velocity waveform diagram of the bang-bang control in the x and y directions
[0019] Figure 5 is a trajectory waveform diagram of the bang-bang control in the x and y directions
[0020] Figure 6 is an acceleration waveform diagram of the improved bang-bang control in the x and y directions
[0021] Figure 7 is a velocity waveform diagram of the improved bang-bang control in the x and y directions
[0022] Figure 8 is a trajectory waveform diagram of the improved bang-bang control in the x and y directions
[0023] Figure 9 is a trajectory waveform diagram of the UAV and the mobile platform in the x direction
[0024] Figure 10 is a trajectory waveform diagram of the UAV and the mobile platform in the y direction
[0025] Figure 11 is a trajectory waveform diagram of the UAV and the mobile platform in the z direction
[0026] Figure 12 is the pitch angle waveform diagram of the UAV
[0027] Figure 13 is the roll angle waveform diagram of the UAV
[0028] Figure 14 is the yaw angle waveform diagram of the UAV
[0029] Figure 15 is the three - dimensional trajectory diagram of the UAV's autonomous landing Specific implementation method
[0031] All features disclosed in this specification, or steps in all methods or processes disclosed, except for mutually exclusive features and / or steps, can be combined in any way.
[0032] Any feature disclosed in this specification (including any additional claims, abstract, and drawings), unless specifically recited, can be replaced by other equivalent or similar - purpose alternative features. That is, unless specifically recited, each feature is only an example of a series of equivalent or similar features.
[0033] The method of this embodiment is as follows: establish a nonlinear system model of the quad - rotor UAV and a kinematic model of the differential - drive vehicle mobile platform, perform attitude control on the UAV by designing an MPC - PID attitude controller, use the time - optimal trajectory planning method to plan a dynamic time - optimal trajectory as the reference trajectory of the UAV. Through the landing state machine, switch to the appropriate landing state in real - time. The time - optimal quad - rotor landing control method is designed as follows:
[0034] First, establish the six - degree - of - freedom mathematical model of the UAV:
[0035]
[0036] where m is the body mass, g is the acceleration due to gravity, I x , I y , I z are the moments of inertia about the X b , Y b , Z b axes of the body coordinate system, U1 is the resultant force generated by the rotor, and U2, U3, U4 are the roll torque, pitch torque, and yaw torque, is the external disturbance and model uncertainty.
[0037] Ground robot represents the wheel speed, w c represents the speed and angular velocity of the ground robot. The center of the ground robot and the distance to the center are defined as:
[0038]
[0039] Let \(i (i = 1, 2, 3, 4)\) be the wheel number. When the ground robot rotates, it can be regarded as a circular motion. Decompose the velocity \(v\) c into the velocity along the tangent direction and the velocity perpendicular to the tangent (linear velocity). Assume the direction angle is \(\varphi\) c , and at the same time, the wheels will not deform and the trolley will not slide. Define the vector \(q\) c (t)=[x c (t), y c (t), \(\varphi\) c (t)] T . The differentially driven wheeled robot cannot move laterally. The non - linear motion equation of the robot is as follows:
[0040]
[0041] In the above formula, \(v\) c and \(w\) c are the linear velocity and angular velocity of the robot.
[0042] The velocity of the wheels of the trolley is:
[0043]
[0044] The position control of the quad - rotor UAV adopts MPC. For the kinematic model of the quad - rotor, since disturbances and uncertainties will affect the calculation accuracy and increase the calculation amount, the controller can be designed based on the quad - rotor mathematical model after ignoring the disturbances. The position dynamics model of the UAV after ignoring the disturbances is as follows:
[0045]
[0046] From the above formula, let \(u\) x (t), \(u\) y (t), \(u\) z (t) be as follows:
[0047]
[0048] The model of the translational motion of the quad - rotor UAV can be decomposed into two sub - models: the altitude sub - system and the translational sub - system. The altitude sub - system model is:
[0049]
[0050] Then the discrete calibration system of the altitude deviation prediction model is as follows:
[0051]
[0052] For the height controller, the cost function predicted by its deviation model is as follows:
[0053]
[0054] In the formula, Q z and R z are both positive diagonal matrices, represents the prediction horizon, represents the control horizon, the state vector X z , the control vector U z is:
[0055]
[0056] The state increment reference vector and the control increment reference vector are in the following forms:
[0057]
[0058] The state vector can be calculated by the height deviation prediction model, and the calculation formula is as follows:
[0059] X z = P z (k|k)·x z (k) + H z (k|k)·U z
[0060] Matrices P z and H z are calculated by the following formula:
[0061]
[0062] Minimizing the cost function can obtain the control input of the deviation model of the height controller as:
[0063]
[0064] Select the first item of and substitute it into the control input at time k as follows:
[0065]
[0066] The translation model is the same as the height model, and its cost function is given by the following formula:
[0067]
[0068] The control input of the translation model controller can be obtained through the cost function as:
[0069]
[0070] The reference values of the Euler angles of the quadrotor UAV at the current moment are obtained by back-solving as follows:
[0071]
[0072] The attitude control of the quadrotor UAV is realized by using PID control, which has the characteristics of simple structure, easy implementation, high reliability, relatively simple parameter tuning, and low requirement for the accuracy of the control system. Therefore, applying the PID controller to attitude control can achieve fast tracking.
[0073] The PID controller adjusts the error through three components: proportional (P), integral (I), and derivative (D). Its formula is:
[0074]
[0075] In the formula, e(t) is the difference between the desired angle and the current angle: e φ = φ r - φ; K p , K i , K d are the gains of the PID controller. For each attitude angle, an independent PID controller is designed:
[0076]
[0077] The attitude control law can be solved as:
[0078]
[0079] From this, the actual attitude angles φ, θ of the quadrotor UAV can be solved,
[0080] The goal of time-optimal trajectory planning is to complete the movement from the starting point to the target point in the shortest time while satisfying the system physical constraints (such as acceleration, speed, control force, etc.) and environmental constraints.
[0081] In the autonomous landing mission, the movement of the mobile platform is unpredictable, but its position and speed can be measured by methods such as IMU, UWB, and vision. To enable the quadrotor to catch up with the mobile platform as soon as possible, an executable trajectory p(t) needs to be planned, which can make the quadrotor start flying from the current position p0 of the quadrotor at time t0 and reach the position of the target object at time t f while ensuring the shortest flight time.
[0082] The mathematical expression of the functional J of time-optimal control is:
[0083]
[0084] where Φ(t0, t f ) is a function dependent on the initial time t0 and the terminal time t f , and L(x, u, t) is a function of the state variable x, the control variable u, and the time t. Among them:
[0085] Φ(t0, t f ) = 0, L(x, u, t) = 1
[0086] That is, the time-optimal function can be defined as:
[0087]
[0088] s.t. Dynamics constraint: Maximum velocity constraint: -v max ≤ v ≤ v max ; Maximum acceleration constraint: -a max ≤ a ≤ a max ; Maximum jerk constraint: -j max ≤ j ≤ j max ; Initial state constraint: Terminal state constraint:
[0089] Define the state vector x and the co-state vector λ as follows:
[0090]
[0091] λ = [λ1 λ2],
[0092] For the quadrotor control system, define the Hamiltonian function according to the above formula as follows:
[0093] H = L(x, u, t) + λ T f(x, u, t)
[0094]
[0095] Since u = a ≤ |a max |, that is, u is a switching quantity, does not exist. To find the minimum value of the Hamiltonian function, the Pontryagin minimum principle can be used to solve it, and its form is as follows:
[0096] min H[x * , λ * , u, t] = H[x * , λ * , u * , t]
[0097] That is, find a control quantity u* can minimize the Hamiltonian function H, and u * is the optimal solution. The form of the Hamiltonian function established based on the time-optimal problem is as follows:
[0098]
[0099] For the above formula, since 1 + λ1x is independent of u, we can obtain:
[0100]
[0101] Using the Hamiltonian function, we can obtain:
[0102]
[0103] u * = -sgn[λ2] = -sgn(-c 10 t + c 20 ) = ±u max
[0104] S3. According to the position, velocity, acceleration, etc. of the UAV and the mobile platform, a switching function can be constructed, and its form is as follows:
[0105]
[0106] That is, the bang-bang control rate can be written in the following form:
[0107]
[0108] Through the bang-bang control rate, the minimum control time t used for the quadrotor to catch up with the target along the time-optimal trajectory can be approximately solved as:
[0109]
[0110] S4. When using the above bang-bang control rate for trajectory planning, due to problems such as non-linear control errors and external disturbances, the control rate switches frequently, resulting in a large jerk and causing the UAV to vibrate. To improve the robustness of the system, the bang-bang control is improved by introducing a multi-link collaborative optimization strategy.
[0111] Adaptive threshold adjustment: The adaptive threshold can dynamically adjust the threshold according to the current state of the system and other relevant information, improving the robustness of the system.
[0112] The adaptive threshold T can be designed as follows:
[0113] T = T base ·(1 + α·|h| + β·|v target-v0|)
[0114] where T base is the adaptive threshold coefficient, and α, β are adaptive parameters. Since the speed deviation is crucial for UAV control, considering |v target -v0| alone can ensure that the control strategy switches in a timely manner to adapt to the speed change requirements.
[0115] Smoothing transition mechanism: In the previous text, the Bang-Bang control would switch immediately from one control state to another when the error exceeded the threshold, resulting in chattering of the control input. By introducing a transition region, the control input changes smoothly within this region to avoid sudden changes, thereby reducing chattering and improving the stability and reliability of the system.
[0116] After introducing the smoothing transition mechanism, the optimal control rate can be rewritten as:
[0117]
[0118] where σ is the smoothing transition bandwidth, and u unsat is the ideal control quantity.
[0119] Saturation compensation link: When the control input exceeds the saturation range, it cannot output as expected. The saturation compensation link corrects the control input to approximate the ideal control effect.
[0120] After introducing the saturation compensation link, the obtained optimal control rate a is:
[0121]
[0122]
[0123] u sat is the saturation output term; K p , K i are the saturation compensation proportional coefficient and the integral coefficient respectively.
[0124] Through the above improved bang-bang control, the time-optimal trajectory can be obtained as:
[0125]
[0126] For the quadrotor autonomous landing task, first control the UAV to fly to a safe altitude at the beginning of the experiment, and then design a landing state machine, which includes an error detector and a landing state selector.
[0127] The error detector detects the errors x_error and y_error in the x and y directions in real time to provide
[0128]
[0129] x and y are displacements in the x and y directions, and xr and yr are the desired trajectories generated during the time-optimal trajectory planning of the UAV for the mobile platform.
[0130] Design a landing state selector that has three states: descent, hold, and lift during the subsequent tracking landing process. When the landing conditions are not met, the landing state will cause the UAV to maintain its flight altitude and continue to track the mobile platform. When the conditions are met, the landing state machine will switch states to make the UAV land. During the entire landing period, the landing conditions will be detected in real-time, and when the landing conditions are not met, the UAV will re-lift to a safe position.
[0131]
[0132] Table 1 Quadrotor model parameters
[0133]
[0134]
[0135] Table 2 MPC controller parameters
[0136]
[0137] Table 3 Improved mechanism parameters
[0138]
[0139] Experiment 1: In this experiment, it is set that from 0 to 6 seconds is the stage when the UAV lifts to the safe altitude z r = 4, and during the period from 6 to 60 seconds, the UAV needs to track and land on the moving platform. Set the speed of the moving platform v c = [0.2, 0.2], and the initial position is p c = [3, 2].
[0140] Figure 3 Shows the accelerations in the x and y directions obtained based on the traditional bang-bang control, Figure 4 is the speed in the x and y directions, Figure 5 、 Figure 6 are the trajectories in the x and y directions respectively. In the interval from 7.42 to 60 s, the accelerations ax and ay are between -5 and 5 m / s 2 and the speed is between 0.1 and 0.3 m / s and the switching time from the maximum value to the minimum value is only 0.04 s, resulting in a very large jerk in this time interval. Figure 7 、 Figure 8Shows the reference acceleration, velocity and trajectory of the improved bang-bang control in the x and y directions. From 9.93 s to 31.72 s, the acceleration decreases from -5 to 3.5 m / s 2 to -0.42 to 0.44 m / s 2 , the velocity decreases from -0.41 to 0.56 m / s to -0.09 to 0.09 m / s, and the switching time between the maximum and minimum values increases from 0.9 s to 1.9 s. It can be seen that the improved bang-bang control effectively reduces the jerk and enhances the stability of the trajectory.
[0141] Experiment 2: Studied the situation of the drone using the MPC-PID control method to track and land on a moving platform, and compared two cases of using and not using the time-optimal trajectory in Experiment 1.
[0142] Figure 9 (a), Figure 10 (a) shows the trajectories in the x and y directions. Among them, xc and yc are the trajectories of the moving platform in the x and y directions; xr and yr are the time-optimal trajectories in the x and y directions obtained by the improved bang-bang control; xm and ym are the actual trajectories in the x and y directions obtained by simply using MPC-PID control; xb and yb are the actual trajectories in the x and y directions obtained by using MPC-PID control with the time-optimal trajectory as the reference trajectory. It can be clearly seen from the figure that xb and yb can reach the switching condition earlier than xm and ym.
[0143] Figure 11 (a) shows the trajectories in the z direction. It can be seen from this that relying only on MPC-PID control, the drone completes landing at 55 s; while the drone using time-optimal trajectory planning completes landing at 20 s. Figure 12 (a), Figure 13 (a), Figure 14 (a) respectively show the attitude angle situations of using MPC-PID control and MPC-PID control combined with time-optimal trajectory planning. Figure 15 (a) is the three-dimensional trajectory diagram of the drone landing.
[0144] Experiment 3: On the basis of Experiment 1 and Experiment 2, assume that the moving platform has an acceleration a c = [0.02, 0.02]. From Figure 9 (b), Figure 10 (b), it can be seen that xb and yb under MPC-PID control with the time-optimal trajectory as the reference trajectory reach near the expected values xr and yr at 10.2 s; while xm and ym obtained by simply using MPC-PID control reach near the expected values xr and yr at 16.4 s and 31.2 s respectively. Figure 11(b) It can be seen that only by using MPC-PID control, the UAV completes landing at 46 s. While the UAV with time-optimal trajectory planning completes landing at 41 s. Figure 12 (b), Figure 13 (b), Figure 14 (b) is the attitude waveform diagram of the two control methods. Figure 15 (b) is the three-dimensional trajectory diagram of the UAV landing.
[0145] Based on the comprehensive experiments 2 and 3, it can be known that the trajectory obtained by using the time-optimal trajectory planning method as the reference trajectory can enable the UAV to reach the landing switching condition faster and complete the landing process.
Claims
1. A time-optimal quadrotor UAV landing control method, characterized in that, It includes the following steps: S1. Establish the dynamic model of the quadrotor UAV to describe the relationship between the forces / moments of the UAV and the system states (linear velocity, angular velocity, linear acceleration, angular acceleration); establish the kinematic model of the differential drive vehicle to describe the relationship between the UAV and the mobile platform; S2. Combine the MPC and PID control methods to construct the UAV flight control system. Among them, the MPC method can predict future states and generate optimal control strategies, and the PID method can respond quickly to complete the tracking control task; S3. Solve the time-optimal control law based on the Hamilton function and the Pontryagin minimum principle, and construct a time-optimal trajectory planner by improving the bang-bang control; S4. Design a quadrotor autonomous landing state machine for switching the real-time landing state of the UAV.
2. A quadrotor UAV landing control method based on time-optimal trajectory planning according to claim 1, characterized in that: S1. First, establish an inertial coordinate system I = {X I , Y I , Z I} and a body coordinate system B = {X b , Y b , Z b} in the modeling stage, and define the position vector σ = {x, y, z} of the UAV in the inertial coordinate system T and attitude angles (roll angle, pitch angle, and yaw angle); S2. Then, construct the rotation matrix from the inertial coordinate system to the body coordinate system in the order of x-y-z; S3. Finally, based on Newton's second law and Euler's equations, a six-degree-of-freedom nonlinear dynamic model of the UAV is derived, where m is the airframe mass, g is the acceleration due to gravity, I x , I y , I z are the moments of inertia of the UAV about the three axes of the body coordinate system, U1 is the total resultant force, and U2, U3, U4 are the roll moment, pitch moment, and yaw moment. is the external disturbance and model uncertainty. S4. Ground robot represents the speed of the wheel, w c represents the speed and angular velocity of the ground robot in the X and Y directions. The center of the ground robot is O, and the distance from each vertex to the center is defined as (a i , b i ): where i (i = 1, 2, 3, 4) is the wheel number. When the ground robot rotates, it can be regarded as circular motion, and the velocity v c is decomposed into the velocity along the tangent direction and the velocity perpendicular to the tangent. Assume the direction angle is φ c , and at the same time, the wheels will not deform and the trolley will not slide. Define the vector q c (t) = [x c (t), y c (t), φ c (t)] T . The differential drive wheeled robot cannot move laterally. The nonlinear motion equation of the robot is as follows: where, v and w are the linear velocity and angular velocity of the robot, and the speeds of the left and right wheels are:
3. Design a UAV flight control system based on MPC-PID according to claim 4, and its design method is as follows: S1. Model Predictive Control (MPC) is a dynamic closed-loop control method based on a rolling optimization strategy. It can predict the future dynamic behavior of the system according to the current state and generate the optimal control input under the optimization objective and constraint conditions, so as to achieve precise adjustment of the UAV motion state. However, MPC has the problem of excessive computational complexity. To improve the computational efficiency, MPC control is adopted for the position dynamics model, and PID control that can respond quickly is adopted for the attitude dynamics model. Establish the quadrotor position dynamics model as follows: Let u x (t), u y (t), u z (t) be: The model of the translational motion of the quadrotor UAV can be decomposed into two sub-models: the altitude subsystem and the x, y direction subsystems. The altitude deviation sub-model can be obtained from the position dynamics model as follows: Its cost function is given by the following formula: The state vector can be calculated by the altitude deviation prediction model, and the calculation formula is as follows: X z = P z (k|k)·x z (k) + H z (k|k)·U z Matrix P z and H z are calculated by the following formula: Minimizing the cost function can obtain the deviation model control input of the altitude controller as: Select the first item of Substituting it in, the control input at time k is as follows: The x, y directions are the same as the altitude model, and its cost function is as follows: The deviation model control input of the x, y direction controller can be obtained as: By inverse solution, the reference value of the Euler angles of the quadrotor UAV at the current moment is: S2. The PID control has the characteristics of simple structure, easy implementation, high reliability, simple parameter tuning, and low requirement for the accuracy of the control system. Therefore, applying the PID controller to attitude control can achieve fast tracking. The PID controller adjusts the error through three components: proportional, integral, and differential. The attitude dynamics model of the quadrotor UAV can be expressed by the following formula: where e(t) is the difference between the desired angle and the current angle, e.g., e φ = φ r - φ; K p , K i , K d are the proportional, integral, and derivative gains of the PID controller. For each attitude angle, an independent PID controller is designed: The attitude control law can be solved as: Thus, the actual attitude angles of the quadrotor UAV can be solved 4. Based on the Hamilton function and the Pontryagin minimum principle, calculate the bang-bang control rate according to claim 2, and improve the problem of rapid and frequent switching of the control rate; the improved time-optimal trajectory planner is designed as follows: The goal of time-optimal trajectory planning is to plan a trajectory that completes the movement from the starting point to the target point in the shortest time while satisfying the physical constraints of the system (such as acceleration, velocity, control force, etc.) and environmental constraints. In order to enable the quadrotor to catch up with the mobile platform as soon as possible, a time-optimal trajectory p(t) needs to be planned. This trajectory allows the quadrotor to start flying from its current position p0 at time t0 and reach the position of the target at time t f while ensuring the shortest flight time. The mathematical expression of the functional J of time-optimal control is: where Φ(t0,t f ) is a function dependent on the initial time t0 and the terminal time t f , and L(x, u, t) is a function of the state variable x, the control variable u, and the time t. Wherein: Φ(t0,t f ) = 0; L(x, u, t) = 1 That is, the time-optimal function can be defined as: s.t. Kinematic Constraints: Maximum Velocity Constraint: -v max ≤ v ≤ v max ; Maximum Acceleration Constraint: -a max ≤ a ≤ a max ; Maximum Jerk Constraint: -j max ≤ j ≤ j max ; Initial State Constraint: Terminal State Constraint: S2. Define the state vector x and the co-state vector λ as follows: λ = [λ1 λ2], For the quadrotor control system, the Hamiltonian function is defined as follows according to the above formula: H = L(x, u, t) + λ T f(x, u, t) Since \(u = a\leq|a|\), that is, \(u\) is a switching quantity, max there is no such thing. To find the minimum value of the Hamiltonian function, the Pontryagin minimum principle can be used to solve it, and its form is as follows: Since \(u = a\leq|a|\), that is, \(u\) is a switching quantity, there is no such thing. To find the minimum value of the Hamiltonian function, the Pontryagin minimum principle can be used to solve it, and its form is as follows: minH[x * ,λ * ,u,t] = H[x * ,λ * ,u * ,t] The Pontryagin minimum principle can be described as follows: The Hamiltonian function H is a function related to the control variable u. Find a control variable u * that minimizes the Hamiltonian function H. u * is the optimal solution. For the time-optimal problem described above in this paper, the Hamiltonian function can be constructed as follows: For the above formula, since λ1x2 is independent of u, that is, the Hamiltonian function is only related to λ2. The derivation process is as follows: According to the relevant conditions of the Hamiltonian function, the calculation method of λ is as follows: The optimal control law, i.e., the bang-bang control law, can be solved as follows: a * = u * = -sgn[λ2] = -sgn(-c 10 t + c 20 ) = ±a max S3. According to the position, velocity, acceleration, etc. of the UAV and the mobile platform, a switching function h can be constructed, and its form is as follows: That is, the bang-bang control rate can be written in the following form: Through the bang-bang control rate, the minimum control time t can be approximately solved as: S4. If the above bang-bang control rate is used for trajectory planning and used as a reference trajectory, due to problems such as non-linear errors and external disturbances, the control rate will switch frequently, resulting in a large jerk, causing the UAV to vibrate. To improve the robustness of the system, the bang-bang control is improved by introducing a multi-link collaborative optimization strategy. Adaptive threshold adjustment: The adaptive threshold can dynamically adjust the threshold according to the current state of the system and other relevant information, improving the robustness of the system. The adaptive threshold T can be designed as follows: T = T base ·(1 + α·|h| + β·|v target - v0|) where T base is the adaptive threshold coefficient, and α, β are adaptive parameters. Since the speed deviation is crucial for UAV control, considering |v target - v0| alone can ensure timely switching of the control strategy to meet the speed change requirements. Smoothing transition mechanism: In the previous text, the Bang-Bang control will immediately switch from one control state to another when the error exceeds the threshold, resulting in control input vibration. By introducing a transition region, the control input changes smoothly in this region to avoid sudden changes, thereby reducing vibration and improving the stability and reliability of the system. After introducing the smoothing transition mechanism, the optimal control rate can be rewritten as: where σ is the smooth transition bandwidth and u unsat is the ideal control quantity. Saturation compensation link: When the control input exceeds the saturation range, it cannot output as expected. The saturation compensation link corrects the control input to approximate the ideal control effect. After introducing the saturation compensation link, the obtained optimal control rate a is: u sat is the saturation output term; K p , K i are the saturation compensation ratio coefficient and the integral coefficient respectively. Through the above improvement of the bang-bang control, the time-optimal trajectory is:
5. The design method of the quadrotor autonomous landing state machine according to claim 2 is as follows: S1: First, design a real-time error detector that detects the errors x_error and y_error in the x and y directions, where x and y are the displacements in the x and y directions, and xr and yr are the desired trajectories generated when the UAV performs time-optimal trajectory planning for the mobile platform. S2: Design a height reference trajectory selector. First, the UAV flies to a safe height at the beginning of the experiment. During the subsequent tracking and landing process, it has three states: descending, maintaining, and ascending. When the landing conditions are not met, the landing state machine will make the UAV maintain its flight height and continue to track the mobile platform. When the conditions are met, the landing state machine switches states to make the UAV land. During the entire landing period, the landing conditions will be detected in real time. When the landing conditions are not met, the UAV will re-ascend to a safe position. 。