Flight control method and device, unmanned aerial vehicle and storage medium

CN119546518APending Publication Date: 2025-02-28SZ DJI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280097972.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

After hitting an obstacle, the drone may roll over and be firmly attached to the obstacle, or the pitch attitude difference between the aircraft body and the shooting device may drift and cannot be maintained constant due to wind disturbance and control errors.

Method used

By determining whether the UAV collides during the flight state, and reducing the speed of all motors in the power system to reduce the flight altitude when a collision occurs, the attitude of the UAV is adjusted to a normal attitude to reduce the risk of rollover; at the same time, the shooting device is obtained The deviation between the reference and the actual pitch attitude between the fuselage and the fuselage, and the fuselage pitch attitude is adjusted according to the error to make it approach the reference deviation.

Benefits of technology

It effectively reduces the occurrence of abnormal situations where the drone rolls over and is absorbed after hitting an obstacle, improves flight stability, ensures the attitude consistency between the fuselage and the shooting device, and improves the user control experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119546518A_ABST
    Figure CN119546518A_ABST
Patent Text Reader

Abstract

The invention discloses a flight control method and device, an unmanned aerial vehicle and a storage medium. The method comprises: in a flight state, determining whether the unmanned aerial vehicle collides (31); and when it is determined that the collision occurs, reducing the rotational speeds of all motors in a power system of the unmanned aerial vehicle to reduce the flight height of the unmanned aerial vehicle, and adjusting the attitude of the unmanned aerial vehicle to a normal attitude (32). According to the invention, the occurrence of abnormal conditions that the unmanned aerial vehicle turns on one side after colliding with an obstacle and is finally firmly adsorbed on the obstacle can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Flight control method, device, drone, and storage medium Technical Field

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

[0002] With the rapid development of science and technology, drones have achieved widespread development and application due to their good stability and strong anti-interference capabilities.

[0003] Although drone flight control technology is becoming increasingly sophisticated, anomalies can still occur during flight. One such anomaly is when a drone strikes an obstacle (such as a wall), causing it to flip over and eventually become firmly attached to the obstacle. Another anomaly is when the pitch difference between the drone's fuselage and its camera unit drifts and becomes unstable due to wind disturbances or control errors.

[0004] Therefore, how to reduce the occurrence of abnormal situations during drone flight has become an urgent problem to be solved.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a flight control method, device, drone, and storage medium to solve the problem of how to reduce the occurrence of abnormal situations during drone flight in the prior art.

[0007] In a first aspect, an embodiment of the present application provides a flight control method for an unmanned aerial vehicle (UAV), wherein the UAV includes a power system, wherein the power system includes a plurality of motors that provide lift, including:

[0008] During flight, determine whether the drone has collided;

[0009] When it is determined that a collision has occurred, the rotation speeds of all motors in the power system of the UAV are reduced to lower the flight altitude of the UAV, and the posture of the UAV is adjusted to a normal posture.

[0010] In a second aspect, an embodiment of the present application provides a flight control method applied to a drone, the drone including a camera, a gimbal for mounting and adjusting the pitch attitude of the camera, and a fuselage, the gimbal being mounted on the fuselage, and comprising:

[0011] Acquiring a reference pitch attitude deviation between the camera and the body, wherein the reference pitch attitude deviation is set by a user;

[0012] Obtaining an actual pitch attitude deviation between the camera and the fuselage;

[0013] determining an error between the reference pitch attitude deviation and the actual pitch attitude deviation;

[0014] The pitch attitude of the fuselage is adjusted according to the error, so that the pitch attitude deviation between the shooting device and the fuselage approaches the reference pitch attitude deviation.

[0015] In a third aspect, an embodiment of the present application provides a flight control device for use in a drone, wherein the drone includes a power system, the power system includes a plurality of motors that provide flight lift, and the device includes: a memory and a processor;

[0016] The memory is used to store program code;

[0017] The processor calls the program code, and when the program code is executed, is configured to perform the following operations:

[0018] During flight, determine whether the drone has collided;

[0019] When it is determined that a collision has occurred, the rotation speeds of all motors in the power system of the UAV are reduced to lower the flight altitude of the UAV, and the posture of the UAV is adjusted to a normal posture.

[0020] In a fourth aspect, an embodiment of the present application provides a flight control device for use with a drone, the drone comprising a camera, a gimbal for mounting and adjusting the pitch attitude of the camera, and a fuselage, the gimbal being mounted on the fuselage, the device comprising: a memory and a processor;

[0021] The memory is used to store program code;

[0022] The processor calls the program code, and when the program code is executed, is configured to perform the following operations:

[0023] Acquiring a reference pitch attitude deviation between the camera and the body, wherein the reference pitch attitude deviation is set by a user;

[0024] Obtaining an actual pitch attitude deviation between the camera and the fuselage;

[0025] determining an error between the reference pitch attitude deviation and the actual pitch attitude deviation;

[0026] The pitch attitude of the fuselage is adjusted according to the error, so that the pitch attitude deviation between the shooting device and the fuselage approaches the reference pitch attitude deviation.

[0027] In a fifth aspect, an embodiment of the present application provides a drone, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in any one of the first aspect or the steps of the method described in any one of the second aspect are implemented.

[0028] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspect or the second aspect are implemented.

