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!
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:
- 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.
- The props could be unbalanced - Check that the props are in a good condition and don't have any deformations.
- 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.
- Check for loose stuff on the quad - Things tend to resonate in different throttle levels causing the quad to change its behaviour.
- 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?
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.
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:
- Put throttle all the way up
- Connect power to ESC
- Wait for 3 beeps (or something)
- Lower throttle until lowest value
- Wait for 3 beeps
But it differs from ESC to ESC
Edit: Ran into a another explanation: Purpose of programming an ESC
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