Agreed 100%. I would just add that when all else fails, apply experience....and also.....There will be hysteresis in EVERY control loop..it's just a matter of how much is acceptable. Chris > Short PID 101: > > PID = Proportional Integral Derivative > > Proportional control means that the correction is proportional to the > error. > > Correction = -1 * P * Perror = -1 * P * (Setpoint - CurrentValue) > > Integral control means that the correction depends on the > present and past > error. More exactly, the Integral of the error, which can be > represented > as the sum of the errors so far. If Ierror0 is the error at > the previous > measurement time and error is the Ierror at the present time then: > > Ierror = Ierror + (Setpoint - CurrentValue) > Correction = -1 * I * Ierror > > Derivative control means that the correction depends on the > change rate of > the error. Therefore if Derror was the previous error: > > Derror = Derror - (Setpoint - CurrentValue) > Correction = -1 * D * Derror > Derror = (Setpoint - CurrentValue) > > By putting it all together and everything in the middle of a loop that > repeats at fixed time intervals: -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics