Getting the most out of PID Control - Modelling HLT/1V, RIMS and HERMS

Australia & New Zealand Homebrewing Forum

Help Support Australia & New Zealand Homebrewing Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Adr_0 said:
So, below should be some hopefully good starting points:

1V:
Just use P control, e.g. P of 1 to 5, or on the Aubers use P of 100 to 500. Keep the pump circulation up, or stir as much as you dare during the step changes. 1V will give you the value out of your element.

RIMS with T in the tube:
This is a pretty bulletproof setup and will give the second best ramp rates for a given element size. You should be able to set the P to 1 to 5 (100 to 500 on Auber) and that should be fine. Keep the pump circulation as high as you dare with your mash tun geometry. You can use a bit of Integral control with RIMS where you measure temperature in the tube, but don't make it less than 60s - e.g. 120 or 180s. This will cause you to overshoot a touch in your tube (a couple of degrees) and you need to decide if you're comfortable with that. KISS is probably best here.

RIMS with T in the mash:
This can be a dangerous setup. High circulation is your friend here and low circulation (e.g. 1-3lpm) will cause some serious dramas. Use P control only if you want to keep it simple (P of 0.2 to 0.5, 20 to 50 on Auber).
If you want to keep your wort safer, use P of 0.5 and some D control as well, e.g. 25 to 100. If you are losing too much ramp rate, check your in-tube temperature and drop this back a bit.

HERMS:
This is a graceful and handy setup but the ramp rates are inherently compromised unless you have a super-long coil and small HEX volume, and can open yourself to overshoot and very slow ramp rates if you have the opposite. You generally need PD control with HERMS, but if you have a relatively small HEX and/or a lot of coil you should be able to to just use P.
High flow, as with all setups, is best. 10-15lpm as long as you can stop your bed compacting is great.
Coil length, try to have it at least 3-5m of copper for a start. Check out page 73 of the HERMS guide for a bit on coils.
HEX volume... if you can have 5-10m of copper you should be ok up to 30-40% of your mash kg (e.g. up to 10L for a 25kg mash) but it can be dangerous (inherent overshoot, slow ramp rates) if you only have a couple of metres of coil. If you have 2-10L HEX this is probably ideal for a 25kg mash, and fit as much coil in as you can.
Big HEX, short coil: start with P of 1 (100 for Auber) and D of 100-200. If you are still getting overshoot, don't touch the P but increase the D, maybe 300 or 400. If it's too doughy, drop the D down to 50-100.
If you have a decent coil and a fairly small HEX you can probably try something like P of 5 (500), I of 0, D 0, 50 or 100 - see how you go and adjust as above: if it's doughy, reduce the D; if it overshoots increase the D.

Feel free to msg me if you want any pointers.
Brewed today with my revised PID parameters which you helped me with.
Great success...held the mash temperature witnin 0.2 degrees of target 66,no overshoot at anytime,ramp time 1 degree /75 seconds.
Decided to check the outflow wort temperature and suprisingly only 1.2 degrees lower that the inflow.
As you know I mash with 20 litres of water,I used 5.950 kgs of grain and mashed for one hour the HEX neon was cycling showing small inputs of power most of the time, never overshot once.
This has been one of the most rewarding exercises that I have done, appreciate your help very much.
I am attaching a picture of my controller showing the temperature of the wort. 2015-09-02 10.20.01.jpg
 
That's awesome Alan, great to hear. It's all about making the brew day a little smoother and more consistent, and happy to help.
 
Here's a curly one - what if you used the auto tune function and then changed the I to zero? Would that be worse than manually guessing the P and D values?
 
Ha ha, that is a curly one - try it. I would say you'd get a pretty doughy response. It depends what your response is at the moment, but with all things even and to get the same response, setting I to 0 you should raise the P a bit and drop the D a bit.

If it's still really doughy, raise the P more or drop the D a bit. If you are getting overshoot, drop the P a touch and raises the D a bit.
 
Hi Adr_0
I'm currently working on my HERMS system but I'm taking a very different approach to temperature control. I recognise that almost everyone is trying to perform a finite temperature control by modulating the temperature of a relatively large volume of medium and an unstable heat exchanger flow rate. In industry this is almost unheard of as the rate of change for this volume is too slow and compounded with an ever changing flow rate through the heat exchanger. One could greatly reduce error by introducing a second control loop operating a diverting or mixing valve and a simple bypass line.
The second control loop would need to have a proper sized valve for decent authority and real proportional controller (4-24mA, 2-10V,... blah blah).
Alternatively, or additionally, you could add another process to control pump flow rates through a smaller heat exchanger. Initially it would be more difficult to tune but it's inherent stability would add incredible accuracy. If you controlled by variable flow rate then you'd never expose your wort to over-temperature as you would through a diverting/mixing process but I don't know exactly how that would effect your conversion.
If you added all of these controls together I'm thinking you could control maximum heat exchanger temperature and wort return temperature by varying flow and mix rates.
What are your thoughts on this? Am I way over-thinking the value of this level of accuracy?
 
Hey Tex,

What would you be bypassing, and what is your heat source? And when you say accuracy do you mean at all points of the wort circulation/grain bed or just good temperature response wherever you're controlling it? The proportional output of off-the-shelf PID's is time proportional. It's not as good as varying voltage or mA, but it's close enough. If you consider the output cycle is over 2-3s and we're interested in 15s, 30s or a couple of minutes order of magnitude it's acceptable anyway. I guess you could vary phase or amplitude on an element?

In terms of over-temperature, actually if you had a diverter (I assume one 'side' hot, the other is the mash?) and 'diverted' the hot wort away from the mash, this would still have an amount of hot wort somewhere, which would denature the enzymes or potentially scorch the wort. Switching/diverting hot wort is not how you avoid overshoot as it's complex as you're potentially controlling two things (diversion amount, heat input) when one (heat input) is absolutely fine. Overshoot is more a factor of capacitance (large volume of water) which can be offset by heat exchanger efficiency (coil length), which means that your water volume doesn't get that hot anyway, i.e. the energy efficiently gets into the coil rather than the water. I made this argument myself a little while ago, but some thinking and modelling turned me around.

In terms of accuracy through the grain bed and to temperature response, a system with a pump is best. So the accuracy is more down to system layout (short lengths of tube, high pump rates, good wort distribution and collection) than BIAB vs RIMS vs HERMS.

If you are worried about the inefficiency of a heat exchanger (coil), go RIMS - simple as that. You will essentially get all of your heat input directly into the wort. Get the RTD close to the element and have good wort distribution through your bed, etc.

If you're set on HERMS, the 'effectiveness' I've talked about is essentially how much of the heat you have in your HLT/HEX water vs how much actually gets into your wort. I've got a graph on page 73 of the HERMS guide that you should check out if you're curious - and surprise surprise the more coil the better (if you can fit it in, if you can afford it, if your pump can handle the increased back pressure). I haven't modelled pressure drop and 1/2" vs 3/8", sorry...

In terms of varying pump rate, high is best, but once you hit a certain 'gain' in your HLT/HEX and coil (i.e. HEX small enough and/or coil long enough), the overshoot and response profile start to look the same, and just the overall rate improves as the wort circulation goes up.
 
Back
Top