Quote:
Originally Posted by Asymons
Thanks for the advice. Once you read the details, I have a couple of questions: Are you suggesting I should add in the derivative of error to fix the oscillation of the motor?
|
No, just to use a non-zero, probably constant value of D. It is convenient to think of D as standing for dampening as well as derivative.
Quote:
Originally Posted by Asymons
How would the tuning work if the system has an issue with just a P-closed loop essentially? Would that not continue having error in the sense of a continued oscillation?
|
A P-only PID feedback system is (assuming that the mechanical system is linear) is mathematically identical to an undamped spring-and-mass; you would expect it to oscillate for a long time. When the system is far from the target, it is accelerated towards the target. By the time it reaches the target, it has significant speed, but there is no frictional term to slow it down, so it overshoots. You have essentially made a system in which F=kx (Hooke's Law). In terms of a differential equation, it becomes the simple x''=(k/m)x, where k/m is proportional to your P term. If you have done calculus 1 it is easy to verify that one solution to this equation is x=sin(sqrt(k/m)t), that is displacement is described as an undamped sine wave. Some sort of friction term is required to dissipate the initial "potential energy"; neither P nor I do this. Both D and mechanical friction will dampen the oscillations.