Unmanned aerial vehicle control method and device, electronic equipment and storage medium
By adjusting the steering and speed of the second rotor of the quadrotor drone, the balance control of the drone under a single power failure is achieved, avoiding rollover, reducing the risk of crashes, and maintaining handling.
Patent Information
- Application Number
- CN202510912623.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-03
AI Technical Summary
Four-rotor drones are prone to overturn after a single power system fails, resulting in crashes, causing economic losses and potential secondary accidents.
After detecting a power failure, adjust the steering and speed of the second rotor of the drone, so that it rotates forward and reversely, maintains balance, and controls the drone to return to the preset position using headless mode.
Without adding hardware equipment, the probability of falling after single power failure is significantly reduced, and the manoeuvre is maintained.
Smart Images

Figure CN120406553A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) flight control, and particularly to a UAV control method, device, electronic device and storage medium. Background Art
[0002] During the flight of a UAV, if a single power system of a quadrotor UAV fails, the lift of the diagonal of the failed power system will drop sharply, resulting in the UAV tipping over in a short time or even crashing. The crash caused by tipping over not only damages the airframe and has a high maintenance cost, but also causes huge economic losses. If the UAV crashes in scenarios such as logistics transportation and high-altitude inspection, it is very likely to trigger a secondary accident. Therefore, there is an urgent need for a solution to control the UAV when a single power system of the quadrotor UAV fails. Summary of the Invention
[0003] The present invention provides a UAV control method, device, electronic device and storage medium, which can, in the case of a power failure of a single rotor of a quadrotor UAV, achieve not adding additional hardware devices, but by alternately adjusting the forward and reverse rotations of the second rotor to ensure that the UAV does not tip over.
[0004] In a first aspect, the present invention provides a UAV control method, including:
[0005] If it is detected that a first rotor of the UAV has a power failure, determine a first flight attitude of the UAV, where the first flight attitude is used to indicate a pitch angle of the UAV obtained in real time after the first rotor of the UAV has a power failure;
[0006] According to the first flight attitude, perform steering adjustment and speed adjustment on a second rotor of the UAV, so that the UAV is adjusted from the first flight attitude to a second flight attitude, where the second flight attitude is used to indicate a pitch angle that can ensure that the UAV does not tip over; the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions, and the second rotor and the first rotor are rotors corresponding to both ends of the same diagonal line in the UAV;
[0007] Start the headless mode and control the UAV to fly back to a preset position.
[0008] In a second aspect, the present invention further provides a UAV control device, including:
[0009] A flight attitude determination module, configured to determine a first flight attitude of the drone if a power failure occurs in a first rotor of the drone, where the first flight attitude is used to indicate a pitch angle of the drone obtained in real time after the power failure occurs in the first rotor of the drone;
[0010] A flight attitude adjustment module, configured to perform steering adjustment and speed adjustment on a second rotor of the drone according to the first flight attitude, so that the drone is adjusted from the first flight attitude to a second flight attitude, where the second flight attitude is used to indicate a pitch angle that can ensure that the drone will not roll over; the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions, and the second rotor and the first rotor are the rotors corresponding to the two ends of the same diagonal line in the drone;
[0011] A fly-back control module, configured to activate the headless mode and control the drone to fly back to a preset position.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0013] One or more processors;
[0014] A storage device, configured to store one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the drone control method provided in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute the drone control method provided in any embodiment of the present invention when executed by a computer processor.
[0017] In the technical solution of the embodiment of the present invention, if a power failure occurs in the first rotor of the drone, the first flight attitude of the drone is determined. The first flight attitude is used to indicate the pitch angle obtained in real time after the power failure of the first rotor of the drone. Then, according to the first flight attitude, the steering and speed of the second rotor of the drone are adjusted. The second rotor is the rotor diagonal to the first rotor, so that the drone is adjusted from the first flight attitude to the second flight attitude. The second flight attitude is used to indicate the pitch angle that can ensure that the drone does not roll over. At the same time, the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions. By alternately adjusting the steering of the second rotor in the forward and reverse directions in this way, it is equivalent to enabling the second rotor to alternately generate forward and reverse thrusts. This can ensure that the second rotor does not generate thrust in only a certain fixed direction, but alternately generates forward and reverse thrusts, so that the thrust generated by the second rotor can be balanced from a macroscopic time perspective, and the drone can be kept balanced from a macroscopic perspective, avoiding rollover. Then, by activating the headless mode, the drone is controlled to fly back to the preset position. This solution can ensure that the drone does not roll over by alternately adjusting the forward and reverse rotations of the second rotor without adding additional hardware devices in the case of a power failure of a single rotor of a quadcopter drone, which can significantly reduce the probability of falling after a single power failure. At the same time, combined with the dynamic headless mode, the controllability of the drone is maintained, and the solution is economical and feasible.
[0018] The above-mentioned invention content is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above-mentioned and other purposes, features and advantages of the present invention more obvious and understandable, the following specific embodiments of the present invention are specifically given. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Combined with the drawings and referring to the following specific embodiments, the above-mentioned and other features, advantages and aspects of the embodiments of the present invention will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original components and elements are not necessarily drawn to scale.
[0020] Figure 1 It is a schematic flow chart of a drone control method provided by an embodiment of the present invention;
[0021] Figure 2 It is a schematic flow chart of another drone control method provided by an embodiment of the present invention;
[0022] Figure 3 It is a schematic diagram of the linear relationship between the thrust and the throttle parameter provided by an embodiment of the present invention;
[0023] Figure 4 Schematic diagram of the effect of a second mapping table provided by an embodiment of the present invention;
[0024] Figure 5 Schematic diagram of the structure of an unmanned aerial vehicle control device provided by an embodiment of the present invention;
[0025] Figure 6 Schematic diagram of the structure of an electronic device for implementing an unmanned aerial vehicle control method provided by an embodiment of the present invention. Detailed implementation manners
[0026] Embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.
[0027] It should be understood that the various steps recited in the method embodiments of the present invention can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this regard.
[0028] As used herein, the term "including" and its variants are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0030] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] Figure 1The figure is a schematic flowchart of a drone control method provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of controlling a quadcopter drone after a single power failure. This method can be executed by a drone control device, which can be implemented in the form of software and / or hardware and is generally integrated on any electronic device with network communication functions. The electronic device can be a mobile terminal, a PC, a server, etc. As Figure 1 shown, the drone control method of the embodiment of the present invention may include the following processes:
[0033] S110. If it is detected that the first rotor of the drone has a power failure, determine the first flight attitude of the drone. The first flight attitude is used to indicate the pitch angle of the drone obtained in real time after the first rotor of the drone has a power failure.
[0034] Among them, the drone is a quadcopter drone with four rotors, and these four rotors can be evenly distributed in four directions of the drone, so as to form two diagonals. The first rotor can be any one of the four rotors of the drone.
[0035] If the first rotor of the drone fails or is damaged, or the motor corresponding to the first rotor fails, or the drive corresponding to the first rotor fails, etc., it may all cause the first rotor of the drone to have a power failure, resulting in the first rotor being unable to continue providing lift.
[0036] Specifically, if it is detected that the first rotor of the drone has a power failure, the first flight attitude of the drone can be determined through an inertial measurement unit or other relevant sensor measurement units equipped on the drone. The first flight attitude can be used to indicate the pitch angle of the drone obtained in real time after the first rotor of the drone has a power failure. The pitch angle can reflect the angle between the body of the drone and the horizontal plane. For example, the obtained first flight attitude can indicate that the angle between the current body of the drone and the horizontal plane is 30 degrees, that is, the pitch angle at this time is 30 degrees.
[0037] S120. Adjust the steering and speed of the second rotor of the drone according to the first flight attitude, so that the drone is adjusted from the first flight attitude to the second flight attitude. The second flight attitude is used to indicate the pitch angle that can ensure that the drone will not roll over; the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions. The second rotor and the first rotor are the rotors corresponding to the two ends of the same diagonal in the drone.
[0038] It should be noted that in the case of a power failure of the first rotor, since the first rotor can no longer provide lift, this will cause the forces generated among all the remaining rotors to become unbalanced, resulting in the loss of stability of the drone and situations such as tipping over or crashing. The solution of this embodiment is precisely to address such a situation, mainly by alternately adjusting the forward and reverse rotations of the other rotor diagonally opposite to the first rotor, thereby preventing the drone from tipping over or crashing.
[0039] Specifically, since the first flight attitude can indicate the current pitch situation of the drone, the steering adjustment and speed adjustment of the second rotor of the drone can be carried out according to the first flight attitude, so that the drone can be adjusted from the first flight attitude to the second flight attitude. The second rotor and the first rotor are the rotors corresponding to the two ends of the same diagonal in the drone, that is to say, the second rotor is the rotor at the diagonal position of the first rotor. The second flight attitude is used to indicate the pitch angle that can ensure that the drone does not tip over. For example, the pitch angle that can ensure that the drone does not tip over can be 0 degrees, or 0.5 degrees or 1 degree, etc. As long as it is the pitch angle that can ensure that the drone does not tip over, it is acceptable and will not be further limited here. That is to say, the second flight attitude can be set differently based on actual needs.
[0040] In order to adjust the drone from the first flight attitude to the second flight attitude, in the process of adjusting the steering of the second rotor in this embodiment, at least the forward and reverse alternations of the steering of the second rotor are carried out, which is equivalent to being able to control the second rotor to perform alternating forward and reverse rotations. It can be understood that assuming that the second rotor rotates forward under normal conditions, then when the second rotor rotates forward normally, it can provide forward pull. If the second rotor is adjusted from forward rotation to reverse rotation, then the second rotor can be changed to provide reverse pull. It can be seen that by alternately adjusting the forward and reverse steering of the second rotor, it is equivalent to the second rotor being able to alternately generate forward pull and reverse pull, which can ensure that the second rotor does not only generate pull in a certain fixed direction, but alternately generates forward pull and reverse pull, so that the pull generated by the second rotor can be maintained in balance from a macroscopic time perspective, and the drone can be maintained in balance from a macroscopic perspective, avoiding tipping over.
[0041] Of course, after determining the first flight attitude of the drone, it is natural to determine what direction and degree of adjustment are required, and thus it is possible to determine the steering to be adjusted for the second rotor, as well as the speed to be adjusted, etc., so as to realize the steering adjustment and speed adjustment of the second rotor of the drone, and adjust the drone from the first flight attitude to the second flight attitude.
[0042] It should be noted that through a large number of experimental analyses, it can be known that when the second rotor rotates in the reverse direction, it can at least provide a force about half of the normal pulling force of the drone. The about half of the pulling force provided, when alternately cooperating with the corresponding normal pulling force during forward rotation, can continuously adjust the pose of the drone to maintain a state of not tipping over, or even being stable. Of course, in actual applications, such alternating adjustments are carried out at a high frequency, and can reach 400 or even 500 adjustments per minute.
[0043] S130. Activate the headless mode and control the drone to fly back to the preset position.
[0044] Among them, the headless mode is an operation mode that simplifies the flight control of the drone. In the headless mode, the flight of the drone can no longer depend on the direction of the drone's nose, but is controlled based on the position when the drone takes off. In short, in the headless mode, the flight direction of the drone is controlled based on the take-off position of the drone or the position of the operator, rather than based on the direction of the drone's own nose. Exemplarily, after the drone activates the headless mode, if the operator applies an operation on the remote control to control the drone to fly left, then the drone will fly and move to the left; if the operator applies an operation on the remote control to control the drone to fly in the direction closer to the operator, then the drone will fly in the direction of the operator and thus approach the operator.
[0045] Specifically, by adjusting the steering and rotational speed of the second rotor, the drone can be kept in a state of not tipping over. Then, the drone can be started to enter the headless mode. In this mode, even if the drone spins, it doesn't need to consider the specific nose orientation of the drone at this time too much. Just consider macroscopically what specific direction adjustment should be applied to the drone based on the preset position, so as to be able to control the drone to fly back to the preset position. Among them, the preset position can be the flight starting point of the drone or a designated docking location pre-assigned for the drone.
[0046] In the technical solution of the embodiment of the present invention, if it is detected that a power failure occurs in the first rotor of the drone, the first flight attitude of the drone is determined. The first flight attitude is used to indicate the pitch angle obtained in real time after the power failure of the first rotor of the drone. Then, according to the first flight attitude, the steering adjustment and speed adjustment of the second rotor of the drone are performed. The second rotor is the rotor diagonal to the first rotor, so that the drone is adjusted from the first flight attitude to the second flight attitude. The second flight attitude is used to indicate the pitch angle that can ensure that the drone will not roll over. At the same time, the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions. By alternately adjusting the steering of the second rotor in the forward and reverse directions like this, it is equivalent to enabling the second rotor to alternately generate forward and reverse pulling forces. This can ensure that the second rotor does not generate a pulling force in only a certain fixed direction, but alternately generates forward and reverse pulling forces, so that the pulling force generated by the second rotor can be balanced from a macroscopic time perspective, and the drone can be kept balanced from a macroscopic perspective, avoiding rollover. Then, by activating the headless mode, the drone is controlled to fly back to the preset position. This solution can, in the case of a power failure in a single rotor of a quadcopter drone, without adding additional hardware devices, ensure that the drone does not roll over by alternately adjusting the forward and reverse rotations of the second rotor, significantly reducing the probability of crashing after a single power failure. At the same time, in cooperation with the dynamic headless mode, the controllability of the drone is maintained, and the solution is economical and feasible.
[0047] Figure 2 FIG. is a schematic flow chart of another drone control method provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of adjusting the steering and speed of the second rotor of the drone according to the first flight attitude in the previous embodiment to adjust the drone from the first flight attitude to the second flight attitude on the basis of the technical solution of the previous embodiment. This embodiment can be combined with each optional solution in one or more of the above embodiments. As Figure 2 shown, the drone control method of the embodiment of the present invention may include the following process:
[0048] S210. If it is detected that a power failure occurs in the first rotor of the drone, determine the first flight attitude of the drone. The first flight attitude is used to indicate the pitch angle of the drone obtained in real time after the power failure of the first rotor of the drone.
[0049] S220. Determine the motor steering of the first motor and the throttle parameter of the first motor through the first flight attitude; the first motor is the motor configured for the second rotor; the throttle parameter is used to control the throttle size of the first motor.
[0050] Among them, motors are correspondingly configured on the four rotors of the drone, and the motors are used to drive the rotation of their corresponding rotors. The first motor is the motor correspondingly configured for the second rotor.
[0051] The throttle parameter is used to control the throttle of the first motor, and the throttle parameter can be expressed in the form of a percentage. For example, 0% means that the throttle is 0 at this time and the throttle is the smallest; 100% means that the throttle is 100% at this time and the throttle reaches the maximum. By adjusting the throttle parameter of the first motor, the first motor can present different rotational speeds, thereby driving the first rotor to change its rotational speed.
[0052] Specifically, through the first flight attitude, the inclination degree of the drone relative to the horizontal plane can be determined, and then the direction and degree of adjustment to the first rotor can be determined based on such an inclination degree. That is, the motor rotation direction and the throttle parameter of the first motor can be determined through the first flight attitude.
[0053] As an optional but non-limiting implementation manner, determining the motor rotation direction and the throttle parameter of the first motor through the first flight attitude includes: determining the pitch angle corresponding to the drone in the first flight attitude through the inertial measurement unit configured on the drone; determining the motor rotation direction and the first pulling force of the first motor based on the pitch angle of the drone; the motor rotation direction is the rotation direction required for the drone to adjust from the first flight attitude to the second flight attitude; the first pulling force is used to adjust the attitude of the drone so that the drone adjusts from the first flight attitude to the second flight attitude; determining the throttle parameter of the first motor based on the first pulling force. By adopting this optional solution, the adjustment direction and details of the first motor can be determined through the determined pitch angle, so that the motor rotation direction and the throttle parameter of the first motor can be determined more accurately.
[0054] Among them, the inertial measurement unit (IMU) is a sensor device mainly composed of a gyroscope, an accelerometer, a magnetometer, etc. The inertial measurement unit can be used to measure information such as angular velocity, acceleration, and yaw angle of the drone on the X-axis, Y-axis, and Z-axis during flight. At the same time, the inertial measurement unit can also process the determined information by means of a fusion algorithm to determine the pitch angle of the drone.
[0055] Specifically, after determining the pitch angle corresponding to the UAV in the first flight attitude through the inertial measurement unit configured on the UAV, the motor rotation direction and the first pulling force of the first motor can be determined based on this pitch angle. The motor rotation direction is the rotation direction required when the UAV adjusts from the first flight attitude to the second flight attitude; the first pulling force can be used to adjust the attitude of the UAV so that the UAV adjusts from the first flight attitude to the second flight attitude. Then, based on the first pulling force, it can be determined what degree of throttle should be applied to the first motor, that is, the throttle parameter of the first motor is determined.
[0056] As an optional but non-limiting implementation manner, determining the motor rotation direction and the first pulling force of the first motor based on the pitch angle of the UAV includes: if the pitch angle of the UAV is greater than the preset pitch angle, determining that the motor rotation direction of the first motor is reverse, and determining the first pulling force based on the pitch angle; if the pitch angle of the UAV is less than the preset pitch angle, determining that the motor rotation direction of the first motor is forward, and determining the first pulling force based on the pitch angle; wherein, the magnitude of the pitch angle is proportional to the magnitude of the first pulling force. By adopting this optional solution, the pulling force and the adjustment direction that need to be applied to the UAV can be determined based on the pitch angle of the UAV, so that a more accurate and appropriate throttle parameter can be determined in the subsequent solution.
[0057] The preset pitch angle includes the first pitch angle or the second pitch angle. The first pitch angle can be 0 degrees, and the difference between the second pitch angle and the first pitch angle is less than the preset angle. That is to say, the second pitch angle can be a certain angle value close to the first pitch angle. For example, the second pitch angle can be 0.01 degrees, etc., and the preset pitch angle can be set differently based on actual needs.
[0058] When the pitch angle of the UAV is greater than the preset pitch angle, it means that the UAV is in an up-tilt attitude. Then, a downward force needs to be applied to the UAV to correct and adjust the up-tilt situation of the UAV. At this time, it can be determined that the motor rotation direction of the first motor is reverse, so that the second rotor can be driven to rotate in the reverse direction, and the first pulling force is determined based on the pitch angle, so that a downward first pulling force is generated after the second rotor rotates to realize the correction and adjustment of the up-tilt attitude of the UAV.
[0059] By the same principle, when the pitch angle of the UAV is less than the preset pitch angle, it means that the UAV is in a down-tilt attitude. Then, an upward force needs to be applied to the UAV to correct and adjust the down-tilt situation of the UAV. At this time, it can be determined that the motor rotation direction of the first motor is forward, so that the second rotor can be driven to rotate in the forward direction, and the first pulling force is determined based on the pitch angle, so that an upward first pulling force is generated after the second rotor rotates to realize the correction and adjustment of the down-tilt attitude of the UAV.
[0060] It can be understood that the magnitude of the pitch angle is directly proportional to the magnitude of the first pulling force. The larger the pitch angle, the greater the first pulling force required. The smaller the pitch angle, the smaller the first pulling force required.
[0061] It should be noted that when the pitch angle of the drone is equal to the preset pitch angle, it means that the drone is in a state where it will not roll over at this time. Then, the attitude of the drone does not need to be adjusted at this moment. However, as time goes by, if the attitude of the drone is not continuously controlled, the drone will inevitably gradually change from the "state where it will not roll over" to the "state where it will roll over". In this embodiment, the attitude of the drone will be continuously and real-time obtained. As long as the drone is not in the state where it will not roll over, the attitude of the drone will be continuously adjusted based on the pitch angle of the drone, so that the attitude adjustment of the drone always tends to be adjusted towards the "pitch angle required to prevent rollover".
[0062] As an optional but non-limiting implementation manner, determining the throttle parameter based on the first pulling force includes: determining the throttle parameter based on the first pulling force and the first mapping table; the first mapping table is used to indicate the mapping relationship between the pulling force generated by the second rotor and the throttle parameter of the corresponding first motor used. Adopting this optional solution can provide a reference basis for determining the throttle parameter based on the first pulling force, so as to determine the throttle parameter matching the first pulling force.
[0063] Among them, the first mapping table is used to indicate the mapping relationship between the pulling force generated by the second rotor and the throttle parameter of the corresponding first motor used. The first mapping relationship can be obtained through actual experimental measurements of the pulling force that the rotor can generate and the corresponding throttle parameter used.
[0064] Exemplarily, Figure 3 is a schematic diagram of the linear relationship between the pulling force and the throttle parameter provided by the embodiment of the present invention. As Figure 3 shown, the horizontal axis represents the "pulling force", and if the pulling force value is positive, it represents a positive pulling force; if the pulling force value is negative, it represents a negative pulling force. The vertical axis represents the "throttle parameter". Similarly, if the throttle parameter value is positive, it represents the throttle parameter when the motor rotates forward; if the throttle parameter value is negative, it represents the throttle parameter when the motor rotates backward. Through Figure 3 it can be seen that based on such a linear relationship, the first mapping table can be determined. In the first mapping table, the corresponding throttle parameter can be determined based on the pulling force value.
[0065] Then, after determining the first pulling force, the throttle parameter can be determined with the help of the first mapping table. Of course, the first mapping table can be obtained through Figure 3It can be determined based on the linear relationship between the shown pulling force and the throttle parameter. It can also be multiple data pairs of the pulling force and the throttle parameter measured through experiments. Such multiple data pairs can be directly constructed into a first mapping relationship table. It should be noted that the relationship between the "pulling force" and the "throttle parameter" can be linear, such as Figure 3 the shown linear relationship; it can also be non-linear. For example, the relationship between the two may be a non-linear relationship in the form of an exponential function. Specifically, it can be set differently based on the actual situation and will not be detailedly limited here.
[0066] S230. Determine the first control signal based on the motor rotation direction and the throttle parameter of the first motor.
[0067] Specifically, after determining the motor rotation direction and the throttle parameter of the first motor, the first control signal can be determined based on the motor rotation direction and the throttle parameter. For example, the first control signal can be a PWM (Pulse Width Modulation) signal. The first control signal can be sent to the Electronic Speed Controller (ESC) configured on the drone after being generated, so that the electronic speed controller adjusts the motor rotation direction and the throttle parameter of the first motor based on the received first control signal.
[0068] As an optional but non-limiting implementation manner, determining the first control signal based on the motor rotation direction and the throttle parameter of the first motor includes: determining the pulse width adopted by the first motor of the drone based on the throttle parameter value and the second mapping relationship table; the second mapping relationship table is used to indicate the mapping relationship between the throttle parameter value of the first motor and the pulse width to be adopted by the first motor, and the pulse width is used to make the first motor generate a motor rotation speed matching the pulse width; generating the first control signal according to the pulse width adopted by the first motor of the drone and the rotation direction of the first motor. By adopting this optional solution, the pulse width matching the throttle parameter value can be determined through the second mapping relationship table, so as to generate an accurate first control signal.
[0069] Specifically, the second mapping relationship table can be determined in advance, and the second mapping relationship table can be used to indicate the mapping relationship between the throttle parameter value of the first motor and the pulse width to be adopted by the first motor. Then, after determining the throttle parameter, the pulse width corresponding to the throttle parameter can be determined based on the second mapping relationship table. The motor rotation speed matching the pulse width can be generated by means of the pulse width. Furthermore, the first control signal can be generated according to the pulse width adopted by the first motor of the drone and the rotation direction of the first motor.
[0070] As an optional but non-limiting implementation, the second mapping relationship table is determined as follows: based on the pulse width interval of the first control signal, the first pulse width interval, the second pulse width interval, and the third pulse width interval are determined; the pulse width of the first pulse width interval is used to indicate the rotational speed for controlling the motor to reverse, the pulse width of the second pulse width interval is used to indicate that the rotational speed of the motor is zero, the pulse width of the third pulse width interval is used to indicate the rotational speed for controlling the motor to rotate forward, and the pulse width of the first pulse width interval is less than the pulse width of the third pulse width interval; the first throttle parameter, the second throttle parameter, and the third throttle parameter of the motor are determined; the first throttle parameter is the throttle parameter with a non-zero throttle percentage and used to control the motor to reverse, the second throttle parameter is the throttle parameter with a throttle percentage of zero, and the third throttle parameter is the throttle parameter with a non-zero throttle percentage and used to control the motor to rotate forward; by constructing a mapping relationship between the first pulse width interval and the first throttle parameter, a mapping relationship between the second pulse width interval and the second throttle parameter, and a mapping relationship between the third pulse width interval and the third throttle parameter, the second mapping relationship table is determined. By adopting this optional solution, it is possible to make each throttle parameter have a corresponding effective pulse width, so that the first motor can be effectively controlled by means of the first control signal.
[0071] Among them, the pulse width interval of the first control signal refers to the pulse width interval segment occupied by the pulses that the first control signal can be used to adjust and control the motor. For example, the pulse width interval of the first control signal can be from 1 millisecond to 2 milliseconds.
[0072] Specifically, based on the pulse width interval of the first control signal, the first pulse width interval, the second pulse width interval, and the third pulse width interval can be determined. That is, it is equivalent to dividing the pulse width interval into three interval segments, and the pulse width of the first pulse width interval is less than the pulse width of the third pulse width interval. The pulse width of the first pulse width interval can be used to indicate the rotational speed for controlling the motor to reverse, the pulse width of the second pulse width interval can be used to indicate that the rotational speed of the motor is zero, and the pulse width of the third pulse width interval is used to indicate the rotational speed for controlling the motor to rotate forward. For example, taking the pulse width interval of the first control signal from 1 millisecond to 2 milliseconds as an example, the determined first pulse width interval can be from 1 millisecond to 1.4 milliseconds, the second pulse width interval can be from 1.4 milliseconds to 1.6 milliseconds, and the third pulse width interval can be from 1.6 milliseconds to 2 milliseconds.
[0073] Then, the first throttle parameter, the second throttle parameter, and the third throttle parameter of the motor are determined. Among them, the first throttle parameter is the throttle parameter with a non-zero throttle percentage and used to control the motor to reverse, the second throttle parameter is the throttle parameter with a throttle percentage of zero, and the third throttle parameter is the throttle parameter with a non-zero throttle percentage and used to control the motor to rotate forward. For example, the first throttle parameter can be any value within the range [-100%, 0%), but the first throttle parameter does not include the case where the throttle percentage is zero; the first throttle parameter can be set as a negative throttle parameter, which can be used to control the motor to reverse. The second throttle parameter can be 0%. The third throttle parameter can be any value within the range (0%, 100%], but the third throttle parameter does not include the case where the throttle percentage is zero; the third throttle parameter can be set as a positive throttle parameter, which can be used to control the motor to rotate forward.
[0074] Then, by constructing a mapping relationship between the first pulse width interval and the first throttle parameter, a mapping relationship between the second pulse width interval and the second throttle parameter, and a mapping relationship between the third pulse width interval and the third throttle parameter, the second mapping relationship table can be determined.
[0075] It should be noted that when constructing the mapping relationship between the first pulse width interval and the first throttle parameter, each first throttle parameter should be able to map to a unique pulse width value within the first pulse width interval. Similarly, when constructing the mapping relationship between the third pulse width interval and the third throttle parameter, each third throttle parameter should also be able to map to a unique pulse width value within the third pulse width interval. And the pulse width values within the second pulse width interval all correspond to the same second throttle parameter.
[0076] Exemplarily, Figure 4 is a schematic diagram of the effect of a second mapping relationship table provided by an embodiment of the present invention. As Figure 4 shown, Figure 4 the horizontal axis represents the PWM pulse width, 1ms to 2ms is the pulse width interval of the first control signal, the first pulse width interval is 1ms to 1.45ms, and the first throttle parameter, that is, the negative throttle parameter, is mapped within this interval; the second pulse width interval is 1.45ms to 1.55ms, and the second throttle parameter, that is, the case where the throttle parameter is 0, is mapped within this interval; the third pulse width interval is 1.55ms to 2ms, and the third throttle parameter, that is, the positive throttle parameter, is mapped within this interval.
[0077] S240. Based on the first control signal, adjust the first motor corresponding to the second rotor so that the drone adjusts from the first flight attitude to the second flight attitude.
[0078] Optionally, adjusting the first motor corresponding to the second rotor based on the first control signal includes: receiving and parsing the first control signal through an electronic speed controller configured on the drone to determine a parsing result; adjusting the motor speed and motor rotation direction of the first motor based on the parsing result.
[0079] Specifically, the first control signal can be received by an electronic speed controller configured on the drone. After receiving the first control signal, the electronic speed controller can perform corresponding parsing to determine a parsing result. Then, based on the parsing result, the motor speed and motor rotation direction of the first motor are adjusted to enable the drone to adjust from the first flight attitude to the second flight attitude.
[0080] S250. Start the headless mode and control the drone to fly back to a preset position.
[0081] In the technical solution of the embodiment of the present invention, if it is detected that a power failure occurs in the first rotor of the drone, the first flight attitude of the drone is determined. The first flight attitude is used to indicate the pitch angle obtained in real time after the power failure of the first rotor of the drone; the motor rotation direction of the first motor and the throttle parameter of the first motor are determined through the first flight attitude; the first control signal is determined based on the motor rotation direction and throttle parameter of the first motor; based on the first control signal, the first motor corresponding to the second rotor is adjusted to enable the drone to adjust from the first flight attitude to the second flight attitude. The second flight attitude is used to indicate the pitch angle that can ensure that the drone will not roll over; at the same time, the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions. By alternately adjusting the steering of the second rotor in the forward and reverse directions in this way, it is equivalent to enabling the second rotor to alternately generate positive and negative pulling forces. This can ensure that the second rotor does not only generate a pulling force in a certain fixed direction, but alternately generates positive and negative pulling forces, so that the pulling force generated by the second rotor can be balanced from a macroscopic time perspective, and the drone can be kept balanced from a macroscopic perspective, avoiding rollover. Then, by starting the headless mode, the drone is controlled to fly back to the preset position. This solution can, in the case of a single rotor power failure of a quadcopter drone, without adding additional hardware devices, ensure that the drone does not roll over by alternately adjusting the forward and reverse rotations of the second rotor, significantly reducing the probability of falling after single power failure, and at the same time, cooperating with the dynamic headless mode, maintaining the controllability of the drone. The solution is economical and feasible.
[0082] Figure 5The figure is a schematic structural diagram of a drone control device provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of controlling a quadcopter drone after a single power failure. The drone control device can be implemented in the form of software and / or hardware and is generally integrated on any electronic device with network communication functions. The electronic device can be a mobile terminal, a PC, or a server, etc. As Figure 5 shown, the drone control device according to the embodiment of the present invention may include a flight attitude determination module 510, a flight attitude adjustment module 520, and a fly-back control module 530. Among them:
[0083] The flight attitude determination module 510 is configured to determine the first flight attitude of the drone if a power failure of the first rotor of the drone is detected. The first flight attitude is used to indicate the pitch angle of the drone obtained in real time after the power failure of the first rotor of the drone.
[0084] The flight attitude adjustment module 520 is configured to perform steering adjustment and speed adjustment on the second rotor of the drone according to the first flight attitude, so as to adjust the drone from the first flight attitude to the second flight attitude. The second flight attitude is used to indicate the pitch angle that can ensure that the drone will not roll over. The steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions. The second rotor and the first rotor are the rotors corresponding to the two ends of the same diagonal line in the drone.
[0085] The fly-back control module 530 is configured to activate the headless mode and control the drone to fly back to a preset position.
[0086] In the technical solution of the embodiment of the present invention, the flight attitude determination module detects whether a power failure occurs in the first rotor of the UAV. In the case of a power failure, the first flight attitude of the UAV is determined. The first flight attitude is used to indicate the pitch angle obtained in real time after the power failure occurs in the first rotor of the UAV. Then, the flight attitude adjustment module adjusts the steering and speed of the second rotor of the UAV according to the first flight attitude, where the second rotor is the rotor diagonal to the first rotor, so that the UAV is adjusted from the first flight attitude to the second flight attitude. The second flight attitude is used to indicate the pitch angle that can ensure that the UAV does not roll over. At the same time, the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions. By alternately adjusting the steering of the second rotor in the forward and reverse directions like this, it is equivalent to enabling the second rotor to alternately generate forward and reverse pulling forces, which can ensure that the second rotor does not only generate a pulling force in a certain fixed direction, but alternately generates forward and reverse pulling forces, so that the pulling force generated by the second rotor can be balanced from a macroscopic time perspective, and thus the UAV can maintain balance from a macroscopic perspective and avoid rolling over. Then, the return control module starts the headless mode to control the UAV to fly back to the preset position. This solution can, in the case of a power failure in a single rotor of a quadrotor UAV, without adding additional hardware devices, ensure that the UAV does not roll over by alternately adjusting the forward and reverse rotations of the second rotor, can significantly reduce the probability of falling after a single power failure, and at the same time cooperate with the dynamic headless mode to maintain the controllability of the UAV. The solution is economical and feasible.
[0087] As an optional but non-limiting implementation manner, the flight attitude adjustment module 520 includes a parameter determination unit, a first control signal determination unit, and a flight attitude adjustment unit. Among them:
[0088] The parameter determination unit is used to determine the motor steering of the first motor and the throttle parameter of the first motor through the first flight attitude; the first motor is the motor configured corresponding to the second rotor; the throttle parameter is used to control the throttle size of the first motor;
[0089] The first control signal determination unit is used to determine a first control signal based on the motor steering and the throttle parameter of the first motor;
[0090] The flight attitude adjustment unit is used to adjust the first motor corresponding to the second rotor based on the first control signal, so that the UAV is adjusted from the first flight attitude to the second flight attitude.
[0091] As an optional but non-limiting implementation manner, the parameter determination unit includes a pitch angle determination subunit, a first pulling force determination subunit, and a throttle parameter determination subunit. Among them:
[0092] The pitch angle determination subunit is configured to determine the pitch angle corresponding to the drone in the first flight attitude through an inertial measurement unit configured on the drone;
[0093] The first pulling force determination subunit is configured to determine the motor rotation direction and the first pulling force of the first motor based on the pitch angle of the drone; the motor rotation direction is the rotation direction required for the drone to adjust from the first flight attitude to the second flight attitude; the first pulling force is used to adjust the attitude of the drone so that the drone adjusts from the first flight attitude to the second flight attitude;
[0094] The throttle parameter determination subunit is configured to determine the throttle parameter of the first motor based on the first pulling force.
[0095] As an optional but non-limiting implementation manner, the first pulling force determination subunit is specifically configured to: if the pitch angle of the drone is greater than a preset pitch angle, determine that the motor rotation direction of the first motor is reverse, and determine the first pulling force based on the pitch angle; if the pitch angle of the drone is less than the preset pitch angle, determine that the motor rotation direction of the first motor is forward, and determine the first pulling force based on the pitch angle; wherein, the magnitude of the pitch angle is proportional to the magnitude of the first pulling force.
[0096] As an optional but non-limiting implementation manner, the throttle parameter determination subunit is specifically configured to: determine the throttle parameter based on the first pulling force and a first mapping relationship table; the first mapping relationship table is used to indicate the mapping relationship between the pulling force generated by the second rotor and the throttle parameter of the corresponding first motor used.
[0097] As an optional but non-limiting implementation manner, the first control signal determination unit includes a pulse width determination subunit and a first control signal determination subunit. Wherein:
[0098] The pulse width determination subunit is configured to determine the pulse width adopted by the first motor of the drone based on the throttle parameter value and a second mapping relationship table; the second mapping relationship table is used to indicate the mapping relationship between the throttle parameter value of the first motor and the pulse width to be adopted by the first motor, and the pulse width is used to make the first motor generate a motor speed matching the pulse width;
[0099] The first control signal determination subunit is configured to generate a first control signal according to the pulse width adopted by the first motor of the drone and the rotation direction of the first motor.
[0100] As an optional but non-limiting implementation manner, the second mapping relationship table is determined in the following manner:
[0101] Determine a first pulse width interval, a second pulse width interval, and a third pulse width interval based on the pulse width interval of the first control signal; the pulse width of the first pulse width interval is used to indicate the rotational speed for controlling the motor to reverse, the pulse width of the second pulse width interval is used to indicate that the rotational speed of the motor is zero, the pulse width of the third pulse width interval is used to indicate the rotational speed for controlling the motor to rotate forward, and the pulse width of the first pulse width interval is less than the pulse width of the third pulse width interval;
[0102] Determine a first throttle parameter, a second throttle parameter, and a third throttle parameter of the motor; the first throttle parameter is a throttle parameter with a non-zero throttle percentage and is used to control the motor to reverse, the second throttle parameter is a throttle parameter with a throttle percentage of zero, and the third throttle parameter is a throttle parameter with a non-zero throttle percentage and is used to control the motor to rotate forward;
[0103] Determine the second mapping relationship table by constructing a mapping relationship between the first pulse width interval and the first throttle parameter, constructing a mapping relationship between the second pulse width interval and the second throttle parameter, and constructing a mapping relationship between the third pulse width interval and the third throttle parameter.
[0104] The drone control device provided by the embodiments of the present invention can be used to execute a drone control method, and has corresponding functional modules and beneficial effects for executing the drone control method.
[0105] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present invention.
[0106] Figure 6 It is a schematic structural diagram of an electronic device for implementing a drone control method provided by an embodiment of the present invention. Referring below to Figure 6 , which shows a schematic structural diagram of an electronic device 610 suitable for implementing an embodiment of the present invention. The terminal device in the embodiments of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0107] As Figure 6As shown, the electronic device 610 includes at least one processor 611 and a memory communicatively connected to the at least one processor 611, such as a read-only memory (ROM) 612, a random access memory (RAM) 613, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 611 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 612 or the computer program loaded from the storage unit 618 into the random access memory (RAM) 613. In the (RAM) 613, various programs and data required for the operation of the electronic device 610 can also be stored. The processor 611, the (ROM) 612, and the (RAM) 613 are connected to each other through a bus 614. An input / output (I / O) interface 615 is also connected to the bus 614.
[0108] Multiple components in the electronic device 610 are connected to the I / O interface 615, including: an input unit 616, such as a keyboard, a mouse, etc.; an output unit 617, such as various types of displays, speakers, etc.; a storage unit 618, such as a disk, an optical disc, etc.; and a communication unit 619, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 619 allows the electronic device 610 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0109] The processor 611 can be various general and / or special processing components with processing and computing capabilities. Some examples of the processor 611 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 611 executes the drone control method provided in any embodiment of the present invention.
[0110] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium. The computer program contains program codes for executing the drone control method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication unit 619, or installed from the storage unit 618, or installed from the ROM 612. When the computer program is executed by the processor 611, the above-mentioned functions defined in the drone control method of the embodiment of the present invention are executed.
[0111] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0112] The electronic device provided in the embodiment of the present invention and the unmanned aerial vehicle control method provided in the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be referred to in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0113] The embodiment of the present invention provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the unmanned aerial vehicle control method provided in the above embodiment.
[0114] It should be noted that the computer-readable medium in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0115] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0116] Computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0118] The units described in the embodiments of the present invention can be implemented in software or in hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself.
[0119] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0120] In the context of the present invention, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0121] The above description is only a preferred embodiment of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, a technical solution formed by mutually replacing the above features with (but not limited to) technical features having similar functions disclosed in the present invention.
[0122] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Certain features described in the context of separate embodiments can also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0123] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it is to be understood that the subject matter defined in any one of the above embodiments is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms of implementing any one of the above embodiments.
Claims
1. A method for controlling a drone, characterized in that, The unmanned aerial vehicle (UAV) is a quadrotor UAV, and the method includes: If a power failure is detected in the first rotor of the UAV, determine the first flight attitude of the UAV, where the first flight attitude is used to indicate the pitch angle of the UAV obtained in real time after the power failure occurs in the first rotor of the UAV; According to the first flight attitude, perform steering adjustment and speed adjustment on the second rotor of the UAV, so that the UAV is adjusted from the first flight attitude to the second flight attitude, where the second flight attitude is used to indicate the pitch angle that can ensure that the UAV will not roll over; the steering adjustment at least includes alternately adjusting the steering of the second rotor in the forward and reverse directions, and the second rotor and the first rotor are the rotors corresponding to the two ends of the same diagonal line in the UAV; Activate the headless mode and control the UAV to fly back to a preset position.
2. The method according to claim 1, wherein The performing steering adjustment and speed adjustment on the second rotor of the UAV according to the first flight attitude so that the UAV is adjusted from the first flight attitude to the second flight attitude includes: Determine the motor steering of the first motor and the throttle parameter of the first motor through the first flight attitude; the first motor is the motor configured for the second rotor; the throttle parameter is used to control the throttle size of the first motor; Based on the motor steering and the throttle parameter of the first motor, determine the first control signal; Based on the first control signal, adjust the first motor corresponding to the second rotor, so that the UAV is adjusted from the first flight attitude to the second flight attitude.
3. The method according to claim 2, characterized in that The determining the motor steering of the first motor and the throttle parameter of the first motor through the first flight attitude includes: Determine the pitch angle corresponding to the UAV in the first flight attitude through an inertial measurement unit configured on the UAV; Based on the pitch angle of the UAV, determine the motor steering of the first motor and the first pulling force; the motor steering is the steering required for the UAV to be adjusted from the first flight attitude to the second flight attitude; the first pulling force is used to adjust the attitude of the UAV so that the UAV is adjusted from the first flight attitude to the second flight attitude; Based on the first pulling force, determine the throttle parameter of the first motor.
4. The method according to claim 3, wherein The determining the motor steering of the first motor and the first pulling force based on the pitch angle of the UAV includes: If the pitch angle of the UAV is greater than the preset pitch angle, determine that the motor steering of the first motor is reverse, and determine the first pulling force based on the pitch angle; If the pitch angle of the UAV is less than the preset pitch angle, determine that the motor steering of the first motor is forward, and determine the first pulling force based on the pitch angle; Wherein, the magnitude of the pitch angle is proportional to the magnitude of the first pulling force.
5. The method according to claim 3, wherein The determining the throttle parameter based on the first pulling force includes: Based on the first pulling force and the first mapping table, determine the throttle parameter; the first mapping table is used to indicate the mapping relationship between the pulling force generated by the second rotor and the throttle parameter of the first motor used correspondingly.
6. The method according to claim 2, wherein Determining a first control signal based on the motor steering and the throttle parameter of the first motor includes: Determining the pulse width adopted by the first motor of the drone based on the throttle parameter value and a second mapping table; the second mapping table is used to indicate the mapping relationship between the throttle parameter value of the first motor and the pulse width to be adopted by the first motor, and the pulse width is used to enable the first motor to generate a motor speed matching the pulse width; Generating a first control signal according to the pulse width adopted by the first motor of the drone and the steering of the first motor.
7. The method according to claim 6, characterized in that, The second mapping table is determined in the following manner: Determining a first pulse width interval, a second pulse width interval, and a third pulse width interval based on the pulse width interval of the first control signal; the pulse width of the first pulse width interval is used to indicate the speed for controlling the motor to reverse, the pulse width of the second pulse width interval is used to indicate that the speed of the motor is zero, the pulse width of the third pulse width interval is used to indicate the speed for controlling the motor to rotate forward, and the pulse width of the first pulse width interval is less than the pulse width of the third pulse width interval; Determining a first throttle parameter, a second throttle parameter, and a third throttle parameter of the motor; the first throttle parameter is the throttle parameter with a non-zero throttle percentage and used to control the motor to reverse, the second throttle parameter is the throttle parameter with a throttle percentage of zero, and the third throttle parameter is the throttle parameter with a non-zero throttle percentage and used to control the motor to rotate forward; Determining the second mapping table by constructing a mapping relationship between the first pulse width interval and the first throttle parameter, constructing a mapping relationship between the second pulse width interval and the second throttle parameter, and constructing a mapping relationship between the third pulse width interval and the third throttle parameter.
8. A drone control device, characterized in that, The device includes: A flight attitude determination module, configured to determine the first flight attitude of the drone if a power failure occurs in the first rotor of the drone, where the first flight attitude is used to indicate the pitch angle of the drone obtained in real time after the power failure of the first rotor of the drone; A flight attitude adjustment module, configured to adjust the steering and speed of the second rotor of the drone according to the first flight attitude, so that the drone is adjusted from the first flight attitude to a second flight attitude, where the second flight attitude is used to indicate the pitch angle that can prevent the drone from tipping over; the steering adjustment includes at least alternately adjusting the steering of the second rotor forward and backward, and the second rotor and the first rotor are the rotors corresponding to the two ends of the same diagonal line in the drone; A fly-back control module, configured to activate the headless mode and control the drone to fly back to a preset position.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the drone control method according to any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the drone control method according to any one of claims 1-7 when executed by a computer processor.
Citation Information
Patent Citations
Motor seat capable of changing tilt angles of rotor surfaces of multi-rotor unmanned aerial vehicle
CN106986019A
Multi-rotor craft and control method, control device and flight control system thereof
CN107077142A
Attitude correction control system and method of a four-rotor aircraft
CN110806754A
High-error-tolerance-rate deformable four-rotor aircraft and control method
CN112158329A
Unmanned aerial vehicle rotor disturbance correction method and device
CN115683544A