Tuning advice for BIAB

Hey guys,

I realise you get a lot of these questions but I haven’t been able to glean much direction from other posts.

I’m attempting to configure the PID settings for my BIAB setup. It’s a 70L pot with a 5500W element and recirculating pump. I wrote a post about my setup a couple of years back:

I did a water test last night with 35L of water (I aim for 30L into my fermenter). The temperature control does not appear as stable as I would have hoped. These are the PID settings (default from wizard):

I tried a number of different temperatures and tried to leave it for 15-30 minutes at each temperature to stabilise. Here’s a summary graph (note there was a loss of data from 21:18 to 21:45, as my Raspberry Pi dropped off the network for some reason):

Zoomed in when set to 70°C:

It looks like the Differential portion seems to be contributing quite a lot. Also I suspect Kp is too high?

I also tried boiling. Boil was reached when the probe was measuring 98°C. From what I can see the controller didn’t detect boil so the “minimum output when boiling” was never reached. Is this an indication that my probe needs calibrating? Can the “Boil Temperature Setting” be -ve?

I’ve also attached a CSV export from the Session Log:
graph-Mash Graph-brewpi_p1_mash-downsample_1m.csv (51.8 KB)

As a side note the session log appears to be at a down-sampled rate compared with the live data. Is this adjustable?

I’m also in the process of configuring my new Fermentation chamber. I’ll see how it goes but may also be after some tuning advice for that.

Thanks in advance!

The D portion should be all but inactive during steady state. You can try disabling Td entirely, and then configuring Kp / Ti to keep temperature steady.
Afterwards you’ll have to tune step response separately - the D portion is relevant to avoid overshoot there.

There’s no harm in calibrating your sensor, but boil temperature does indeed vary, based on altitude (pressure) and mineral content of the water.
You can set a negative value for boil point adjustment. If you set that to -5°C, then boil mode will kick in for every setpoint >=95°C. You can then use a setpoint setting of 97-98°C.

Graphs are downsampled based on how much data would be yielded for their period. The policy is chosen for each new query (whenever a graph is loaded). I assume your Session View graph is showing a significantly longer period than your live view?
We don’t currently have UI settings to override the algorithm that selects the most appropriate downsampling policy for a query.

Thanks Bob. I’ll try setting Td to 0. Any suggestion for what to try for Kp and Ti?

I think the session log was for about 3 hours.

You can keep them the same for now. Re-evaluate after testing with Td=0.

There is an auto pid in craft beer pi that someone wrote. Could that code be useful in brewblox. It’s deadnuts every time. U just have to transfer over the parameters…

Possibly, but it’d still have to be adjusted to fit. Adding/implementing an autotune has been on the backlog for a while now.

Slightly different topic, but I also have some questions about my fermentation chamber setup. I think from reading the guide here:

that I should not be using a dynamic fridge setpoint, and instead control the beer temperature directly from the heater and cooler PIDs. My fermenter is only about 25mm from the fridge evaporator. I use a tube heater under my fermenter with a fan:

The fridge sensor is currently in the fridge control box at the top left, as that was the most convenient place to mount it.

If using this setup wouldn’t there need to be different PID settings when switching between Constant Beer and Constant Fridge modes? I also use the chamber for bottle conditioning/storage and yeast starters so often switch between these 2 modes.

All settings currently being used are the defaults from the wizard:


Initially I did some tests of Fridge Constant:

Cooling:

Heating (blip caused when the door was opened):

I’m now trying a typical ale profile with 30L of water in my fermenter using the beer sensor. Will see how it goes (thermowell right in the center of the fermenter).

There are. If you check quick actions settings, you’ll see the beer/fridge mode actions include changes to PID settings.

Ahhh next time I’ll be more attentive. Thanks!

Update from the latest brew:

I adjusted Kp to 40, Ti kept at 5min, Td to 0s and boil temp to -5°C.

These are the results:

Full log:

Zoomed in on overshoot after setting to mash in temperature:

Steady state for mash temperature:

For the boil I played around a bit with the settings. I found that it seemed to be most stable when set to 97.8°C and 50% minimum power:

I’m thinking I should further reduce Kp a bit more? Can you tell from the graphs what Td and Ti should be set to?

I’d say the overshoot seems to be from the integrator increasing too fast, at least partly.

Try setting Ti to 10 min instead. You can also experiment with a little bit of Td, like 30s.
Perhaps decreasing Kp to 30 too.

Judge minimum boil intensity by how much bubbles you want.

1 Like