PID Settings for Unitank Glycol cooling

I have a setup of 3 200 liter unitanks and a chiller. Everything runs smooth but after haveing just started my 2nd batch there seems to be a need for some adjustment of the PID settings.

This batch was a little too warm when I transferred to the unitank (23,5 vs a Target of 20)

The cooling has now resulted in a ~5 degree undershoot of the temp. What puzzles me is that the controller seemed to continue to add periods of cooling even after the temperature was below target (see first screenshot). I only have cooling added to the tank, no heating.

I’ve also inserted a screenshot of the PID graph for the couple of hours around the time where it drops below target.

Can you please advice what I should adjust?

As a side note, the system is brilliant at keeping a stable temperature or reducing the temperature slowly using a temperature profile


It would be great with some input on this question :slight_smile:

For advice on how to resolve the issue you’ll need @Elco’s input. I understand the problem, but it ends there.

The overshoot is caused by the integral (I) still being built up when the temperature target is reached. The integral exists to compensate for constant temperature drift when maintaining a constant temperature.
For this kind of more drastic temperature change, the proportional (P) should be the major driving component, with the integral taking a back seat.

Possible solutions include reducing your Ti, or increasing your Td setting.

What are your current PID settings?

Hi Bob,

My settings on the PID is:

Bob’s analysis is almost correct, your main problem is indeed that Kp is too low.

Because the proportional part isn’t doing enough, the integrator starts increasing. The integrator however, is slow to increase and slow to decrease by design. It is meant to correct steady-state errors, to prevent stabilizing at 0.1 or 0.2 degrees under the setpoint.
Ti should long enough to not have much effect integrator buildup in the time you go from 100% PWM to 5% PWM.

In your setup though, the temperature responds very slowly, so the integral has time to wind up.

Possible remedies, in order of preference, are:

  • Increase Kp to reach the setpoint faster and not give the integrator time to build up
  • Increase Ti, so the integral builds up slower
  • Increase Td so you anticipate more overshoot, based on the slope.

I also see in your graph that the temperature keeps dropping even after the actuator has gone to zero.
That can only be corrected with Td I think. But first dial in Kp.

Looking at how slow your system responds, 2h for Ti is way to fast. It looks like your system takes 4 hours to respond to a step. Ti should be a multiple of that.

Because your system doesn’t respond quickly to cooling, you can be more aggressive with it.
I would try Kp at -50 and Ti at 12h.

If that overshoots because of proportional action (P), then you should reduce Kp or compensate with Td.


Hi Elco,

Thanks a lot for your input. I will test the setup with the suggested settings.

Hi Elco,

I made a test with water today with the suggested settings and the result was definitely better. It shot 1,8 degrees under the set temperature - and since it was just water there was no counter-effect of an ongoing fermenation that would have developed some heat.

Based on this test, would you suggest any further adjustments?

I think the increased Ti helped, because the integral was minimal. However, I think we went too far with Kp and caused overshoot.

Can you try Kp -25 and Td 30 minutes?
I am guessing about 30 min overshoot.