My profile comes reasonably close to this, with
the segment-changing-temperatures of 230, 300, 350, 410, and 435F.
The
Original Control Algorithm.
Process control in the roaster required the simultaneous
monitoring of a number of variables. A conventional PID control
approach is used for any segment during the roast, that is, a target
heater air temperature is determined every 1/2 second, and the heater
power calculated to reach that level is implemented by switching the
duty cycle of a SSR. A ramp of the heater air temperature can be easily
achieved by changing the PID target temperature a given amount each 1/2
second. This aspect of the control process is no different than
could be more easily achieved using a ramp and soak commercial PID
controller.
In order to implement the overall profile shown above, however, the
roasting control has to do things that I think lie outside what can be
achieved with a stand alone ramp/soak controller. Consider, for
example, the first segment of the roast shown above (from 0 to about
160 seconds). The heater air temperature increases at something
like 35 degrees per minute in "Segment 1". What is "non-standard"
about controlling the roaster is that the end of the segment is NOT
fixed by reaching an endpoint heater air temperature, but
instead
by reaching a temperature of 230 degrees in the bean thermometer.
If we ignore the second segment in the above roast (a glitch in the fan
flow prevented the computer from keeping the heater air temperature
constant for a few seconds, as was the plan....), the complexity of the
control algorithm is further illustrated by the third segment.
This starts at about 175 seconds and 375 deg. heater air
temperature (HA-Temp), and ends at about 185 seconds and 475 deg.
HA-Temp. The purpose of this segment is to boost the temperature
of the heater air enough to increase the heating rate of the beans.
This is done as a fast ramp, so that the PID can maintain
control. What I think is unusual here is that both the starting
point and the endpoint of this HA-Temp ramp is unknown before the
roast. The ramp HA-Temp start point is determined by the heater
air temperature that is present when we reach a certain BEAN
temperature,
and the endpoint is set to be a certain number of degrees hotter than
the startpoint. So while this ramp segment is more conventional,
in that it has a beginning and end that is determined by the
temperature actually being controlled, the values used for those
endpoints cannot be set before srating the roast. (Changes in
ambient air temperature and humidity can make considerable changes in
these values).
Overall, segment endpoints have to be configurable to be either: a
target heater air temperature, a target bean temperature, or a fixed
amount of time. While I do believe that it might be possible to
achieve the profile shown above with a conventional ramp/soak PID
controller, the profile would end up being different if the ambient air
changed, if different beans were used, or if the bean load were
different. I am currently convinced that the more flexible
approach used here, where segment endpoints can be set by a number of
parameters, is necessary for making a reasonably repeatable
profile in a process controlled roaster. If anyone is aware of a
way to do this sort of control with a conventional ramp/soak controler
--- Please let me know!! -- I would really like to learn about it.
The Current Control Alorithm:
While the control algorithm used for the roast above worked very well,
it is somewhat difficult to reconfigure. For example, if I wanted
the beans to increase by 20 degrees per minute between 300 and 350
degrees bean temperature, rather than the 12.5 degrees per minute used
above, I would end up having to tweak the heater air ramp rate and
endpoints for many of the segments. Not only would the segment
actually altered have to change, but its changes would leave the
roaster in a different starting point for the next segment, so that
would have to be adjusted too.
This has proven unsatisfactory. Discussions of various profiles
and their influence on the taste of the coffee, especially by Jim
Schulmann and Mike McGuiness, have driven me to find a more
flexible approach for the control process, one where I could tell the
computer bean temperature ramp rates directly, and have the computer
figure out how to achieve that. This would then allow me to
better explore various profiles, in a repeatable manner, and help me
better teach myself how to roast coffee.
I have recently been able to achieve this. The "data
entry" for the profile has also gotten MUCH simpler. The steps
the computer is told in order to get a profile similar to the one shown
(I'll get the new data graphed up and posted hopefully soon) above is:
1) Preheat the roaster to 200 degrees,
heater air temperature
2) Wait for any key being pressed (means that coffee is in!)
3) Ramp heater air at 20 degrees per minute, till coffee is 230 F
4) Hold bean temperature close to fixed for 30 seconds
5) Ramp beans at 60 degrees per minute to 300 F bean temperature
6) Ramp 12.5 degrees per minute to 350 F
7) Ramp 25 degrees per minute to 400 F
8) Ramp 10 degrees perminute to 430 F, or end on key-strike
Previously, it was impossible to "tell" the computer
to ramp bean temperature, I could only make it control the heater air
temperature that I had determined would work, but took many many more
"steps". Now a change in roast profile is EASY to do, any of the
steps after number 4 above can be changed and implemented in seconds.
And the computer gets the right bean ramp rate to roughly within
a couple of percent. (for example, tell it 20 degrees per minute,
and it will be be within 0.4 degrees per minute of that rate).
The hard part of getting the computer to do this was making it so that
it could directly control the ramp rate of the coffee bean temperature.
This was not straightforward. I ran into lots of stability
problems. The most interesting part, at least to me, had to do
with the difference between regulating to a temperature and regulating
directly to a rate. This had me thinking hard about loop control,
especially in terms of the closed loop frequency response.
It turns out that to get a rate controlled in the same way that
you would get proportional control for a temperature, you need to have
an open loop gain that varies as 1/frequency! This sure suprised
me for a while. So in order to get RATE control, I had to abandon
Proportional-integral-differential control, and use instead: integral
plus the integral of the integral!!!. Sounds nuts, but it
does work, and even makes sense analytically.
This worked OK, and allowed me a stable control, but it did not provide
accurate control. Adding in two additional elements into the mix
got me control accuracy. The first was predictive determination
of heater power required for different bean temperature ramp rates.
This is based on measurements in each roast, and so
automatically adjusts for bean type, bean load, ambient changes, etc.
The second "fix" was a term proportional to the bean temperature.
It makes sense that you would need a certain amount of heat just
to maintain a given temperature, and that more is needed to maintain a
higher temperature. This is also measured each roast. So
the total heater power if the sum of three terms:
1 -- A term simply proportional to the bean temperature.
2 -- A predicted heater amount calculated for the requested ramp
rate
3 -- A fed back heater amount determined by the integral plus the
"integral of the integral" of the deviation of the ramp rate from the
requested ramp rate.
It would be possible to just use 1+3 to get control, and it would get
the right rate eventually. But that approach is hampered by the
relatively big time constant necessary for loop stability.
But adding in term 2 makes it possible to change the
ramp rate relatively quickly, and then get them precise (to a couple of
percent) after the third term kicks in.
Overall this approach to roaster control works great. I will put
up a plot showing 5 different roasts on different days with different
bean types, that have nearly indistinguishable measured roast
profiles. And changing to a different profile is now VERY easy.
I believe that this control approach would work for almost
any type of roaster.
My next project is to work on less pricey hardware......
Thanks for visiting, Tom G.
Please make comments or suggestions to: Toms-roaster@columbus.rr.com
I get my green coffee from: