Interesting discussion of PID parameter design.


 
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Miguel Drake:
Math heavy but comprehensible. For those designing their own auto tune or tuning themselves here is a resource.
http://www.siam.org/books/dc14/DC14Sample.pdf </div></BLOCKQUOTE>

Because the PID algorithm and tuning tends to be somewhat esoteric, I started thinking about a temperature control algorithm for my electric smoker. What I have done so far can be seen here.

The PID process continuously looks at the difference between the set point and the current temperature reading to determine the duty cycle to bring the 2 into alignment.

My algorithm uses an estimated (target) duty cycle and measures it's performance and if necessary adjusts the target duty cycle setting.

I am building a controller based on the Arduino. As soon as I get the temperature sensor to work it should be ready to go.

Curt
 
I see.
Interesting, it seems that you are building a proportional control with Kff in the form of a nonlinear transfer function. Are you planning on making the controller self adapting?
 
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Miguel Drake:
I see.
Interesting, it seems that you are building a proportional control with Kff in the form of a nonlinear transfer function. Are you planning on making the controller self adapting? </div></BLOCKQUOTE>

If I understand your question correctly, yes. The 'Basic Algorithm' section of my link above shows one iteration of the adaptive process. The target duty cycle continues to get adjusted until the stable temperature reading is within allowable limits of the set point.

Curt
 
OK, it looks like you are implementing three things here, first a non-linear proportional control, a time integral control with adaptive gain, and a feed forward based on external knowledge of the process.
Should work well. You may have problems with disturbance handling, but since you are using electricity you have a much better chance to control the overshoot.
Cool.
 
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Miguel Drake:
OK, it looks like you are implementing three things here, first a non-linear proportional control, a time integral control with adaptive gain, and a feed forward based on external knowledge of the process. </div></BLOCKQUOTE>
I really set the parameters for what I thought would work best with an electric smoker. I'm sure it could be adapted to handle a number of control environments.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Should work well. You may have problems with disturbance handling, but since you are using electricity you have a much better chance to control the overshoot.
Cool. </div></BLOCKQUOTE>
When a disturbance occurs, such as opening the smoker door, the temperature will become unstable causing the target set point to remain constant. It will remain unchanged until the temperature stabilizes again, probably very close to where it was before.

Curt
 
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Curt Timmerman:
When a disturbance occurs, such as opening the smoker door, the temperature will become unstable causing the target set point to remain constant. It will remain unchanged until the temperature stabilizes again, probably very close to where it was before.

Curt </div></BLOCKQUOTE>

Yes...and the gain will be lower than needed to return to temp, so the recovery will be slower than you might hope for.

Still a neat idea, let's see how well it works. I like the non-linear approach, it's the sort of thing that gets over looked when one studies the canonical methods. If the arc tan thing doesn't work as well as you like you can build a lookup table. Frequently there are several stages to the controller parameters depending on the error signal and point in process. You have three so far; low, high and 'in control'. This is perfect for an 'easy' process like electric heat. Have you considered making the out of bounds conditions smart as well?
 
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">If the arc tan thing doesn't work as well as you like you can build a lookup table. </div></BLOCKQUOTE>
I used the trig function that most closely resembled the plot that I drew free hand. This is the adjustment curve I thought would work best with an electric because, from my observations, it had a strong tendency to over shoot the set point. Tests may prove otherwise.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Have you considered making the out of bounds conditions smart as well? </div></BLOCKQUOTE>
This gets into that very grey area of what is internal/external to the algorithm. How you define 100% duty cycle is one example. For an electric smoker 100% DC would be simply full power. For an automobile cruise control 100% DC would not be full throttle. The external factors are more of an interface issue involving a specific implementation.

You could also take into consideration indicated duty cycle verses effective duty cycle. For the electric there would be a very close correspondence between the 2. For a charcoal smoker with a variable speed fan the effective DC may vary greatly from the indicated DC. For example, a 25% fan speed may effectively generate 50% of the potential heat capacity. Throw in a -20F outside temperature and there may be a tipping point where raising the fan speed may actually lower the smoker temperature. This will drive a controller nuts!

Curt
 

 

Back
Top