BBQ Tech Stuffs
PID Function Code - Printable Version

+- BBQ Tech Stuffs (http://bbq.nailbuster.com/forum)
+-- Forum: Q-Control DIY BBQ Controller Stuffs (http://bbq.nailbuster.com/forum/forumdisplay.php?fid=1)
+--- Forum: Q-Control Discussions (http://bbq.nailbuster.com/forum/forumdisplay.php?fid=2)
+---- Forum: Q-Control Mini-All-In-One Project (http://bbq.nailbuster.com/forum/forumdisplay.php?fid=4)
+---- Thread: PID Function Code (/showthread.php?tid=22)



PID Function Code - BourneToRide - 04-07-2017

I just scanned the arduino code and noticed what I think is an error in the PID code
float dInput = (setPoint - currentTemp);
should be something like
float dInput = (error - prevError) / timeChange

if it is like this because there will be negligible change in 1 second, then only run the pid calc every minute
otherwise dInput will be the same as pInput and no weight is given to the rate of change

lots of suggestions http://brettbeauregard.com/blog/2011/04/improving-the-beginner%E2%80%99s-pid-sample-time/


RE: PID Function Code - NailBuster - 04-07-2017

I agree, that seems not ideal... The PID does get called every second...

The PID is something I want to test/work on. I have about 3 separate PID objects I want to test out once weather improves and I can get 'cooking' time in.

This is one I'm trying out: https://nicisdigital.wordpress.com/2011/06/27/proportional-integral-derivative-pid-controller/