BCS 2 Vessel No Sparge Garage Brewery Build

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.
There is no time scale on that graph. Anyway, not sure it matters but the graph shows an unstable system, which is an incorrectly tuned PID system. Those coefficients are the default so they should work with a moderately sized system (enough thermal mass, which yours has).
 
There is no time scale on that graph. Anyway, not sure it matters but the graph shows an unstable system, which is an incorrectly tuned PID system. Those coefficients are the default so they should work with a moderately sized system (enough thermal mass, which yours has).

yea I believe each grid is 5 minutes. But yea I think we can all agree its not even close to intune.
 
Can you explain what the integral clamps do?

Something like this, starting from the algorithm from the BCS wiki:

Code:
pid_output = pTerm + iTerm - dTerm;

where
pTerm = pGain * err;
iTerm = iGain * iState;
dTerm = dGain * (curr_temp - previous_temp);

The pTerm is simply the difference in the setpoint and actual temperature multiplied by some factor. For example lets say the setpoint is 152 and the actual temperature is 150, and we are using the default gains, the pTerm would = (20 * (152-150)) = 20*2 = 40% duty cycle. The iTerm would = (0.5 * (152-150)) + previous_iTerm = previous_iTerm + 1% duty cycle. Let's forget about the dTerm for the moment.

You can see that the iTerm accumulates. If we started out at a real low temperature or we're climbing slowly, the iTerm *by it self* could grow to 200+% duty cycle or what ever. Lets say our actual temp is now at 153, the pTerm would calculate to (20*-1)=-20% duty cycle but without limits the accumulated iTerm could be at +1,000% duty cycle or even higher! In this situation it might take a really long time for the iTerm to come back down to a reasonable level if it's only coming down at (0.5*-1)=-0.5% at a time. This is called windup. The integral clamp allows you to set upper and lower bounds to the iTerm and help mitigate windup.

Code:
pid_output = pTerm + iTerm - dTerm;

where
pTerm = pGain * err;

iTerm = iGain * iState;
  if iTerm < lower_i_limit then
    iTerm = lower_i_limit
  else if iTerm > upper_i_limit then
    iTerm = upper_i_limit
  end if

dTerm = dGain * (curr_temp - previous_temp);
 
I did see the wiki and am going to be mucking with it more tonight for sure. Can you explain what the integral clamps do? I don't understand them. I believe I understand the pulse ones but not the integral limits.

The integral has a tendency to "wind up". This is when the temp has been below the setpoint for a while and the integral value has reached its max. Once you get above the setpoint the output will still be on until the integral unwinds. This will cause your overshoot to be larger and longer in duration. By limiting the max of the integral it won't windup as much and therefore will take less time to unwind during the initial overshoot.

I set the min integral to 0 because we will never need a negative steady state integral. By letting the integral go negative during the overshoot, it will take longer for it to turn positive again after the temp falls back below the setpoint after the initial overshoot.

Long story short the integral clamps are used to reduce overshoot and settling times.
 
Something like this, starting from the algorithm from the BCS wiki:

Code:
pid_output = pTerm + iTerm - dTerm;

where
pTerm = pGain * err;
iTerm = iGain * iState;
dTerm = dGain * (curr_temp - previous_temp);

The pTerm is simply the difference in the setpoint and actual temperature multiplied by some factor. For example lets say the setpoint is 152 and the actual temperature is 150, and we are using the default gains, the pTerm would = (20 * (152-150)) = 20*2 = 40% duty cycle. The iTerm would = (0.5 * (152-150)) + previous_iTerm = previous_iTerm + 1% duty cycle. Let's forget about the dTerm for the moment.

You can see that the iTerm accumulates. If we started out at a real low temperature or we're climbing slowly, the iTerm *by it self* could grow to 200+% duty cycle or what ever. Lets say our actual temp is now at 153, the pTerm would calculate to (20*-1)=-20% duty cycle but without limits the iTerm could be at +1,000% duty cycle or even higher! In this situation it might take a really long time for the iTerm to come back down to a reasonable level. This is called windup. The integral clamp allows you to set upper and lower bounds to the iTerm and help mitigate windup.

Code:
pid_output = pTerm + iTerm - dTerm;

where
pTerm = pGain * err;

iTerm = iGain * iState;
  if iTerm < lower_i_limit then
    iTerm = lower_i_limit
  else if iTerm > upper_i_limit then
    iTerm = upper_i_limit
  end if

dTerm = dGain * (curr_temp - previous_temp);
awesome that was super helpful. they are defaulted to 0-100, I assume this is a decent starting point for this type of system, but now I can tweak them and know what they do if need be. :)
 
I set the min integral to 0 because we will never need a negative steady state integral. By letting the integral go negative during the overshoot, it will take longer for it to turn positive again after the temp falls back below the setpoint after the initial overshoot.

This is very sound advice, and I had not considered it before. Since heating or cooling is "one-way", flattening this makes sense.
 
This is very sound advice, and I had not considered it before. Since heating or cooling is "one-way", flattening this makes sense.

Makes perfect sense.

In the same vein, just off the top of my head, what about setting the upper bound to something around the system's 'maintenance' duty-cycle. Maybe that's a little too subjective.
 
Makes perfect sense.

In the same vein, just off the top of my head, what about setting the upper bound to something around the system's 'maintenance' duty-cycle. Maybe that's a little too subjective.

I do something similar. I set the upper limit to 2-3 times the steady state integral value. This part is subjective as the steady state value will be different from day to day depending on the ambient temperature.
 
Yea I can get you pics next time im outside. Its basically a Tee made out of 1/2 copper pipe and has a stainless steel wool ball at the base, works and cleans up insanely good and just sits there no installation. The ball does fit 1/2 tubing, its a little big but hose clamps on either side of it keep it from sliding around on the hose. Here is the float and I can get you pics of it on the hose as well.


Thanks!

So does it tie into your drain valve or are you siphoning with it?
 
Thanks!

So does it tie into your drain valve or are you siphoning with it?

u0xwRTj.jpg

QANV9zb.jpg

Oef33mK.jpg

AkdZWAF.jpg
 
Good day all. some cool things happened. My car started (yay weather above -10), IPA has krausen, nothing crazy but its going somewhere. and PID is way way way more in tune. Its still oscillating by about .4 +- around setpoint with waves being around 2 minutes, not super sure how to dial that in but we are way closer. Dialing back max integer to 10 and max pulse to 25 were really helpfull. 'i' was definitely getting wound up and causing the massive overshoots. Probes are reading temp of trusted thermometer as well. So definitely progress. I will brew again this weekend with hopefully better results. And maybe just maybe there is a whisper of a hope the IPA will be drinkable.
:mug:
 
Good day all. some cool things happened. My car started (yay weather above -10), IPA has krausen, nothing crazy but its going somewhere. and PID is way way way more in tune. Its still oscillating by about .4 +- around setpoint with waves being around 2 minutes, not super sure how to dial that in but we are way closer. Dialing back max integer to 10 and max pulse to 25 were really helpfull. 'i' was definitely getting wound up and causing the massive overshoots. Probes are reading temp of trusted thermometer as well. So definitely progress. I will brew again this weekend with hopefully better results. And maybe just maybe there is a whisper of a hope the IPA will be drinkable.
:mug:

Really cool pickup tube you have there!
Did you need to calibrate your temp probes? I have to do mine looks like. I have filled my HLT for clean process today and hopefully can calibrate the temp probes too. One seems off by a good 7º, others might be a little more accurate.
Is your build the one with the float switches in the drain tube? Was wondering if those worked as intended if so.

TD
 
Really cool pickup tube you have there!
Did you need to calibrate your temp probes? I have to do mine looks like. I have filled my HLT for clean process today and hopefully can calibrate the temp probes too. One seems off by a good 7º, others might be a little more accurate.
Is your build the one with the float switches in the drain tube? Was wondering if those worked as intended if so.

TD

They came calibrated by brewers hardware, so I haven't touched them. Yep I have the float switches in the Tee below each pot for pump cut offs, they work amazing so far. Even at full open they do not trip until the water is too low. Workes perfect for hands off lautering.
 
They came calibrated by brewers hardware, so I haven't touched them. Yep I have the float switches in the Tee below each pot for pump cut offs, they work amazing so far. Even at full open they do not trip until the water is too low. Workes perfect for hands off lautering.

BCS uses thermistors right?
 
Yeah, let's hear it.

Out of curiosity what did you end up with for your PID coefficients?
 
Mash from last brew day; setpoint 154, blue is return, green is MLT. Still has oscillation but nowhere near last time.
uOKKDb4.png

wB2o7lj.png


I knew it was going to be a bad day when my bcs was reading 2 degrees in the garage. The short version, everything was frozen, so frozen one of the ball valves broke. was able to take it apart and mend it during the mash. Lines apparently didn't drain fully so they had sections of solid ice in them. Ended up doing an hour or so whirlpool because I couldn't thaw the chiller for the life of me. Decided to just rack to carboy and chill in icy water. After cleaning up and taking the chiller inside and thawing it fully sad news was found. There was water left in the outer coil of the chiller that froze and appears to have collapsed the inner tube the wort runs through. Pretty sure its ruined beyond repair. I will cut it open to make sure but sadly I think its dead. I cant blow air through either end, its sealed shut. Here is a pic of the fallen trooper. Loved this chiller, it always worked perfect, 1 pass and done.
Q9Amwqt.jpg


Good news though, Austinhomebrew has a pretty sick deal on counterflows so I picked one of those up. Should be a lot easier to mount and drain. And I learned I think in the winter I need to take the hoses off and let them fully drain, and store the ball valves in open position when not in use. So yea any tips on how to tighten up the PID more or is this about as good as I should expect when its about 150 degreese colder ambient temp.
 
Ya... me neever. I guess that is why most in cold Wx try to brew indoors! Sorry about the expansion properties of freezing water!

Regarding the PID loop... something is wrong. It is still unstable (oscillation gets bigger over time), and that is almost hard to do. Also, the response is pretty slow... almost 8 minutes peak to peak. I think your D is too high, but certainly this needs to be tuned. BTW, you could have fixed this by changing it to a fixed duty cycle and modifying it slightly over time yourself. I see you capped the output pulse to 25% - this could be needed but with properly tuned PID this should not be necessary. I don't remember your system - will go back and look and maybe make some recommendations.
 
Ya... me neever. I guess that is why most in cold Wx try to brew indoors! Sorry about the expansion properties of freezing water!

Regarding the PID loop... something is wrong. It is still unstable (oscillation gets bigger over time), and that is almost hard to do. Also, the response is pretty slow... almost 8 minutes peak to peak. I think your D is too high, but certainly this needs to be tuned. BTW, you could have fixed this by changing it to a fixed duty cycle and modifying it slightly over time yourself. I see you capped the output pulse to 25% - this could be needed but with properly tuned PID this should not be necessary. I don't remember your system - will go back and look and maybe make some recommendations.

Yea its definitely better but not ideal. I need to just sit down again with the tuner probably and watch it graph while i tweak. Sadly its like 1 tweak per 20-30 minutes though at the moment so its a slow process.
 
I assume by looking back at your hardware and above, that the green trace is the probe down in the MLT next to the element? And that the blue trace is a probe somewhere on the feed back into the MLT? Which is the probe feeding the PID?

Also, one quick recommendation would be to insulate your MLT. Way too much heat getting lost there given your temps. Also you need to recirc as fast as your false bottom or bag will allow.
 
