is PID really needed? | HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Homebrew Talk

Help Support Homebrew Talk by donating:

  1. Dismiss Notice
  2. We have a new forum and it needs your help! Homebrewing Deals is a forum to post whatever deals and specials you find that other homebrewers might value! Includes coupon layering, Craigslist finds, eBay finds, Amazon specials, etc.
    Dismiss Notice

is PID really needed?

Discussion in 'Fermenters' started by GatorDad, Apr 17, 2011.

 

  1. #1
    GatorDad

    Well-Known Member

    Posted Apr 17, 2011
    I'm controlling temps in my fermentation chamber with an old linux 'puter and some extra parts. Now that I'm working my way into all grain, I was thinking about expanding this system to control the mashing process temps in a HERMS system.

    A long time ago in a galaxy far far away, I did some PID stuff in C. I was dusting off that code last night in order to port to PHP... and I'm sure this will label me as a heretic, but.... it occurs to me that PID is probably overkill for the project. A large tub of HLT water (5+ gallons) being used to passively heat the mash (MLT) can't possibly respond fast enough to warrant a PID algo. Seems to me a simple hysteresis would work just fine for this... Eh?
     
  2. #2
    rosier9

    Well-Known Member

    Posted Apr 17, 2011
    My experience has been that a simple hysteresis will overshoot by about 2 degrees in 10 gallons of water. Probably not enough to be overly concerned with...
     
  3. #3
    Cuffers

    New Member

    Posted Apr 17, 2011
    If your temp rise is slow then pid is not needed. There will be a little carryover heat when the relay or contactor opens but not much. If you had enough heat to cause a fast rise then an SCR and pid would be needed. Another trick for multiple heating elements would be to stage them with a pid loop. In our big electric boilers we use a staging controller that takes in an analog signal from a pid and energizes stages as needed.
     
  4. #4
    jdieter

    Well-Known Member

    Posted Apr 18, 2011
    To get true pid control, if you're using electrical elements you need pwm to reduce the on time as the error decreases. If you're using gas you'll need a modulating air valve for infinite control of burner btu also correlated to the error signal. As you stated with the slow response time on/off control is more than adequate.
     
  5. #5
    GatorDad

    Well-Known Member

    Posted Apr 18, 2011
    rosier9: What heater wattage are you using?

    Cuffers: Just one 10 gallon rubbermaid and a 1500w heater element. I don't have big electric boilers. :)

    jdieter: I'm not buying a pwm switch (I'm doing this on the cheap). I could simulate it, but I just don't think it's worth the effort.

    My goal is to do this in bash scripts - not a program "proper". As such, it'll run stateless. I may code a ramping function, but I won't bother with it until I see some empirical evidence I need to. All I'm doing here is heating water to a temperature. Given a somewhat reliable water source, its properties won't change significantly. This is not a slurry of constantly changing density - it's water. And it behaves in a repeatable, predictable fashion. I have discussed this with myself at great length, and we both agree. :)

    KISS is my only goal here. Wait. That's not accurate: beer is my only goal! :mug:
     
  6. #6
    acefaser

    Well-Known Member

    Posted Apr 18, 2011
    Sorry I can't help u with your question, however you say
    you are controlling your temps with a computer? I do some php/mysql programming for websites and would like to know more about how you hook up your computer to manage your temps.
     
  7. #7
    Quaffer

    Well-Known Member

    Posted Apr 19, 2011
    If all you want is beer then hysteresis is all it takes. The evil thing about mashing though is that a few degrees variation can make the difference between getting spot on the beer you wanted with the predicted finishing gravity, or getting a thinner or sweeter beer than you had hoped. You could start with a hysteresis and see how it goes. Switch to PID if you think you need it. Software is great that way, no changes to the hardware.
     
  8. #8
    jdieter

    Well-Known Member

    Posted Apr 19, 2011
    Gatordad, I mistated regarding pwm, you are not reducing the on time but reducing output so the power to the element negates the error in the system. I'm assuming you'll be using a ss relay and without controlling frequency and voltage it's still on/off isn't it?
     
  9. #9
    GatorDad

    Well-Known Member

    Posted Apr 19, 2011
    I'm using the 1-wire file system (owfs) for linux to control the 1-wire devices, and some stuff of my own to control the parallel port relays. Nothing fancy - it's really quite simple...


     
  10. #10
    GatorDad

    Well-Known Member

    Posted Apr 19, 2011
    Agreed. I just don't think I'm going to see temp variations of 2 degrees. The DS18S20's provide 4 decimal places to the temperature reading. I don't have to (and won't) turn the heating element on/off at whole number temperatures. That window can be vary narrow.

    The mash tun, which is a rubbermaid 10 gallon cooler, doesn't seem to lose more than one degree per hour anyway. Take that solution (which is at stable target temperature), run it through a heat exchanger in another mass of water that is within +-1/2 degree of target. I just don't see temperature swings of 2 degrees in this system. I don't see how it's possible (without a device failure).


     
  11. #11
    GatorDad

    Well-Known Member

    Posted Apr 19, 2011
    Yup. But as I stated before, I ain't buying no pwm switch (all my "extra" money finds its way to Gainesville). To simulate a pwm with a ssr you have to play games with "on time". I'm trying to keep this simple, and, I just don't think it's necessary.


     
  12. #12
    amb1935

    Active Member

    Posted Apr 19, 2011
    This sounds really interesting. Do it and let us know how well it works.
     
  13. #13
    Quaffer

    Well-Known Member

    Posted Apr 19, 2011
    That's all true if you do not have overshoot in the system. With hysteresis the element is always all on or off which tend to exacerbate overshoot problems. Just try the hysteresis approach and see how it goes, it might work just fine, especially if you have a stirring device in the HERMS vessel. Without a stirrer I think you will see quite a bit of overshoot and stratification of the hot water.
     
  14. #14
    GatorDad

    Well-Known Member

    Posted Apr 19, 2011
    Overshoot won't be an issue. The square wave effects of hysteresis are buffered by the large mass of water (in an insulated environment). If we were chatting about a 5500w element in 1 gallon of water, in a metal non-insulated pot, polled once every 60 seconds, waiting for a 1 degree change, sure. But we're not. :)

    Stirrer? Well, of course. Entropy and all that jazz.


     
  15. #15
    jdieter

    Well-Known Member

    Posted Apr 20, 2011
    Quaffer hit on one of the problems I'm still trying to solve with my MT. It's a direct fired false bottom keg with a stirrer and a Honeywell UDC3000 controller. I have a permanent t/c in the middle of the keg and an long t/c through the lid to meaure temp stratifacation. I get a 3-5dgf variation from 1" above the false bottom to 1" below the mash top surface. The variation starts at the high end and drops to low end about 15 minutes in to the mash. Currently re-designing the stirrer to get better mixing and I'm a little slow on rpm at 20, would like to be at 30-35rpm. I had a 50rpm stirrer which gave me a 1 dgf differential, but it caused to much splashing in the mash. Overshoot is an issue for me also so I use the feed-forward parameter of the controller. PID control would be an excellent way to control overshoot and flatline at the setpoint, but I would have to build a stepper with position fdbk to contol the burner. Anyway my point for this thread is temp stratification & overshoot can be an issue.
     
  16. #16
    GatorDad

    Well-Known Member

    Posted Apr 20, 2011
    jdieter,

    Our setups seem rather different. Gas firing a large metal pot (keggle?) full of water. Yea, I'll bet stratification and overshoot are a problem with that kind of heat sink. :)

    To be clear: I'm not saying PID isn't a good general solution for many things. I've used and written PID firmware many times over in the past (astro imaging, robotics, etc). However, for this particular application (mine, not yours), I believe PID is overkill.

    Use case: a HERMS setup that is operating within the confines of two 10 gallon insulated coolers, with the HLT heated by a single centered 1500watt element (with agitation) and the MLT heated passively by the HLT. Given these parameters, and the ability to react very quickly to very small changes in the HLT temps, I don't expect to see the MLT drift more than a fraction of a degree.

    I'm almost done with the (free!) electronics and will be testing the above this weekend. I'll post results. :)
     
Draft saved Draft deleted

Share This Page

Group Builder