PID Tuning Question - Ti or Td?


Hello Brewpi community,

My heater and fridge compressor continue to run after the fridge temp reaches the fridge setting temp. I’ve seen a lot of charts here where the fridge temp follows the fridge setting temp almost perfectly. I’m hoping someone can have a look at my chart and let me know if I’ve got one of the following situations:

  1. Too much reset?
    Solution - Ti for both the heater and cooler needs to be increased

  2. Not enough braking?
    Solution - Td for both the heater and the cooler needs to be increased

  3. Something entirely different?

Also, non critical, but should the Log1 Temp show up on the chart?
I’m running a Brewpi v2 spark 0.4.4 firmware

Many thanks in advance


I think your overshoot is caused by having too much integral and too little proportional action.

Integral action should only happen in steady state, but you already have quite a bit of integral windup after the first hour of the chart. This causes the fridge setpoint to stay too low for too long.

The integral is held to zero as long as the fridge setpoint is clipping to min or max.
I would decrease the maximum difference between beer and fridge setpoint.

I would also increase Ti, so it builds up slower. This is the beer to fridge Ti.

Also update to 0.5.x. Some anti-windup improvements were part of the 0.5.0 update.
Your heater can probably have a higher Kp. It is now only 10% on for a 1 degree difference.


Hi Elco,

Thanks for replying so quickly, I will up update the firmware and make the following changes:

  • Beer to fridge Ti
    5400 -> 10800

  • Decrease the max. offset
    10 -> 5

  • Increase heater Kp
    10 -> 15



I think I’d go much higher on heater Kp. See how 50 works for you.
Your overshoot in fridge temperature is caused by integrator windup, because the integrator is doing work that should be done by the proportional part.

Also increase heater Ti and cooler Ti to a value about 3 times your process response time.

Don’t forget to update to the latest version.


Ah I see… 50% heater on if fridge is 1deg below set point… much more aggressive proportional gain. Got it.

I’ve just updated to 0.5.2 and I’ve now got Log1 temp on the chart too

Thanks for help Elco, appreciate it