Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel1
maxLevel7

Controls Research

  • Controls:

    • Anni + ??

  • Attitude Manager ??

Roadmap Planner
maplinks
timelinetrue
source%7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222021-09-27%2000%3A00%3A00%22%2C%22endDate%22%3A%222022-04-30%2000%3A00%3A00%22%2C%22displayOption%22%3A%22MONTH%22%7D%2C%22lanes%22%3A%5B%7B%22title%22%3A%22Controls%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%22%2C%22text%22%3A%22%23594300%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%22Research%22%2C%22description%22%3A%22This%20is%20the%20first%20bar.%22%2C%22startDate%22%3A%222021-10-01%2000%3A00%3A00%22%2C%22duration%22%3A0.38613861386138615%2C%22rowIndex%22%3A0%2C%22id%22%3A%229a5c20a6-8098-4892-a13c-7f077ff0e319%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22title%22%3A%22Simulation%22%2C%22description%22%3A%22This%20is%20the%20second%20bar.%22%2C%22startDate%22%3A%222021-10-12%2015%3A55%3A14%22%2C%22duration%22%3A6.574257425742574%2C%22rowIndex%22%3A1%2C%22id%22%3A%22bda80769-7637-4e55-b401-f56274e18e27%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A2%2C%22startDate%22%3A%222021-10-28%2000%3A14%3A15%22%2C%22id%22%3A%223bc65081-4d19-4ba0-9ab7-a0c3d9d6c70f%22%2C%22title%22%3A%22Manual%20Controls%20Testing%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.1287128712871286%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A3%2C%22startDate%22%3A%222021-11-16%2014%3A26%3A44%22%2C%22id%22%3A%2267effb69-416f-413e-b3dc-a42a817d10ed%22%2C%22title%22%3A%22Autonomous%20Controls%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.0297029702970297%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A4%2C%22startDate%22%3A%222021-11-29%2020%3A51%3A40%22%2C%22id%22%3A%22e11d92ff-2a43-4ccb-b960-cb59dfbcb8b5%22%2C%22title%22%3A%22Testing%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A5%2C%22startDate%22%3A%222021-12-31%2006%3A48%3A42%22%2C%22id%22%3A%22da89c56e-dd8b-4060-b44e-b593c4242abf%22%2C%22title%22%3A%22Tuning%22%2C%22description%22%3A%22%22%2C%22duration%22%3A3.376237623762376%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22Attitude%20Manager%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%22Bar%203%22%2C%22description%22%3A%22This%20is%20the%20third%20bar.%22%2C%22startDate%22%3A%222021-10-01%2000%3A00%3A00%22%2C%22duration%22%3A2.5%2C%22rowIndex%22%3A0%2C%22id%22%3A%2271a6b178-1fe6-4e76-b004-819e7cec24ab%22%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22New%20Lane%22%2C%22color%22%3A%7B%22lane%22%3A%22%23d04437%22%2C%22bar%22%3A%22%23dc7369%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%5D%7D%5D%2C%22markers%22%3A%5B%7B%22title%22%3A%22Oct%209%3A%20Reach%20out%22%2C%22markerDate%22%3A%222021-10-12%2023%3A17%3A13%22%7D%2C%7B%22markerDate%22%3A%222021-11-16%2009%3A41%3A35%22%2C%22title%22%3A%22Nov15%20Manual%20Flight%22%7D%2C%7B%22markerDate%22%3A%222022-04-11%2016%3A38%3A01%22%2C%22title%22%3A%22Competition%22%7D%5D%7D
pagelinks
titleRoadmap%20Planner
hash01fd74d17b979f8c5d3897af54e3d8d8

Specification & Modules

Controls Module ??

  • Handles the control of the aircraftTakes in current state data && desired position and flies in that direction

Input data:

  • Position data from PM

  • Position data from IMU (already filtered?)

  • Desired position to be in (as a vector from current position, encoded with yaw angle)

Output:

  • motor % → to be converted to PWM signals.

Sensorfusion Module

  • Most of the work as the same as done by Tony, but we need to run local sensorfusion for fastest IMU updates.

(ground-side) Simulation

  • hopefully have some simulation done in matlab or smth?

Targets & Questions

  • Target 1: Stable flight in all directions

  • Target 2: Fancy flight in all directions

  • How are we localizing - how does PM know to tell us which way to go!?

    • do we operate under one local heading as 0 and PM handles the rest of the spinny localization?

    • local or global reference frame? → not high priority (but I think local is easier?)

  • Other Considerations:

    • How to handle pre-flight sensor calibration (is it triggered by user for tele-op or occurs automatically before flying?)

    • How to handle catastrophic failure - if the entire controller system fails to work, would we shut off all motors and let it fall? Or is there a defualt motor PWM value that can allow the drone to fall softly without damaging itself?

Timeline

  • development start by reading week.

  • Wednesday reading week → discuss how to approach this in terms of implementation

  • Manual controls with RAW PWM values can be done by E.O. reading week.

  • Implementing fancier methods later

Project Tasks

  •  Implement MANUAL PWM based controls for quadcopter.
  •  Sensorfusion for IMU data.
  •  Determine Controls architecture for remote control control
  •  Stability Simulation
  •  Stability Code????
    •  to be expanded

