Unmanned aerial vehicle control method and device, unmanned aerial vehicle and computer storage medium

By constructing a dynamic model of a double-layer staggered rotor UAV and inner and outer loop PID controllers, the problem of inaccurate control of traditional multi-rotor UAVs in complex environments and under fault conditions is solved, achieving higher adaptability and stability.

CN120631041APending Publication Date: 2025-09-12NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510753695.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Traditional multi-rotor drones lack adaptability and fault tolerance in complex environments or when the system fails, and are unable to accurately control the rotor speed, resulting in inaccurate control.

Method used

Based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV, a dynamic model is constructed, and a PID controller with an inner and outer loop structure is used to determine the rotor speed to achieve precise control of the UAV.

Benefits of technology

It improves the adaptability of the drone in complex environments and its fault tolerance in the event of failure, and enhances its response speed and attitude stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631041A_ABST
    Figure CN120631041A_ABST
Patent Text Reader

Abstract

The invention relates to an unmanned aerial vehicle control method and device, an unmanned aerial vehicle and a computer storage medium, and belongs to the technical field of unmanned aerial vehicle control, and the unmanned aerial vehicle control method comprises the steps: determining a rotation matrix based on a conversion relation between an earth fixed connection coordinate system and a body coordinate system of a double-layer staggered rotor unmanned aerial vehicle; and constructing a kinetic model of the double-layer staggered rotor unmanned aerial vehicle based on the rotation matrix, determining expected tension of the double-layer staggered rotor unmanned aerial vehicle by adopting a preset inner and outer ring structure PID controller based on a preset expected position, and determining the rotation speed of each rotor of the double-layer staggered rotor unmanned aerial vehicle based on the expected tension and the kinetic model. By introducing the conversion between the earth fixed connection coordinate system and the body coordinate system, the motion state and the control requirement of the unmanned aerial vehicle are accurately described, the response speed and the attitude stability of the unmanned aerial vehicle are improved, and particularly, the adaptability in a complex environment and the fault-tolerant capability in case of a fault are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of drone control technology, and in particular to a drone control method and device, a drone, and a computer storage medium. Background Art

[0002] In recent years, drones, especially multi-rotor drones, have been widely used in military, civilian, scientific research and other fields due to their unique vertical take-off and landing capabilities and good maneuverability.

[0003] Traditional multi-rotor drones typically employ a fixed-layer design with a fixed number and configuration of rotors. This limits their adaptability and fault tolerance in complex environments or when encountering partial system failures. Furthermore, after a rotor failure, traditional control schemes often fail to effectively distribute the rotational speed of the remaining rotors to maintain the drone's flight status and safety. In particular, describing the motion state of a multi-rotor drone makes it difficult to accurately construct a dynamic model, resulting in inaccurate control.

[0004] This shows that existing technology cannot accurately control multi-rotor drones. Summary of the Invention

[0005] In view of this, it is necessary to provide a drone control method, device, drone and computer storage medium to solve the problem that the existing technology cannot accurately control multi-rotor drones.

[0006] In order to solve the above problems, in a first aspect, the present invention provides a drone control method, comprising: Determine the rotation matrix based on the transformation relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV; A dynamic model of a double-layer staggered rotor UAV is constructed based on the rotation matrix. The dynamic model is used to represent the relationship between the lift force of the double-layer staggered rotor UAV and the motor speed and three-axis torque. Based on the preset expected position, a preset inner and outer loop structure PID controller is used to determine the expected pulling force of the double-layer staggered rotor UAV, and the rotational speed of each rotor of the double-layer staggered rotor UAV is determined based on the expected pulling force and the dynamic model.

[0007] In one possible embodiment of the present invention, the rotation matrix is ​​determined based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor drone, including: The starting point of the double-layer staggered rotor UAV is used as the origin, and the direction perpendicular to the ground downward is the Z-axis to construct the earth-fixed coordinate system. The center of gravity of the double-layer staggered rotor UAV is used as the origin, and the direction perpendicular to the fuselage downward is the Z-axis to construct the body coordinate system. The rotation matrix between the earth-fixed coordinate system and the body coordinate system is calculated based on the Euler angle:

[0008] in, is the rotation matrix, C is the cosine operator, S is the sine operator, is the roll angle, is the pitch angle, is the yaw angle.

[0009] In one possible embodiment of the present invention, a dynamic model of a double-layer staggered rotor UAV is constructed based on a rotation matrix, including: The resultant external force expression of the double-layer staggered rotor UAV in the body coordinate system is constructed as follows:

[0010] in, is the resultant external force of the double-layer staggered rotor UAV in the body coordinate system, is the total lift of the double-layer staggered rotor UAV; The resultant external force of the double-layer staggered rotor UAV in the earth-fixed coordinate system is calculated based on the rotation matrix of the earth-fixed coordinate system and the body coordinate system:

[0011] According to the Newton-Euler equation, the dynamic model of the double-layer staggered rotor UAV is constructed as follows:

[0012] in, 、 and They are the double-layer staggered rotor UAV at the lower edge of the earth fixed coordinate system x 、 y 、 z The acceleration of the axis, 、 and are the angular accelerations of the double-layer staggered rotor UAV in the roll, pitch and yaw directions, 、 and The drones are respectively 、 and The moment of inertia of the shaft, is the quality of the drone, is the acceleration due to gravity, 、 、 They are the rotational forces of the double-layer staggered rotor UAV in the body coordinate system. x axis, y Axis and z The torque of the shaft.

[0013] In one possible embodiment of the present invention, the double-layer staggered rotor drone is a double-layer staggered X-configuration octorotor drone, and the relationship between the force and torque of the octorotor drone in the body coordinate system is constructed as follows:

[0014] in, The upper rotor speed of the double-layer staggered rotor UAV is The lift force on The lower rotor speed of the double-layer staggered rotor UAV is The lift force on 、 、 、 、 、 、 、 are the rotation speeds of the eight rotors, I is the length of the upper arm, L is the length of the lower arm, The upper rotor speed is The torque applied when The lower rotor speed is The torque applied.

[0015] In one possible embodiment of the present invention, when constructing the relationship between the force and torque of the octorotor drone in the body coordinate system based on the dynamic model, it includes: The relationship between wing speed, lift and torque when the intercept is 0 is:

[0016]

[0017]

[0018]

[0019] Based on the above relationship between wing speed, lift and torque when the intercept is 0, the relationship between force and torque of the octorotor UAV in the body coordinate system can be converted into:

[0020]

[0021] in, The value of , The value of , The value of , The value of .

[0022] In one possible embodiment of the present invention, a predetermined inner and outer loop structure PID controller is used to determine the desired pulling force of the double-layer staggered rotor drone based on a predetermined desired position, including: Determine the actual pulling force of the double-layer staggered rotor UAV in the earth-fixed coordinate system based on the current speed, current position and expected position of the double-layer staggered rotor UAV; The attitude of the double-layer staggered rotor UAV is solved based on the actual pulling force combined with the dynamic model to obtain the expected roll angle, expected pitch angle and expected yaw angle of the double-layer staggered rotor UAV; The desired roll angle, desired pitch angle, and desired yaw angle are used as the outer loop inputs of the inner-outer loop PID controller to obtain the control position of the outer loop output. The control position is used as the inner loop input to obtain the desired thrust of the double-layer staggered rotor UAV with inner and outer outputs.

[0023] In a possible embodiment of the present invention, after determining the rotational speed of each rotor of the double-layer staggered rotor drone based on the expected pulling force and the dynamic model, the method includes: A rotation speed actuator is used to control the double-layer staggered rotor drone based on the rotation speed of each rotor, so that the double-layer staggered rotor drone moves from the current position to the desired position.

