PID control of mash temp

Describe your system and processes, and post your config file.
Post Reply
Timbrew
Posts: 26
Joined: Sat Jun 29, 2013 2:40 pm
Bot?: No
Location: Kent, UK

PID control of mash temp

Post by Timbrew » Mon Dec 14, 2015 3:08 pm

A question about using PID control of an HLT element from my mash tun output temperature probe in my electric HERMS.

Currently, the way I’m getting reasonable control of my mash temperature is to set the HLT PID at 1.5C above my requirement using the HLT temp probe rather than the mash tun probe. So, for a 66.7C mash I set my HLT PID to 68.2C. I’ve found the higher temp compensates for heat losses in the pipework. Although it would be more logical to use my mash tun probe to measure this, when I tried this I got large temperature swings which took quite a while to stabilize….the PID control seems to be overcompensating.

Any suggestions on how I might change (say) parameters in PID Settings so I can use my mash temp output probe directly? Cheers.

clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: PID control of mash temp

Post by clearwaterbrewer » Tue Dec 15, 2015 6:24 am

disclaimer - I use RIMS, and measure temp with PID set *exactly* at the desired mash temp and the probe within 1 inch of the RIMS tube element and have a stable system, the following are just thoughts that cross my mind when comparing your HERMS to my RIMS.

it is a bit confusing, first statement "control of an HLT element from my mash tun output temperature probe" and the second "HLT PID at 1.5C above my requirement using the HLT temp probe rather than the mash tun probe"... these seem to contradict each other...

I am going to assume you are doing the first, the HLT temp probe is NOT used, and instead you are using the HERMS output probe to control the HLT... This will always have some delay, resulting in an overshoot or long convergence time, but it can still be made to perform acceptably, but with a 1.5C higher heat source temp, you will have to stop herms flow, which you probably do not want to do, so you will have to change that 1.5C difference as you approach your setpoint.

Are you circulating your HLT water? you should..

There may be a way to use PID tuning to fix your overshoot, lowering P would be the first thing to try...


One programming-only alternative would be to have two BCS states, one when it is is more than x degrees C off of the setpoint to assist in fast heating, the other exactly on (or maybe ~.1C higher) for when you are close

Another would be a ramp-down of the heat source temp...

Another would be to average the existing MLT temp (or inlet to the herms) and actual HLT temp to your setpoint, say you wanted your mash to be at 66, and your mash(or herms inlet) was 36, with temp averaging(do they have this in 4.0? I am a bit behind the times on that stuff) it would attempt to heat the HLT(or herms output) to 96, right? as it got closer, say to 65, it would have the HLT try to be 67...

Timbrew
Posts: 26
Joined: Sat Jun 29, 2013 2:40 pm
Bot?: No
Location: Kent, UK

Re: PID control of mash temp

Post by Timbrew » Tue Dec 15, 2015 12:03 pm

Thanks for your reply.

Sorry for the confusion - "control of an HLT element from my mash tun [HERMS] output temperature probe" is what I'd like to do rather than using my HLT output probe. So your assumption is right although obviously I use the HLT probe to monitor my HLT water temperature. Yes, I circulate the HLT water....

I'm not sure the 1.5C difference will affect the mash, but you may well be right. The wort residence time in the [HERMS / HLT] coil is very short so IMHO the short-term temperature affect should be minimal (??). This is presumably a general issue with all HERMS systems where there's bound to be some heat loss which can only be remedied by having a higher HLT water temp. Wondering if this has ever been discussed?

Although my system works fine, what I'm not too happy about is that the 1.5C increment seems a bit too arbitrary (determined by hit and miss experiment) given the control capacity of the BCS. My preference as mentioned would be to use the PID to directly control my mash temp using the HERMS output probe. However, even if I can do this (say by tuning the PID settings - thanks for your 'P' idea on this!!), laws of thermodynamics will mean I'll still need to keep my HLT water more or less 1.5C above desired mash temp.

I'll try the PID tuning option, so any further advice welcome.

Cheers!

User avatar
oakbarn
Posts: 738
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: PID control of mash temp

Post by oakbarn » Tue Dec 15, 2015 1:03 pm

I have a modified HERMS and have the same issue. If I use the probe in my HLT, I have to set it about 3 to 4 Degrees F above my desired Mash to get my Mash Temp in the Winter. I actually use 4 probes in my Mash Process: I use a Chillzilla where I pump Wort on the inner tube and the hot water on the outer tube. I do have a standard HERMS Coil but I found I have better control and flow with the Chillzilla.

I have a Probe on the "MLT IN Tee" on the wort inlet side of the MLT. I have one in the "MLTBody" . One on the "MLT Tee Out" of the MLT. One in my electric element 9 gal sHLT (small HLT).

I find that controlling the sHLTe (small HLT Element) by any thing other than the sHLT probe is a game of overshoots. I brew in an open Barn so the outside Temp means I have different heat loss depending on the outside Temperature. In the summer, I can normally have the sHLT about 1 degree F above my Mash Setpoint and the other 3 are at the Setpoint. In the Winter, I have to use about 4 degrees F and there is a Delta in all the other 3. I have thought about an insulation jacket for the MLT.

Whenever I have tried to use any of the other three probes, I was not getting the corrections needed in a timely fashion so I have decided that the sHLT probe is what I use and I have to be part of the PID myself.

I tried tuning the PIDs but I think it was the system heat loss that is the problem and not the PID.

clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: PID control of mash temp

Post by clearwaterbrewer » Thu Dec 17, 2015 7:24 am

I think that there are a couple ideal solutions:

Longer HERMS coil so your returning wort is very, very close to your HLT temp... then you set the HLT to the desired mash temp. (if you have decent flow, and you are not in a cold, windy environment, there is no way for enough loss to be that far off, maybe a tenth of a degree or two at the max...

Have the HLT several degrees hotter than the desired mash temp, but use a three way valve to bypass some of the flow and achieve the correct mash heat(we did this manually with a 60 gallon brew system with a 15 Gal HLT 10 years ago) 4-20mA output control would be phenomenal for this...

use RIMS with the BCS... without analog output, pulsed electric heating of a very small volume that is pumped constantly through the mash is really the best way...

Timbrew
Posts: 26
Joined: Sat Jun 29, 2013 2:40 pm
Bot?: No
Location: Kent, UK

Re: PID control of mash temp

Post by Timbrew » Fri Dec 18, 2015 9:54 am

Thanks guys. I tried tuning my PID using several water-only trials and found results uninspiring. I brought down 'P' to 5 from 20 and 'sample period' to 5 from 30 (info from an earlier ECC thread). I still had relatively poor control although better than before - setpoint took 20-30 mins to stabilize and swings would reappear - too much variability.

I also retried my original process using the HLT probe at 1.5C above my setpoint (more or less like Oakbarn's) and get rock steady mash output [to HERMS coil] temps after a few minutes. Therefore conclusion is better the devil you know.... The PID tuning log [http://embeddedcc.github.io/bcs-pid-tuner/] looks great but I have no idea what it's telling me. It would be great to have some more detailed help write up on PID tuning for dummies.

More now on my experiences with Recipe Utility. I mentioned in another couple of threads that this is not working for temperature variable settings with decimal points. This is evidently more of an issue for Celcius users. A work around is to use F but why when there's Celcius functionality in the BCS?? Is this an issue that's pegged up for a future fix?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest