Quote:
|
Originally Posted by Mike
My two cents about PID loops.
Today I tried implementing a PI loop. I've never done one before and was relying on non-proven code. I spent about three hours and called it quits. My new code that works great:
Code:
PAN_MOTOR = NEUTRAL + (pan_error / 5) + 11;
Adjust 5 and 11 to your needs.
Quote from my mentor: "Keep things as complex as necessary, and not a bit more."
|
an excellent example! Pan error is the error signal (distance) from where you want to be. Pan error / 5 means your feedback gain is 0.2
Im not sure why you need the +11. That seems to be a zero point error, or maybe there is a zero point error in your feedback signal?