Re: PID-filter routine (2nd try).

Originally Posted by
HenrikOlsson
Hi,
I'm sure you're correct that you don't need derivative. I'm surprised though that you get unpredictable results when you set it to zero, I'll have to look into that. What exactly is it doing?
All this was observed using the code I posted above.
With the derivative set to one, and the loop at 216 (degrees) it usually starts with an output to the PWM of 150 or so. As the sample gets closer to the setpoint (230) it ramps down - as it should.
With derivative set to 0, the PWM starts at about 20, and goes down from there - I can't remember exactly where, but at some point (long before its at the setpoint) its at ZERO - with a charcoal fire, that means its never getting to the setpoint. Strangely enough, on the SECOND run through the numbers, it starts working properly - not sure why. Maybe its my fault.
It seems to work great with the derivative set to 1, though, acts exactly as it should.

Originally Posted by
HenrikOlsson
Hope it helps.
Very much so. Now, if only this damn snow would go away........
Thanks again,
Andy
Last edited by andywpg; - 18th April 2013 at 00:15.
Reason: spelling
"I have noticed that even those who assert that everything is predestined and that
we can change nothing about it still look both ways before they cross the street"
-Stephen Hawking
Bookmarks