/Quadrotor_control_and_design

Quadrotor design and control

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Quadrotor Control and Design

Project Objectives

  • Assemble the electromechanical system of a quadrotor (joystick control, autonomous control).
  • Program interfaces between embedded computer (Raspberry Pi running Linux) and external sensors and actuators (IMU, motor controllers).
  • Program and tune a time-critical control loop for stable flight.
  • Create software stack that interacts with low-level code to achieve high-level behavior including:
    1. Control the quadrotor with logitech joystick (demo).
    2. Autonomous flight with HTC vive lighthouse (demos).

Software/Language Used

Hardware Used

Weekly Milestones

Week 1 & 2

  • Set up IMU, SD card, wifi dongle, Raspberry Pi.
  • Calibrate gyro from X, Y, and Z direction, roll and pitch angles from corresponding X, Y acceleration.
  • Add complimentary filters to reduce the noises from acceleration in short term and drifts from gyro in long term.
  • Add safety check and control.

Week 3

  • Build quadrotor from commodity parts.
  • Check safty control.
  • Set up proportional control (P control) w.r.t pitch.
  • Set up proportional + differential control (PD control) w.r.t pitch.
  • Set up proportional + integral + differential control (PID control) w.r.t pitch.

Here is the electric system schematic diagram for quadrotor:

Here is the assembled quadrotor:

Week 4

  • Tune the PID w.r.t pitch.
  • Build connection between joystick and quadrotor via virtual machine.
  • Test pause, unpause, calibrate, kill all buttons on the joystick.

Here is what can each button on joystick do:

Week 5

  • Tune the PID w.r.t pitch, which eventually reduce the overshoot and transient time.
  • Add desire pitch control on joystick (±25 degree). check joystick here
  • Add Thrust control on joystick (1250 ± 100 pwm).
  • Set up proportional control (P control) w.r.t roll.
  • Set up proportional + differential control (PD control) w.r.t roll.
  • Set up proportional + integral + differential control (PID control) w.r.t roll.

Week 6

  • Tune the PID w.r.t roll, which eventually reduce the overshoot and transient time.
  • Add desire roll control on joystick (±25 degree). check joystick here
  • Add desire yaw control on joystick (±45 degree).
  • Ground flight test (fly from one point to another point at low level).

Week 7

  • Change the desire pitch & roll control on joytick to ±10 degree.
  • 2-feet flight test (fly from one point to another point at 2-feet).

Demo for joystick control of quadrotor

joystick control

Week 8

Start from week 8, we switch from joytick control flight to autonomous flight by using HTC vive lighthouse and its corresponding sensors.

  • Assemble vive sensors to the chassis of quadrotor.
  • Test sensor by reading the data.
  • Add safety control during automonous flight.
  • Add autonomous control for yaw, which have pitch axis (front of the robot) to always face in -y direction (proportional control).

Here is vive lighthouse we use:

Here is assembled quadrotor with vive sensors:

Week 9

  • Add autonomous control for X, Y direction (proportional + differential control).
  • Add filters for autonomous control for X, Y, and yaw to reduce the noises from vive light house.
  • Mix the autonomous control and joystick control for X, Y, and yaw.
  • Test autonomous control so far by Using joystick thrust to keep quadrotor about 2 feet off ground.

Week 10

  • Add autonomous thrust control (Z direction, height off ground) (calibrate Z acceleration, average Z acceleration, fuse Z velocity).

Demos for autonomous control of quadrotor

First:

autonomous control

Second:

autonomous control