Who is here? 1 guest(s)
 Print Thread
PID Autotune?
When I started this popcorn popper to coffee roaster project, the goal was to do this as cheaply as possible. Cheap is a relative term- as it turns out, I have a rather nice (but obsolete from the vendors perspective) laboratory/ chemical process temperature controller that will let me store several ramp & soak processes (each step can have it's own PID settings) or set a final temp and get there using the PID. This has the ability to 'auto-tune'. Has anyone used the PID auto-tune to set PID values? Success? Did you sacrifice a charge of coffee beans to do it? I read in an older post that someone substituted navy beans to get their PID settings (but they were not using auto-tune). I made the 'funnel' mod per Chicago John in order to get better mixing. I separated the fan from the heater, but I do not have any control other than on/off. I have since read that I need to move my dimmer switch - I think to the other side of the resistors so that it is modulating the DC voltage. Meanwhile, the popper roasted/ burnt coffee just fine before I separated heat and fan (just too fast to control), so I have to believe leaving the fan on (full) will not stop my roast. I'll work on fan again later- eager to get to the next stage in roasting experience.

So, comments on letting the controller autotune the PID?

Thanks, this group is great. The more I read, the more I see that I want to try, but I'll never roast if I don't finish something!
I tried only one time to autotune a PID (Cal Controls 3300) with beans loaded and it fails. This fact is possible and documented in controller brochure:
"The thermal characteristics of the load exceed the Autotune algorithm limits"

However, AT works without beans, but the resulting PID (17-0.3-1) are not useful for the loaded machine, I got 2-3 degrees overshot at each setpoint change.
This behaviour can be overcome with some practice, if trying to catch the moment when overshot is at the maximum, for example at 153 degrees when your SP is set to 150, that moment immediately raise to next SP, for example 155.

No idea if a ramp/soak controller can cope with such situation, but these controllers aren't cheap... if you have them gathering dust, let's try... beans are cheaper than a controller Grin
Edited by renatoa on 03/18/2019 3:09 AM
Thanks, renetoa,

I just realized I probably posted this in the wrong place- still learning the map of this site. My controller is a C-P Digisense 89000-10 (https://tinyurl.c...) - same era (circa 1999) as your CALControls. I have other PIDs similar to yours, this one happens to have the SSD and AC out built in as well as easier to understand user interface. (i.e. I don't have to think quite as much if I can use this.)

I was naively thinking I could set the autotune for 5 degrees above estimated FC and take my chances that it would complete without totally destroying the coffee. (The autotune on this will overshoot 3 times- I tried it with an empty chamber and the TC just dangling inside and the overshoot was about 3 degrees F.) That would teach the PID about the system in general. I think this is the controller I have with 'fuzzy logic', so I was kind of thinking if I then set up a ramp to a series of target temperatures, it would use 'fuzzy logic' to shape the curve appropriately to get from one step to the next. I am still learning, so even if it isn't perfect at first, it will be better than what I can do manually.

Meanwhile, another delay- the TC-in socket is having a problem (I am hoping it is just loose connections), so I harvested an RTD from the same stuff in storage. Now to install after already having drilled for a long TC probe...
Moved you to Dataloggers/Controllers/Rate of Rise Meters section.

KKTO Roaster.
Thanks, Jack,

I have a turbo-oven, too- that was my first thought for making a roaster after seeing some on you-tube a couple years ago. Popcorn popper seemed like a 'safe' start for small batches (=small mistakes). How do you like your KKTO? Okay, I'll go read your posts to learn more about it...
I ran the autotune with a charge of beans in the roasting chamber. I was pleasantly surprised that the autotune completed quickly and I ended up with a drinkable (but not great) roast of Ethiopian Longberry Deep Bue Harrar from Coffee Bean Corral. Was able to pick up the blueberry flavor and sweetness on this 'sacrifice' batch.

Surprisingly, the response is very linear. I am using a Pt RTD that comes through the wall of the (popper) chamber with the tip sitting in the center of the bean mass and the air flow. On the next roast, I set two ramp setpoints- one to lengthen the drying time a tad and one to reduce RoR through yellow to completion. I thought I might see the rise flatten more as it approached target temp, but the controller was able to again control the climb in a very linear point-to-point fashion. Okay, so now I know that I will have to shape the curve using multiple points.

NEXT QUESTION: Has anyone successfully used PLX-DAQ with open source spreadsheets such as Open Office or LibreOffice CALC? My T-Controller has a serial port and will accept setting commands and send back analog temp data. I can buy a serial to USB adapter easily enough. Would be great to not have to try to get an old version of MS Office to run on my Windows 10 machine.

What values for PID was been found by your AT ?
Autotune values are P= 97 degF; I = 11 sec; D= 2 sec

Here's the roast after the autotune- I set two temperature steps- 370 deg at 3 minutes, 460 at 12 minutes. The red curve is the smoothed curve drawn by the spreadsheet through the setpoints, the asterisks are the actual temp that I recorded by hand every 30 sec.
Monarda attached the following image:
Degrees as unit for P ? strange ...
They looks like values of the oscillating regime used for ZN method.
Yes, Proportional band is in degrees, Integral time in seconds per repeat, Derivative Rate in seconds. Note I set cycle time to 1 second. Also, this controller cycles heat full on or full off, not variable output. Cole-Parmer products are targeted to chemistry and biology lab people, so they have made their user interface something less engineering-ese. I don't know how P in degrees is translated for their algorithm. In fact, the manual admonishes we stupid chemists to only use the autotune unless we have 'advanced training in the understanding of PID'.
In a classic PID output (as %) is kP * error, so the P term tell us how close to the setpoint the power start modulating.
For example if P = 5, then the power will be 100% as long as error is more than 20 degrees, 20 * 5 = 100%
When we are closer than 20 degrees to the setpoint, then % of power due to P term diminishes, and the I term comes into play as main output driving factor.

Probably in your case the P term express directly, in degrees instead %, the temperature of setpoint, or perhaps error value, where output start pulsating, and I term becomes significant.
That might make sense then- I autotuned to 400 deg. I know this pop-lite popper got hot FAST when I tried a couple of roasts with no mod and with only the funnel mod. Roast was over and out of control at 3-4 minutes max, and safety cutoff occurred- hence the need to get control of the heating. So, for this system, it might make sense that P= 97 deg or 24% of target temp. I guess that explains the linearity from point to point in the ramp program- the jumps are less than 97 degrees and I don't know whether the firmware compensates by converting that 97 degrees to a percent value. Would it make sense for me to adjust P to 24% of each target point in a ramp? If so, would I also need to adjust i and d? The controller allows me to do this. Right now, all points use the autotune values. Seems like a lot of fiddling- from what I can see on commercial roasters, they are temperature step-jumps (or at least, energy step-jumps) with a soak.

I will say, with just a couple roasts in hand with this 'new' system, roasts are very consistent. Now a bad roast is precisely my fault! Need to learn to roast!
Jump to Forum: