PID tuning test


 

Brent Cooley

TVWBB Member
Hi all -

A few days ago I hooked up my HM to my kettle with the primary goal of trying out a new charcoal ring and heat diffuser. Instead of burning through a load of charcoal with no food, I smoked some almonds for the first couple of hours (which turned out great).

After a few hours I wanted to try "scientifically" tweaking the PID settings to see if I could cure some of the oscillations I was seeing. I set the PID values to B=0,P=15,I=0,D=0. I chose 15 since it seems that the response time is quite slow in both directions.

According to Bryan's wiki PID tuning suggestions, a P-only test is at the right P value when the oscillations are relatively even in size and time, peak to valley. I *think* what I see in the graph is like that, more or less but was wondering if anyone could say whether they are even-enough to have found the proper P value. In the image below, the section not "blacked out" is when I was running just a P=15 test (ignore the other parts since I was mucking around with all sorts of things). At the very end, I was running low on charcoal so the peaks barely made it to the setpoint.

Any suggestions of next steps would be appreciated!

PIDTest.jpg
 
Last edited:
The next step would be to just get the time of the oscillation, which appears to be about 20 minutes (1200 seconds)?
Code:
Ku = 15
Pu = 1200

P = Ku / 1.7 = 15 / 1.7 = 8.8
I = Ku / (Pu / 2) = 15 / (1200 / 2) = 0.025
D = Ku * (Pu / 8) = 15 * (1200 / 8) = 2250

As you can see, the D parameter is way the heck off, as it would be for anything with a period on the order of minutes. Because this would never work for anyone, I'm not sure what's up with that. I've seen a lot of papers that talk about the I and D terms as Ti and Td indicating they're in seconds but I'm not sure how that would translate to Output = P + I + D
 
I've yet to build my HM, all the parts are in a box waiting for some spare time, so i'll give that caveat. But i do work in industrial process and process control industry and a took some process control theory in college. On P&ID tuning i'd first suggest a read of the Wikipedia page on PID theory http://en.wikipedia.org/wiki/PID_controller. The majority of industrial control systems don't utilize the D portion of PID controllers because of a variety of factors, but the short answer is system stability. I'm sure it can be applied and run in a stable manner with our smokers, but i don't know that it's critical to success and wouldn't get hung up on it. The main purpose of the D term is to minimize overshoot. Proportional only control will work but will result in steady state error (ie: 5 degrees off the setpoint at steady state operation), the integral term takes care of the steady state error problem but can result in overshoot, and the D takes care of overshoot. So once you are up and running the D term isn't as valuable as the P & I terms. Your best bet would likely be to experimentially tune the D term if thats what you're looking for. In general this is a very small term. It's better to reduce your P & I gain terms to avoid overshoot than to risk system instability with a large D term. if you just want to ignore D control just set the Kd to 0.
 
Thanks Bryan. The average Pu is 771 seconds or 12.9 minutes (used CSV output to calculate in Excel). I came to the same conclusion using the Ziegler and Tyreus formulas that you did... giant D values.

Short of repositioning my air input to be directly under the coals, I'm not sure how I can speed up the oscillations like I see many other people (with BGEs for example).

The next step would be to just get the time of the oscillation, which appears to be about 20 minutes (1200 seconds)?
Code:
Ku = 15
Pu = 1200

P = Ku / 1.7 = 15 / 1.7 = 8.8
I = Ku / (Pu / 2) = 15 / (1200 / 2) = 0.025
D = Ku * (Pu / 8) = 15 * (1200 / 8) = 2250

As you can see, the D parameter is way the heck off, as it would be for anything with a period on the order of minutes. Because this would never work for anyone, I'm not sure what's up with that. I've seen a lot of papers that talk about the I and D terms as Ti and Td indicating they're in seconds but I'm not sure how that would translate to Output = P + I + D
 

 

Back
Top