[0029] In a seventh aspect, an embodiment of the present application provides a drone, comprising a power system and a flight control device as described in any one of the third aspect or the fourth aspect.

[0030] An embodiment of the present application further provides a computer program, which, when executed by a computer, is used to implement the method described in any one of the first aspect or the second aspect.

[0031] The embodiments of the present application provide a flight control method, device, drone and storage medium, which determine whether a drone has collided during flight. When a collision is determined to have occurred, the rotation speed of all motors in the drone's power system is reduced to lower the drone's flight altitude, and the drone's attitude is adjusted to a normal attitude. This achieves the goal of first lowering the drone's flight altitude and then adjusting the drone's attitude to a normal attitude when a collision is determined to have occurred. This can reduce the occurrence of rollovers caused by directly adjusting the drone's attitude to a normal attitude when a collision is determined to have occurred, thereby reducing the occurrence of abnormal situations in which the drone rolls over after colliding with an obstacle and eventually becomes firmly attached to the obstacle. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0033] FIG1 is a schematic diagram of an application scenario of the flight control method of the present application;

[0034] Figures 2A and 2B are schematic diagrams of a drone flipping over and adhering to a wall after hitting the wall;

[0035] FIG3 is a schematic diagram of a flow chart of a flight control method provided in one embodiment of the present application;

[0036] FIG4 is a schematic flow chart of a flight control method provided in another embodiment of the present application;

[0037] FIG5A is a schematic diagram of a reference pitch attitude deviation provided by an embodiment of the present application;

[0038] FIG5B is a schematic diagram of a control device sending a control instruction according to an embodiment of the present application;

[0039] FIG5C is a schematic diagram of an actual pitch attitude deviation provided by an embodiment of the present application;

[0040] FIG5D is a schematic diagram of adjustment according to error according to an embodiment of the present application;

[0041] FIG6 is a schematic structural diagram of a flight control device provided in one embodiment of the present application;

[0042] FIG7 is a schematic structural diagram of a flight control device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0043] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0044] The flight control method provided in the embodiment of the present application can be applied to the flight control system shown in Figure 1. As shown in Figure 1, the flight control system may include a drone 11 and a control device 12, and the drone 11 and the control device 12 can communicate wirelessly. The drone includes a power system, and the power system includes a plurality of motors that provide flight lift. In some embodiments, the drone includes a plurality of propellers, and each motor drives a propeller. The drone includes a shooting device, a gimbal for mounting and adjusting the pitch attitude of the shooting device, and a fuselage. The gimbal is mounted on the fuselage, and the power system as described above can be mounted on the fuselage. It should be noted that this application does not limit the number, type, and device form of the drone 11 and the control device 12.

[0045] Exemplarily, the control device 12 may be a terminal device, which may include at least one of a remote control, a smart phone, a tablet computer, a laptop computer, a smart wearable device, etc., and an application (Application, APP) for controlling the drone 11 may be installed on the terminal device.

[0046] Exemplarily, the control device 12 may be a remote controller. The remote controller and the terminal device may also perform wired or wireless communication. Optionally, the remote controller may be provided with a fixing bracket for fixing the terminal device.

[0047] Exemplarily, the control device may also be an augmented reality (AR) device, a virtual reality (VR) device, etc.

[0048] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0049] One abnormal situation a drone may encounter during flight is that it may flip over after colliding with an obstacle (such as a wall) and eventually become firmly attached to the obstacle. Analysis has found that the root cause of this abnormality is that the drone's attitude tilts toward the obstacle due to the impact of the obstacle and the drone. Typically, to adjust the drone's attitude to a normal state, the motor of the drone near the obstacle accelerates after the collision. As shown in Figure 2A, the acceleration of the motor near the obstacle rapidly draws air from area X, causing the air pressure in area X to decrease. The faster the motor speed near the obstacle, the lower the air pressure in area X, forming a low-pressure area inside the obstacle. Specifically, the air pressure in area X is lower than the air pressure in the area below the drone. The pressure difference between below and above the drone "presses" the drone toward the obstacle (as indicated by the arrow in Figure 2A). As a result, the acceleration of the motor near the obstacle not only fails to generate the torque required to stabilize the drone's attitude, but instead causes the drone to be further attracted to the obstacle, forming a positive feedback loop that ultimately causes the drone to become firmly attached to the obstacle, as shown in Figure 2B.

[0050] In order to reduce the occurrence of abnormal situations in which a drone rolls over after colliding with an obstacle and eventually becomes firmly attached to the obstacle, an embodiment of the present application provides a flight control method as shown in FIG3 .

[0051] FIG3 is a flow chart of a flight control method according to an embodiment of the present application. The method according to this embodiment can be applied to the UAV 11 in FIG1 . The UAV includes a power system, which includes multiple motors that provide lift. As shown in FIG3 , the method according to this embodiment may include:

[0052] Step 31: In the flight state, determine whether the UAV has collided.

[0053] In this step, it is considered that the drone's attitude control after colliding with an obstacle triggers the drone's rollover and eventual attachment to the obstacle. Because the control process after the drone hits the obstacle can reduce the occurrence of abnormal situations such as the drone's rollover and eventual attachment to the obstacle, it is possible to determine whether the drone has collided during flight. For example, whether the drone has collided can be determined based on the acceleration value and / or the disturbance magnitude.

[0054] When it is determined that the UAVs have not collided, this process may be terminated; when it is determined that the UAVs have collided, step 32 may be further executed.

[0055] Step 32: When it is determined that a collision has occurred, the rotation speeds of all motors in the power system of the UAV are reduced to lower the flight altitude of the UAV, and the attitude of the UAV is adjusted to a normal attitude.

[0056] In this step, when a collision is determined to have occurred, the attitude control mode is exited, and the power system is no longer controlled to adjust the attitude of the UAV to a normal attitude (i.e., the attitude corresponding to hovering). Instead, the speed of all motors in the power system of the UAV is reduced. After lowering the flight altitude of the UAV, the attitude of the UAV is adjusted to a normal attitude.

[0057] By reducing the speed of all motors in the drone's power system, the drone's flight altitude can be lowered. Furthermore, since the speed of the motors is also reduced when the drone approaches an obstacle, the pressure difference between area X and the area below the drone, which is caused by adjusting the drone's attitude to a normal attitude (which requires accelerating the motors when approaching the obstacle), can be reduced. This means that the force that "presses" the drone toward the obstacle can be reduced.

[0058] Furthermore, since the pressure difference between area X and the area below the drone caused by adjusting the drone's attitude to a normal attitude can be reduced by lowering the drone's flight altitude, adjusting the drone's attitude to a normal attitude after lowering the drone's flight altitude can reduce the probability of the drone being firmly sucked into an obstacle due to the large pressure difference between area X and the area below the drone. This can also reduce the occurrence of abnormal situations where the drone rolls over after colliding with an obstacle and is ultimately firmly attached to the obstacle.

[0059] The flight control method provided in this embodiment determines whether the drone has collided during flight. When a collision is determined to have occurred, the rotation speed of all motors in the drone's power system is reduced to lower the drone's flight altitude, and the drone's attitude is adjusted to a normal attitude. This method achieves the goal of first lowering the drone's flight altitude and then adjusting the drone's attitude to a normal attitude when a collision is determined to have occurred. This can reduce the occurrence of rollovers caused by directly adjusting the drone's attitude to a normal attitude when a collision is determined to have occurred, thereby reducing the occurrence of abnormal situations in which the drone rolls over after colliding with an obstacle and eventually becomes firmly attached to the obstacle.

[0060] Based on the embodiment shown in FIG3 , considering that the propeller protection component surrounding the outside of the propeller may form a duct, which will hinder the gas exchange between the upper and lower parts of the drone, in one embodiment, the method provided by the embodiment shown in FIG3 can be applied to a drone including a propeller driven by a motor and a propeller protection component surrounding the outside of the propeller, wherein the propeller protection component forms a duct. In this case, the aforementioned power system may also include a propeller driven by a motor, and the drone includes a propeller protection component surrounding the outside of the propeller. The propeller protection component may be part of the drone's fuselage, that is, the fuselage may include the propeller protection component, or the propeller protection component may be a component mounted on the fuselage.

[0061] Based on the embodiment shown in Figure 3, the drone can be equipped with a sensor that can be used to determine whether the drone has collided based on measurements from the sensor. In one embodiment, the sensor can include an accelerometer. Determining whether the drone has collided based on the accelerometer's measurements can specifically include determining whether the drone has collided. Determining whether the drone has collided can specifically include determining whether the accelerometer's measurements exceed a first threshold; if they exceed the first threshold, the drone has collided; if they do not exceed the first threshold, the drone has not collided. The first threshold can be, for example, 5g, where g represents the acceleration due to gravity. This allows for the assumption that once the accelerometer's measurements exceed a certain threshold, the acceleration is caused by a collision with an obstacle. In another embodiment, the sensor can include an attitude sensor. Determining whether the drone has collided based on measurements from the attitude sensor can specifically include determining whether the accelerometer's measurements exceed an attitude threshold; if they exceed the attitude threshold, the drone has collided; if they do not exceed the attitude threshold, the drone has not collided. The attitude threshold can be, for example, 40, 45, 50, 60, or 70 degrees. Thus, once the measurement value of the attitude sensor exceeds a certain threshold, it can be considered that the acceleration is caused by a collision with an obstacle.

[0062] In another embodiment, an observer can be designed to observe the disturbance in the drone's attitude to determine whether the drone has collided. Determining whether the drone has collided can specifically include: observing the drone's attitude disturbance through the observer and determining whether the attitude disturbance exceeds a second threshold; if it exceeds the second threshold, it indicates that the drone has collided; if it does not exceed the second threshold, it indicates that the drone has not collided. In this way, once the attitude disturbance exceeds a certain threshold, it can be considered that the disturbance is caused by a collision with an obstacle.

[0063] In another embodiment, a model can be used to calculate external disturbances to determine whether the drone has collided. Determining whether the drone has collided can specifically include: calculating the total input of the control system model based on the inverse model of the drone's control system model and the measured angular velocity of the motor; subtracting the calculated control variable from the total input to obtain the external disturbance; and determining whether the external disturbance exceeds a third threshold; if the third threshold is exceeded, it indicates that the drone has collided; if the third threshold is not exceeded, it indicates that the drone has not collided. Thus, once the external disturbance exceeds a certain threshold, it can be considered that the disturbance is caused by a collision with an obstacle.

[0064] Based on the embodiment shown in FIG3 , in one embodiment, the speed reduction of all motors can be substantially uniform. The substantially uniform speed reduction can include: the speed reduction of all motors being uniform, or the speed reduction of all motors being less than or equal to a set threshold. By ensuring that the speed reduction of all motors is substantially uniform, the drone's attitude can be maintained substantially unchanged during the process of lowering its altitude.

[0065] Based on the embodiment shown in FIG3 , in one embodiment, the tilt angle of the drone caused by the collision can be kept substantially unchanged during the process of lowering the flight altitude. That is, during the process of lowering the flight altitude, the tilt angle of the drone remains substantially the tilt angle caused by the collision. The tilt angle of the drone can be kept substantially unchanged by controlling the speed control amount, which is beneficial for improving flight stability.

[0066] In practical applications, the control variables of the power system can be divided into an ascent speed control variable and an attitude control variable. The ascent speed control variable can be used to control the vertical motion of the drone, thereby controlling the drone's ascent and descent, while the attitude control variable can be used to control the rotation of the drone's rotational axes (e.g., pitch, roll, and yaw), thereby controlling the drone's attitude. Based on this, based on the embodiment shown in FIG3 , in one embodiment, reducing the speed of all motors in the drone's power system can specifically include reducing the ascent speed control variable and the attitude control variable provided to the power system.

[0067] When a proportional-integral-derivative (PID) control algorithm is used to calculate the control variable, the speed control variable can be reduced by clearing the integral. Based on this, based on the embodiment shown in FIG3 , in one embodiment, reducing the ascent speed control variable and attitude control variable provided to the power system can specifically include: when the PID control algorithm is used to calculate the control variable, clearing the integral used to calculate the ascent speed control variable to reduce the ascent speed control variable provided to the power system, and clearing the integral used to calculate the attitude control variable to reduce the attitude control variable provided to the power system. Thus, once the drone collides with an obstacle, the flight controller can immediately clear the integrals for vertical control and attitude control, preventing the drone's control variable from increasing due to positive feedback. Since the drone's propellers enter a low throttle range after clearing the integrals, the drone still has a weak attitude control capability. Once the drone leaves area X, normal control can be immediately restored.

[0068] If the collision is minor and the drone's attitude is slightly out of control, such as when it's less than 45 degrees, once collision detection takes effect, the drone will maintain a certain level of attitude control at low throttle, thanks to an algorithm that clears the integral of vertical and attitude control when a collision is determined. This allows the drone to regain control of its attitude and return to normal. If the collision is very severe, causing the drone to flip 90 degrees and hit an obstacle, the algorithm will still take effect, causing the drone to fall under gravity. If the obstacle is not completely vertical, such as hitting a tree trunk, the drone will immediately resume normal attitude and vertical control once it has some distance from the tree trunk.

[0069] Based on the embodiment shown in FIG3 , optionally, when performing flight control based on a collision, it is possible to distinguish whether the collision is caused by a manual control operation of the user.

[0070] Based on this, in one embodiment, the method shown in FIG3 may further include determining whether the collision was caused by a user's manual control operation. Reducing the speed of all motors in the drone's power system may specifically include: if not, reducing the speed of all motors in the drone's power system. For example, determining whether the collision was caused by a user's manual control operation can be performed by determining whether a user control command was received when the collision occurred. If a user control command was received when the collision occurred, it can be determined that the collision was caused by the user's manual control operation. If no user control command was received when the collision occurred, it can be determined that the collision was not caused by the user's manual control operation. Thus, when it is determined that the collision was not caused by the user's manual control operation, the speed of all motors in the drone's power system can be reduced. This can avoid situations where the user intends to impact an obstacle but the obstacle is not properly impacted, resulting in a lowered flight altitude, thereby improving the user experience. For example, if a user controls a drone to hover near a wall, but the drone collides with the wall due to interference or inaccurate positioning, the speed of all motors in the drone's power system can be reduced to lower the drone's flight altitude.

[0071] In another embodiment, the method of the embodiment shown in FIG3 may further include: determining whether the collision was caused by a user's manual control operation; if so, controlling all motors to accelerate according to the user's manual control operation. Thus, when it is determined that the collision was caused by a user's manual control operation, the obstacle can be correctly impacted according to the user's control instructions, so that the control of the drone's flight can be consistent with the user's wishes, which is conducive to improving the user's experience. For example, if a tree branch is obstructing the drone's flight, the user can control the drone to accelerate. In this case, all motors can be controlled to accelerate according to the user's manual control operation to crash through the branch and fly past it.

