PID unmanned aerial vehicle position control method based on short memory

By adopting a short memory-based PID control method in the drone, the storage time of error terms is reduced, and the problems of large calculation and long time in the prior art are solved, and efficient and stable drone attitude control is achieved.

CN119805911APending Publication Date: 2025-04-11NORTHWEST A & F UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411752656.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When calculating integral and differential terms, the existing UAV fractional PID controller needs to calculate the sum of all the previous position error terms, resulting in a long calculation time and a large amount of calculation.

Method used

The position control method of PID drone based on short memory is adopted. By obtaining the speed of the four-axis drone under the inertial coordinate system and the angular velocity around the body coordinate axis, a dynamic model is constructed, and the position signal is obtained at the current moment and at the previous moment of length L, the signal error at the previous moment is calculated, and the storage time of the error term is reduced, and the short memory PID control is realized.

Benefits of technology

It effectively reduces the amount of calculation and improves the computing efficiency, allowing the four-axis drone to reach a stable state in a shorter time, achieving efficient and stable attitude control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119805911A_ABST
    Figure CN119805911A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unmanned aerial vehicle flight control, in particular to a PID unmanned aerial vehicle position control method based on short memory. Comprising the following steps: respectively acquiring the speed of the four-axis unmanned aerial vehicle in an inertial coordinate system and the angular speed around a vehicle body coordinate axis, and constructing a four-axis unmanned aerial vehicle kinetic model; position signals of the four-axis unmanned aerial vehicle at the current moment and the previous moment with the length being L are obtained, and the signal error of the previous moment is calculated; the position of the unmanned aerial vehicle at the current moment is updated and calculated, the calculation result is output, when the operation of the algorithm exceeds a certain time length, the error memory at the initial moment is not stored any more, a segment of error data at the current moment and a segment of error data before are substituted into the algorithm, the PID control algorithm is achieved through calculation, and the calculation amount can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle flight control, and in particular to a PID unmanned aerial vehicle position control method based on short memory. Background Art

[0002] The existing UAV fractional-order PID controller position control method is mainly based on the proportional, integral, and differential (PID) controller - the fractional-order PID controller, which includes a fractional-order integrator and a differentiator. The fractional-order PID controller extends the order of the traditional PID controller to the fractional field. It is not only suitable for fractional-order systems, but also for some integer-order systems, and can achieve some effects that are better than integer-order PID controllers.

[0003] However, during the calculation process of this method, when calculating the integral term and the differential term, it is necessary to calculate the sum of all the previous position error terms, resulting in a long calculation time and a large amount of calculation; if an incremental fractional-order PID algorithm is used, it is still necessary to calculate the sum of all the previous position error terms, which will also lead to a large amount of calculation.

[0004] In summary, it is necessary to propose a PID UAV position control method that can effectively reduce the amount of calculation. Summary of the invention

[0005] The purpose of the present invention is to provide a PID UAV position control method based on short memory, aiming to solve the problem in the prior art that when calculating integral terms and differential terms, it is necessary to calculate the sum of all the previous position error terms, resulting in long calculation time and large amount of calculation; if an incremental fractional-order PID algorithm is used, it is still necessary to calculate the sum of all the previous position error terms, which will also lead to a large amount of calculation.

[0006] To achieve the above object, the present invention adopts a short memory based PID UAV position control method, comprising the following steps:

[0007] The velocity of the quadcopter in the inertial coordinate system and the angular velocity around the coordinate axis of the body are obtained respectively, and the dynamic model of the quadcopter is constructed;

[0008] Obtain the position signal of the quadcopter at the current time and the time before that with a length of L, and calculate the signal error at the previous time;

[0009] Update the current position of the drone and output the calculation results.

[0010] Among them, in the step of obtaining the speed of the quadcopter in the inertial coordinate system:

[0011] The velocity is calculated using the motion equation in the inertial coordinate system of the quadcopter drone. The equation is:

[0012]

[0013] In the formula, x, y, z are the positions of the quadcopter in the inertial coordinate system; To obtain the first-order derivative of x, y, and z, we can get the velocity of the quadcopter in the inertial coordinate system. To obtain the acceleration of the quadcopter in the inertial coordinate system by taking the second-order derivative of x, y, and z; α, β, and δ are the attitude angles of the quadcopter, namely the roll angle, pitch angle, and yaw angle; U T is the total lift of the quadcopter along the Z axis of the body coordinate system; m is the mass of the quadcopter; g is the acceleration due to gravity; k f is the air resistance coefficient of the quadcopter during flight.

[0014] Among them, in the step of obtaining the angular velocity of the quadcopter around the body coordinate axis:

[0015] The angular velocity is calculated using the rotational motion equation in the inertial coordinate system of the quadcopter drone. The calculation equation is:

[0016]

[0017] In the formula, To obtain the angular velocity of the quadcopter around the body coordinate axis, we need to take the first-order derivative of α, β, and δ; To obtain the angular acceleration of the quadcopter around the body coordinate axis, we need to take the second-order derivative of α, β, and δ; J x ,J y ,J z is the moment of inertia of the three axes of the body coordinate system; K M is the torque coefficient, K T is the lift coefficient, l is the distance between the geometric center of the rotor and the center of gravity of the quadrotor; is the attitude air resistance moment coefficient, are the rotation speeds of the four-axis propellers respectively.

[0018] Among them, in the step of obtaining the position signal of the quadcopter at the current moment and at the moment before the length L, and calculating the signal error at the previous moment:

[0019] When the length of the previous moment is less than L, the error data of all previous moments are obtained to repeatedly calculate the position. When calculating the position information of the next moment, the data with a time length greater than L is discarded, and the position signals of the current moment and the previous L moments are used for calculation.

[0020] Among them, in the step of updating and calculating the current position of the drone and outputting the calculation result:

[0021] The fractional-order PID controller is used to calculate the position control output signal of the quadcopter under the three axes of the body coordinate axis. The calculation equation is:

[0022]

[0023] In the formula, u x (k),u y (k),u z (k) is the position control output signal of the quadcopter under the three axes of the body coordinate axis, including position signal and angular velocity signal; k is a complex number in the complex frequency domain; K xP ,K xI ,K xD is the proportional, integral and differential coefficients of the X-axis controller; K yP ,K yI ,K yD K is the proportional, integral and differential coefficients of the Y-axis controller; zP ,K zI ,K zD are the proportional, integral and differential coefficients of the Z-axis controller; μ, λ are the differential order and integral order; e x (s),e y (s),e z (s) is the error on the X-axis, Y-axis, and Z-axis.

[0024] A short-memory PID unmanned aerial vehicle position control method of the present invention obtains the speed of a four-axis unmanned aerial vehicle in an inertial coordinate system and the angular velocity around the body coordinate axis, and constructs a four-axis unmanned aerial vehicle dynamics model; obtains the position signal of the four-axis unmanned aerial vehicle at the current moment and at a time before the length L, and calculates the signal error at the previous moment; updates the position of the unmanned aerial vehicle at the current moment and outputs the calculation result; through the above method, the traditional unmanned aerial vehicle position PID control algorithm is converted into a short-memory unmanned aerial vehicle position PID algorithm in which the initial value of the sum of error terms changes with time. When the algorithm runs for more than a certain time length, the error memory of the initial moment is no longer saved, but the error data of the current moment and the previous moment are substituted into the algorithm and the PID control algorithm is calculated and implemented, which can effectively reduce the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0026] Figure 1It is a step flow chart of the short memory-based PID UAV position control method of the present invention.

[0027] Figure 2 It is a flow chart of the short memory-based PID UAV position control method of the present invention. DETAILED DESCRIPTION

[0028] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0029] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0031] See also Figure 1 and Figure 2 The present invention provides a PID UAV position control method based on short memory, comprising the following steps:

[0032] S100: respectively obtaining the velocity of the quadcopter drone in the inertial coordinate system and the angular velocity around the body coordinate axis, and constructing a quadcopter drone dynamics model.

[0033] In this embodiment, in the step of obtaining the speed of the quadcopter in the inertial coordinate system:

[0034] The velocity is calculated using the motion equation in the inertial coordinate system of the quadcopter drone. The equation is:

[0035]

[0036] In the formula, x, y, z are the positions of the quadcopter in the inertial coordinate system; To obtain the first-order derivative of x, y, and z, we can get the velocity of the quadcopter in the inertial coordinate system. To obtain the acceleration of the quadcopter in the inertial coordinate system by taking the second-order derivative of x, y, and z; α, β, and δ are the attitude angles of the quadcopter, namely the roll angle, pitch angle, and yaw angle; U T is the total lift of the quadcopter along the Z axis of the body coordinate system; m is the mass of the quadcopter; g is the acceleration due to gravity; k f is the air resistance coefficient of the quadcopter during flight.

[0037] In the step of obtaining the angular velocity of the quadcopter around the body coordinate axis:

[0038] The angular velocity is calculated using the rotational motion equation in the inertial coordinate system of the quadcopter drone. The calculation equation is:

[0039]

[0040] In the formula, To obtain the angular velocity of the quadcopter around the body coordinate axis, we need to take the first-order derivative of α, β, and δ; To obtain the angular acceleration of the quadcopter around the body coordinate axis, we need to take the second-order derivative of α, β, and δ; J x ,J y ,J z is the moment of inertia of the three axes of the body coordinate system; K M is the torque coefficient, K T is the lift coefficient, l is the distance between the geometric center of the rotor and the center of gravity of the quadrotor; is the attitude air resistance moment coefficient, are the rotation speeds of the four-axis propellers respectively.

[0041] The dynamic model of the quadcopter UAV is composed of the motion equation and rotational motion equation in the inertial coordinate system of the quadcopter UAV.

[0042] S200: Obtain the position signal of the quadcopter at the current moment and at a moment before the length L, and calculate the signal error at the previous moment.

[0043] In this embodiment, when the length of the previous moment is less than L, the error data of all previous moments are obtained to repeatedly perform position calculations. When calculating the position information of the next moment, data with a time length greater than L is discarded. The position signals of the current moment and the previous L moments are used for calculations. Starting from moment 0, when the quadcopter is started, the position signals of the quadcopter at all subsequent moments are calculated.

[0044] S300: Update the current position of the drone and output the calculation result.

[0045] In this embodiment, a fractional-order PID controller is used to calculate the position control output signal of the quadcopter under the three axes of the body coordinate axis, and the calculation equation is:

[0046]

[0047] In the formula, u x (k),u y (k),u z (k) is the position control output signal of the quadcopter under the three axes of the body coordinate axis, including position signal and angular velocity signal; k is a complex number in the complex frequency domain; K xP ,K xI ,K xD is the proportional, integral and differential coefficients of the X-axis controller; K yP ,K yI ,K yD K is the proportional, integral and differential coefficients of the Y-axis controller; zP ,K zI ,K zD are the proportional, integral and differential coefficients of the Z-axis controller; μ, λ are the differential order and integral order; e x (s),e y (s),e z (s) is the error on the X-axis, Y-axis, and Z-axis.

[0048] Unlike previous algorithms that use PID control, the present invention uses short-memory fractional-order PID control to generate control signals, and uses position and angle control signals to achieve attitude control of the quadcopter. Compared with integer-order PID control, the present invention can make the quadcopter receiving signal reach a stable state in a shorter time. Compared with traditional fractional-order UAV position signal PID control algorithm, the present invention reduces the time to generate new signals, achieves the effect of combining high efficiency and strong stability, and reflects the good robustness of the algorithm.

[0049] In addition, the calculation equation of the position control output signal of the quadcopter UAV under the three axes of the body coordinate axis using the fractional-order PID controller is a short-memory fractional-order PID control algorithm, which can also be written as an incremental short-memory fractional-order PID control algorithm:

[0050]

[0051] Where T s is the time step; u(k) is the control signal sequence generated by the system; K p ,K i ,K dare the proportional, integral and differential coefficients respectively; λ and μ are the fractional integral and fractional differential orders respectively; L is the short memory time length; compared with the short memory fractional order PID control algorithm, the incremental short memory fractional order PID control algorithm reduces the amount of calculation, can reduce the impact of the controller on the controlled quantity, and makes the system more stable.

[0052] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0053] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A PID UAV position control method based on short memory, characterized in that: The steps include: The velocity of the quadcopter in the inertial coordinate system and the angular velocity around the coordinate axis of the body are obtained respectively, and the dynamic model of the quadcopter is constructed; Obtain the position signal of the quadcopter at the current moment and the moment before by a length of L, and calculate the signal error at the previous moment; Update the current position of the drone and output the calculation results.

2. The short memory based PID UAV position control method according to claim 1, characterized in that: In the steps of obtaining the velocity of the quadcopter in the inertial coordinate system: The velocity is calculated using the motion equation in the inertial coordinate system of the quadcopter drone. The equation is: In the formula, x, y, z are the positions of the quadcopter in the inertial coordinate system; To obtain the first-order derivative of x, y, and z, we can get the velocity of the quadcopter in the inertial coordinate system. To obtain the acceleration of the quadcopter in the inertial coordinate system by taking the second-order derivative of x, y, and z; α, β, and δ are the attitude angles of the quadcopter, namely the roll angle, pitch angle, and yaw angle; U T is the total lift of the quadcopter along the Z axis of the body coordinate system; m is the mass of the quadcopter; g is the acceleration due to gravity; k f is the air resistance coefficient of the quadcopter during flight.

3. The short memory based PID UAV position control method according to claim 2, characterized in that: In the step of obtaining the angular velocity of the quadcopter around the body coordinate axis: The angular velocity is calculated using the rotational motion equation in the inertial coordinate system of the quadcopter drone. The calculation equation is: In the formula, To obtain the angular velocity of the quadcopter around the body coordinate axis, we need to take the first-order derivative of α, β, and δ; To obtain the angular acceleration of the quadcopter around the body coordinate axis, we need to take the second-order derivative of α, β, and δ; J x ,J y ,J z is the moment of inertia of the three axes of the body coordinate system; K M is the torque coefficient, K T is the lift coefficient, l is the distance between the geometric center of the rotor and the center of gravity of the quadrotor; is the attitude air resistance moment coefficient, are the rotation speeds of the four-axis propellers respectively.

4. The short memory based PID UAV position control method according to claim 3, characterized in that: In the step of obtaining the position signal of the quadcopter at the current moment and at the moment before the length L, and calculating the signal error at the previous moment: When the length of the previous moment is less than L, the error data of all previous moments are obtained to repeatedly calculate the position. When calculating the position information of the next moment, the data with a time length greater than L is discarded, and the position signals of the current moment and the previous L moments are used for calculation.

5. The short memory based PID UAV position control method according to claim 4, characterized in that: In the step of updating the current drone position and outputting the calculation results: The fractional-order PID controller is used to calculate the position control output signal of the quadcopter under the three axes of the body coordinate axis. The calculation equation is: In the formula, u x (k),u y (k),u z (k) is the position control output signal of the quadcopter under the three axes of the body coordinate axis, including position signal and angular velocity signal; k is a complex number in the complex frequency domain; K xP ,K xI ,K xD K is the proportional, integral and differential coefficients of the X-axis controller; yP ,K yI ,K yD K is the proportional, integral and differential coefficients of the Y-axis controller; zP ,K zI ,K zD are the proportional, integral and differential coefficients of the Z-axis controller; μ, λ are the differential order and integral order; e x (s),e y (s),e z (s) is the error on the X-axis, Y-axis, and Z-axis.