[0024] In a second aspect, the present invention further provides a drone control device, comprising: A rotation matrix calculation module is used to determine the rotation matrix based on the transformation relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV; A dynamic model construction module is used to construct a dynamic model of a double-layer staggered rotor UAV based on the rotation matrix. The dynamic model is used to represent the relationship between the lift force of the double-layer staggered rotor UAV and the motor speed and three-axis torque; A PID control module is used to determine the expected thrust of the double-layer staggered rotor UAV based on a preset expected position using a preset inner and outer loop structure PID controller, and to determine the rotational speed of each rotor of the double-layer staggered rotor UAV based on the expected thrust in combination with the dynamic model.

[0025] In a third aspect, the present invention further provides a drone, comprising a memory and a processor, wherein: Memory, used to store programs; The processor is coupled to the memory and is configured to execute a program stored in the memory to implement the steps of the drone control method of any of the above embodiments.

[0026] In a fourth aspect, the present invention also provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the drone control method of any of the above-mentioned embodiments.

[0027] The beneficial effects of the present invention are: the UAV control method provided by the present invention determines the rotation matrix based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV, and constructs the dynamic model of the double-layer staggered rotor UAV based on the rotation matrix. The dynamic model is used to represent the relationship between the body lift of the double-layer staggered rotor UAV and the motor speed and three-axis torque. By introducing the conversion between the earth-fixed coordinate system and the body coordinate system, the motion state and control requirements of the UAV are accurately described. A preset PID controller based on the inner and outer loop structure is used to control the body lift of the double-layer staggered rotor UAV based on the dynamic model. The inner and outer loop PID control structure is used to improve the response speed and attitude stability of the UAV, especially the adaptability in complex environments and the fault tolerance capability in the event of failure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 A schematic diagram of a flow chart of a drone control method provided by an embodiment of the present invention; Figure 2 A coordinate diagram provided by an embodiment of the present invention; Figure 3 A schematic diagram of the rotors of an octorotor drone provided in an embodiment of the present invention; Figure 4 A schematic flow chart of a PID control method provided in an embodiment of the present invention; Figure 5 A schematic diagram of a PID control principle provided by an embodiment of the present invention; Figure 6 A PID control effect diagram provided by an embodiment of the present invention; Figure 7 A schematic structural diagram of a drone control device provided by an embodiment of the present invention; Figure 8 A schematic structural diagram of a drone provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0031] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0032] A specific embodiment of the present invention, as Figure 1 As shown, a drone control method is disclosed, comprising: S101, determining a rotation matrix based on a conversion relationship between an earth-fixed coordinate system and a body coordinate system of the double-layer staggered rotor UAV.

[0033] In the embodiment of the present invention, before constructing the dynamic model of the UAV, it is necessary to first clarify the definition of the coordinate system. When describing the motion state of an aircraft, two coordinate systems are usually involved: the earth-fixed coordinate system and the body coordinate system. Figure 2 As shown, represents the Earth-fixed coordinate system, Usually set as the aircraft take-off origin, Vertically downwards; is the body coordinate system, Usually set to the center of gravity of the aircraft, is the nose direction, With the vertical fuselage pointing downward, the coordinate axis and the positive direction of rotation can be determined according to the right-hand customization. Based on this, the transformation relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor drone can be determined to determine the rotation matrix.

[0034] S102, constructing a dynamic model of the double-layer staggered rotor UAV based on the rotation matrix, where the dynamic model is used to represent the relationship between the lift of the double-layer staggered rotor UAV and the motor speed and three-axis torque.

[0035] In an embodiment of the present invention, after determining the rotation matrix of the earth-fixed coordinate system and the body coordinate system, a dynamic model is constructed based on the motion state of the multi-rotor drone to represent the relationship between the body lift, motor speed, and three-axis torque of the double-layer staggered rotor drone. The specific construction method of the dynamic model will be described in detail later in the present invention.

