Better Brewing, With Math!

First off, greetings! I’m new to Arduino and Raspberry Pi, but I’ve been building PID’d espresso machines for years. I have a couple ideas I’d like to bounce off the brain trust here, but first, some background: I’m currently living near Seoul, South Korea and the nature of my job requires that I move quite often, so lugging a ferm-fridge around just isn’t an option. I do, however, have an all-grain rig that I schlep around (priorities :smile:). I want to integrate digital controls into my HLT, MT (via HERMS), and Boil Kettle. I also want to use a kimchi tub as a water bath for my carboys. So here it goes:

Brewing:

HLT- I don’t think PID control is the best solution here. PID is best suited for unknowns and very complex systems. We know how much water we have, we know the specific heat of water, and (with the addition of voltage and current sensors) we know how much energy is going into the vessel. Therefore it should be entirely possible to get almost exactly to the setpoint much more rapidly than can be accomplished with a PID algorithm. PID can help maintain a setpoint once reached, but I think this would be a more efficient method.

HERMS- Due to the complex thermal nature of this system, a motorized valve controlled by a PID seems like it’d work best here.

Boil Kettle- here we have a couple of goals, maintain a rolling boil and end that boil after a certain amount of time with the volume we want in primary. PID is not the best option here, but for different reasons. Since the water is boiling, applying more power will not change the temperature, so there is no feedback in the loop. But, once again, we know the volume, we know the molar enthalpy of vaporization of water (energy required to make the phase change from liquid to gas), and we know how much energy is going into the wort based on the same sensors that were used for the HLT. Here we (or, rather, the Arduino) can calculate the exact amount of energy to apply to the wort in order to affect the desired boil-off.

Fermentation: I plan to use a water bath that is cooled and circulated by a mashup of parts originally intended for liquid cooling processors. Here again we know the volume and temperature of the fermenter as well as the volume and temperature of the bath. But this time the math is even simpler, just a ratio chain. And again, the PID algorithm can kick in to help maintain the setpoint once reached, but the math will get you there faster.

So, thoughts? Am I off my rocker? I already know I’m out of my league. Thanks in advance!

-Jesse

PID is generically the best control mechanism - the main advantage is that it can be set up simply without needing lots of parameters to be available. But it’s simplicity is also it’s disadvantage in that it knows nothing of the process other than what is gleaned indirectly from the PID parameters.

As brewpi matures, we will introduce new control algorithms, including model predictive control where known process parameters are added to the control algorithm. Given the complexity this involves and the reliance on having these parameters quite accurately set, the PID algorithm does a pretty good job!