Search

CN-120803009-B - Light four-rotor unmanned aerial vehicle and control method thereof

CN120803009BCN 120803009 BCN120803009 BCN 120803009BCN-120803009-B

Abstract

The invention relates to the technical field of automatic control of aircrafts, and solves the problem that an unmanned aerial vehicle cannot realize fixed-point hovering when a GPS signal is poor and is insufficient in fixed-height precision, in particular to a light-weight four-rotor unmanned aerial vehicle and a control method thereof. The control method provided by the invention can realize high-precision position height setting and unmanned plane optical flow fixed-point effects. Meanwhile, an unmanned aerial vehicle safety protection algorithm is designed, the signal state of the unmanned aerial vehicle is identified through the algorithm, and the unmanned aerial vehicle can be protected to stably land after the unmanned aerial vehicle remote control signal is identified to be lost.

Inventors

  • Su Yanxu
  • DING YU
  • Gong Tianzhu
  • ZHANG QIYANG

Assignees

  • 安徽大学

Dates

Publication Date
20260508
Application Date
20250710

Claims (7)

  1. 1. The control method of the light four-rotor unmanned aerial vehicle is characterized by comprising the following steps of controlling the attitude of the unmanned aerial vehicle, controlling the height of the unmanned aerial vehicle and controlling the position of the unmanned aerial vehicle at fixed points: acquiring attitude angle data and angular speed data of the unmanned aerial vehicle, and adopting a double-loop PID algorithm to control the attitude of the unmanned aerial vehicle according to the attitude angle data and the angular speed data; acquiring the height data and the speed data in the height direction of the unmanned aerial vehicle, and adopting a double-loop PID algorithm to realize the control of the height of the unmanned aerial vehicle according to the height data and the speed data in the height direction; Acquiring speed data of the unmanned aerial vehicle in the X-axis and Y-axis directions, and respectively carrying out closed loop control on the speed data in the X-axis and Y-axis directions by adopting a single-loop PID algorithm to realize the position fixed point control of the unmanned aerial vehicle; After the control of the unmanned aerial vehicle posture, the control of the unmanned aerial vehicle height and the position fixed-point control of the unmanned aerial vehicle are realized, a protection mechanism is executed according to the signal state of the unmanned aerial vehicle based on a safety protection algorithm; the control of unmanned aerial vehicle gesture and the control of unmanned aerial vehicle height adopt dicyclo PID control and carry out parameter debugging, including the debugging of gesture ring and altitude ring, promptly: first debug the gesture ring, including: Fixing the unmanned aerial vehicle on a test frame, firstly debugging a pitch angle, giving a minimum value to a proportional gain Kp serving as an outer ring pitch angle attitude ring, and then adjusting the proportional gain Kp of an inner ring; continuously increasing the proportional gain Kp of the inner ring until the pitch angle of the unmanned aerial vehicle is stable and slightly oscillates, and manually pushing the unmanned aerial vehicle, wherein the unmanned aerial vehicle has resistance and the pitch angle can be quickly corrected; Then, adjusting a differential gain Kd parameter to enable the unmanned aerial vehicle not to oscillate any more, and adjusting an integral gain Ki parameter to eliminate steady-state errors of the pitch angle of the unmanned aerial vehicle; finally, slightly adjusting parameters of proportional gain Kd and integral gain Ki of the outer ring, so that the unmanned aerial vehicle has better stability and smaller steady-state error; After the pitch angle is regulated, the roll angle is regulated, and the PID parameters of the roll angle are identical to the pitch angle; finally, the yaw angle is regulated, and the parameter regulation mode of the yaw angle is consistent with the pitch angle; the attitude ring is debugged and then the height ring is debugged, and the method comprises the following steps: Calculating a take-off throttle, and setting an initial throttle at the beginning of PID control of the unmanned aerial vehicle as the take-off throttle; Firstly, giving a minimum value to a proportional gain Kp parameter of a height outer ring; observing the dynamic response of the unmanned aerial vehicle in the height direction, and adjusting the proportional gain Kp parameter in the inner loop PID parameter; The stability of the unmanned aerial vehicle is ensured by adjusting the differential gain Kd parameter of the unmanned aerial vehicle inner ring; adjusting the integral gain Ki parameter of the inner ring to eliminate steady-state errors on the height of the unmanned aerial vehicle; and the parameters of the proportional gain Kd and the integral gain Ki of the outer ring are regulated, so that the unmanned aerial vehicle can obtain a better control effect.
  2. 2. The control method according to claim 1, wherein in realizing the control of the attitude of the unmanned aerial vehicle, the specific process includes: acquiring quaternary data of unmanned aerial vehicle through attitude sensor And according to quaternary data Rotating the reference gravity vector into a machine body coordinate system to obtain each axis gravity component used for representing the angular speed data of the unmanned aerial vehicle under the machine body coordinate system, wherein the quaternion rotation formula is as follows: ; in the formula, Respectively representing the gravity components of the corresponding shafts under the coordinate system of the machine body projected by gravity; According to a formula, combining quaternion data and gravity components of each axis, calculating Euler angles used for representing unmanned aerial vehicle attitude angle data, wherein the Euler angle calculating formula is as follows: ; in the formula, Respectively representing the yaw angle, the pitch angle and the roll angle of the unmanned aerial vehicle; based on the attitude angle data and the angular velocity data, the attitude angle ring is used as an outer ring to control the angle of the unmanned aerial vehicle by utilizing a double-ring PID algorithm, the output result of the outer ring is used as the expected input of the angular velocity ring, namely an inner ring, and the output of the inner ring acts on a motor controller to realize the control of the attitude of the unmanned aerial vehicle.
  3. 3. The control method according to claim 1, wherein in realizing the control of the unmanned aerial vehicle height, the specific process includes: An optical flow sensor is adopted as a laser ranging sensor, and the current unmanned aerial vehicle height data is obtained through the laser ranging sensor; Differentiating the height data to obtain speed data in the height direction, and carrying out mean value filtering on the speed data to obtain final speed data in the height direction, wherein a specific mean value filtering formula is as follows: ; in the formula, Refers to the final speed data in the height direction; Front finger Beat speed data; Is a total beat of the velocity data; Based on the height data and the speed data in the height direction, taking the height ring as an outer ring and the speed ring as an inner ring, adopting a double-ring PID control algorithm to take the output of the outer ring as the input of the inner ring, and enabling the output of the inner ring to act on a motor controller of the unmanned aerial vehicle so as to realize the control of the height of the unmanned aerial vehicle.
  4. 4. The control method according to claim 1, wherein in realizing the position-fixed point control of the unmanned aerial vehicle, the specific process includes: selecting an optical flow sensor to acquire speed data of the unmanned aerial vehicle in the X-axis and Y-axis directions; And (3) carrying out closed-loop control on speed data in the X-axis and Y-axis directions by adopting single-loop PID control, wherein the expected speeds of the X-axis and the Y-axis are all 0, and PID output results act on a motor controller of the unmanned aerial vehicle to realize the position fixed-point control of the unmanned aerial vehicle.
  5. 5. The control method according to claim 1 or 4, wherein the position-fixed-point control of the unmanned aerial vehicle adopts single-loop PID control and performs parameter debugging, comprising: firstly setting the expected speeds of an X axis and a Y axis to be 0, adjusting the proportional gain Kp parameter of the X axis of the unmanned aerial vehicle, observing the offset of the unmanned aerial vehicle in the X axis direction, and continuously increasing the proportional gain Kp parameter until the position coordinates of the unmanned aerial vehicle in the X axis direction are unchanged and slight oscillation occurs; Then adjusting a differential gain Kd parameter until the unmanned aerial vehicle does not oscillate in the X-axis direction and the position coordinate is unchanged, and taking 0 as an integral gain Ki parameter; finally, the Y-axis parameter is consistent with the X-axis parameter.
  6. 6. The control method according to claim 1, wherein in the performing the protection mechanism based on the security protection algorithm according to the signal state of the unmanned aerial vehicle, the specific process includes: Setting the flag_ Nosignal flag bit to be automatically set to 1 if the unmanned aerial vehicle does not receive a remote controller signal for a long time, or to be 0 if the flag_ Nosignal flag bit is not set to be the same; The timer interrupt function automatically detects the flag bit at intervals, and if the flag bit is found to be 1, the suspected signal loss of the unmanned aerial vehicle is judged; the timer interrupt function starts to count the variable Nosignal _cnt, if the count value is larger than 500, namely the signal loss of the unmanned aerial vehicle exceeds a period of time, the unmanned aerial vehicle is judged to determine the signal loss, the unmanned aerial vehicle enters a forced landing mode, and protection measures are executed; If the flag_ Nosigna flag bit is judged to be 0 in the counting process, the unmanned aerial vehicle signal recovery is judged, and the Nosignal _cnt count value is cleared to be 0; based on the method, the unmanned aerial vehicle can realize emergency forced landing when the signal is lost, the expected angles of the gesture ring are all set to 0 when the unmanned aerial vehicle is forced to land, the unmanned aerial vehicle presents a horizontal gesture, meanwhile, the expected height data is gradually decreased to 0, and the unmanned aerial vehicle gradually decreases the height with the horizontal gesture until landing safely.
  7. 7. A lightweight quadrotor unmanned aerial vehicle, using the control method of any of the preceding claims 1-6, characterized in that the lightweight quadrotor unmanned aerial vehicle is implemented to include control of attitude, altitude and position pointing, and to enter a forced landing mode and to perform protective measures until safe landing after recognizing loss of the unmanned aerial vehicle remote control signal.

