Hello guys, wanted to get your recommendations on fine tuning the Cool PID. Fermentation just kicked in on a high gravity DoppelBock, been very pleased with the temperature control when compared to my previous system. However, I’ve noticed a variance of about 0.7 deg f and would like to see if I could get this tighter.
Control mode: Beer
Cool PID: Kp = -27.78, Ti: 6h, Td: 30m
Cool Actuator has 3 constraints: Min Off = 5m, Min On = 2m, Extra lock time 10m
Here is a link describing my build. Let me know if there is something else I need to clarify about my system. It may be worth mentioning that I have the thermostat set at the minimum cooling level on the freezer. In other words, I can crank it up if I need to cool faster.
I think the derivative gain is too high at 30 minutes.
The filter selected depends on the chosen derivative time constant, but perhaps it is also causing too much lag for a counter effective result.
I think it is worth changing the code to be able to set the filtering on the derivative separately from the time constant (gain).
Update. Elco, think your first assumption was spot on! Temp is staying very close to the target set point. Thanks for the suggestion. What do you think the next step would be to have it actually hit the target temp? I do realize I am talking about a few tenths of a degree which wont have a real impact on the beer. However, for the sake of my learning and others reading the post it could be helpful.
(In these graphs there was a 30 min power outage around 11am)
So I had an opportunity to sit down, eat lunch and talk with a process control engineer. He is highly revered and often sought after when dealing with Oil and Gas process control. He is also a fellow home brewer. Being a tech guy, I was able to pull up my system on my phone and show him what I was doing with BrewPi. I will say he was highly impressed with what the BrewPi team has put together. After telling him what it cost his jaw hit the floor. You guys might get another customer out of the deal.
While geeking out over all this he brought up the point that, in his experience, he recommends setting the derivative as small as possible. In the Oil and Gas industry for example, he will always set D to 0.0001 and work up from there as needed. I will mention that this application is quite a bit different than what he normally deals with. At any rate, his first recommendation was to lower my derivative value even further. He had also pointed out a flaw in my initial assumption. Initially I had thought the thermostat on my freezer would adjust the intensity of my cooling process as well as lower the temperature. This was not true. It is merely a temperature control. With that he recommended that I lower the proportional value by another 10 degrees and see where that takes my system. As he gets more familiar with BrewPi and understand the control philosophy he might have more recommendations. But I was impressed with his quick analysis and recommendations, even more so without him having knowledge of the control matrix.
In summary, here are my new settings and results. We will see how it works throughout tomorrow. Elco, please let me know if you have a different perspective. With your knowledge I would trust your judgement over his with this setup.
Looks like things went very well overnight. Still running with these settings: Kp: -37.78. Ti: 6h. Td: 1m. Kp was adjusted around 4 pm and Td at 6 pm. May be a bit early to call it a success, but as it stands now it looks like I was able to achieve the desired 0.18 deg f precision levels. Was actually pleased to see the small overshoot.
You can find the “Filter period” setting in the Setpoint block. You can access the Setpoint block either through the spark service page, or from the PID settings.
Gentlemen, I appreciate the help and feedback. Elco, I took your advise and lowered Kp once more. Looks like we’ve been able to hit it on the nose! Currently controlling at temp with an 0.11 deg f swing.
Final cool settings: Kp: -47.78. Ti: 6h. Td: 1m.
Cool actuator: Min off: 5m. Min on: 2m. Extra Lock Time: 45m.
If it’s working great for you, that’s all that matters.
I think you’ve been going the wrong way with Kp.
I believe both Elco and your PE buddy meant closer to 0 when they said lower Kp.