Indirect Control Defaults

In Tuning to address over shooting beer temp you outlined

We changed it to directly act on beer temp instead of indirectly through managing the fridge temp. It is easier to understand and works well.

I just built my fridge for indirect control and added in the indirect portion based on Controlling beer temperature with a dynamic fridge setpoint

Is there anywhere where the previous wizard defaults would have been?

I just kicked in the system to manage the fridge for the first time so I am in the process of tuning the PIDs.

With no constraints on the Fridge Setpoint Driver, it was going to set my fridge temperature to 70c, so I added a maximum offset of 10c.

I am just looking to start with the default baseline and go from there.

if you are interesting in specific values for what I have now, https://termbin.com/w77k

I have a full sized fridge for 40L batches.

Is there a way to discard the history from a PID?

I am trying to tune my PIDs and I was hoping to remove the impacts of the Integral value.

I changed my beer pid Ti/Td value to align with my fridge PID Ti of 6h/30m so it took about 6 hours to recover from that, but I don’t think this was the right thing to do.

It would be great if I could try our new settings and have the PID think it was starting all over again.

You can override the Integral result in the PID settings. Set it to 0 to reset.
A (shorter) filter history is also kept in the Setpoint block. This can also be reset by using the button in the “bypass filter threshold” field. You can access the input Setpoint from the PID.

Where does the default minimum on time for the cool actuator come from?
I have done some searching about this and so far only requirement to have a minimum off time to ensure a happy compressor.

I only ask as three minutes of compressor time moves my fridge by 1.5 to 2 degrees c which means a lot of oscillation.

I am working on tuning K and Td on my heat PID, but it seems that I will always drop a decent temperature if the compressor is ever needed.

I seem that after about a minute or so, the compressor has pretty much done all it needs.

Minimum ON exists to prevent the fridge turning on for a few seconds, and then being blocked by the minimum OFF constraint.

If 3 minutes is too much for your fridge, feel free to shorten it.

I would not worry about a few degrees fluctuation in the air temp. I prefer to run the compressor a bit longer and less often instead of these short bursts.

I would increase the lock time for the compressor, so it blocks the heater for an hour if it activates. That will prevent alternating between active heating and cooling, and the temperature will rise passively.

Yeah, there seems to be a certain amount of natural heating. With the minimum on time of 1m the swings are not as bad, but I do get an interesting pattern emerging

the compressor is turning on every 30 mins or so for about the the 1m minimum

Interesting that the there is no desire to use the compressor on the times it doesn’t dip super low.

I only have the heat/cool actuators take a 5m extra time from the mutex. I’ll put the original setting back and see how it reacts.

Yeah 5 minutes is definitely not enough. When you cool, you’ll cool the walls of your fridge. The time constant of that system is much more than 5 minutes. You need to give it some time to stabilise. You definitely want your lock time to be higher than your own period.

changed the cool extended time on the mutex to 1hr.

Seems like the natural heating in the environment is more than sufficient.

A quick minute from the compressor every 30 - 35 mins has it is keeping that regular oscillation, which keeps it within +0.1 and -0.2 of the set point.

Seems reasonable

Heater Kp = 12.5, Ti and Td are both 0
Cool Kp = 25, Ti and Td are both 0

Last time I tried raising the setpoint above the beer temp it held steady just -0.5c below the setpoint. Time to attempt to add an I component.

1 Like

Going back to my original question, what where the default values for the heat/cool/beer PIDs used in the wizard?

The Ti value used with direct of 6h seems like it would be on the beer pid, rather than reacting to the relatively fast response of the fridge itself.

Cool PID (beer)

kp: -50 1/degC
ti: 6 hour
td: 30 min

Cool PID (fridge)

kp: -20 1/degC
ti: 2 hour
td: 10 min

Heat PID (beer)

kp: 100 1/degC
ti: 6 hour
td: 30 min

Heat PID (fridge)

kp: 20 1/degC
ti: 2 hour
td: 10 min

Note that those are for direct control, changing the PID settings and input when switching between beer and fridge control.

For indirect control, I think it was something like Kp 5, Ti 4h Td 15m to drive the offset actuator. Set a min and max on the actuator, like -10/+10.
That would be a good first guess. Look at the PID chart and adjust.

1 Like

I just got access to a friends spark from before the software updated, I’m assuming he didn’t change anything.

Beer PID: Kp = 20, Ti = 2h, Td = 0
Cool PID: Kp = -50, Ti = 6h, Td = 30m
Heat PID: Kp = 100, Ti = 6h, Td = 30m

1 Like

Finally got some beer in my fermenter, and everything is working really nicely with indirect control, variation on the beer is ±0.05c which is waay better than I anticipated.

But the fridge temperatures is something that I want to have a look to see if they can be improved as from time to time the beer temp starts to trend away from the setpoint, the fridge setpoint seems to overcompensate and it takes up to 4 hours for that to settle back in.

Below is the graph the the fermentation so far, raised started at 19.5 and pitched, raised to 20 for 6hrs for the lag period then dropped to my target temp of 19 over the next 6hrs, been holding pretty steady at 19 since then.

But as you can see, the was couple of time that the beer varied for whatever reason the and the fridge has some large reactions, with some similarities in the setpoint variance, a quick dip, then a small recovery, only to dip again until it settles back in for a long period of time.

My PIDs are mostly set to indirect defaults:
Beer: Kp 20, Ti 2h, Td 0s
Cool: Kp -50, Ti 6h, Td 0s (non-default)
Heat: Kp 100, Ti 6h, Td 0s (non-default)

I set my Heat/Cool Td to 0 as I never saw overshoot with step changes in my testing with water and the default Td of 30m stopped the ramp too early.

So, there are two parts to this question

  1. Do these reactions seem normal? I zoomed in on one of the larger adjustments

  1. Under what looks like more steady state, the fridge temp alway stays somewhat below the set point

I kind of expected it to hover around the setpoint, in my testing with water it mostly did that, so I assume it has something to do with the constant absorption of heat from the fermentation.

You can see that all of the temperature control is being done via by the compressor, the heater is only ever on for those large reactions in question 1.

I thought that the large reactions could have been a result of Td of 0, as it’s role is to avoid large change, so I put them back to defaults (15:00) and it introduced a bunch of instability

So I lowered them to 5m for a period, 17:00 to 18:15, where the system seems to hold the variance but didnt trend to no Td component I would kind of expect at steady state.

At 18:!5 I set them to Td 150s, and you can see that it is stabalising.

Does all this look normal? Or is there some optimisation that I should be looking at?

It looks like your fridge setpoint is adjusting too aggressively. You need to look at the graph of the beer PID to see what needs adjusting.

It could also be that your heater affects the beer quite directly and not through the fridge air, but with some delay.

The heater has been rarely on, and I have removed the periodic fan activation as that threw the fridge temperature off even more so.

This is the beer PID:

Integral looks good, there is no Td, so only Kp left. 20 -> 10?

No, go to the block and check the graph of the block.
You don’t need to make a custom graph.

Ahh, didn’t realise that was a thing.

Removing the input target and value

Ok, so it is P that’s fluctuating a bit too much and a bit too agressive.

In the beer setpoint, try increasing the filtering and reduce Kp a bit.
That should smoothen the fridge setpoint.

I actually upped the filtering from the default to 90s, but I will make it 3m, and see what a Kp of 15 does.