PID Algorithm Tuning

Hi - I have a BrewPi legacy system tuning a fermentation chamber and am overall very pleased with the performance. I have noticed after a few days of changing the temperature set point, the errors increase. It will still control within 0.5 degF, but as you can see from the charts below, the error starts small and builds. Please ignore the large spike as that is when I took the thermometer out of the thermowell temporarily.

I am sure that this needs a small tweak to the PID constants, but I don’t want to change these without a full understanding of what I’m doing and value the opinion of the PID experts on this board.

Thanks,

Paul

I suspect it is interaction between the integrator and process lag, but it is very hard to tell from such a zoomed out graph. And don’t hide the fridge temp please.

It could be because there is some lag between cooling and the fridge responding or if the beer is close to the back of the fridge it could be directly cooled instead of through the fridge air. Moving the fridge sensor closer to the cooler would help in that case.

But again, these are guesses based on very little data.

You asked a very similar question before:

Isn’t this the same thing happening?

Thanks for the quick response Elco. So the setup is a 6’ high commercial freezer with fermenters inside. The fermenters sit on wire shelves and the refrigerant runs through pipes in the shelves. The fridge temp sensor is hanging from the top of the fridge, in free air, about 1/2" from the outside of the 6.5 gallon plastic fermenter. The wort temperature is taken from a thermowell inside the fermenter.

Here’s a capture of the temperatures with the requested fridge temp. As you can see, all is well until suddenly the error grow.

And this is with fridge temp and fridge setting on the graph.


Paul

Elco - your post regarding the same question I asked last year had me go back and check the Kp & Ki constants. In order to fix things before you suggested I change the Kp & Ki parameters and I ended up with Kp=6 and Ki=0.2. I just checked and these settings are at Kp=10, Ki-0.051, Kd=1.5, PID Max at 18.

I have no idea how they got changed but I did update the BrewPi software in January to the latest legacy branch. I will change Kp & Ki and see what happens!

Thanks for jogging my memory.

Paul