Meetings

October 13, 2021 Anthony B

Q1: Input Controls

  • Before they went through PID Controller

  • Usually done (and attempted for ZP)

    • sticks map directly to angles.

    • Pilot commands setpoint and angle.

  • what if the value is too much?

    • payload of drone doesn't actually matter, it doesn't matter?

    • objects in the air rotate around their center of gravity, no matter what they weight and what their weight distribution is.

q1a: is one set of PID enough?

  • if you take care to adjust, you'll get better results.

q1b: trim from both sides?

  • for sake of symmetry, trim from both sides

    • if only increasing one side, you'll have more total thrust and drone will actually go up.

q1c: how is yaw controlled?

  • rate of turn -> see dji.

q1d: set hard limits?

  • Recommended to set hard limits.

    • if the drone is past some angle, it declares an emergency and goes into failed state.

    • once you are past 90 degrees, all the angles fail

      • gimbal lock !!

Q2: what happens when motors fail?

  • In the worst case scenario, we turn off all motors and just fall out of the sky.

  • Code has to have option to shut everything down.

Q3: Independent PID?

  • Works fine.
    -> simple pid will get you in the air and get you stable

  • once you start combining euler angles, then they start to behave non-linearly.
    -> at low angles, it's fine.
    -> to get fancier, you'd need something fancier like predictive or non-linear.

  • CAN GUARANTEE PID WORKS ! ! !! (yay).

Q4: Tuning in Simulation?

  • Simulink model ! !

    • it's a simple model with no complicated physics.

    • modelled as weight in the air with motors as linear forces.

  • Matlab has euler angle block

  • Can use simulink model for ZP and make it look like a quadcopter instead of a fixed wing to start

  • It'll be super simple → refer to Nixon

  • He never got it super close to quad

    • it was a super rough place to start.

Q5: IMU Senor drift?

  • IMU keeps drone level and pointing in right direction

  • Will not keep drone at same longitute and lattitude.

    • drone will drift a bunch.

      • maybe not may be a big issue

      • Update from GPS module from PM then?

  • ZP sending data?

    • PM sends a track (fly this far, how)

    • AM obliges, this is how you fly that way.

    • Send Vectors! 😃

    • PM navigator, AM captain 😃

Q5: Sensor Fusion needed?

  • Tony’s sensor fusion module will work fine.

    • magnetometer never really got working.

  • Need magnetometer, but IMU should have one built in.

  • Share IMU data?

    • such fancy imu, why no use?

October 12, 2021

  • Might be better to go through articles and guides.

  • Have somebody start something soon for raw pwm values.

    • Iterate later.

  • Alternatively use Tony’s Sensor Fusion and some PID values to keep heading.

    • Local reference frame updated against global frame soon.

  • Center sticks should hover in place, no motion.

  • MAP RC values to PID heading

    • PID → PWM values.

  • Anthony B

    • how do stick inputs translated into direction (radius, %, rate?)

      • Max angle determined by how the drone can fly stably.

      • Full stick = go that way as fast as you can.

        • PID auto-tunes to go as fast as you can without dropping altitude as you go.

    • how did he setup his pid if he used any?

    • Did he use matlab/simulink?

  • How does stabilization work.

    • PID sets to 0 and just keeps it there.

  • MAX PWM set after testing (with PID values).

  • Attempt testing for PID’s in waterloo.

October 7, 2021

  • Send E-mail to Stephen Smith Friday Oct 8th 2021 → end of day. (or early saturday).

    • come up with some ideas to send to him about controls

    • hopefully get guidance wrt our specific requirements → help us choose methods?!

  • Sending info to the drone as a spline (especially for autonomous flight)

  • Focus on two aspects

    • teleop and autonomous. → both get pretty ok with vectors.

    • for autonomous → pm should give us a vector.

    • for tele-op, depending on how we handle it, calculate internally or in PM - also consider that PM is on Autopilot while Teleop and RC input will be on safety (prob best to keep teleop localized completely on safety)

  • PM → tell you where to go | AM → figure out how to get there without crashing

  • Definitely can get manual control done by end of reading week with raw pwm values.

    • fancier flight will have to come later.

October 5, 2021:

  • Start development by the end of reading week.

  • Meet next Thursday 7:30.

    • Come with ideas. Be prepared to prepare documents.

    • Questions and critical areas to ask the experts.

  • Reach out on friday.

  • Take weekend to look over data

  • Try to meet next tuesday.

  • Aim for reading week start

  • Try to make applicable for hexa/quadcopter (depending on what’s chosen). Worry about layout agnostic controls later

Questions to Ask Anthony B:

  • How do the RC inputs get mapped/converted into PWM - rate of change, set angle, etc.

    • Is there a max angle you set, or is it through PID tuning only?

    • How does the stabilization work (centering sticks sets quad in 0 roll and pitch angle)

  • How to stabilize the drone while you’re increasing/decreasing thrust

  • How did he set up his PID for the tuning

  • If he used MATLAB or Simulink for the tuning and how he used it, any resources, etc.

  • Specific switch/sequence for calibration to calibrate IMU at the beginning of each flight.