[0072] Another abnormal situation that may be encountered during drone flight is that the pitch attitude difference between the drone body and the drone's camera device will drift and cannot be maintained constant due to wind disturbances and control errors. Through analysis, it was found that the main scenario in which this abnormal situation occurs is: in a drone control mode, the user can adjust the pitch attitude of the camera device (for example, the user adjusts the pitch attitude of the drone's camera device through the terminal device as described above) to set the pitch attitude deviation between the camera device and the drone body to a baseline pitch attitude deviation. The user operates the joystick of the terminal device to send flight control commands to the drone, and the drone flies according to the received flight control commands. During flight, the pitch attitude of the drone body will change. Ideally, the pitch attitude deviation between the camera device and the drone body should always be the baseline pitch attitude deviation. In this way, the user can feel and understand the pitch attitude of the drone body through the images captured by the camera device displayed on the terminal device, and then decide how to operate the joystick of the terminal device to control the drone's flight. However, due to wind disturbance and control errors encountered by the drone, the pitch attitude difference between the drone body and the drone's camera device will drift and cannot be maintained constant, that is, it cannot be maintained at the baseline pitch attitude deviation. This makes it difficult for users to feel and understand the pitch attitude of the drone body through the images captured by the camera device displayed on the terminal device, which in turn affects the user's flight control of the drone.

[0073] In order to solve the occurrence of such abnormal situation, an embodiment of the present application provides a flight control method as shown in FIG4 .

[0074] FIG4 is a flow chart of a flight control method provided in another embodiment of the present application. The method provided in this embodiment can be applied to the drone 11 in FIG1 . The drone includes a camera, a gimbal for mounting and adjusting the pitch attitude of the camera, and a fuselage. The gimbal is mounted on the fuselage. As shown in FIG4 , the method of this embodiment may include:

[0075] Step 41 : obtaining a reference pitch attitude deviation between the camera and the camera body, wherein the reference pitch attitude deviation is set by the user.

[0076] In this step, the baseline pitch attitude deviation between the camera and the camera body refers to the attitude deviation between the camera and the camera body in the pitch direction set by the user. The baseline pitch attitude deviation between the camera and the camera body can be, for example, as shown in FIG5A . The baseline pitch attitude deviation between the camera and the camera body can be set by the user by setting the attitude of the gimbal. That is, adjusting (e.g., setting) the attitude of the gimbal can adjust the attitude deviation between the camera and the camera body in the pitch direction.

[0077] For example, the base pitch attitude deviation between the camera and the camera body can be determined based on the attitude of the gimbal set by the user. Of course, in other embodiments, the base pitch attitude deviation between the camera and the camera body can also be determined by other means, and this application does not limit this.

[0078] Step 42: Acquire the actual pitch attitude deviation between the camera and the fuselage.

[0079] As shown in Figure 5B, during the process of controlling the drone, the control device will send control instructions for adjusting the pitch attitude of the fuselage to the drone and the gimbal, so that both the fuselage and the gimbal can move according to the pitch attitude controlled by the control device. Ideally, the attitude changes of the shooting device and the fuselage in the pitch direction of the fuselage are completely consistent, so that the picture can reflect the attitude changes of the drone in the pitch direction.

[0080] However, since the camera body and the gimbal adjust their posture at different speeds, after a period of control, there may be an error between the actual pitch posture deviation between the camera device and the camera body and the reference pitch posture deviation. Therefore, in this step, the actual pitch posture deviation between the camera device and the camera body can be obtained. The actual pitch posture deviation refers to the actual posture deviation between the camera device and the camera body in the pitch direction of the camera body. The actual pitch posture deviation between the camera device and the camera body can be shown, for example, in Figure 5C.

[0081] For example, the actual pitch attitude deviation between the camera and the fuselage can be determined based on the current attitude of the gimbal. Of course, in other embodiments, the actual pitch attitude deviation between the camera and the fuselage can also be determined by other methods, and this application does not limit this.

[0082] Step 43: Determine the error between the reference pitch attitude deviation and the actual pitch attitude deviation.

[0083] In this step, after obtaining the reference pitch attitude deviation and the actual pitch attitude deviation, the error between the reference pitch attitude deviation and the actual pitch attitude deviation can be determined. For example, the error between the reference pitch attitude deviation and the actual pitch attitude deviation can be determined as the difference between the reference pitch attitude deviation and the actual pitch attitude deviation.

[0084] Step 44 : adjusting the pitch attitude of the fuselage according to the error so that the pitch attitude deviation between the camera device and the fuselage approaches the reference pitch attitude deviation.

[0085] In this step, to lock the posture of the camera and the fuselage along the pitch axis of the fuselage, the drone can follow the camera (which can also be understood as following the gimbal). Therefore, after determining the error between the baseline pitch posture deviation and the actual pitch posture deviation, the pitch posture of the fuselage can be adjusted based on the error to bring the pitch posture deviation between the camera and the fuselage closer to the baseline pitch posture deviation, thereby locking the posture of the camera and the fuselage along the pitch axis of the fuselage. Based on Figures 5A and 5C, the method for adjusting the pitch posture of the fuselage based on the error can be shown in, for example, Figure 5D.

[0086] It should be noted that the direction indicated by the arrow in Figure 5D can represent the direction of adjusting the pitch attitude of the fuselage. When the pitch axis of the fuselage rotates in the direction of the arrow shown in Figure 5D, the deviation of the pitch attitude between the shooting device and the fuselage can be reduced so that the pitch attitude deviation approaches the reference pitch attitude deviation. The drone represented by the solid line in Figure 5D is the drone before adjustment, and the drone represented by the dotted line is the drone after adjustment.

