Difference between revisions of "Altitude PID"

From MultiWii
Jump to: navigation, search
(fix typos)
Line 2: Line 2:
 
==Requirements==
 
==Requirements==
 
Here are some notes for achieving a good altitude hold:
 
Here are some notes for achieving a good altitude hold:
* protect the [[Hardware#Barometer_.2F_Altimeter|barometric]] sensor from light and air turbulence (a black plastic tube glued on the pcb with some foam inside or anything else).
+
* Protect the [[Hardware#Barometer_.2F_Altimeter|barometric]] sensor from light and air turbulence (a black plastic tube glued on the pcb with some foam inside or anything else).
* tune your multirotor with proper [[Calibration_Accelerometer| Acc calibration]] , radio and Acc trims
+
* Ensure that your altitude reading is accurate enough for your needs... eg if you want altitude hold to hover 1M from the ground, you need much less than 1M noise in the altitude readings that are reported from the FC.
* consider that you should activate baro only when a stable hover is reached
+
* Tune your multirotor with proper [[Calibration_Accelerometer| Acc calibration]] , radio and Acc trims
 +
* Consider that you should activate baro only when a stable hover is reached
 
* Once you activate the baro DO NOT touch anymore throttle
 
* Once you activate the baro DO NOT touch anymore throttle
 
* Once with baro on you should not notice any differences in behavior between Acro and Acc mode.
 
* Once with baro on you should not notice any differences in behavior between Acro and Acc mode.

Revision as of 00:38, 16 September 2015

Requirements

Here are some notes for achieving a good altitude hold:

  • Protect the barometric sensor from light and air turbulence (a black plastic tube glued on the pcb with some foam inside or anything else).
  • Ensure that your altitude reading is accurate enough for your needs... eg if you want altitude hold to hover 1M from the ground, you need much less than 1M noise in the altitude readings that are reported from the FC.
  • Tune your multirotor with proper Acc calibration , radio and Acc trims
  • Consider that you should activate baro only when a stable hover is reached
  • Once you activate the baro DO NOT touch anymore throttle
  • Once with baro on you should not notice any differences in behavior between Acro and Acc mode.
  • When changing PID values begin with P, I and D values at zero,


Altitude PID tuning

  • Take notes, record which values cause desirable/undesirable effects, this will be useful in future!
  • Set Altitude P, I and D to 0.
  • Slowly increase D from 0 in increments of 1-2 until you start to get a slow yo yo movement. (When I tried this step, I don't really get a yo-yo motion, with low D values the copter shoots up when alt hold is enabled, as it increases it holds with drift, then if increased further it drops to the ground)
  • Reduce D a little until yo yo movement stops (or, if no yoyo motion, reduce D until the hover sounds smoother!).
    • At this point the multicopter will start to hold altitude for a short time with drift
  • Increase P slowly now in small increments (0.1-0.2), and you will find that the multicopter will begin to hold altitude better, until it starts the yo yo movement again,
  • reduce P until yo yo movement goes away. The multicopter will now hold altitude with less drift.
  • Increase I gradually to reduce the drift that occurs as the battery runs down and the throttle needed to keep the copter at hover changes.
  • If copter moves with a sinusoidal motion from altitude point (point when you activate baro) decrease P value little by little, when you reach a good result increase D parameter.