Description

Light four-rotor unmanned aerial vehicle and control method thereof Technical Field The invention relates to the technical field of automatic control of aircrafts, in particular to a lightweight four-rotor unmanned aerial vehicle and a control method thereof. Background With the wide application of the quadrotor unmanned aerial vehicle in life, a control method of the quadrotor unmanned aerial vehicle has great attention in the field of scientific research. Most scientific research institutions or universities directly purchase existing four-rotor unmanned aerial vehicle platforms to carry out related experiments, and the bottom control method and hardware of the four-rotor unmanned aerial vehicle platforms are not concerned. However, most of the control performance of the unmanned aerial vehicle, such as anti-interference performance, and positioning accuracy are determined by the underlying flight control system. The research on the bottom layer of the unmanned aerial vehicle flight control system has important significance for improving various performances of the unmanned aerial vehicle. At present, the unmanned aerial vehicle has the technical bottlenecks of limiting the traditional height setting control technology, and the traditional unmanned aerial vehicle generally adopts a barometer (Barometer) for height measurement, but the barometer is easily influenced by ambient temperature and air flow disturbance, so that the height setting error is larger (usually more than +/-1 m) and cannot meet high-precision application (such as indoor flight and accurate take-off and landing). Outdoor unmanned aerial vehicles mainly rely on GPS positioning, but fail completely in indoor or GPS signal-free environments (such as warehouses and tunnels). In addition, most consumer unmanned aerial vehicle mainstream control schemes on the market all adopt STM32F4 series chip at present, and the chip cost is higher, and unmanned aerial vehicle weight is great moreover, and mobility is not high, once falls the machine, and unmanned aerial vehicle is extremely fragile. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a lightweight four-rotor unmanned aerial vehicle and a control method thereof, and solves the problems that the unmanned aerial vehicle cannot realize fixed-point hovering when the fixed-point high precision is insufficient and GPS signals are poor. In order to solve the technical problems, the invention provides a control method of a light four-rotor unmanned aerial vehicle, which comprises the following steps of: acquiring attitude angle data and angular speed data of the unmanned aerial vehicle, and adopting a double-loop PID algorithm to control the attitude of the unmanned aerial vehicle according to the attitude angle data and the angular speed data; acquiring the height data and the speed data in the height direction of the unmanned aerial vehicle, and adopting a double-loop PID algorithm to realize the control of the height of the unmanned aerial vehicle according to the height data and the speed data in the height direction; Acquiring speed data of the unmanned aerial vehicle in the X-axis and Y-axis directions, and respectively carrying out closed loop control on the speed data in the X-axis and Y-axis directions by adopting a single-loop PID algorithm to realize the position fixed point control of the unmanned aerial vehicle; after the control of the unmanned aerial vehicle posture, the control of the unmanned aerial vehicle height and the position fixed point control of the unmanned aerial vehicle are realized, a protection mechanism is executed according to the signal state of the unmanned aerial vehicle based on a safety protection algorithm. In order to compress the production cost of the unmanned aerial vehicle and improve the anti-falling performance and the maneuverability of the unmanned aerial vehicle, the invention develops a lightweight unmanned aerial vehicle which is based on an STM32F1 series main control chip with lower price and can realize good control performance, maneuvering performance and safety protection function. In addition, the hardware of the invention adopts a lightweight scheme. The unmanned aerial vehicle has the advantages that the small hollow cup brushless motor is used as a driving module, the STM32F103 is used as a main control chip, the flight control PCB is designed and laid out by adopting light elements, and the unmanned aerial vehicle can be ensured to be light, high in maneuverability and resistant to falling by matching with a double-ring PID control algorithm and an unmanned aerial vehicle safety protection algorithm. Further, in implementing the control of the unmanned aerial vehicle gesture, the specific process includes: The method comprises the steps of obtaining quaternary data q x、qy、qz、qw of the unmanned aerial vehicle through an attitude sensor, rotating a reference gravity vector into a machine body coordinate s