[0087] After obtaining the error between the baseline pitch attitude deviation and the actual pitch attitude deviation, in order to ensure that the pitch attitude deviation between the camera and the camera body always remains at the baseline pitch attitude deviation, the gimbal can theoretically be controlled based on the error to adjust the camera's pitch attitude so that the pitch attitude deviation between the camera and the camera body approaches the baseline pitch attitude deviation. However, this approach can cause the camera to shake or shift, and the user will see the image displayed on the terminal device shake or shift, which can cause user confusion and a poor interactive experience. Therefore, in this embodiment, the camera body's pitch attitude is adjusted based on the error so that the pitch attitude deviation between the camera and the camera body approaches the baseline pitch attitude deviation. This ensures that the image displayed on the terminal device is stable for the user while also ensuring that the pitch attitude deviation between the camera and the camera body approaches the baseline pitch attitude deviation. The flight control method provided in this embodiment obtains a reference pitch attitude deviation between the camera and the fuselage, obtains an actual pitch attitude deviation between the camera and the fuselage, determines the error between the reference pitch attitude deviation and the actual pitch attitude deviation, and adjusts the pitch attitude of the fuselage according to the error so that the pitch attitude deviation between the camera and the fuselage approaches the reference pitch attitude deviation. This enables the drone to follow the camera to lock the attitudes of the camera and the fuselage in the direction of the pitch axis of the fuselage, so that the pitch attitude deviation between the camera and the fuselage should always be the reference pitch attitude deviation.

[0088] Based on the embodiment shown in FIG4 , in one embodiment, adjusting the posture of the fuselage according to the error may specifically include adjusting the posture of the fuselage in real time according to the error, thereby ensuring real-time adjustment.

[0089] In another embodiment, adjusting the posture of the fuselage according to the error may specifically include: when the error is greater than a preset error threshold, adjusting the pitch posture of the fuselage according to the error, thereby reducing the workload of the adjustment.

[0090] Based on the embodiment shown in FIG. 4 , for example, when the drone includes a power system, adjusting the pitch attitude of the drone body based on the error may specifically include controlling the power system based on the error to adjust the pitch attitude of the drone body. The power system is mounted on the drone body. In some embodiments, the drone body may include an arm, and the power system is mounted on the arm.

[0091] Optionally, when performing flight control based on the error, the control mode of the drone can be distinguished. Based on this, in one embodiment, the method of the embodiment shown in FIG4 may further include: determining the control mode of the drone. Adjusting the pitch attitude of the fuselage based on the error may specifically include: if the drone's control mode is the first control mode, adjusting the pitch attitude of the fuselage based on the error. The first control mode may be any type of control mode that requires the image to reflect changes in the drone's pitch direction. For example, the first control mode may be First Person View (FPV) mode or FPV mode. When the drone is in FPV mode or FPV mode, the gimbal and the drone must remain relatively stationary. Thus, in modes that require the image to reflect changes in the drone's pitch direction, the fuselage can follow the camera, allowing for flexible control of the drone and improving the user experience.

[0092] In another embodiment, the method of the embodiment shown in FIG. 4 may further include: if the drone's control mode is the second control mode, obtaining the initial pitch attitude of the camera, and controlling the gimbal to bring the camera's pitch attitude closer to the initial pitch attitude. The second control mode may specifically be any type of control mode that requires the gimbal to control the camera's attitude to be stable. For example, the second control mode may be a locked mode. When the drone is in locked mode, the gimbal's attitude relative to the ground must remain unchanged. This allows the user to use a control mode in which the gimbal controls the camera's attitude to be stable, as needed, thereby improving the user experience.

[0093] Optionally, the initial pitch posture may be set by the user, so that the user can flexibly set the field of view of the camera according to shooting requirements, which is conducive to improving the user experience.

[0094] FIG6 is a schematic diagram of the structure of a flight control device provided in an embodiment of the present application. The flight control device is applied to a drone, which includes a power system including multiple motors that provide lift. As shown in FIG6 , the device 60 may include a processor 61 and a memory 62.

[0095] The memory 62 is used to store program codes;

[0096] The processor 61 calls the program code, and when the program code is executed, is used to perform the following operations:

[0097] During flight, determine whether the drone has collided;

[0098] When it is determined that a collision has occurred, the rotation speeds of all motors in the power system of the UAV are reduced to lower the flight altitude of the UAV, and the posture of the UAV is adjusted to a normal posture.

[0099] The flight control device provided in this embodiment can be used to execute the technical solution of the method embodiment shown in Figure 3 above. Its implementation principle and technical effects are similar to those of the method embodiment and will not be repeated here.

[0100] Figure 7 is a schematic diagram of the structure of a flight control device provided in another embodiment of the present application. This flight control device is applied to a drone. The drone includes a camera, a gimbal for mounting and adjusting the pitch of the camera, and a fuselage. The gimbal is mounted on the fuselage. As shown in Figure 7, the device 70 may include a processor 71 and a memory 72.

[0101] The memory 72 is used to store program codes;

[0102] The processor 71 calls the program code, and when the program code is executed, is used to perform the following operations:

[0103] Acquiring a reference pitch attitude deviation between the camera and the body, wherein the reference pitch attitude deviation is set by a user;

[0104] Obtaining an actual pitch attitude deviation between the camera and the fuselage;

[0105] determining an error between the reference pitch attitude deviation and the actual pitch attitude deviation;

