We are using the Arduino PID library to control the initial heating of the pot up to around 170 F. I have tested the control on a small pot of water to see if the PID is working. It appears to be working , but very poorly. I was using the suggested "aggressive" constants, Kp=4, Ki=.2, and Kd=1, which clearly are not even close with this small pot.
What the test shows me, however, is that determining good constants is going to be a chore. Also, since we are heating 300 gallons of water with electrical elements, it could get expensive.
I am hoping that someone has done something like this and can give me some reasonably good constants to start with. Or, can give me some advice on the procedure to use to get to reasonable constants in as few heating cycles as possible.
It has also occurred to me that we could apply 100% power until we get to 150 F and then switch on a very conservative PID control. We expect the preheating to take around 4 hours, so 3 hours or so could be at 100% and the PID brings the temperature in for a soft landing at the preset.
Any help would be appreciated.
PID output gains refer to the output action for a given set point error. Gains mean very little when you don't talk about how powerful your output is. A cruise control is an example of PID. The output is torque of you engine, error is desired speed minus actual speed. You can have "aggressive" gains (i.e. pedal to the metal) but if you have a 1.0L engine in a school bus it won't really matter. It sounds like you heating output is very small and can't really do much very fast to affect output. If you give some specs like Btu/Hr someone could have an idea how fast you can expect to heat 300 gallons of water. A domestic water heater does not use PID at all, nor do most home heating systems. This is because overshoot is so minimal it's not worth the trouble. Try this... Output you full heating capacity until you hit your setpoint, then turn it off. See how much it overshoots (if any). If it really doesn't overshoot the proportional gain (Kp) can be very high. Integral gain will get you in trouble in a long heating process if you do do some anti-wind-up. Tuning will help to maintain it around the setpoint.
Saw a whole lot of PID loop tuning done at the refinery I use to work for. Temperature loops were often the most difficult to tune in that the large process time lags made it very time consuming and tedious to make a change and wait to see if the response was better or not. Keep in mind that the objective of your PID loop is to exhibit tight control once your water does reach setpoint, it can't really help with how long it takes to heat 300 gallons from ambient, that is strictly a function of the wattage of your heating element(s).
It has also occurred to me that we could apply 100% power until we get to 150 F and then switch on a very conservative PID control.
Appears to be a very sound scheme. Also, that way, once you have it up to 150, you can mess with the constants repeatedly without having to expend time or energy on the initial heating. Probably best to let the temperature fall under 150 at each change, or at least to do a final test on a set of constants you think are good.
Thanks for the input.
I would like to be able to make some calculations for the initial constants, but because
of the unique design of our still , I don't think it's possible. We are using about 48,000 watts of electrical power to heat the 300 gallon copper pot, but the heating elements are wrapped under and around on the outside of the pot to prevent burning of the mash. As a result, there is an unknown amount of heat lost, even with reasonable insulation.
It should be much like an electric hot water heater so it looks like we should be able to simply run it at 100% power up close to the preset temperature and then switch over to PID to bring it to and hold it at the preset. So, we can try a number of PID constants
without having to let the pot cool all the way down and reheat it all the way back up.
Any suggestions for a first round of constants, assuming a hot water heater -like response?
As a result, there is an unknown amount of heat lost, even with reasonable insulation.
It's unknown only because you haven't (yet) measured it. It's time to do so.
Hi oldradio
That is a big still pot you have there.
I would avoid the PID controller for heating such a reactor. The "dead" time is going to be really long. I would do it with a cycles time and a ramping system.
Eg. cycles time = 60 sec.
Below 150F the heater should be on for 100%cyclus time = 60 sec ON, 0 sec OFF.
Between 150F and 155F: 80% cyclus time = 48 sec ON, 12 sec OFF.
etc etc.
Above 170F: 0% * cyclus time = 0 sec. ON, 60 sec OFF.
This will give you a nice and easy controllable system for a heater.
But, it's not gonna be enough. You said you wanted to heat 300 gallon to 170F but I think you want to distill a mixture of water and ethanol at atmospheric pressure - am I right?
You can not distill at constant temperature since the composition is changing due to ethanol enriched vapors leaving the pot. The boiling point in the pot is going up due to higher and higher water concentration. You need to set a certain heat input to "drive" the distillation otherwise you will reach the set point and the distillation will stop.
If I were you I would make a control system where you could set the % output to the heater. Just remember to change the output once you get close to the boiling point .... or make a cut-off value that turns off the heating.
Btw, do you have column with condenser and reflux or is this a single step distillation?
-Fletcher
Thanks for the ideas Fletcher.
It is a big still pot. My son's distillery hopes to be making and selling Vodka, gin, rum and whiskey this year, so the still has a number of configurations, including all you mentioned.
We would only use the PID during the preheat phase of the process, which brings the temperature up to a level just before any flammable vapors are produced. Then you switch the control through heads, hearts and tails phases where the pot temperature is raised further in an artful manner to produce the desired spirits. We are driving 8 50 amp SSRs with a phase controller that enables very precise control of the pot temperature. It is a huge dimmer switch!
My current thinking is that our first test run will turn the power on 100% until the pot temp reaches x=? degrees below the preset temperature and then we will switch on the PID for the final approach. We don't want to over shoot because that could produce flammable vapors before we switch to the heads phase in which condenser water is switched on. This preheat step takes a long time and we want it automated so the system does not have to be closely watched. When preheat is reached, an alarm goes off and the operator can then get down to the highly attentive distilling steps.
Hi all,
I'm facing the same problem but a smaller still (100l).
Oldradio, how did you solved the problem?
My control system try to follow a varaible setpoint, but the system is very unstable due to the pid constants I think.
I was wondering if it is necessary draw a sketch to auto tune the pid system,? What do you think?