br3ttb / Arduino-PID-AutoTune-Library

416 stars 225 forks source link

peak-to-peak amplitude for relay is 2*oStep #2

Closed t0mpr1c3 closed 12 years ago

t0mpr1c3 commented 12 years ago

In the formula for the ultimate gain Ku, oStep is used as the measure of amplitude for the relay which is half the peak-to-peak amplitude. The amplitude of the induced oscillation is measured by ( absMax - absMin ) i.e. the peak-to-peak amplitude. This would appear to underestimate Ku by a factor of 2.

br3ttb commented 12 years ago

yeah at first glance it looks like I messed up. I'll need to take a closed look, but it seems that the library is yielding more conservative tunings than it should.