Why PID?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

billtzk

Well-Known Member
Joined
Apr 5, 2007
Messages
1,617
Reaction score
24
Location
Dallas
I guess PID is a standard thing for industrial process control, but it is a pretty new concept for me. I didn't know what it meant, so I had to look it up.

What I'm wondering is what is the benefit of PID control in a home brewery application? It seems like way overkill. Everything I can think of that a home brewer might want to automate can be accomplished with a simple on/off control.

For example:

Pumps - Most of us use magnetic pumps because they nicely accommodate flow restriction. The pump itself is either on or off, and flow is controlled by a valve. Ok, I could see a PID being used to control a valve on the outflow of the mag pump if you had a valve capable of variable flow via remote signal. But in brewing, you normally set the flow and leave it alone. Once set it doesn't need to be adjusted for sparging or mash recirculation. Even if you use a float valve to maintain liquid level above the grain while sparging, it is an on/off application.

Burners - Flame on or flame off. You are heating large volumes of liquid, and temperature changes in either direction occur slowly. There's no real need to regulate the intensity of the flame, just whether it is on or off.

Kegerators and Lagerators - These are always insulated boxes, such as refrigerators. Again, there are no rapid temperature changes, and turning the compressor on or off to maintain a desired temperature range is all that is needed.



PID controllers and the types of valves and other equipment required to take advantage of PID capabilities are really expensive compared to simple open/close valves and on/off controllers. So why not just use simple (and relatively inexpensive) on/off type controls?

I'm sure there's something I must be missing here that makes PID more attractive than straightforward on/off. What is it?

To be clear, I'm not stating that on/off is best in a home brewery application or that PID has no value; I'm saying I don't understand what you gain with PID that isn't satisfactorily accommodated by an on/off type control for this application.

For reference, this is from the Cole Parmer web site where I ordered my Love TS switches for my Brutus Ten. The ones I'm using are digital on/off controls with 16 amp SPST swtich output and thermistor input. All I'm controlling are ASCO red hat valves that supply gas to the HLT and MLT burners.

Types of Controllers

On/off control: A simple control system in which the device being controlled is either completely on if there is a deviation from set point, or completely off if you are at the set point or within the hysteresis.

Proportional (P) control: Control in which the value of the control output is proportional to the deviation from the set point. When the process variable enters the proportional band, the control output decreases as your process variable approaches the set point.
Usually, the control output will be 50% when you reach the set point.

Integral (I) control: Control that corrects for a ÒdroopÓ or offset condition that can occur when using only proportional control. The deviation from set point is integrated over a selected time interval and added to the proportional signal in order to move or ÒresetÓ the proportional band. The selected time interval is sometimes called the number of resets per minute. Usually used with proportional control for proportional-integral (PI) control.

Derivative (D) control: Control in which the value of the control output is dependent on the rate of increase (or decrease) of the process variable from the set point. The derivative of the deviation from set point is taken and added to the proportional signal. Always used with at least proportional control for proportional-derivative (PD) control. Helps prevent overshoot during process disturbances.

PID control: Proportional-integral-derivative control. Control in which the value of the control output is a linear combination of the error signal, its integral, and its derivative. Provides precise control and is used for systems that have frequent disturbances.

Fuzzy logic PID: Uses a set point modifier to create a temporary set point that allows the controller to recover more quickly and smoothly. The temporary set point changes continuously as you get closer to the actual set point, so that overshoot at start-up and during process disturbances is virtually eliminated. Optimizes system performance.
 
Your analysis of PID control vs. manual on-off control is correct in many respects.
Almost any brewing process can be controlled manually just by having a person watching the process and operating the controls.

What a PID controller can do for you is provide an enormous amount of convenience during the brewing process. In my opinion, it also can provide more consistancy to the brewing process as well.

May PID units are really just a precise form of on-off control. Many operate by switching a device on and off in order to maintain a process setpoint such as a temperature.

An example I can think of is temperature control of my MLT. I use a PID to control an electric element that brings my liquor up to strike temp, maintains the mash temperature, does the step increases, and mash out temp control. The PID just switches the element on and off to maintain the temperature. You could think of it as a sophisticated thermostat in this particular application, but it could be used to control flow rate, motor speed, pressure or any number of processes as well.

I could do the temperature control manually, but the PID makes it a pretty much a hands-off process. This leaves me free to do other things like wash-up and stow equipment or relax and have a home brew.
 
OK, but I'm not comparing PID to manual on/off. The two Love TS switches I'm using provide automation so I don't have to manually open or close the gas valve to my standing pilot burners. The SPST output signals the solenoid-actuated ASCO red hat valve to open or close based on a temperature input. The input is a thermistor located in the MLT outlet valve (inside a thermowell) and another in the HLT (inside another thermowell).

That's not manual.
 
Keep in mind an on/off system can operate in a variable manner by having a time base and varying the amount of on time during the base time. For example, during a one-minute time base the output can be on for 0% (0 seconds) to 50% (30 seconds) to 100% (sixty seconds) of the time. By doing so, it gives much tighter control than just a thermostat-style control.

Rick
 
Right, that makes sense, and it adds more credence to my ... assumption?, theory?, observation?, belief? ... that automating via on/off controls is more than sufficient for a brewery operation, and that PID is really overkill.

So my question remains, and I hope some of the PID aficionados on this board can help me understand, just what additional value over simple on/off controls does PID lend to a home brewing application? What useful thing can PID do for a home brewery that a simple on/off control can't do just as effectively?
 
On/off control will work fairly well in most applications if you use sensing instruments that give you fast feedback and use appropriate deadbands. I have boxes of control equipment that I haven't got around to hooking up (and may never bother). Right now I have time to do the stirring, monitoring, and heating by hand (I am the PID) and have very good success. I am evaluating where I could use controls, and may incorporate them in the future. But it's all a matter of preference. I don't have a system so edgy it needs closed loops, and I'm always around when brewing.
 
it adds more credence to my ... assumption?, theory?, observation?, belief? ... automating via on/off controls is more than sufficient for a brewery operation, and that PID is really overkill.

One note first - when you say on/off, again many PID control loops use on/off but the on/off is finely tuned via the PID to maintain the temperature. What makes it a PID is that it uses an algorithm that either can or does include three main aspects to the algorithm -- a proportional value, an integral value, and a derivative value -- to determine the output. The output can then go to either an on/off output based on time or to a variable output. So an automatic temperature control system using on/off output can be a PID controller or can be something other than a PID (such as a simple thermostat).

A PID may well be overkill for homebrewing beer, but a thermostat-style on/off controller will have overshoots and undershoots, possibly dramatic ones, where a PID can remove a large portion of the overshoot/undershoot in the system. Basically, you could move from maintaining the temperature within several degrees to within a degree.

If within a few degrees is all you are after, then a thermostat-style is fine -- but on the other hand what are you going to use to automate the thermostat-type controller? Once you have the input to measure the temperature and an output to control the valve, you need something to monitor the input and turn the output on or off based on the temperature -- i.e, your thermostat. For a fermentation chamber, a $10 wall thermostat will work to keep it within several degrees of your target, but for the temperatures for mashing you would probably end up with a PID controller anyway. And, let's face it, a PID controller kicks the crap out of a wall thermostat in the geek-cool department.

Note that my experience with PID control systems is in industrial control systems and not brewing related. But I could see using them; being an extract brewer my first use would be in a PID loop for fermenting chambers (I'd want to monitor the actual wort/beer temperature not the chamber temperature, plus I would want to maintain actual temperature very close to my target temperature, plus I would want to chart the actual temperature over time). If I ever move to all grain, though, I can also see using PID controllers to control mash temperatures.

Rick
 
I guess overkill would be personal opinion.
Temperature controllers with PID function that is properly setup will give you more control to limit over and under shoot temperatures in turn keeping you closer to your desired target temperature.


Edit: rickylr, I just read your above post.....good post
 
rickylr said:
One note first - when you say on/off, again many PID control loops use on/off but the on/off is finely tuned via the PID to maintain the temperature. What makes it a PID is that it uses an algorithm that either can or does include three main aspects to the algorithm -- a proportional value, an integral value, and a derivative value -- to determine the output. The output can then go to either an on/off output based on time or to a variable output. So an automatic temperature control system using on/off output can be a PID controller or can be something other than a PID (such as a simple thermostat).

With regard to what I mean by on/off, see the definitions of the different control types I quoted from the Cole Parmer web site in my first post. I am using their definitions, since that's really all I know. As I said, this is new to me.

A practical example of a simple on/off control in that context is this Love TS device. By the Cole Parmer definition, they are not PID controllers.

It sounds like you are saying that such a switch could be incorporated into a design with additional components and logic to effectively make a PID control. If so, I think I understand you, but it was not what I was asking about. What I'm getting at (just to give a concrete example) is using devices like the Love TS that Cole Parmer calls an "on/off" control, versus the Love A series devices that they refer to as "Fuzzy PID", for a home brewery application.

My actual question was, what advantages do the PID style control give over the on/off control in this application (home brewery). I think between you and wihophead, you've addressed that in conceptual terms, but I am still hoping someone will give a specific comparison of a practical home brewing application where PID control gives demonstrably and meaningfully better results than on/off controls. Again, I'm using the Cole Parmer definitions of those terms.

rickylr said:
A PID may well be overkill for homebrewing beer, but a thermostat-style on/off controller will have overshoots and undershoots, possibly dramatic ones, where a PID can remove a large portion of the overshoot/undershoot in the system. Basically, you could move from maintaining the temperature within several degrees to within a degree.

That finer control would be a clear advantage for maintaining critical mash temperatures if indeed the mash benefits from control to within a degree versus several. I think most of us assume it would, so I'll assume that too. I'll pose a practical situation for consideration in a subsequent post.

rickylr said:
If within a few degrees is all you are after, then a thermostat-style is fine -- but on the other hand what are you going to use to automate the thermostat-type controller? Once you have the input to measure the temperature and an output to control the valve, you need something to monitor the input and turn the output on or off based on the temperature -- i.e, your thermostat.

Again, the "on/off" type control I'm referring to is not a simple thermostat. This Love TS is the kind of device I mean, and it has the input, output, and monitoring capability you are asking about, yet it is not classified as "PID", but rather "on/off".

rickylr said:
For a fermentation chamber, a $10 wall thermostat will work to keep it within several degrees of your target, but for the temperatures for mashing you would probably end up with a PID controller anyway.

That's the thing... I question your conclusion and that is my specific question ... why PID when this Love TS on/off control device appears capable of doing the same job for much lower cost?

rickylr said:
And, let's face it, a PID controller kicks the crap out of a wall thermostat in the geek-cool department.

Undeniably true, but not relevant to my question, which is about the practical (not conceptual or theoretical) advantages in a home brewery application of one versus the other.

rickylr said:
Note that my experience with PID control systems is in industrial control systems and not brewing related. But I could see using them; being an extract brewer my first use would be in a PID loop for fermenting chambers (I'd want to monitor the actual wort/beer temperature not the chamber temperature, plus I would want to maintain actual temperature very close to my target temperature, plus I would want to chart the actual temperature over time). If I ever move to all grain, though, I can also see using PID controllers to control mash temperatures.

Except for charting the actuals, I again propose that an on/off control like the Love TS will be as useful as a PID control for both of your examples.

Why? Because temperature variations in large bodies of fluid, whether it is being chilled or heated, occur relatively slowly, and given the practical means in a home brewery application of effecting changes in temperature, an on/off control with features like the Love TS will do as well as a full-blown PID. That's my supposition, and what I'm seeking is demonstrable evidence to the contrary.
 
I think I can boil this down to very simple terms:

Simple thermostat controllers can maintain a mash at a specific temperature, plus or minus a couple of degrees. The beauty of a thermostat controlled system is in its simplicity.

Well tuned PID controllers work VERY well for automated mash control. They offer precise control and rather exacting temperatures. However, that precision is gained at the price of complexity.

So, if you're the type of brewer who frets over every tenth of a degree when mashing and you really NEED (sarcasm) fine control over things, by all means, get yourself a PID controller and spend the time to get it dialed in. It'll give you peace of mind, and you may be able to achieve more consistent results than other homebrewers.

If you're like most of us, mash temperature swings of a couple degrees are quite normal, and they don't seem to hurt anything. A simple thermostat controlled mash system will probably give your brew rig a certain amount of "hands off" operation. Unless the rest of your procedure sucks, you WILL make good beer with such a system.

In the end...it's largely a matter of personal preference and brewer personality.


And remember, some of the best homebrewed beer comes from stovetop stock pot mash tuns, colanders, and scratched 5 gallon buckets. Your fancy brew system is only as good as your ability to use it...
 
Here's a practical situation for discussion purposes:

Consider a HERMS system where wort is pumped through copper pipe from an insulated mash tun through a long coil in an HLT, then back to the mash to control mash temperature. The HLT burner is regulated by a controller of some kind to adjust the temperature of the water bath that the copper coil is immersed in. The water bath is 12 gallons so that it fully covers a large copper coil.

The process designer could use a simple on/off controller (e.g., the Love TS controller) or a Fuzzy PID (e.g., the Love A series controller) to manage the mash temperature.

Here is a design using the Love TS, which is a on/off controller intended for temperature control applications:

The temperature of the continuously circulating mash wort is read at the mash tun outlet by the thermistor sensor of the Love TS. The sensor is in a thermowell built into the outlet valve. The output of the Love TS is an SPST switch that controls a solenoid-actuated ASCO red hat valve. The valve is not proportional. It is either fully open or fully closed, either supplying or preventing gas flow to a standing-pilot gas burner under the HLT. When the temperature of the mash drops below the set point, the output signal switches the solenoid gas valve to open it sending gas to the standing-pilot burner. Through experimentation, the hysteresis value of the 4 degrees was set to turn off the HLT burner before set point to account for lag in heat transfer via the HERMS as detected at the wort temperature input.

What problems might such a design have that could be solved by a full PID implementation?
 
An on/off controller (as described in the link you gave) will swing between slightly above and slightly below the target plus/minus the dead band; that's how it is designed. Because of the mass of the system, it continues to rise or fall after the heating element is turned off or on and it only turns off or on after the dead band is achieved.

Simply put, the practical aspect is that you get much tighter temperature control to your target with a PID than with an on/off controller. Whether that is important is up to the user and/or the application.

It sounds like you are saying that such a switch could be incorporated into a design with additional components and logic to effectively make a PID control

No, not quite. A PID requires an output that is not on or off, but that changes proportionally to the error (target-actual). A heating element that is on 0% of the time to 100% of the time during a time-base is a full PID. I've done many applications in that manner and they control much tighter to the set point than the on/off controller in your example.

Rick
 
Yuri_Rage said:
Simple thermostat controllers can maintain a mash at a specific temperature, plus or minus a couple of degrees. The beauty of a thermostat controlled system is in its simplicity.

Well tuned PID controllers work VERY well for automated mash control. They offer precise control and rather exacting temperatures. However, that precision is gained at the price of complexity.

So, if you're the type of brewer who frets over every tenth of a degree when mashing and you really NEED (sarcasm) fine control over things, by all means, get yourself a PID controller and spend the time to get it dialed in. It'll give you peace of mind, and you may be able to achieve more consistent results than other homebrewers.

If you're like most of us, mash temperature swings of a couple degrees are quite normal, and they don't seem to hurt anything. A simple thermostat controlled mash system will probably give your brew rig a certain amount of "hands off" operation. Unless the rest of your procedure sucks, you WILL make good beer with such a system.

In the end...it's largely a matter of personal preference and brewer personality.

I'm more attuned to the relaxed approach that appreciates some ease-of-use automation without having to measure and calibrate to the ultimate finest detail. Brewing can tolerate a lot of variation and produce outstanding results, and frankly the activity is NOT so well understood and documented that it can be reduced to pin-point precision to obtain highly specific results.

Brewing is more like cooking than it is like chemical manufacturing or oil refining, and that's pretty much why I think that a simple control setup satisfies my needs. Or maybe I should say that brewing is more like general cooking versus baking. I don't measure ingredients exactly when cooking because I am part of the feedback loop and I'm trying to achieve the best damn dish I've ever cooked, not trying to reproduce a dish exactly. With baking on the other hand, I've found that minor variations from a recipe can have disastrous results, so I tend not to deviate as much. The reason for the difference, though, might just be the level of skill and understanding on my part. Maybe I could do the same with baking that I do with cooking if I understood more about baking. That's an analogy that somewhat reveals my motivation for posting this topic.

I can't imagine divorcing myself from the brewing process to the point where I could just push a button and make a beer. I wouldn't want to. BUT, I've noticed a frequent number of topics centered around PID-controlled processes lately, and I just want to explore and understand what precisely it brings to the kettle. Just in case there are new tricks an old dog can learn.
 
rickylr and wihophead, thank you both for your explanations. Rick, your especially lucid explanations have increased my level of understanding quite a bit.

After thinking about everything that has been said by all, I'm beginning to think that my original question may not be answerable without actually building and testing different systems side by side under controlled conditions. And more importantly, if actual comparison tests were performed and the results were published, I think I'd find it only to hold academic interest for me. Thanks to Yuri for helping me to recognize that part.

It was fun! :fro:
 
I think it boils down to the fact that some people find as much joy in building and tweaking their rigs as they do in making beer. It is a marriage of two great hobbies....;)
 
I am planning on 10 gallon batches, so at least 13 in the BK. This amount of mass in the MT keggle will have some momentum upwards and downwards of my desired hold temperature. When the thermocouple senses the temp low, I foresee the swing of low temperature going past what I want to maintain-the system constantly being in a lag type situation, in both the HLT, and the circ loop/mash. It seems to best control the variation of temperature in the MT, that I would also want to control the variation in the HLT-for a constant temp of additional heat source.

I see the PID as able to learn to anticipate temperature loss and and turn on before it sees a low temperature that an on/off controller would have to wait and see. Bear in mind that I will be outside in the garage or hot rod shop-nice environments, but not kept at room temps in the 3 off-seasons from summer. So with much lower ambient temps, the cooling effect will be much greater than if I was doing this at 70°. My activity and the humidity and heat gained from the brewing will be adequate to keep me warm-and drinking some will also help. Either type of control will still be needed- I am just looking for the best solution but at a reasonable cost.

It is my experience as a machinist and machine builder that is driving my interest in PID's-I am looking at a whole system and the dynamics and considerations of it. But I have no controls experience, so I may have even fuzzier logic than a PID-so I am asking questions and looking for similar set-ups to give some credence to my possible plans.

Geez, I remember when I thought that anti-lock brakes were overkill and only for chitty drivers-soccer moms and such, but having seen them in unavoidable situations on the road, I have come to appreciate what controls can do for seemingly unnecessary applications.
 
We have tons of PID controllers at my work (micro electronics)...

They are nothing more than fine tuners of a process and completely 100% automated, set and forget if you will...and whether that's overkill for someone's brewery kind of depends on what system they have. For most that would probably be way too costly and no added benefit.

For others, it could be a real time and energy saver especially if they are brewing a lot.
 
Back
Top