[0036] S103, based on the preset expected position, using the preset inner and outer loop structure PID controller to determine the expected pulling force of the double-layer staggered rotor UAV, and based on the expected pulling force combined with the dynamic model, determining the rotation speed of each rotor of the double-layer staggered rotor UAV.

[0037] In an embodiment of the present invention, in a PID controller based on an inner and outer loop structure, the attitude control loop is the inner loop and the position control loop is the outer loop. Such a structural design helps the multi-rotor aircraft to quickly control its attitude, thereby improving the safety of flight. The specific control method will be described in detail later in the present invention.

[0038] The drone control method provided by the present invention determines a rotation matrix based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor drone, and constructs a dynamic model of the double-layer staggered rotor drone based on the rotation matrix. The dynamic model is used to represent the relationship between the body lift of the double-layer staggered rotor drone and the motor speed and three-axis torque. By introducing the conversion between the earth-fixed coordinate system and the body coordinate system, the motion state and control requirements of the drone are accurately described. A preset PID controller based on an inner and outer loop structure is used to control the body lift of the double-layer staggered rotor drone based on the dynamic model. The inner and outer loop PID control structure is used to improve the response speed and attitude stability of the drone, especially the adaptability in complex environments and the fault tolerance capability in the event of failure.

[0039] In some possible embodiments of the present invention, the rotation matrix is ​​determined based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor drone, including: The starting point of the double-layer staggered rotor UAV is used as the origin, and the direction perpendicular to the ground downward is the Z-axis to construct the earth-fixed coordinate system. The center of gravity of the double-layer staggered rotor UAV is used as the origin, and the direction perpendicular to the fuselage downward is the Z-axis to construct the body coordinate system. The rotation matrix between the earth-fixed coordinate system and the body coordinate system is calculated based on the Euler angle: (1) in, is the rotation matrix, C is the cosine operator, S is the sine operator, is the roll angle, is the pitch angle, is the yaw angle.

[0040] In the embodiment of the present invention, before the multi-rotor drone takes off, the earth-fixed coordinate system coincides with the body coordinate system of the double-layer staggered rotor drone; after takeoff, the relationship between the two coordinate systems can be expressed by the Euler angle express, represents the roll angle, represents the pitch angle, represents the yaw angle, from which the rotation matrix of the earth-fixed coordinate system and the body coordinate system shown in formula (1) can be determined.

[0041] The embodiment of the present invention introduces the conversion relationship between the earth-fixed coordinate system and the body coordinate system, which can more accurately construct the dynamic model of the multi-rotor drone.

[0042] In some possible embodiments of the present invention, a dynamic model of a double-layer staggered rotor drone is constructed based on a rotation matrix, including: The resultant external force expression of the double-layer staggered rotor UAV in the body coordinate system is constructed as follows: (2) in, is the resultant external force of the double-layer staggered rotor UAV in the body coordinate system, is the total lift of the double-layer staggered rotor UAV; Based on the rotation matrix of the earth-fixed coordinate system and the body coordinate system, the net external force of the double-layer staggered rotor UAV in the earth-fixed coordinate system can be calculated as: (3) According to the Newton-Euler equation, the dynamic model of the double-layer staggered rotor UAV can be constructed as follows: (4) in, 、 and They are the double-layer staggered rotor UAV at the lower edge of the earth fixed coordinate system x 、 y 、 z The acceleration of the axis, 、 and are the angular accelerations of the double-layer staggered rotor UAV in the roll, pitch and yaw directions, 、 and The drones are respectively 、 and The moment of inertia of the shaft, is the quality of the drone, is the acceleration due to gravity, 、 、 They are the rotational forces of the double-layer staggered rotor UAV in the body coordinate system. x axis, y Axis and z The torque of the shaft.

