I am tuning PID for quadcopter, the problem i have is that with different base Throttle, i seems that i have to adjust different PID gains in order for the quadcopter to balance!

  • $\begingroup$ I guess you use a Quadro with 4 motors. Are all the motors the same type? $\endgroup$
    – TobiasK
    Sep 10 '14 at 7:39
  • $\begingroup$ I use the same type of course! $\endgroup$
    – Earthgod
    Sep 10 '14 at 14:13

Well, the optimal PID parameters are an estimation that should do best at all situations. It's possible that you just need to find better PID parameters.

But it could also be a hardware problem: It helps to let the quad hover a bit and figure out if it's drifting in a specific direction - That should point you to the culprit, or at least to the culprit 'leg'.

The issues to check, in my opinion, will be:

  1. ESC calibration isn't the same on all motors - The ESCs do not react the same to the same throttle level. Recalibrating the ESCs (preferably at the same time) should fix that.
  2. The props could be unbalanced - Check that the props are in a good condition and don't have any deformations.
  3. Maybe one of the ESCs is acting up? Try measuring the current usage of each ESC changing the throttle from low to high. It should be about the same on every motor.
  4. Check for loose stuff on the quad - Things tend to resonate in different throttle levels causing the quad to change its behaviour.
  5. Try switching between parts. I'd go with switching ESC between sides and checking if it makes a difference in the drift direction.

Lastly, it could be (not likely however) a problem in the PID implementation. Which flight controller are you using?

ESC calibration

ESCs translate the signal coming from your receiver (PWM signal usually) to 3-phase voltage given to the motor. PWM signal is basically a square wave with changing duty cycle. enter image description here

The duty cycle (D.C.) is really just the value the receiver receives from the RC Transmitter (the remote). Since each receiver & transmitter are different, the received value isn't always going from 0% to 100%. It can sometimes go from 20% to 90%, or in worse cases 40% to 60%, etc. Usually low D.C. means low channel value (low throttle in our case), but Futaba tend to reverse that (high D.C. = low channel value).

So what you need to do is to calibrate your ESCs to know the dynamic range of your throttle (how much D.C is low and how much is high). Check the ESC manual - it should explain how to do that. Usually it's something like:

  1. Put throttle all the way up
  2. Connect power to ESC
  3. Wait for 3 beeps (or something)
  4. Lower throttle until lowest value
  5. Wait for 3 beeps

But it differs from ESC to ESC

Edit: Ran into a another explanation: Purpose of programming an ESC

  • $\begingroup$ We use Tiva C from TI, and we write own code for the quadcopter, which employs the DCM filter to compute the angles. The sensor is MPU 9150. I am a newbie and also english is not my native language! So please help me! what does ESC Calibration mean? Why do we need that? $\endgroup$
    – Earthgod
    Sep 11 '14 at 2:36
  • $\begingroup$ Edited my answer a bit. Hope it helps! $\endgroup$
    – Nitay
    Sep 11 '14 at 7:52
  • $\begingroup$ Thanks so much. Iam trying to fix that, i'll let you know soon the result. $\endgroup$
    – Earthgod
    Sep 11 '14 at 12:01
  • $\begingroup$ Now i meet a problem that in my PID, i use (set_point - current_angle ), which i believe that it will help the quadcopter to balance. However, i have to change it to (current_angle - set_point), but in this case the quadcopter tends to go to one direction if i push that way and similarly for the other side. Anyone can help me? $\endgroup$
    – Earthgod
    Sep 13 '14 at 4:19
  • $\begingroup$ well - changing the sign of the error will cause the control loop to behave differently. I think you might want to take a look on some other implementations for quadcopter PIDs and get some ideas $\endgroup$
    – Nitay
    Sep 13 '14 at 20:09

I found the reason, in my original code, i just use one stage PID. The right one should comprise of 2 cascaded PIDs: rate PID and stablized PID

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.