[0106] The pitch attitude of the fuselage is adjusted according to the error, so that the pitch attitude deviation between the shooting device and the fuselage approaches the reference pitch attitude deviation.

[0107] The flight control device provided in this embodiment can be used to execute the technical solution of the method embodiment shown in Figure 4 above. Its implementation principle and technical effects are similar to those of the method embodiment and will not be repeated here.

[0108] In addition, an embodiment of the present application also provides a drone, including the flight control device shown in Figure 6 or Figure 7.

[0109] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method described in the embodiment shown in Figure 3 or Figure 4 is implemented.

[0110] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A flight control method, applied to a UAV, wherein: The UAV includes a power system, which includes a plurality of motors that provide flight lift, and is characterized by including: During flight, determine whether the drone has collided; When it is determined that a collision has occurred, the rotation speeds of all motors in the power system of the UAV are reduced to lower the flight altitude of the UAV, and the posture of the UAV is adjusted to a normal posture.

2. The method according to claim 1, characterized in that The speed reduction ranges of all the motors are substantially the same.

3. The method according to claim 1, characterized in that During the process of lowering the flying altitude of the UAV, the tilt angle of the UAV caused by the collision is kept substantially unchanged.

4. The method according to any one of claims 1 to 3, characterized in that The power system further includes a propeller driven by the motor, and the UAV includes a propeller protection component surrounding the outside of the propeller.

5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: determining whether the collision is caused by a manual control operation of a user; The reducing the rotational speed of all motors in the power system of the UAV includes: If not, reduce the rotation speed of all motors in the power system of the UAV.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: determining whether the collision is caused by a manual control operation of a user; If so, all motors are controlled to accelerate according to the user's manual control operation.

7. The method according to any one of claims 1 to 6, characterized in that Determining whether the drone has collided includes: judging whether a measurement value of an accelerometer of the drone exceeds a first threshold; if it exceeds the first threshold, it indicates that the drone has collided; if it does not exceed the first threshold, it indicates that the drone has not collided.

8. The method according to any one of claims 1 to 6, characterized in that Determining whether the UAV has collided includes: observing the attitude disturbance of the UAV through an observer, and determining whether the attitude disturbance exceeds a second threshold; if it exceeds the second threshold, it indicates that the UAV has collided; if it does not exceed the second threshold, it indicates that the UAV has not collided.

9. The method according to any one of claims 1 to 6, characterized in that Determining whether the UAV has collided includes: Calculating a total input of the control system model according to an inverse model of the control system model of the UAV and the measured angular velocity of the motor; Subtracting the calculated control amount from the total input to obtain the external disturbance; Determining whether the external disturbance exceeds a third threshold; If the third threshold is exceeded, it indicates that the UAV has collided; If the third threshold is not exceeded, it indicates that the UAV has not collided.

10. The method according to any one of claims 1 to 9, characterized in that The reducing the rotation speed of all motors in the power system of the UAV includes reducing the ascending speed control amount and the attitude control amount provided to the power system.

11. The method according to claim 10, characterized in that The reducing the ascent speed control amount and the attitude control amount provided to the power system includes: When the PID control algorithm is used to calculate the control quantity, the integral quantity used to calculate the ascent speed control quantity is cleared to reduce the ascent speed control quantity provided to the power system, and the integral quantity used to calculate the attitude control quantity is cleared to reduce the attitude control quantity provided to the power system.

12. A flight control method, applied to an unmanned aerial vehicle (UAV), comprising a camera, a gimbal for mounting and adjusting the pitch attitude of the camera, and a fuselage, wherein the gimbal is mounted on the fuselage, wherein: include: Acquiring a reference pitch attitude deviation between the camera and the body, wherein the reference pitch attitude deviation is set by a user; Obtaining an actual pitch attitude deviation between the camera and the fuselage; determining an error between the reference pitch attitude deviation and the actual pitch attitude deviation; The pitch attitude of the fuselage is adjusted according to the error, so that the pitch attitude deviation between the shooting device and the fuselage approaches the reference pitch attitude deviation.

13. The method according to claim 12, characterized in that The adjusting the pitch attitude of the fuselage according to the error includes: when the error is greater than a preset error threshold, adjusting the pitch attitude of the fuselage according to the error.

14. The method according to claim 12, characterized in that The UAV includes a power system, wherein the power system is mounted on the fuselage; The adjusting the pitch attitude of the fuselage according to the error comprises: The power system is controlled according to the error to adjust the pitch attitude of the fuselage.

15. The method according to any one of claims 12 to 14, characterized in that The method further comprises: determining a control mode of the drone; The adjusting the pitch attitude of the fuselage according to the error comprises: If the control mode of the UAV is the first control mode, the pitch attitude of the fuselage is adjusted according to the error.

16. The method according to any one of claims 12 to 14, characterized in that The method further comprises: If the control mode of the UAV is the second control mode, the initial pitch posture of the camera is acquired, and the gimbal is controlled so that the pitch posture of the camera approaches the initial pitch posture.

17. The method according to claim 16, characterized in that The initial pitch attitude is set by the user.

18. A flight control device, applied to a UAV, wherein: The drone includes a power system, which includes a plurality of motors that provide flight lift, and is characterized in that the device includes: a memory and a processor; The memory is used to store program code; The processor calls the program code, and when the program code is executed, is configured to perform the following operations: During flight, determine whether the drone has collided; When it is determined that a collision has occurred, the rotation speeds of all motors in the power system of the UAV are reduced to lower the flight altitude of the UAV, and the posture of the UAV is adjusted to a normal posture.

19. The device according to claim 18, characterized in that The speed reduction ranges of all the motors are substantially the same.

20. The device according to claim 18, characterized in that During the process of lowering the flying altitude of the UAV, the tilt angle of the UAV caused by the collision is kept substantially unchanged.

21. The device according to any one of claims 18 to 20, characterized in that The power system further includes a propeller driven by the motor, and the UAV includes a propeller protection component surrounding the outside of the propeller.

22. The device according to any one of claims 18 to 20, characterized in that The processor is further configured to: determining whether the collision is caused by a manual control operation of a user; When the processor reduces the rotation speed of all motors in the power system of the drone, it is specifically used to: If not, reduce the rotation speed of all motors in the power system of the UAV.

23. The device according to any one of claims 18 to 20, characterized in that The processor is further configured to: determining whether the collision is caused by a manual control operation of a user; If so, all motors are controlled to accelerate according to the user's manual control operation.

24. The device according to any one of claims 18 to 23, characterized in that When the processor is used to determine whether the drone has collided, it is specifically used to: determine whether the measurement value of the accelerometer of the drone exceeds a first threshold; if it exceeds the first threshold, it indicates that the drone has collided; if it does not exceed the first threshold, it indicates that the drone has not collided.

25. The device according to any one of claims 18 to 23, characterized in that When the processor is used to determine whether the drone has collided, it is specifically used to: observe the attitude disturbance of the drone through an observer, and determine whether the attitude disturbance exceeds a second threshold; if it exceeds the second threshold, it indicates that the drone has collided; if it does not exceed the second threshold, it indicates that the drone has not collided.

26. The device according to any one of claims 18 to 23, characterized in that When the processor is used to determine whether the UAV has collided, it is specifically used to: Calculating a total input of the control system model according to an inverse model of the control system model of the UAV and the measured angular velocity of the motor; Subtracting the calculated control amount from the total input to obtain the external disturbance; Determining whether the external disturbance exceeds a third threshold; If the third threshold is exceeded, it indicates that the UAV has collided; If the third threshold is not exceeded, it indicates that the UAV has not collided.

27. The device according to any one of claims 18 to 26, characterized in that When the processor is used to reduce the rotational speed of all motors in the power system of the drone, it is specifically used to: reduce the ascent speed control amount and attitude control amount provided to the power system.

28. The device according to claim 27, characterized in that When the processor is used to reduce the ascent speed control amount and the attitude control amount provided to the power system, it is specifically used to: When the PID control algorithm is used to calculate the control quantity, the integral quantity used to calculate the ascent speed control quantity is cleared to reduce the ascent speed control quantity provided to the power system, and the integral quantity used to calculate the attitude control quantity is cleared to reduce the attitude control quantity provided to the power system.

29. A flight control device, applied to an unmanned aerial vehicle (UAV), comprising a camera, a gimbal for mounting and adjusting the pitch attitude of the camera, and a fuselage, wherein the gimbal is mounted on the fuselage, and wherein: The device includes: a memory and a processor; The memory is used to store program code; The processor calls the program code, and when the program code is executed, is configured to perform the following operations: Acquiring a reference pitch attitude deviation between the camera and the body, wherein the reference pitch attitude deviation is set by a user; Obtaining an actual pitch attitude deviation between the camera and the fuselage; determining an error between the reference pitch attitude deviation and the actual pitch attitude deviation; The pitch attitude of the fuselage is adjusted according to the error, so that the pitch attitude deviation between the shooting device and the fuselage approaches the reference pitch attitude deviation.

30. The device according to claim 29, characterized in that The processor is configured to adjust the pitch attitude of the fuselage according to the error, specifically to adjust the pitch attitude of the fuselage according to the error when the error is greater than a preset error threshold.

31. The device according to claim 29, characterized in that The UAV includes a power system, wherein the power system is mounted on the fuselage; When the processor is configured to adjust the pitch attitude of the fuselage according to the error, the processor is specifically configured to: The power system is controlled according to the error to adjust the pitch attitude of the fuselage.

32. The device according to any one of claims 29 to 31, characterized in that The processor is further configured to: determining a control mode of the drone; When the processor adjusts the pitch attitude of the fuselage according to the error, it is specifically configured to: If the control mode of the UAV is the first control mode, the pitch attitude of the fuselage is adjusted according to the error.

33. The device according to any one of claims 29 to 31, characterized in that The processor is further configured to: If the control mode of the UAV is the second control mode, the initial pitch posture of the camera is acquired, and the gimbal is controlled so that the pitch posture of the camera approaches the initial pitch posture.

34. The device according to claim 33, characterized in that The initial pitch attitude is set by the user.

35. A drone, characterized in that: The drone includes a memory and a processor wherein, The memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 or the steps of the method described in any one of claims 12 to 17 are implemented.

36. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.

37. A drone, characterized in that: The UAV comprises a power system and a flight control device according to any one of claims 18 to 34.