Green is in the MLT below the false bottom. Blue is return. Blue feeds the PID. And yea I have some reflectix lying around I should probably hit both MLT and BK with it, no need not to. Fair point on recirc speed, ill try to pick up the pace with it next time, that would allow less time for it to cool while outside the tun.
 
First, confirm that you inserted some conductive gel at the tips of your thermowells and the thermistors are at the tip. They need to respond quickly... within a few seconds I would say. If you put your fingers at the tip of the thermowell... does the temp start to rise quickly?

Second, can you estimate your re-circulation rate? It needs be as least a 1.5 gals a minute... the more the better so long as you don't get a stuck mash. If your efficiency is good, consider opening up your mill a tad.

Blue seems correct as the driving probe but there is an awfully large temp drop between green and blue (3-4 degrees). This makes little sense as the element should be heating the liquid up hotter than green reads (assuming fast enough flow rate) and then a small decay as heast is lost through piping and pump, then read by blue. Unless green is sensing heat coming off the element (I assume its the probe pointed toward the element in the pics?). Would be better if green were further away from the element so it is not influenced by it, but I understand it is not in the PID loop.

I dunno... everything is pointing at recirc rate to me right now.
 
I just went back and looked... you are using a bag for your mash/false bottom? You are not using that snorkel gig in the MT, correct? That would pose a big problem there because the liquid would bypass the element. Can you post a pic of your MT inside?
 
First, confirm that you inserted some conductive gel at the tips of your thermowells and the thermistors are at the tip. They need to respond quickly... within a few seconds I would say. If you put your fingers at the tip of the thermowell... does the temp start to rise quickly?

Second, can you estimate your re-circulation rate? It needs be as least a 1.5 gals a minute... the more the better so long as you don't get a stuck mash. If your efficiency is good, consider opening up your mill a tad.

Blue seems correct as the driving probe but there is an awfully large temp drop between green and blue (3-4 degrees). This makes little sense as the element should be heating the liquid up hotter than green reads (assuming fast enough flow rate) and then a small decay as heast is lost through piping and pump, then read by blue. Unless green is sensing heat coming off the element (I assume its the probe pointed toward the element in the pics?). Would be better if green were further away from the element so it is not influenced by it, but I understand it is not in the PID loop.

I dunno... everything is pointing at recirc rate to me right now.

there is thermal paste at the end of the probes. I will confirm they respond fast to the touch but I believe they do. The rate is about 1/4 open on the pump, I can measure but I would think its at least a gallon a minute, will double check and try to speed it up regardless. The green probe is about an inch from the element so it definitely could be reading hotter than the majority of the mash. I will hit it with some insulation as well when I'm out there installing the new chiller. And then we can see what happens from there I supose. I would assume faster recirc will tighten the difference in temp but not sure that it will do anything for the oscillation though. I think I probably need to drop D and or I more.
 
I just went back and looked... you are using a bag for your mash/false bottom? You are not using that snorkel gig in the MT, correct? That would pose a big problem there because the liquid would bypass the element. Can you post a pic of your MT inside?

inside of MLT is just like BK, no snorkel. then there is a false bottom I made out of a lid that has lots of 1/4" holes in it that sits above the element. then I line everything with a bag. I should be able to recirc pretty fast without getting stuff stuck.
 
The faster the better as far as the temp control goes, here is a shot of my controller running at about 3.5-4 gal/minute if I remember correctly:
MZAgwHb.png

(Useless data as far as practical use goes, flow too fast)

But @Brundog, at what flow rate do you need to worry about channeling? I personally aim for about 1 to 1.25 gpm on my system, maybe I should step it up.
 
OK. What voltage is that running at? 120VAC would be better (240VAC like putting a jet engine on a Cessna - **** gets out of hand quickly) but with the ambient temps it may not be enough.

yea it runs on 240, thats why the max pulse down to 25% appears to have helped a lot.
@thekraken yea those are a lot tighter temps than mine.
 
Back
Top