Is there any information about how to properly tune those PID in arduplane? P tuning is easy, but how about I and D. under what circumstances we need to increase or decrease the I or D value? A detail illustration will help a lot. Thanks
You need to be a member of diydrones to add comments!
Replies
Hi,
For a plane, you will normally not need servo I.
I is for conditions that require a nonzero control output even at zero error. P only cannot do this, as output is proportional to error with that. Imagine for example an lift driven by a DC motor. Even when standing still, the motor may to exercise some torque (is has no brakes) to keep the lift standing still. I sums up past errors and adds an output proportional to that (after standing too high or too low for a little time, the lift will creep to the right height). I is generally not needed on planes because they were trimmed mechanically or with stick center positions to really fly straight with all servos at zero.
D is for braking down control as the target value is approached. Example: Driving a car and having to stop before a red light. The P term is proportional to the distance to the red light. Without D, you would just be easing off the accelerator until you are at the light, where you would finally let go of it completely. Letting go of the pedal and maybe even reverse output (apply brakes) before crossing the line would have made for a more precise approach without overshooting.
If control tends to overshoot, increasing D might solve it. If control approaches the target in steps, stopping and then continuing, D is too high.
I once looked into the yaw stabilization in the source code and came to:
"Rudder mix" is adding part of the aileron control output directly to the rudder. I sometimes doubt the correctness of wanting to do this - it's fine for doing coordinated turns, but ailerons are also used for keeping the plane level without wanting to turn. These control (re)actions will go to the rudder as well.
The servo yaw PID actually has little to do with yaw. Its error input is local lateral acceleration minus zero. It serves to apply so much rudder in a banked turn that lateral acceleration is countered (a ball on the floor of the plane would roll neither to the left or to the right). This appears to me to be coordinated turns once again..
There seems to be no stabilization anything that serves to dampen oscillations or other noise in the heading direction of the plane. Or did I get that wrong? It appears that heading correction goes to the ailerons, part of which goes to the rudder with "rudder mix", and that the yaw servo PID only takes input from the left-right accelerometer.
Regards
Soren
Also for us that fly airplanes with both ailerons and rudder we need a YAW PID tuning guide. The default is all 0? I did a little work last summer and it did improve performance but it was trial and error. We need a step-by-step guide like the multi rotor guys use.