[0043] In the embodiment of the present invention, ignoring the gyroscopic effect and air resistance, and assuming that the aircraft is a rigid body, the resultant external force of the multi-rotor UAV in the body coordinate system can be expressed as the resultant external force expression shown in formula (2). According to the rotation matrix of the earth-fixed coordinate system and the body coordinate system, the reasonable external force of the multi-rotor UAV in the earth-fixed coordinate system can be calculated and expressed as the expression shown in formula (3). According to the Newton-Euler equation, the dynamic model of the multi-rotor UAV can be expressed as the expression shown in formula (4).

[0044] The embodiment of the present invention can accurately control the multi-rotor UAV by constructing a dynamic model of the multi-rotor UAV.

[0045] In some possible embodiments of the present invention, the double-layer staggered rotor drone is a double-layer staggered X-configuration octorotor drone, and the relationship between the force and torque of the octorotor drone in the body coordinate system is constructed as follows: (5) in, The upper rotor speed of the double-layer staggered rotor UAV is The lift force on The lower rotor speed of the double-layer staggered rotor UAV is The lift force on 、 、 、 、 、 、 、 are the rotation speeds of the eight rotors, I is the length of the upper arm, L is the length of the lower arm, The upper rotor speed is The torque applied when The lower rotor speed is The torque applied.

[0046] In the embodiment of the present invention, ignoring the air resistance and gyroscopic effect, the difference in the dynamic model between the staggered double-layer multi-rotor UAV and the conventional single-layer multi-rotor UAV is mainly reflected in the following: 、 、 and In terms of the corresponding relationship between the rotation speeds of each rotor, when the multi-rotor UAV is an octorotor UAV, the influence of force and torque in the body coordinate system can be constructed, and a rotation speed distribution scheme as shown in formula (5) can be constructed, such as Figure 3 As shown in the figure, for a double-layer staggered X-configuration octorotor drone, the lift and torque of the upper and lower rotors should be calculated using different equations. At the same time, the difference in the length of the upper and lower arms will also affect the roll and pitch moments of the aircraft.

[0047] In the embodiment of the present invention, a double-layer staggered X-shaped octocopters 、 、 and The simplified calculation formula should be as shown in formula (5), where I is the length of the upper arm, L is the length of the lower arm, Indicates that the upper rotor speed is The lift force on Indicates that the lower rotor speed is The lift force on Indicates that the upper rotor speed is The torque applied when Indicates that the lower rotor speed is In order to reduce the burden of the subsequent controller design when calculating the (non-square) matrix pseudo-inverse, 、 、 and The expression should be as concise as possible. The linear expression with an intercept of 0 as shown in Equations (6) to (9) can be used to express the relationship between the rotor speed and the lift and torque.

[0048] (6) (7) (8) (9) Based on the above equations (6) to (9), equation (5) can be transformed into equations (10) and (11): (10) (11) in, The value of , The value of , The value of , The value of .

[0049] The embodiment of the present invention simplifies the dynamic model of the octorotor UAV to obtain a dynamic model of the octorotor UAV that is easy to calculate, thereby facilitating the control of the dynamic model of the octorotor UAV.

[0050] In some possible embodiments of the present invention, Figure 4As shown in FIG, a preset PID controller based on an inner and outer loop structure is used to control the lift of a double-layer staggered rotor UAV based on a dynamic model, including: S401, determining an actual pulling force of the double-layer staggered-rotor UAV in an earth-fixed coordinate system based on a current speed, a current position, and an expected position of the double-layer staggered-rotor UAV; S402, calculating the attitude of the double-layer staggered rotor UAV based on the actual pulling force and the dynamic model to obtain the expected roll angle, expected pitch angle, and expected yaw angle of the double-layer staggered rotor UAV; S3403: The desired roll angle, desired pitch angle, and desired yaw angle are used as the outer loop inputs of the inner-outer loop PID controller to obtain the control position output by the outer loop. The control position is used as the inner loop input to obtain the desired thrust of the double-layer staggered rotor UAV outputted by the inner and outer loops.

[0051] In the embodiment of the present invention, Figure 5 As shown in FIG, it is a control principle diagram of a PID controller based on an inner and outer loop control structure adopted in an embodiment of the present invention. From a dynamic point of view, a multi-rotor aircraft is an under-driven system. It has 6 outputs but only 4 independent inputs. Therefore, the multi-rotor aircraft system itself is unstable and can only track four desired instructions at most. By introducing feedback control into the control system of a multi-rotor aircraft, the stability of the multi-rotor can be enhanced. However, in addition to stability, indicators such as response speed and whether there is overshoot are also factors to be considered in the control system of a multi-rotor aircraft. Taking the above considerations into consideration, a PID controller based on an inner and outer loop structure is adopted to control a double-layer staggered octocrotor UAV to perform path tracking tasks, wherein, 、 and Represent the desired roll angle, pitch angle and yaw angle of the aircraft respectively, and Represent the desired position and actual position of the body respectively, 、 、 and for 、 、 and The expected value of 、 and The body is in the ground coordinate system x 、 y and z The tension of the shaft, is the speed of each of the eight motors, are the three Euler angles of the body, is the angular velocity of the three Euler angles of the body, The body isx 、 y and z Speed ​​in three directions.

[0052] In an embodiment of the present invention, the attitude control loop is an inner loop and the position control loop is an outer loop. Such a structural design helps the multi-rotor aircraft to quickly control its attitude, thereby improving flight safety.

[0053] In some possible embodiments of the present invention, after determining the rotational speed of each rotor of the double-layer staggered rotor drone based on the expected pulling force and the dynamic model, the method includes: A speed actuator is used to control a double-layer staggered rotor UAV based on a desired pulling force, so that the double-layer staggered rotor UAV moves from a current position to a desired position.

[0054] In the embodiment of the present invention, in order to ensure the control effect of the PID controller based on the inner and outer loop structure on the flight performance of the staggered configuration octorotor aircraft, the specific PID parameters are shown in Table 1: Table 1: PID parameters

[0055] The multi-rotor UAV can be precisely controlled by the PID parameters shown in Table 1. Specifically, the initial position of the aircraft is set to , the expected trajectories are , , , in meters, t Indicates time in seconds, and assumes the desired yaw angle is constant The arm length of the octorotor drone model is set to 1.4 meters. The control effect diagram of the octorotor drone model is as follows: Figure 6 As shown in the figure, the path tracking effect of the staggered octocrotor drone in the three position channels. The Z channel has the best control effect, with almost no overshoot, quick response and stability; the X and Y channels perform well, with only slight errors at the beginning. The reason why the X and Y channels perform worse than the Z channel may be related to the mismatch between the initial expected position and the actual position of the Z channel. At this time, the error of the Z channel is the largest, so the aircraft prioritizes adjusting the Z channel. In addition, the adjustment of the yaw angle may also cause this phenomenon. Similarly, Figure 6 The last three figures show that under the current control, the interlaced octorotor achieves excellent attitude tracking. Roll angle tracking is the best, with the desired and actual roll angles almost completely aligned. Yaw angle follows closely, quickly converging to the desired value within about one second with virtually no overshoot. Finally, pitch angle oscillates for the first three seconds but converges after about five seconds.

[0056] The embodiments of the present invention demonstrate faster response speed and lower overshoot in position control in the X, Y, and Z directions. The control of rotation, pitch, and yaw angles is more precise, reducing vibration and improving flight safety. In the event of a rotor failure, the control strategy can quickly redistribute force and torque to ensure stable flight of the drone.

[0057] In order to better implement the drone control method in the embodiment of the present invention, based on the drone control method, correspondingly, Figure 7 As shown, an embodiment of the present invention further provides a drone control device, the drone control device 700 including: The rotation matrix calculation module 701 is used to determine the rotation matrix based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV; A dynamic model building module 702 is used to build a dynamic model of the double-layer staggered rotor UAV based on the rotation matrix. The dynamic model is used to represent the relationship between the lift force of the double-layer staggered rotor UAV and the motor speed and three-axis torque; The PID control module 703 is used to determine the expected thrust of the double-layer staggered rotor UAV based on the preset expected position using a preset inner and outer loop structure PID controller, and to determine the rotational speed of each rotor of the double-layer staggered rotor UAV based on the expected thrust in combination with the dynamic model.

