Quote:
Originally Posted by TimTheGreat
How much do I increase it by? 1?
And how do I know when the P value is tuned? It seems to work, but is there a way I could make it work "better"?
|
There's going to be a lot of guesswork involved, no matter what you do.
A good method to start with (it's in no way optimal, but often good enough), is the
Ziegler-Nichols method.
Basically, set all three of P, I, and D to 0. Then, raise P (this can be by any amount, again, see guesswork) until there is oscillation around the setpoint. Then, increase D until the oscillation stops. If you're noticing a lot of friction in the system so it never quite gets to the setpoint, add some I to compensate.
Take note, however, that long arms are tricky. The gravitational forces acting to pull the arm down vary nonlinearly based on the arm position - this makes it difficult to control, since it's difficult to model. That's not saying it's uncontrollable, but it'll take more work to make smooth.