Quote:
Originally Posted by The Doctor
I have found this to be an acceptable take-back-half algorithm:
Code:
cval -= (cval - goodval) / 2;
Where cval is the current value of [whatever] and goodval is the ideal point (what you want it to be at)
|
Where's the feedback here? How do you find goodval? The fact that you're setting cval suggests it's an output, and if you somehow knew the ideal output (namely goodval) then you wouldn't need closed loop control in the first place.
Now, if you instead have
Code:
cval -= (sensorval - goodval) / 2;
which seems to be what you were getting at, then what you secretly have is an integral controller (just the I from PID) with coefficient 1/2.