Arduino-PID-AutoTune-Library icon indicating copy to clipboard operation
Arduino-PID-AutoTune-Library copied to clipboard

Swapped constants used for Ki calculation

Open Breinholm-coder opened this issue 2 years ago • 0 comments

I think you accidently swapped the 1.2 and 0.48 in the Ki calculation:

double PID_ATune::GetKi() { return controlType==1? 1.2*Ku / Pu : 0.48 * Ku / Pu; // Ki = Kc/Ti }

Should be like this for Ziegler & Nichols (closed loop):

double PID_ATune::GetKi() { return controlType==1? 0.48 * Ku / Pu : 1.2 * Ku / Pu; // Ki = Kc/Ti }

/Thanks

Breinholm-coder avatar Nov 02 '22 14:11 Breinholm-coder