Maybe I am wrong, but I would much appreciate it if you could took a look at it. I am currently implementing it with a power supply and a temperature readout. I was trying to tune the kp, ki and kd using the Ziegler-Nichols method and I noticed that setting kd != 0 introduces some steady overshoot.
Hi guys,
First of all, great job putting this together. I was wondering though, why in line 127:
https://github.com/m-lundberg/simple-pid/blob/7cd080473e582e4de29b49f9d002d2bd62ef33ca/simple_pid/pid.py#L127
you set the derivative to negative. Is this intended? If so, why? The code you reference:
http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/
does not do this:
double dErr = (error - lastErr) / timeChange;
/*Compute PID Output*/
Output = kp * error + ki * errSum + kd * dErr;
Maybe I am wrong, but I would much appreciate it if you could took a look at it. I am currently implementing it with a power supply and a temperature readout. I was trying to tune the kp, ki and kd using the Ziegler-Nichols method and I noticed that setting kd != 0 introduces some steady overshoot.