Disclosure of Invention
In view of the above, a technical problem to be solved by the present invention is to provide an unmanned aerial vehicle attitude control method, an apparatus and an unmanned aerial vehicle.
According to one aspect of the invention, an unmanned aerial vehicle attitude control method is provided, which comprises the following steps: determining the attitude angle deviation to be adjusted according to the target attitude angle to be adjusted of the unmanned aerial vehicle and the current actual attitude angle of the unmanned aerial vehicle;
dividing the adjustment interval of the attitude angle deviation into N angular velocity control intervals, and determining the corresponding relation between the attitude adjustment angular rate and the attitude angle deviation value in each angular velocity control interval; wherein N is greater than or equal to 2; and adjusting the attitude angle of the unmanned aerial vehicle to the target attitude angle, wherein the attitude adjusting angular rate is controlled according to the corresponding relation corresponding to the N angular speed control intervals in the adjustment.
Optionally, the correspondence relationship includes: proportional function relation and inverse parabolic function relation.
Optionally, the dividing the adjustment interval of the attitude angle deviation into N angular velocity control intervals includes: dividing the numerical range of the attitude angle deviation into a first angular speed control range and a second angular speed control range which are continuous, wherein the absolute value of the attitude angle deviation value in the first angular speed control range is smaller than the absolute value of the attitude angle deviation value in the second angular speed control range; the determining of the corresponding relation between the attitude adjustment angular rate and the attitude angular deviation value in each angular velocity control interval includes: in the first angular speed control interval, determining that the attitude adjustment angular rate and the attitude angular deviation value are in a proportional function relationship; and in the second angular velocity control interval, determining that the attitude adjustment angular rate and the attitude angular deviation value are in an inverse parabolic function relationship.
Optionally, the controlling the attitude adjustment angular rate according to the corresponding relationship corresponding to the N angular velocity control intervals during the adjustment includes: in the first angular speed control interval, controlling the attitude adjustment angular rate based on the attitude angle deviation value and according to the proportional function relationship; and acquiring the attitude angle deviation value in real time, and when the attitude angle deviation value is determined to be increased to the interval limit value of the first angular speed control interval and the second angular speed control interval, switching to the inverse parabolic function relationship based on the attitude angle deviation value to control the attitude adjustment angular rate.
Optionally, determining the proportional functional relationship
Ratedes=kp·Atterror;
Wherein, RatedesAdjusting angular rate, k, for the attitudepFor proportional control parameters, kp>0,AtterrorThe attitude angle deviation value is obtained; determining the inverse parabolic function relationship as:
where a is the maximum threshold for rotational acceleration.
Optionally, determining the interval limit value
Optionally, the target attitude angle and the actual attitude angle are one or more of a pitch angle, a yaw angle, and a roll angle.
According to another aspect of the present invention, there is provided an unmanned aerial vehicle attitude control apparatus comprising: the adjustment data acquisition module is used for acquiring a target attitude angle required to be adjusted by the unmanned aerial vehicle; the attitude data acquisition module is used for acquiring the current actual attitude angle of the unmanned aerial vehicle; the control parameter setting module is used for determining attitude angle deviation to be adjusted according to the target attitude angle and the actual attitude angle, dividing an adjustment interval of the attitude angle deviation into N angular velocity control intervals, and determining the corresponding relation between the attitude adjustment angular rate and the attitude angle deviation value in each angular velocity control interval; wherein N is greater than or equal to 2; and the attitude angle control module is used for adjusting the attitude angle of the unmanned aerial vehicle to the target attitude angle, wherein the attitude adjusting angular rate is controlled according to the corresponding relation corresponding to the N angular speed control intervals in the adjustment.
Optionally, the correspondence relationship includes: proportional function relation and inverse parabolic function relation.
Optionally, the control parameter setting module includes: the interval dividing unit is used for dividing the numerical interval of the attitude angle deviation into a first continuous angular speed control interval and a second continuous angular speed control interval, wherein the absolute value of the attitude angle deviation value in the first angular speed control interval is smaller than the absolute value of the attitude angle deviation value in the second angular speed control interval; the control function determining unit is used for determining that the attitude adjustment angular rate and the attitude angle deviation value are in a proportional function relationship in the first angular speed control interval; and in the second angular velocity control interval, determining that the attitude adjustment angular rate and the attitude angular deviation value are in an inverse parabolic function relationship.
Optionally, the attitude angle control module includes: the first adjusting unit is used for controlling the attitude adjusting angular rate based on the attitude angular deviation value and according to the proportional function relation in the first angular speed control interval; and the second adjusting unit is used for acquiring the attitude angle deviation value in real time through the attitude data acquisition module, and controlling the attitude adjusting angular rate based on the attitude angle deviation value and switched into the inverse parabolic function relationship when the attitude angle deviation value is determined to be increased to the interval limit value of the first angular speed control interval and the second angular speed control interval.
Optionally, the control function determining unit determines the proportional functional relationship
Ratedes=kp·Atterror;
Wherein, RatedesAdjusting angular rate, k, for the attitudepFor proportional control parameters, kp>0,AtterrorThe attitude angle deviation value is obtained; the control function determining unit determines the inverse parabolic functional relationship
Where a is the maximum threshold for rotational acceleration.
Optionally, the control function determination unit determines the interval limit value
Optionally, the target attitude angle and the actual attitude angle are one or more of a pitch angle, a yaw angle, and a roll angle.
According to yet another aspect of the invention, there is provided a drone comprising: unmanned aerial vehicle attitude control device as above
According to another aspect of the present invention, there is provided an unmanned aerial vehicle attitude control apparatus, comprising: a memory; and a processor coupled to the memory, the processor configured to perform the drone attitude control as described above based on instructions stored in the memory.
According to the unmanned aerial vehicle attitude control method, the unmanned aerial vehicle attitude control device and the unmanned aerial vehicle, the adjustment interval of the attitude angle deviation is divided into a plurality of angular velocity control intervals, the attitude adjustment angular rate is controlled according to the corresponding relation corresponding to the angular velocity control intervals in the adjustment, the rapid proportional control can be used at the initial stage of the attitude adjustment, larger proportional parameters are used, the response speed is accelerated, the error is rapidly eliminated, the inverse parabolic control algorithm is adopted at the later stage of the attitude adjustment, the angular acceleration in the adjustment can be limited, the overshoot can be reduced, the expected attitude angular rate can be obtained, and the attitude adjustment and flight stability of the unmanned aerial vehicle can be improved.
Detailed Description
The present invention now will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The technical solution of the present invention is described in various aspects below with reference to various figures and embodiments.
The terms "first", "second", and the like are used hereinafter only for descriptive distinction and not for other specific meanings.
Fig. 1 is a schematic flow chart of an embodiment of an unmanned aerial vehicle attitude control method according to the present invention, as shown in fig. 1:
step 101, obtaining a target attitude angle of the unmanned aerial vehicle which needs to be adjusted and a current actual attitude angle of the unmanned aerial vehicle.
The target attitude angle and the actual attitude angle are attitude angles of three channels, namely one or more of a pitch angle, a yaw angle and a roll angle. The actual attitude angle of the unmanned aerial vehicle can be obtained by analyzing and processing data acquired by sensors such as an accelerometer, a gyroscope, a magnetic compass and the like, and the position and the speed of the unmanned aerial vehicle can be obtained by analyzing and processing data acquired by sensors such as a GP, an ultrasonic sensor, a visual sensor and the like.
And 102, determining the attitude angle deviation needing to be adjusted according to the target attitude angle and the actual attitude angle.
Calculating the attitude angle deviation Att according to the target attitude angle required to be adjusted and the current attitude angle obtained by resolving through the attitude heading reference systemerror=Attdes-AttrelFor example, in a coordinate system of the attitude reference system, attitude angle deviations of the unmanned aerial vehicle in the pitch angle, yaw angle, and roll angle of the X axis, Y axis, and Z axis may be acquired. AttdesA target attitude angle to be adjusted, a desired attitude angle obtained in proportion according to the input of the remote controller operating lever or a target attitude angle calculated from a desired position of the unmanned aerial vehicle, AttrelIs the actual attitude angle. The invention does not limit the setting mode of the coordinate system of the attitude and heading reference system.
Step 103, dividing the adjustment interval of the attitude angle deviation into N angular velocity control intervals, wherein N is greater than or equal to 2, and determining the corresponding relation between the attitude adjustment angular rate and the attitude angle deviation value in each angular velocity control interval.
The attitude angle deviation may be a positive or negative number based on the coordinate system of the attitude reference system. The adjustment interval of the attitude angle deviation is a numerical value interval of the attitude angle deviation in the process of adjusting the attitude angle of the unmanned aerial vehicle to the target attitude angle. For example, if the attitude angle deviation is positive 20 degrees, [0, 20] is an adjustment interval of the attitude angle deviation. Dividing an adjusting interval [0, 20] of the attitude angle deviation into 3 angular speed control intervals which are respectively [0,5], [0,10], [10,20], and determining the corresponding relation between the attitude adjusting angular rate and the attitude angle deviation value in the angular speed control intervals [0,5], [0,10], [10,20 ]. The corresponding relationship may be a variety of functional relationships, such as a proportional functional relationship, an inverse parabolic functional relationship, and the like.
And 104, controlling the attitude adjusting angular rate according to the corresponding relation corresponding to the N angular speed control intervals in the adjustment, and adjusting the attitude angle of the unmanned aerial vehicle to the target attitude angle.
In unmanned aerial vehicle's flight in-process, realize the attitude angle adjustment to unmanned aerial vehicle through controlling unmanned aerial vehicle's throttle rudder volume, aileron rudder volume, elevator volume and rudder volume etc. through adjusting pitch angle, yaw angle and roll angle, with unmanned aerial vehicle's attitude angle adjustment to target attitude angle to make unmanned aerial vehicle accord with the flight action that needs the execution at present.
In one embodiment, the numerical range of the attitude angle deviation is divided into a first angular velocity control range and a second angular velocity control range which are continuous, and the absolute value of the attitude angle deviation value in the first angular velocity control range is smaller than the absolute value of the attitude angle deviation value in the second angular velocity control range. And in the first angular speed control interval, determining that the attitude adjustment angular rate and the attitude angle deviation value are in a proportional function relationship. For example, the determined scaling function relationship is:
Ratedes=kp·Atterror;
Ratedesadjusting angular rate, k, for attitudepFor proportional control parameters, kp>0,AtterrorIs the attitude angle deviation value. The value of kp can be selected according to the power system of the airplane, the takeoff mass of the airplane and the like, and taking a six-axis unmanned aerial vehicle as an example, the takeoff weight of the airplane is 32kg, and the kp can be equal to 4.0 if the single-propeller tension is 5.4 kg.
And in the second angular velocity control interval, determining that the attitude adjustment angular rate and the attitude angular deviation value are in an inverse parabolic function relationship. For example, the determined inverse parabolic function relationship is:
a is the maximum threshold value of the rotation acceleration and the unit is m/s2A >0, a being related to the mass of the aircraft, e.g. for a six-axis drone, it may be taken that a is 1000deg/s2。
And in the first angular speed control interval, controlling the attitude adjustment angular rate based on the attitude angle deviation value and according to the proportional function relation. And acquiring an attitude angle deviation value in real time, and controlling the attitude adjustment angular rate based on the attitude angle deviation value and switching to an inverse parabolic function relation when the attitude angle deviation value is determined to be increased to the interval limit value of the first angular speed control interval and the second angular speed control interval.
The attitude angle deviations of the pitch angle, the yaw angle and the roll angle which need to be adjusted can be respectively obtained, the angular velocity control intervals are respectively divided from the adjustment intervals of the 3 attitude angle deviations, and the corresponding relation between the attitude adjustment angular rate and the attitude angle deviation value in each angular velocity control interval is determined. And controlling the attitude adjustment angular rates of the pitch angle, the yaw angle and the roll angle according to the corresponding relations corresponding to the angular speed control intervals of the pitch angle, the yaw angle and the roll angle in the adjustment.
As shown in fig. 2, taking the adjustment of the pitch angle in the attitude angle as an example, the abscissa Att _ err in the figure is the attitude angle deviation, i.e., the pitch angle deviation is greater than 0, and the ordinate Rate _ des is the attitude adjustment angle Rate, i.e., the attitude adjustment angle Rate of the pitch angle. Setting 2 angular speed control intervals, and determining interval limit values as follows:
the angular speed control interval for adjusting the pitch angle of the unmanned aerial vehicle and the corresponding relation between the attitude adjustment angular rate and the attitude angular deviation value are as follows:
from the above, the slope of the linear function is kp, i.e. the designed proportional control parameter, kp is greater than 0, and the larger kp is, the faster the linear function is, the physical meaning of which is that the response of the attitude adjustment angular rate (ordinate) is also faster, but too fast, which brings larger overshoot. When the intersection point with the inverse parabola is reached, the control mode is switched to the inverse parabola control mode, and the expected attitude adjustment angular rate is smoothly reached without overshoot.
The unmanned aerial vehicle attitude control method provided by the embodiment divides the adjustment interval of the attitude angle deviation into a plurality of angular velocity control intervals, controls the attitude adjustment angular rate according to the corresponding relation corresponding to the angular velocity control intervals in the adjustment, can use fast proportional control at the initial stage of the attitude adjustment, uses larger proportional parameters, accelerates the response speed, and quickly eliminates errors, and adopts an inverse parabolic control algorithm at the later stage of the attitude adjustment, so that the angular acceleration in the adjustment can be limited, the overshoot can be reduced, and the expected attitude angular rate can be obtained.
In one embodiment, as shown in fig. 3, the present invention provides an unmanned aerial vehicle attitude control apparatus 30, comprising: an adjustment data acquisition module 31, an attitude data acquisition module 32, a control parameter setting module 33, an attitude angle control module 34, and the like. The adjustment data acquisition module 31 acquires a target attitude angle of the unmanned aerial vehicle to be adjusted. The attitude data acquisition module 32 acquires the current actual attitude angle of the drone.
The control parameter setting module 33 determines an attitude angle deviation to be adjusted according to the target attitude angle and the actual attitude angle, divides an adjustment interval of the attitude angle deviation into N angular velocity control intervals, and determines a corresponding relationship between an attitude adjustment angular rate and an attitude angle deviation value in each angular velocity control interval, wherein N is greater than or equal to 2. The attitude angle control module 34 adjusts the attitude angle of the unmanned aerial vehicle to a target attitude angle, wherein the attitude adjustment angular rate is controlled according to the corresponding relationship corresponding to the N angular rate control intervals during the adjustment. The corresponding relation comprises: proportional functional relationships, inverse parabolic functional relationships, and the like. The target attitude angle and the actual attitude angle are one or more of a pitch angle, a yaw angle and a roll angle.
As shown in fig. 4, the control parameter setting module 33 includes: an interval division unit 331 and a control function determination unit 332. The section dividing unit 331 divides the numerical section of the attitude angle deviation into a first angular velocity control section and a second angular velocity control section which are continuous, wherein the absolute value of the attitude angle deviation value in the first angular velocity control section is smaller than the absolute value of the attitude angle deviation value in the second angular velocity control section. The control function determination unit 332 determines that the attitude adjustment angular rate and the attitude angular deviation value are in a proportional function relationship in the first angular velocity control interval. And in the second angular velocity control interval, determining that the attitude adjustment angular rate and the attitude angular deviation value are in an inverse parabolic function relationship.
The control function determining unit 332 determines the proportional function relationship as:
Ratedes=kp·Atterror;
Ratedesadjusting angular rate, k, for attitudepFor proportional control parameters, kp>0,AtterrorIs the attitude angle deviation value.
The control function determining unit 332 determines that the inverse parabolic function relationship is:
where a is the maximum threshold for rotational acceleration.
The control function determination 332 unit determines the interval limit value as:
as shown in fig. 5, the attitude angle control module 34 includes: a first adjusting unit 341 and a second adjusting unit 342. The first adjustment unit 341 controls the attitude adjustment angular rate based on the attitude angular deviation value and according to the proportional functional relationship in the first angular velocity control section. The second adjusting unit 342 obtains the attitude angle deviation value in real time through the attitude data obtaining module, and controls the attitude adjusting angular rate based on the attitude angle deviation value and switching to the inverse parabolic function relationship when it is determined that the attitude angle deviation value increases to the interval limit value of the first angular speed control interval and the second angular speed control interval.
In one embodiment, the present invention provides a drone comprising: unmanned aerial vehicle attitude control device as above.
Fig. 6 is a schematic block diagram of another embodiment of the attitude control device of the unmanned aerial vehicle according to the invention. As shown in fig. 6, the apparatus may include a memory 61, a processor 62, a communication interface 63, and a bus 64. The memory 61 is used for storing instructions, the processor 62 is coupled to the memory 61, and the processor 62 is configured to execute the unmanned aerial vehicle attitude control method based on the instructions stored in the memory 61.
The memory 61 may be a high-speed RAM memory, a non-volatile memory (non-volatile memory), or the like, and the memory 61 may be a memory array. The storage 61 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules. The processor 62 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement the drone attitude control method of the present invention.
The unmanned aerial vehicle attitude control method, the unmanned aerial vehicle attitude control device and the unmanned aerial vehicle provided by the embodiments divide an adjustment interval of attitude angle deviation into a plurality of angular velocity control intervals, control attitude adjustment angular rate according to a corresponding relation corresponding to the angular velocity control intervals in adjustment, can use fast proportional control at an initial attitude adjustment stage, use larger proportional parameters, accelerate response speed, and quickly eliminate errors, and adopt an inverse parabolic control algorithm at a later attitude adjustment stage, so that angular acceleration in adjustment can be limited, overshoot can be reduced, an expected attitude angular rate can be obtained, the stability of unmanned aerial vehicle attitude adjustment and flight can be improved, the safety factor of flight can be improved, and user experience can be improved.
The method and system of the present invention may be implemented in a number of ways. For example, the methods and systems of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.