Added d parameter to PID regulator