Great Job with the default PID settings!

Just wanted to share my great experience using the default PID settings for my new set up.

New rig is a 21cu.ft. (very large) upright freezer that I have fitted to house my 18 gallon fermenter.
The freezer has a PWM fan that recirculates the air when the cooling system is running, as well as a temp sensor on the exterior to modify its cycle times depending on ambient temp.
Its a “garage-ready” unit, meaning it is designed to operate between ambient temperatures of 0degF and 110degF.
It has auto defrost as well.
Long story to say that I will be simply powering the unit up rather than taking discreet control of the compressor, fan, and defrost heater.

I have added a 65W ceramic heat bulb, for reptiles, and a 15W fan to blow when the heat is on.
I rarely have to use the heat, but last night was an example of “cold” temps around here; 55*F.

I took the opportunity to test out the recently updated default PID settings for fridge heat (Kp = 11.1*F, Ti = 2h, Td = 10m, PWM period = 10s). Worked out great!

The initial overshoot is only 0.75degF.
The subsequent undershoot is only 0.5degF.
The system settled into a +0.15degF, -0.15degF swing after about 12 hours.
That is ridiculously tight with no tuning required on my part!

Thanks for your continued development of this great product.

Now I’ve got 3 other modes to test before getting my first brew in…

2 Likes

And here you can see, out of the box, the fridge cool defaults work great, even with a freezer.

No undershoot to start the party and settled into a +.019degF, -0.37degF swing after 3 hours.

:heart_eyes:

Time to pour some water into this thing and check out the beer pids.
This tank is capable of 5, 10 and 15 gallon batches.
My first take is to tune it with a 10 gallons batch worth of water in it, and compromise one the other two batch sizes.
Let’s see how that behaves.

Good to see it works well!

Changes in Kp are likely enough to account for different batch sizes. Both I and D portions take Kp into account.

I was thinking that might be the case.
I am hoping I won’t even need that.

Started with 10 gallons.
Warmed up the ‘Beer Setpoint’ by 3degF.

That initial overshoot was less than 0.22degF.
Yet 20 minutes later, the freezer comes on and they play push pull.
Yes, 20 minutes was the default mutex setting.
I’ve upped that to 8 hours (both ways) after that single green spike (freezer) at the far right…
At least while I do the tuning, although it may not hurt to keep it that long.

Just changed the set point back down 3degF to test the cooling.
I’ll keep flipping the set point around the ambient in order to do this faster then allowing the water to acclimate.

Turned out I needed to extend the mutex time to 24 hours to keep the push/pull routine from happening.

Here’s the Beer Heat performance on 10 gallons:

Looks good to me.
What would you expect the changes to Kp to be a 15 gallons? Larger or smaller?

Kp is the ratio between temperature error (desired - actual), and required output.
More beer -> more energy required to change actual temperature.

More beer, more Kp.

It looks pretty good actually.
If you are using a setpoint close to room temperature, it will end up heating some times and cooling other times. It is not really something for the mutex anymore, that is to prevent too quick cycling.

But in general, you either need to cool or to heat. So a long mutex doesn’t hurt.

For Kp:

  • Heater output is the error multiplied by Kp (at least the proportional P part).
  • In other words: what should your heater percentage be when the beer is 1 degree too low?

Ti, the integral time constant should also be longer than the duration of a step response. In your case, 6-10 hours seems appropriate.

On the one hand, I agree, more beer = more power = more cowbell.
On the other hand, I can see more beer taking longer to get moving (temperature) and maintain much more inertia in its temp swing past the set temp.
I realize I misused a handful of physics terms here, but I used them artistically, not scientifically.
I feel like slowing down Ti and increasing Td may be warranted for reducing that over/under shoot. But I have been wrong before.

The I and D portions are also affected by Kp, and will automatically scale.

Ti indicates how much energy must be continuously added to offset losses to the environment. My physics is a bit hazy on this, but I think this is mostly a property of how well the fridge itself is isolated.

Practically speaking, it’s fine to only adjust Kp until proven otherwise. PID tuning is not the most exact of sciences. You know what your settings do, and then fiddle them until the graph looks pretty.

Not exactly @Bob_Steers, we use Ti and Td, which are time constants. Other PID implementations use Kp, Ki and Kd, but I think using the time constants is easier to reason about.

The P part is Kp * error.
The I part is Kp * integral / Ti. The integral is the accumulated error.
The D part is derivative of the error / Td.

Resulting form this, the time constants can be explained as follows:

  • Ti is the time it takes for the I part to grow as big as the P part, for a constant error.
  • Td is (roughly) the duration of the expected overshoot (from just P).


Heat PID is on point after upping the Ti from 6 hours to 8 hours.
Initial overshoot of 0.15degF.
Initial undershoot of less than 0.1degF.
Less than 0.1degF variance after that.
Amazing!

2 Likes


Here’s my final Beer Cool PID graph. ^
It took the system 7 hours to move 10gallons (11gallons, really) of water 7degF.
Initial undershoot was only 0.6degF at the 14 hour mark.
I did have to tweak the values a bit from the default to reduce that undershoot.

  • Kp lowered from -27.7 to -15
  • Ti raised from 6 hours to 12 hours
  • Td raised from 30m to 45m

I guess that these changes were required because the defaults are aimed at a 5 gallon batch in a fridge.
The combination of a 10 gallon batch and the use of a freezer is a pretty significant deviation from that norm.

At any rate, this control system is working absolutely great; exceeding expectations.
Looking forward to my first batch in this rig.

Also, looking forward to trying out the default value for the RIMS which is something I never saw before. I had ported over the values from an Auber PID that I was not thrilled with, but deemed good enough. Hoping I can get better step increase rates than before.

1 Like