UAV control method, device, electronic device and storage medium
By alternately adjusting the forward and reverse rotation of the second rotor of the quadcopter and controlling the headless mode, the rollover problem caused by the failure of a single power system was solved, and the balance and safe return of the drone were achieved.
Patent Information
- Application Number
- CN202510912623.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-03
AI Technical Summary
A quadrotor drone is prone to rollover when a single power system fails, causing a crash, resulting in economic losses and possibly a secondary accident.
By alternately adjusting the second rotor to rotate forward and reverse, the pulling force generated by the rotor is kept balanced, and the drone is controlled to return to the preset position in headless mode.
Without adding hardware equipment, the crash rate after single power failure is significantly reduced, maintaining the controllability and balance of the drone.
Smart Images

Figure CN120406553B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) flight control, and in particular to a UAV control method, device, electronic equipment, and storage medium. Background Art
[0002] If a quadcopter experiences a single powertrain failure during flight, the lift diagonal to the failed powertrain will drop dramatically, causing the drone to roll over or even crash. A rollover not only damages the drone but also incurs high repair costs, resulting in significant economic losses. If a drone crashes during logistics, transportation, or high-altitude inspections, it is highly likely to cause a secondary accident. Therefore, a control solution for quadcopters that experience a single powertrain failure is urgently needed. Summary of the Invention
[0003] The present invention provides a drone control method, device, electronic device and storage medium. These methods can prevent the drone from rolling over by alternately adjusting the forward and reverse rotation of the second rotor of a quad-rotor drone without adding any additional hardware when a single rotor of the drone experiences a power failure.
[0004] In a first aspect, the present invention provides a method for controlling a drone, comprising:
[0005] If a power failure of the first rotor of the drone is detected, determining a first flight attitude 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 of the first rotor of the drone occurs;
[0006] Adjusting the steering and speed of the second rotor of the UAV according to the first flight attitude so that the UAV is adjusted from the first flight attitude to a second flight attitude, wherein the second flight attitude is used to indicate a pitch angle required to prevent the UAV from rolling over; the steering adjustment includes at least alternatingly adjusting the steering of the second rotor in forward and reverse directions, wherein the second rotor and the first rotor are corresponding rotors on the same diagonal line of the UAV;
[0007] Start the headless mode and control the drone to fly back to the preset position.
[0008] In a second aspect, the present invention further provides a drone control device, comprising:
[0009] a flight attitude determination module, configured to determine a first flight attitude of the UAV if a power failure of the first rotor of the UAV is detected, wherein the first flight attitude indicates a pitch angle of the UAV acquired in real time after the power failure of the first rotor of the UAV occurs;
[0010] a flight attitude adjustment module, configured to adjust the steering and speed of the second rotor of the UAV according to the first flight attitude, so as to adjust the UAV from the first flight attitude to a second flight attitude, wherein the second flight attitude is used to indicate a pitch angle required to prevent the UAV from rolling over; the steering adjustment at least includes alternating forward and reverse adjustments to the steering of the second rotor, wherein the second rotor and the first rotor are corresponding rotors on the same diagonal line of the UAV;
[0011] The fly-back control module is used 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 for storing one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors 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, which, when executed by a computer processor, are used to execute the drone control method provided in any embodiment of the present invention.
[0017] According to a technical solution of an embodiment of the present invention, if a power failure is detected in a first rotor of a drone, a first flight attitude of the drone is determined, the first flight attitude indicating a pitch angle obtained in real time after the power failure of the first rotor of the drone occurs. Then, the steering and speed of the second rotor of the drone are adjusted based on the first flight attitude, wherein the second rotor is a rotor diagonally opposite the first rotor, so that the drone is adjusted from the first flight attitude to a second flight attitude indicating a pitch angle required to prevent the drone from rolling over. Furthermore, the steering adjustment includes at least alternating forward and reverse adjustments of the steering of the second rotor. This alternating forward and reverse adjustments of the steering of the second rotor is equivalent to enabling the second rotor to alternately generate forward and reverse pulling forces. This allows the second rotor to generate not only pulling forces in a fixed direction but also pulling forces in alternating directions, thereby maintaining the pulling forces generated by the second rotor in a balanced manner over a macroscopic time perspective, thereby maintaining the drone's balance over a macroscopic perspective and preventing rollover. Subsequently, the drone is controlled to return to a preset position by activating headless mode. This solution does not require additional hardware equipment when a single rotor of a quadcopter fails. Instead, it ensures that the drone does not roll over by alternately adjusting the forward and reverse rotation of the second rotor. This can significantly reduce the crash rate after a single power failure. At the same time, combined with the dynamic headless mode, the drone's controllability is maintained, making the solution economical and feasible.
[0018] The above content of the invention is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. 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 that the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 A schematic flow chart of a drone control method provided by an embodiment of the present invention;
[0021] Figure 2 A schematic flow chart of another drone control method provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a linear relationship between tension and throttle parameters provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the effect of a second mapping relationship table provided by an embodiment of the present invention;
[0024] Figure 5 A schematic structural diagram of a drone control device provided by an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of the structure of an electronic device for implementing a drone control method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying 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 described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0027] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders 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 respect.
[0028] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0029] It should be noted that the concepts of "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 or interdependence of the functions performed by these devices, modules or units.
[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 indicated 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 used for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] Figure 1This is a flow chart of a drone control method provided by an embodiment of the present invention. The embodiment of the present invention is applicable to controlling a quad-rotor drone after a single power failure occurs. The 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 into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server. Figure 1 As shown, the drone control method according to the embodiment of the present invention may include the following process:
[0033] S110: If a power failure of the first rotor of the drone is detected, a first flight attitude of the drone is determined, where the first flight attitude is used to indicate a pitch angle of the drone obtained in real time after the power failure of the first rotor of the drone occurs.
[0034] The UAV is a quad-rotor UAV having four rotors, which can be evenly distributed in four directions of the UAV to form two diagonal lines. The first rotor can be any one of the four rotors of the UAV.
[0035] If the first rotor of the drone malfunctions or is damaged, or the motor corresponding to the first rotor malfunctions, or the drive corresponding to the first rotor malfunctions, etc., it may cause a power failure in the first rotor of the drone, causing the first rotor to be unable to continue to provide lift.
[0036] Specifically, if a power failure is detected in the first rotor of the drone, the drone's first flight attitude can be determined by the inertial measurement unit or other relevant sensor measurement unit 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 power failure of the first rotor of the drone occurs. The pitch angle can reflect the angle between the drone's body and the horizontal plane. For example, the obtained first flight attitude can indicate that the angle between the current drone's body 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 UAV according to the first flight attitude 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 must be met to prevent the UAV from rolling over; the steering adjustment at least includes alternating forward and reverse adjustments to the steering of the second rotor, where the second rotor and the first rotor are corresponding rotors at both ends of the same diagonal line in the UAV.
[0038] It should be noted that if the first rotor fails, it will no longer be able to provide lift, which will cause the forces generated by all the remaining rotors to become unbalanced, causing the drone to lose stability and roll over or crash. The solution of this embodiment is designed to address this situation. It mainly prevents the drone from rolling over or crashing by alternately adjusting the forward and reverse rotation of the other rotor diagonally opposite the first rotor.
[0039] Specifically, since the first flight attitude can indicate the current pitch condition of the drone, the steering and speed adjustment of the second rotor of the drone can be performed according to the first flight attitude, so that the drone can adjust 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 line in the drone, that is, 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 must be met to prevent the drone from rolling over. For example, the pitch angle that must be met to prevent the drone from rolling over can be 0 degrees, 0.5 degrees, or 1 degree, etc. As long as it is a pitch angle that must be met to prevent the drone from rolling over, it is acceptable and will not be limited in detail here. In other words, the second flight attitude can be set differently based on actual needs.
[0040] To adjust the drone from the first flight attitude to the second flight attitude, this embodiment, during the process of adjusting the steering of the second rotor, at least alternately adjusts the steering of the second rotor in a forward and reverse direction, effectively controlling the second rotor to alternately rotate forward and reverse. It is understood that, assuming the second rotor is normally rotating in a forward direction, it can provide a positive thrust during normal forward rotation. If the second rotor is adjusted from forward rotation to reverse rotation, it can then switch to providing a reverse thrust. Thus, by alternately adjusting the steering of the second rotor in a forward and reverse direction, the second rotor can alternately generate positive and reverse thrust. This ensures that the second rotor does not generate thrust in a fixed direction, but rather generates both positive and reverse thrust alternately. This allows the thrust generated by the second rotor to maintain balance over a macroscopic time perspective, thus enabling the drone to maintain balance over a macroscopic perspective and prevent rollover.
[0041] Of course, after determining the first flight attitude of the UAV, it is naturally possible to determine the direction and degree of adjustment that needs to be applied, and also to determine the direction and speed of the second rotor to be adjusted, etc., so that the steering and speed of the second rotor of the UAV can be adjusted to adjust the UAV from the first flight attitude to the second flight attitude.
[0042] It should be noted that extensive experimental analysis has shown that when the second rotor rotates in the reverse direction, it can provide at least half of the normal pulling force to the drone. This half of the pulling force, when alternating with the normal pulling force corresponding to forward rotation, can continuously adjust the drone's posture to maintain a non-rolling or even stable state. Of course, in actual application, this alternating adjustment is performed at a high frequency, up to 400 or even 500 times per minute.
[0043] S130, start the headless mode and control the drone to fly back to the preset position.
[0044] Among them, the headless mode is an operating mode that simplifies the flight control of the drone. In headless mode, the flight of the drone no longer depends on the direction of the drone's nose, but is controlled based on the position of the drone at takeoff. In short, in 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, and no longer needs to be controlled based on the direction of the drone's own nose. For example, after the drone turns on the headless mode, if the operator applies an operation on the remote control to control the drone to fly to the left, the drone will fly to the left; if the operator applies an operation on the remote control to control the drone to fly in the direction close to the operator, the drone will fly in the direction of the operator, thereby approaching the operator.
[0045] Specifically, by adjusting the steering and speed of the second rotor, the drone can be kept from tipping over. The drone can then enter headless mode. In this mode, even if the drone spins, the drone's specific nose orientation can be controlled without excessive consideration. The only consideration is the macroscopic adjustment of the drone's direction based on a preset position, allowing the drone to return to its preset position. The preset position can be the drone's starting point or a pre-designated landing location.
[0046] According to a technical solution of an embodiment of the present invention, if a power failure is detected in a first rotor of a drone, a first flight attitude of the drone is determined, the first flight attitude indicating a pitch angle obtained in real time after the power failure of the first rotor of the drone occurs. Then, the steering and speed of the second rotor of the drone are adjusted based on the first flight attitude, wherein the second rotor is a rotor diagonally opposite the first rotor, so that the drone is adjusted from the first flight attitude to a second flight attitude indicating a pitch angle required to prevent the drone from rolling over. Furthermore, the steering adjustment includes at least alternating forward and reverse adjustments of the steering of the second rotor. This alternating forward and reverse adjustments of the steering of the second rotor is equivalent to enabling the second rotor to alternately generate forward and reverse pulling forces. This allows the second rotor to generate not only pulling forces in a fixed direction but also pulling forces in alternating directions, thereby maintaining the pulling forces generated by the second rotor in a balanced manner over a macroscopic time perspective, thereby maintaining the drone's balance over a macroscopic perspective and preventing rollover. Subsequently, the drone is controlled to return to a preset position by activating headless mode. This solution does not require additional hardware equipment when a single rotor of a quadcopter fails. Instead, it ensures that the drone does not roll over by alternately adjusting the forward and reverse rotation of the second rotor. This can significantly reduce the crash rate after a single power failure. At the same time, combined with the dynamic headless mode, the drone's controllability is maintained, making the solution economical and feasible.
[0047] Figure 2 This is a flow chart of another drone control method provided by an embodiment of the present invention. The technical solution of this embodiment is based on the technical solution of the above embodiment. In the above embodiment, the second rotor of the drone is adjusted in steering and speed according to the first flight attitude, so as to further optimize the process of adjusting the drone from the first flight attitude to the second flight attitude. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the drone control method according to the embodiment of the present invention may include the following process:
[0048] S210: If a power failure of the first rotor of the UAV is detected, a first flight attitude of the UAV is determined, where the first flight attitude is used to indicate a pitch angle of the UAV obtained in real time after the power failure of the first rotor of the UAV occurs.
[0049] S220. Determine the motor direction of the first motor and the throttle parameter of the first motor through the first flight posture; 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.
[0050] Each of the four rotors of the drone is equipped with a motor to drive the rotation of the corresponding rotor. The first motor is the motor corresponding to the second rotor.
[0051] The throttle parameter controls the throttle of the first motor. It can be expressed as a percentage. For example, 0% represents the throttle at zero, the minimum setting; 100% represents the throttle at full throttle. By adjusting the throttle parameter of the first motor, you can adjust the speed of the first motor, thereby changing the speed of the first rotor.
[0052] Specifically, the first flight attitude can be used to determine the current tilt of the drone relative to the horizontal plane. This tilt can then be used to determine the direction and degree of adjustment to be made to the first rotor. In other words, the first flight attitude can be used to determine the direction of rotation of the first motor and the throttle parameters of the first motor.
[0053] As an optional but non-limiting implementation, determining the motor steering of the first motor and the throttle parameters of the first motor based on the first flight attitude includes: determining the corresponding pitch angle of the drone in the first flight attitude using an inertial measurement unit configured on the drone; determining the motor steering of the first motor and a first pulling force based on the drone's pitch angle; the motor steering being the steering required when the drone adjusts from the first flight attitude to a second flight attitude; the first pulling force being used to adjust the drone's attitude so as to adjust the drone from the first flight attitude to the second flight attitude; and determining the throttle parameters of the first motor based on the first pulling force. Using this optional solution, the direction and details of the adjustment of the first motor can be determined based on the determined pitch angle, thereby enabling more accurate determination of the motor steering and throttle parameters of the first motor.
[0054] The Inertial Measurement Unit (IMU) is a sensor device primarily composed of gyroscopes, accelerometers, and magnetometers. It can be used to measure information such as angular velocity, acceleration, and yaw angle along the X, Y, and Z axes of a drone during flight. The IMU can also process this information using a fusion algorithm to determine the drone's pitch angle.
[0055] Specifically, after the drone's pitch angle corresponding to the first flight attitude is determined by the inertial measurement unit (IMU) on the drone, the motor steering and first tension of the first motor can be determined based on the pitch angle. The motor steering is the steering required when the drone adjusts from the first flight attitude to the second flight attitude; the first tension can be used to adjust the drone's attitude from the first flight attitude to the second flight attitude. Subsequently, based on the first tension, the required throttle level for the first motor can be determined, thereby determining the throttle parameters for the first motor.
[0056] As an optional but non-limiting implementation, determining the motor direction of the first motor and the first pulling force based on the drone's pitch angle includes: if the drone's pitch angle is greater than a preset pitch angle, determining the motor direction of the first motor to be reverse, and determining the first pulling force based on the pitch angle; if the drone's pitch angle is less than the preset pitch angle, determining the motor direction of the first motor to be forward, and determining the first pulling force based on the pitch angle; wherein the pitch angle is proportional to the first pulling force. This optional solution allows the determination of the required pulling force and adjustment direction based on the drone's pitch angle, thereby enabling subsequent solutions to determine more accurate and appropriate throttle parameters.
[0057] The preset pitch angle includes a first pitch angle and a 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. In other words, the second pitch angle can be an angle value close to the first pitch angle. For example, the second pitch angle can be 0.01 degrees. The preset pitch angle can be set differently based on actual needs.
[0058] When the pitch angle of the drone is greater than the preset pitch angle, it means that the drone is in an upward pitch attitude, and a downward force needs to be applied to the drone to correct the upward pitch of the drone. At this time, it can be determined that the motor direction of the first motor is reversed, so that the second rotor can be driven to rotate in the opposite direction, and the first pulling force is determined based on the pitch angle, so that the second rotor generates a downward first pulling force after rotation, so as to achieve the correction adjustment of the upward pitch of the drone.
[0059] The same principle applies. When the pitch angle of the drone is less than the preset pitch angle, it indicates that the drone is in a downward pitch posture. An upward force needs to be applied to the drone to correct the downward pitch of the drone. At this time, it can be determined that the motor direction of the first motor is forward, so that the second rotor can be driven to rotate forward, and the first pulling force is determined based on the pitch angle, so that the second rotor generates an upward first pulling force after rotation, thereby realizing the correction adjustment of the downward pitch of the drone.
[0060] It is understood that the pitch angle is proportional to the first tension. The larger the pitch angle, the greater the first tension required. The smaller the pitch angle, the smaller the first tension required.
[0061] It should be noted that when the drone's pitch angle is equal to the preset pitch angle, it means that the drone is already in a state where it will not roll over, and at this moment, the drone's attitude does not need to be adjusted. However, as time goes by, if the drone's attitude is not controlled, the drone will inevitably evolve from a "state where it will not roll over" to a "state where it will roll over." However, this embodiment continuously obtains the drone's attitude in real time. As long as the drone is not in a state where it will not roll over, it continuously adjusts the drone's attitude based on the drone's pitch angle, so that the drone's attitude adjustment always tends to be adjusted toward the "pitch angle required to prevent rollover."
[0062] As an optional but non-limiting implementation, determining the throttle parameter based on the first thrust includes determining the throttle parameter based on the first thrust and a first mapping table indicating a mapping relationship between the thrust generated by the second rotor and the throttle parameter of the corresponding first motor. This optional solution provides a reference for determining the throttle parameter based on the first thrust, thereby determining a throttle parameter that matches the first thrust.
[0063] The first mapping relationship table is used to indicate the mapping relationship between the thrust generated by the second rotor and the corresponding throttle parameters of the first motor used. The first mapping relationship can be obtained by performing actual experimental measurements on the thrust that the rotor can generate and the corresponding throttle parameters used.
[0064] For example, Figure 3 A schematic diagram of the linear relationship between tension and throttle parameters provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the horizontal axis represents "pull force". If the pull force value is positive, it means the pull force is in the forward direction; if the pull force value is negative, it means the pull force is in the reverse direction. The vertical axis represents "throttle parameter". Similarly, if the throttle parameter value is positive, it means the throttle parameter when the motor is rotating forward; if the throttle parameter value is negative, it means the throttle parameter when the motor is rotating reversely. Figure 3 It can be seen that a first mapping relationship table can be determined based on such a linear relationship. In the first mapping relationship table, corresponding throttle parameters can be determined based on the tension value.
[0065] Then, after determining the first pulling force, the throttle parameter can be determined by using the first mapping table. Figure 3The linear relationship between the pulling force and the throttle parameter shown can also be determined by using multiple data pairs between the pulling force and the throttle parameter measured experimentally, and directly constructing such multiple data pairs into a first mapping relationship table. It should be noted that the relationship between "pulling force" and "throttle parameter" can be linear, such as Figure 3 The linear relationship shown can also be nonlinear, for example, a nonlinear relationship in the form of an exponential function. Specific differentiation can be made based on actual conditions and will not be further limited here.
[0066] S230 : Determine a first control signal based on motor steering and throttle parameters of the first motor.
[0067] Specifically, after determining the motor steering and throttle parameters of the first motor, a first control signal can be determined based on the motor steering and throttle parameters. For example, the first control signal can be a PWM (Pulse Width Modulation) signal. After being generated, the first control signal can be sent to an electronic speed controller (ESC) configured on the drone, causing the ESC to adjust the motor steering and throttle parameters of the first motor based on the received first control signal.
[0068] As an optional but non-limiting implementation, determining a first control signal based on the motor steering and throttle parameters of a first motor includes: determining a pulse width for 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 a mapping relationship between the throttle parameter value of the first motor and the pulse width to be used by the first motor, the pulse width being used to cause the first motor to generate a motor speed that matches the pulse width; and generating the first control signal based on the pulse width used by the first motor of the drone and the steering direction of the first motor. This optional solution enables the second mapping table to determine a pulse width that matches the throttle parameter value, thereby generating a precise first control signal.
[0069] Specifically, the second mapping table can be predetermined and can be used to indicate the mapping relationship between the throttle parameter value of the first motor and the pulse width to be used by the first motor. Once the throttle parameter is determined, the pulse width corresponding to the throttle parameter can be determined based on the second mapping table. The pulse width can be used to enable the first motor to generate a motor speed that matches the pulse width. Furthermore, a first control signal can be generated based on the pulse width used by the drone's first motor and the direction of rotation of the first motor.
[0070] As an optional but non-limiting implementation method, the second mapping relationship table is determined in the following manner: based on the pulse width interval of the first control signal, a first pulse width interval, a second pulse width interval and a third pulse width interval are determined; the pulse width of the first pulse width interval is used to indicate the speed of 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, and the pulse width of the third pulse width interval is used to indicate the speed of controlling the motor to rotate forward, and the pulse width of the first pulse width interval is smaller 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 a throttle parameter with a throttle percentage that is not zero 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 throttle percentage that is not zero and is used to control the motor to rotate forward; the second mapping relationship table is determined by establishing a mapping relationship between the first pulse width interval and the first throttle parameter, establishing a mapping relationship between the second pulse width interval and the second throttle parameter, and establishing a mapping relationship between the third pulse width interval and the third throttle parameter. By adopting this optional solution, each throttle parameter can have a corresponding effective pulse width, so that the first motor can be effectively controlled by means of the first control signal.
[0071] The pulse width interval of the first control signal refers to the pulse width interval corresponding to the pulse of the first control signal that can be used to adjust and control the motor. For example, the pulse width interval of the first control signal can be 1 millisecond to 2 milliseconds.
[0072] Specifically, based on the pulse width interval of the first control signal, a first pulse width interval, a second pulse width interval, and a 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 smaller 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 speed of controlling the motor to reverse, the pulse width of the second pulse width interval can be used to indicate that the speed of the motor is zero, and the pulse width of the third pulse width interval is used to indicate the speed of controlling the motor to rotate forward. For example, taking the pulse width interval of the first control signal as 1 millisecond to 2 milliseconds as an example, the determined first pulse width interval can be 1 millisecond to 1.4 milliseconds, the second pulse width interval can be 1.4 milliseconds to 1.6 milliseconds, and the third pulse width interval can be 1.6 milliseconds to 2 milliseconds.
[0073] Then, the first, second, and third throttle parameters of the motor are determined. The first throttle parameter is a throttle parameter when the throttle percentage is not zero and is used to control the motor to rotate in the reverse direction. The second throttle parameter is a throttle parameter when the throttle percentage is zero. The third throttle parameter is a throttle parameter when the throttle percentage is not zero and is used to control the motor to rotate in the forward direction. For example, the first throttle parameter can be any value in the interval [-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 to a negative throttle parameter, which can be used to control the motor to rotate in the reverse direction. The second throttle parameter can be 0%. The third throttle parameter can be any value in the interval (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 to a positive throttle parameter, which can be used to control the motor to rotate in the forward direction.
[0074] Then, a second mapping relationship table can be determined by establishing a mapping relationship between the first pulse width interval and the first throttle parameter, establishing a mapping relationship between the second pulse width interval and the second throttle parameter, and establishing a mapping relationship between the third pulse width interval and the third throttle parameter.
[0075] It should be noted that when establishing a mapping relationship between the first pulse width interval and the first throttle parameter, it is necessary to ensure that each first throttle parameter can be mapped to a unique pulse width value within the first pulse width interval. Similarly, when establishing a mapping relationship between the third pulse width interval and the third throttle parameter, it is also necessary to ensure that each third throttle parameter can be mapped to a unique pulse width value within the third pulse width interval. Pulse width values within the second pulse width interval all correspond to the same second throttle parameter.
[0076] For example, Figure 4 This is a schematic diagram of the effect of a second mapping relationship table provided by an embodiment of the present invention. Figure 4 As 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. The first throttle parameter is mapped in this interval, which is a negative throttle parameter. The second pulse width interval is 1.45ms to 1.55ms. The second throttle parameter is mapped in this interval, which is the case where the throttle parameter is 0. The third pulse width interval is 1.55ms to 2ms. The third throttle parameter is mapped in this interval, which is a positive throttle parameter.
[0077] S240: Based on the first control signal, adjust the first motor corresponding to the second rotor to adjust the UAV from the first flight attitude to the second flight attitude.
[0078] Optionally, the first motor corresponding to the second rotor is adjusted based on the first control signal, including: receiving and parsing the first control signal through an electronic speed regulator configured on the drone to determine the parsing result; and adjusting the motor speed and motor 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. Upon receiving the first control signal, the electronic speed controller can perform corresponding analysis to determine an analysis result. Based on the analysis result, the motor speed and motor direction of the first motor are adjusted to adjust the drone from the first flight attitude to the second flight attitude.
[0080] S250, start the headless mode and control the drone to fly back to the preset position.
[0081] According to a technical solution of an embodiment of the present invention, if a power failure of a first rotor of a drone is detected, a first flight attitude of the drone is determined, the first flight attitude being used to indicate a pitch angle obtained in real time after the power failure of the first rotor of the drone occurs; a motor steering direction of a first motor and a throttle parameter of the first motor are determined based on the first flight attitude; a first control signal is determined based on the motor steering direction and throttle parameter of the first motor; and based on the first control signal, the first motor corresponding to the second rotor is adjusted to adjust the drone from the first flight attitude to a second flight attitude, the second flight attitude being used to indicate a pitch angle required to prevent the drone from rolling over. Simultaneously, the steering adjustment includes at least alternating forward and reverse adjustments of the steering direction of the second rotor. By alternating forward and reverse adjustments of the steering direction of the second rotor, the second rotor is able to alternately generate forward and reverse pulling forces. This allows the second rotor to generate not only pulling forces in a fixed direction, but to alternately generate forward and reverse pulling forces, thereby maintaining the pulling forces generated by the second rotor in a balanced manner over a macroscopic time perspective, thereby maintaining the balance of the drone over a macroscopic perspective and preventing rollover. Next, by activating headless mode, the drone is controlled to fly back to the preset position. This solution eliminates the need for additional hardware in the event of a single rotor failure. Instead, it prevents the drone from tipping over by alternating forward and reverse rotation of the second rotor, significantly reducing the chance of a crash following a single power failure. Furthermore, the dynamic headless mode maintains the drone's controllability, making the solution economically feasible.
[0082] Figure 5This is a schematic diagram of the structure of a drone control device provided by an embodiment of the present invention. The embodiment of the present invention is applicable to controlling a quad-rotor drone after a single power failure occurs. The drone control device can be implemented in the form of software and / or hardware and is generally integrated into any electronic device with network communication function, such as a mobile terminal, PC or server. Figure 5 As shown, the drone control device of 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] A flight attitude determination module 510 is configured to determine a first flight attitude of the UAV if a power failure of the first rotor of the UAV is detected, wherein the first flight attitude indicates a pitch angle of the UAV acquired in real time after the power failure of the first rotor of the UAV occurs;
[0084] A flight attitude adjustment module 520 is configured to adjust the steering and speed of the second rotor of the UAV according to the first flight attitude, so as to adjust the UAV from the first flight attitude to a second flight attitude, wherein the second flight attitude indicates a pitch angle required to prevent the UAV from rolling over; the steering adjustment includes at least alternating forward and reverse adjustments to the steering of the second rotor, wherein the second rotor and the first rotor are corresponding rotors on the same diagonal line of the UAV;
[0085] The fly-back control module 530 is used to activate the headless mode and control the drone to fly back to a preset position.
[0086] The technical solution of the embodiment of the present invention is to detect whether a power failure occurs on the first rotor of the drone through a flight attitude determination module. In the event of a power failure, the first flight attitude of the drone is determined. The first flight attitude is used to indicate the pitch angle of the first rotor of the drone obtained in real time after the power failure occurs. Then, the flight attitude adjustment module adjusts the steering and speed of the second rotor of the drone according to the first flight attitude, wherein the second rotor is a rotor diagonally opposite to the first rotor, so that the drone is adjusted from the first flight attitude to a second flight attitude. The second flight attitude is used to indicate the pitch angle that must be met to prevent the drone from rolling over. At the same time, the steering adjustment includes at least alternating forward and reverse adjustments of the steering of the second rotor. By alternating forward and reverse adjustments of the steering of the second rotor, the second rotor can alternately generate forward and reverse pulling forces. This can ensure that the second rotor does not only generate pulling forces in a fixed direction, but also alternately generates forward and reverse pulling forces. Therefore, the pulling forces generated by the second rotor can be balanced from a macroscopic time perspective, thereby maintaining the balance of the drone from a macroscopic perspective and preventing rollover. Next, the flight control module activates headless mode, controlling the drone to return to the preset position. This solution eliminates the need for additional hardware in the event of a single rotor failure. Instead, it prevents the drone from tipping over by alternating forward and reverse rotation of the second rotor, significantly reducing the chance of a crash following a single power failure. Furthermore, the dynamic headless mode maintains the drone's controllability, making the solution economically viable.
[0087] As an optional but non-limiting implementation, the flight attitude adjustment module 520 includes a parameter determination unit, a first control signal determination unit, and a flight attitude adjustment unit.
[0088] a parameter determination unit, configured to determine a motor direction of a first motor and a throttle parameter of the first motor based on the first flight attitude; the first motor is a motor corresponding to the second rotor; the throttle parameter is used to control the throttle size of the first motor;
[0089] a first control signal determining unit, configured 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 as to adjust the UAV from the first flight attitude to the second flight attitude.
[0091] As an optional but non-limiting implementation, the parameter determination unit includes a pitch angle determination subunit, a first tension determination subunit, and a throttle parameter determination subunit.
[0092] a pitch angle determination subunit, configured to determine the pitch angle of the UAV corresponding to the first flight attitude by using an inertial measurement unit configured on the UAV;
[0093] a first tension determination subunit, configured to determine a motor steering direction of the first motor and a first tension force based on the pitch angle of the drone; the motor steering direction being the steering direction required for the drone to adjust from a first flight attitude to a second flight attitude; and the first tension force being used to adjust the attitude of the drone so as to adjust the drone from the first flight attitude to the second flight attitude;
[0094] A throttle parameter determination subunit is configured to determine a throttle parameter of the first motor based on the first pulling force.
[0095] As an optional but non-limiting implementation method, the first tension determination subunit is specifically used 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 tension 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 tension based on the pitch angle; wherein the magnitude of the pitch angle is proportional to the magnitude of the first tension.
[0096] As an optional but non-limiting implementation method, the throttle parameter determination subunit is specifically used to: determine the throttle parameter based on the first thrust and a first mapping relationship table; the first mapping relationship table is used to indicate the mapping relationship between the thrust generated by the second rotor and the throttle parameter of the corresponding first motor used.
[0097] As an optional but non-limiting implementation, the first control signal determination unit includes a pulse width determination subunit and a first control signal determination subunit.
[0098] a pulse width determination subunit, configured to determine a pulse width to be used by a first motor of the UAV based on the throttle parameter value and a second mapping relationship table; the second mapping relationship table being configured to indicate a mapping relationship between the throttle parameter value of the first motor and a pulse width to be used by the first motor, the pulse width being configured to cause the first motor to 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 a pulse width of the first motor of the drone and a direction of rotation of the first motor.
[0100] As an optional but non-limiting implementation, the second mapping relationship table is determined in the following manner:
[0101] A first pulse width interval, a second pulse width interval, and a third pulse width interval are determined 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 of 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, and the pulse width of the third pulse width interval is used to indicate the speed of controlling the motor to rotate forward, and the pulse width of the first pulse width interval is smaller than the pulse width of the third pulse width interval;
[0102] Determining 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 throttle percentage not being zero and used to control the motor to rotate in the reverse direction, the second throttle parameter is a throttle parameter with a throttle percentage being zero, and the third throttle parameter is a throttle parameter with a throttle percentage not being zero and used to control the motor to rotate in the forward direction;
[0103] The second mapping relationship table is determined by establishing a mapping relationship between the first pulse width interval and the first throttle parameter, establishing a mapping relationship between the second pulse width interval and the second throttle parameter, and establishing a mapping relationship between the third pulse width interval and the third throttle parameter.
[0104] The drone control device provided in the embodiment of the present invention can be used to execute the drone control method, and has corresponding functional modules and beneficial effects for executing the drone control method.
[0105] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned 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 distinguishing each other, and are not used to limit the scope of protection of the embodiments of the present invention.
[0106] Figure 6 This is a schematic diagram of the structure of an electronic device for implementing a drone control method provided by an embodiment of the present invention. Figure 6 , which shows a schematic structural diagram of an electronic device 610 suitable for implementing an embodiment of the present invention. The terminal devices in the embodiments of the present invention may include, but are 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), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0107] like Figure 6As shown, electronic device 610 includes at least one processor 611 and memory, such as read-only memory (ROM) 612 and random access memory (RAM) 613, communicatively connected to at least one processor 611. The memory stores computer programs executable by the at least one processor. Processor 611 can perform various appropriate actions and processes based on the computer programs stored in ROM 612 or loaded from storage unit 618 into RAM 613. RAM 613 can also store various programs and data required for the operation of electronic device 610. Processor 611, ROM 612, and RAM 613 are interconnected via bus 614. An input / output (I / O) interface 615 is also connected to 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 magnetic disk, an optical disk, 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 via a computer network such as the Internet and / or various telecommunication networks.
[0109] Processor 611 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of processor 611 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, or microcontroller. 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 comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the drone control method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via 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-described functions defined in the drone control method of the embodiment of the present invention are performed.
[0111] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0112] The electronic device provided in the embodiment of the present invention and the drone control method provided in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0113] An embodiment of the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the drone control method provided in the above embodiment.
[0114] It should be noted that the computer-readable medium described above in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0115] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0116] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, 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 cases involving a remote computer, the remote computer may 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0117] The flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] The units involved in the embodiments of the present invention may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0119] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0120] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on 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), optical fibers, a portable compact disk 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 merely an illustration of preferred embodiments of the present invention and the underlying technical principles. Those skilled in the art should understand that the scope of the present invention is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the aforementioned concepts. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this invention.
[0122] In addition, although adopting specific order to describe each operation, this should not be interpreted as requiring these operations to be executed in the specific order shown or in sequential order.Under certain environment, multitasking and parallel processing may be advantageous.Similarly, although comprising some specific implementation details in the above discussion, these should not be interpreted as limiting the scope of the present invention.Some features described in the context of independent embodiment can also be implemented in single embodiment in combination.On the contrary, the various features described in the context of independent embodiment also can be implemented in multiple embodiments individually or in the mode of any suitable subcombination.
[0123] Although the subject matter has been described in terms of structural features and / or method logic actions, it should be understood that the subject matter defined in any of the above embodiments is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing any of the above embodiments.
Claims
1. A drone control method, characterized in that: The UAV is a quad-rotor UAV, and the method includes: If a power failure of the first rotor of the drone is detected, determining a first flight attitude 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 of the first rotor of the drone occurs; Adjusting the steering and speed of the second rotor of the UAV according to the first flight attitude so that the UAV is adjusted from the first flight attitude to a second flight attitude, wherein the second flight attitude is used to indicate a pitch angle required to prevent the UAV from rolling over; the steering adjustment includes at least alternatingly adjusting the steering of the second rotor in forward and reverse directions, wherein the second rotor and the first rotor are corresponding rotors on the same diagonal line of the UAV; Activate the headless mode and control the drone to fly back to a preset position; The step of adjusting the steering direction and the rotation speed of the second rotor of the UAV according to the first flight attitude so as to adjust the UAV from the first flight attitude to the second flight attitude includes: Determining a motor direction of a first motor and a throttle parameter of the first motor according to the first flight attitude; the first motor is a motor corresponding to the second rotor; the throttle parameter is used to control the throttle size of the first motor; determining a first control signal based on the motor steering and the throttle parameter of the first motor; The determining of the first control signal based on the motor steering and the throttle parameter of the first motor includes: Determining a pulse width used by a first motor of the drone based on the throttle parameter value and the second mapping relationship table; generating a first control signal according to a pulse width of a first motor of the drone and a direction of rotation of the first motor; Based on the first control signal, the first motor corresponding to the second rotor is adjusted to adjust the UAV from a first flight attitude to a second flight attitude.
2. The method according to claim 1, characterized in that The determining the motor steering of the first motor and the throttle parameter of the first motor according to the first flight posture includes: Determining the pitch angle of the drone in the first flight attitude by an inertial measurement unit configured on the drone; determining a motor steering and a first pulling force of the first motor based on the pitch angle of the drone; the motor steering being the steering required for adjusting the drone from a first flight attitude to a second flight attitude; and the first pulling force being used to adjust the attitude of the drone so as to adjust the drone from the first flight attitude to the second flight attitude; A throttle parameter of the first motor is determined based on the first pulling force.
3. The method according to claim 2, characterized in that The determining the motor steering and the first pulling force of the first motor based on the pitch angle of the drone includes: If the pitch angle of the drone is greater than a preset pitch angle, determining that the motor direction of the first motor is reverse, and determining the first pulling force based on the pitch angle; If the pitch angle of the drone is less than a preset pitch angle, determining that the motor direction of the first motor is forward rotation, and determining the first pulling force based on the pitch angle; The magnitude of the pitch angle is proportional to the magnitude of the first pulling force.
4. The method according to claim 2, characterized in that The determining the throttle parameter based on the first pulling force includes: The throttle parameter is determined based on the first thrust and a first mapping relationship table; the first mapping relationship table is used to indicate a mapping relationship between the thrust generated by the second rotor and the throttle parameter of the corresponding first motor used.
5. The method according to claim 1, wherein 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. The pulse width is used to enable the first motor to generate a motor speed matching the pulse width.
6. The method according to claim 1, characterized in that The second mapping relationship table is determined in the following manner: A first pulse width interval, a second pulse width interval, and a third pulse width interval are determined 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 of the motor for reverse rotation, the pulse width of the second pulse width interval is used to indicate that the speed of the motor is zero, and the pulse width of the third pulse width interval is used to indicate the speed of the motor for forward rotation, and the pulse width of the first pulse width interval is smaller 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 a throttle parameter with a throttle percentage not being zero and used to control the motor to rotate in the reverse direction, the second throttle parameter is a throttle parameter with a throttle percentage being zero, and the third throttle parameter is a throttle parameter with a throttle percentage not being zero and used to control the motor to rotate in the forward direction; The second mapping relationship table is determined by establishing a mapping relationship between the first pulse width interval and the first throttle parameter, establishing a mapping relationship between the second pulse width interval and the second throttle parameter, and establishing a mapping relationship between the third pulse width interval and the third throttle parameter.
7. A drone control device, characterized in that: The device comprises: a flight attitude determination module, configured to determine a first flight attitude of the UAV if a power failure of the first rotor of the UAV is detected, wherein the first flight attitude indicates a pitch angle of the UAV acquired in real time after the power failure of the first rotor of the UAV occurs; a flight attitude adjustment module, configured to adjust the steering and speed of the second rotor of the UAV according to the first flight attitude, so as to adjust the UAV from the first flight attitude to a second flight attitude, wherein the second flight attitude is used to indicate a pitch angle required to prevent the UAV from rolling over; the steering adjustment at least includes alternating forward and reverse adjustments to the steering of the second rotor, wherein the second rotor and the first rotor are corresponding rotors on the same diagonal line of the UAV; The flight attitude adjustment module includes: a parameter determination unit, configured to determine a motor direction of a first motor and a throttle parameter of the first motor based on the first flight attitude; the first motor is a motor corresponding to the second rotor; the throttle parameter is used to control the throttle size of the first motor; a first control signal determining unit, configured to determine a first control signal based on the motor steering and the throttle parameter of the first motor; a flight attitude adjustment unit, configured to adjust the first motor corresponding to the second rotor based on the first control signal, so as to adjust the UAV from the first flight attitude to the second flight attitude; The first control signal determining unit specifically includes: a pulse width determination subunit, configured to determine a pulse width used by the first motor of the UAV based on the throttle parameter value and a second mapping relationship table; a first control signal determination subunit, configured to generate a first control signal according to a pulse width of a first motor of the drone and a direction of rotation of the first motor; The fly-back control module is used to activate the headless mode and control the drone to fly back to a preset position.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing 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 as described in any one of claims 1 to 6.
9. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the drone control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-rotor craft and control method, control device and flight control system thereof
CN107077142A