[0058] The drone control device 700 provided in the above embodiment can implement the technical solution described in the above drone control method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above drone control method embodiment, which will not be repeated here.

[0059] like Figure 8 As shown, the present invention also provides a drone 800. The drone 800 includes a processor 801 and a memory 802. Figure 8 Only some of the components of the drone 800 are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may alternatively be implemented.

[0060] In some embodiments, the processor 801 can be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program codes or process data stored in the memory 802, such as the drone control method of the present invention.

[0061] In some embodiments, processor 801 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, processor 801 may be local or remote. In some embodiments, processor 801 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, multiple clouds, or any combination thereof.

[0062] In some embodiments, the memory 802 may be an internal storage unit of the drone 800, such as a hard drive or memory of the drone 800. In other embodiments, the memory 802 may be an external storage device of the drone 800, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the drone 800.

[0063] Furthermore, the memory 802 may include both an internal storage unit of the drone 800 and an external storage device. The memory 802 is used to store application software installed on the drone 800 and various data.

[0064] In some embodiments, when the processor 801 executes the drone control program in the memory 802, the following steps may be implemented: Determine the rotation matrix based on the transformation relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV; A dynamic model of a double-layer staggered rotor UAV is constructed based on the rotation matrix. The dynamic model is used to represent the relationship between the lift force of the double-layer staggered rotor UAV and the motor speed and three-axis torque. Based on the preset expected position, a preset inner and outer loop structure PID controller is used to determine the expected pulling force of the double-layer staggered rotor UAV, and the rotational speed of each rotor of the double-layer staggered rotor UAV is determined based on the expected pulling force and the dynamic model.

[0065] It should be understood that, when the processor 801 executes the drone control program in the memory 802 , in addition to the above functions, it can also implement other functions. For details, please refer to the description of the corresponding method embodiment above.

[0066] Accordingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, the steps or functions in the drone control method provided in the above-mentioned method embodiments can be implemented.

[0067] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0068] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.

Claims

1. A drone control method, characterized in that: include: Determine the rotation matrix based on the transformation relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV; Constructing a dynamic model of the double-layer staggered-rotor UAV based on the rotation matrix, wherein the dynamic model is used to represent the relationship between the lift force of the double-layer staggered-rotor UAV and the motor speed and the three-axis torque; Based on the preset expected position, a preset inner and outer loop structure PID controller is used to determine the expected pulling force of the double-layer staggered rotor UAV, and the rotational speed of each rotor of the double-layer staggered rotor UAV is determined based on the expected pulling force and the dynamic model.

2. The drone control method according to claim 1, characterized in that: The method of determining the rotation matrix based on the conversion relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor drone includes: The starting point of the double-layer staggered rotor drone is used as the origin, and the direction perpendicular to the ground and downward is the Z-axis to construct the earth-fixed coordinate system. The center of gravity of the double-layer staggered rotor drone is used as the origin, and the direction perpendicular to the fuselage and downward is the Z-axis to construct the body coordinate system. The rotation matrix of the earth-fixed coordinate system and the body coordinate system is calculated based on the Euler angle as follows: in, is the rotation matrix, C is the cosine operator, S is the sine operator, is the roll angle, is the pitch angle, is the yaw angle.

3. The drone control method according to claim 2, characterized in that: The step of constructing a dynamic model of the double-layer staggered rotor drone based on the rotation matrix includes: The resultant external force expression of the double-layer staggered rotor UAV in the body coordinate system is constructed as follows: in, is the resultant external force of the double-layer staggered rotor UAV in the body coordinate system, is the total lift of the double-layer staggered rotor UAV; The resultant external force of the double-layer staggered rotor UAV in the earth-fixed coordinate system is calculated based on the rotation matrix of the earth-fixed coordinate system and the body coordinate system: According to the Newton-Euler equation, the dynamic model of the double-layer staggered rotor UAV is constructed as follows: in, 、 and They are the double-layer staggered rotor UAV at the lower edge of the earth fixed coordinate system x 、 y 、 z The acceleration of the axis, 、 and are the angular accelerations of the double-layer staggered rotor UAV in the roll, pitch and yaw directions, 、 and The drones are respectively 、 and The moment of inertia of the shaft, is the quality of the drone, is the acceleration due to gravity, 、 、 They are the rotational forces of the double-layer staggered rotor UAV in the body coordinate system. x axis, y Axis and z The torque of the shaft.

4. The drone control method according to claim 3, characterized in that: The double-layer staggered rotor drone is a double-layer staggered X-configuration octorotor drone. The relationship between the force and torque of the octorotor drone in the body coordinate system is: in, The upper rotor speed of the double-layer staggered rotor UAV is The lift force on The lower rotor speed of the double-layer staggered rotor UAV is The lift force on 、 、 、 、 、 、 、 are the rotation speeds of the eight rotors, I is the length of the upper arm, L is the length of the lower arm, The upper rotor speed is The torque applied when The lower rotor speed is The torque applied.

5. The drone control method according to claim 4, characterized in that: When constructing the relationship between the force and torque of the octorotor drone in the body coordinate system based on the dynamic model, it includes: The relationship between wing speed, lift and torque when the intercept is 0 is: Based on the above relationship between wing speed, lift and torque when the intercept is 0, the relationship between force and torque of the octorotor UAV in the body coordinate system can be converted into: in, The value of , The value of , The value of , The value of .

6. The drone control method according to claim 5, characterized in that: The method of determining the expected pulling force of the double-layer staggered rotor UAV based on the preset expected position using a preset inner and outer loop structure PID controller includes: Determining an actual pulling force of the double-layer staggered-rotor drone in an earth-fixed coordinate system based on a current speed, a current position, and an expected position of the double-layer staggered-rotor drone; The posture of the double-layer staggered-rotor UAV is calculated based on the actual pulling force and the dynamic model to obtain the expected roll angle, expected pitch angle and expected yaw angle of the double-layer staggered-rotor UAV; The desired roll angle, desired pitch angle, and desired yaw angle are used as outer loop inputs of an inner-outer loop structure PID controller to obtain a control position output by the outer loop. The control position is used as the inner loop input to obtain the desired pulling force of the double-layer staggered rotor UAV outputted by the inner and outer loops.

7. The drone control method according to claim 6, characterized in that: After determining the rotational speed of each rotor of the double-layer staggered rotor drone based on the expected pulling force and the dynamic model, the method further includes: A rotation speed actuator is used to control the double-layer staggered rotor drone based on the rotation speed of each rotor, so that the double-layer staggered rotor drone moves from the current position to the desired position.

8. A drone control device, characterized in that: include: A rotation matrix calculation module is used to determine the rotation matrix based on the transformation relationship between the earth-fixed coordinate system and the body coordinate system of the double-layer staggered rotor UAV; a dynamic model construction module, configured to construct a dynamic model of the double-layer staggered rotor UAV based on the rotation matrix, wherein the dynamic model is configured to represent the relationship between the lift force of the double-layer staggered rotor UAV and the motor speed and the three-axis torque; A PID control module is used to determine the expected thrust of the double-layer staggered rotor drone based on a preset expected position using a preset inner and outer loop structure PID controller, and to determine the rotational speed of each rotor of the double-layer staggered rotor drone based on the expected thrust in combination with the dynamic model.

9. A drone, characterized in that: comprising a memory and a processor, wherein, The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the drone control method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the drone control method described in any one of claims 1 to 7.