I want to return to something that has been annoying me for a while now, in that my beer never seems to be able to reach my setpoint, but always tends towards 0.1 or 0.2 degrees above it, and holds.
I haven’t really chased this up and 0.1 to 0.2 is really nothing in the grand scheme of things, but I would just like to understand what is going on, just out of curiosity.
It seems to be because the Integrals never really contributes much.
The below graph is one that illustrates this over the last couple of days of my current fermentation, but is pretty typical of what I have seen over the last year. The settings that I have now provide pretty consistent results and I am generally happy.
Current logs of my setup
I’m using a dynamic fridge setpoint, but I want to focus on the Beer PID
Current values are Kp=5, Ti=4h, Td=15m
Here is a graph of the PID in the last hour
You can see that in this time, the error has been largely steady at -0.28c, it is my understanding that the Ti should also reach Kp * -0.28c after Ti, which is 4 hours. The above graph is only an hour long, but I would expect it to make some amount towards the error, but it is not doing that.
If I remove all but the PID and Output targets, you can see that the I tends below 0 for a while, then regresses back.
What I also don’t understand how all of this influences the output value as the sawtooth nature does not really align with any of the rest of it. I assume this value is how it is interacting with the
I have had a look at the PID code, where I can see that the increase is (m_p + m_d)/m_kp
, so the derivative is impacting the accumulation of I
decltype(m_integral) integral_increase = 0;
if (m_ti != 0 && m_kp != 0 && !m_boilModeActive) {
integral_increase = cnl::quotient(m_p + m_d, m_kp);
m_integral += integral_increase;
m_i = m_integral * safe_elastic_fixed_point<4, 27>(cnl::quotient(m_kp, m_ti));
} else {
m_integral = integral_t{0};
m_i = 0;
}
Incase you are interested, here are the same graphs, over the last day to show more long term behaviour
Disregard the flat spot between 10:30am and 12:30, I had some unrelated wifi issues.