Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PID Function Code
#1
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/...mple-time/
Reply


Messages In This Thread
PID Function Code - by BourneToRide - 04-07-2017, 08:29 PM
RE: PID Function Code - by NailBuster - 04-07-2017, 08:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)