I’ve just finished a ~23 hour water trial and can start thinking about tuning. The spark lost wifi connectivity and had to be reset twice during the trial, once from ~9:00am - ~10:30am and once a little after 10pm (caught the second one right away). The resets are almost useful in a way as they show the extent to which the integrator had accumulated too much error.
Kp: 2 ; Ti: 7200 ; Td: 1200 ; Max diff: 10 ; Input filter delyay: 18s ; Derivative filter delay: 159s
Cooling performance seems to be more or less in line with other examples I’ve seen on the forum (1 degree celsius per hour) despite the cooling PID struggling to match the fridge set temp. There is a little overshoot which appears to come from the integrator. I’m guessing fixing this requires either increasing Ti (so it adds the integral less frequently) or increasing Kp (so the integrater is less significant relative to the proportional part). Given that I’m relatively happy with the cooling rate, perhaps this means I increase Ti without touching Kp?
Heating performance is very slow despite the heating PID working nearly perfectly. I’m guessing more aggressive heating would require raising Kp (in the beer-fridge PID). Any suggestions for how much I should be raising Kp by?
I can’t imagine that the derivative component is doing much if anything in this trial, but I can imagine it might do a good job of predicting how yeast heat output might ramp up during active fermentation.
Kp: 2; Ti: 1800; Td: 200; PWM: 1200; Min off: 180; Min on: 120; input filter delay: 18s; Derivative filter delay: 159s
Seem to be some problems here, although it’s an imperfect trial as the fridge chamber (where the forced cold air comes from) had just turned on–jumpstarted with containers of ice and cold water–and the structural elements of that chamber hadn’t gotten down to temperature yet. I’d be interested to see if this PID works any better now that the fridge is more consistently holding ~4.5 degrees Celsius.
That said, there seem to be two problems:
- The cooling PID is slow in bringing down fridge temperature.
- Once the fridge setting goes up the cooling PID keeps cooling for awhile which results in a substantial overshoot for this PID and the beer-fridge PID.
Regarding the first problem, I can’t help but wonder to what extent there are simply limits to how far below the beer temp I can keep the chamber with only forced cold air (as opposed to fermentation chambers where the fridge’s evaporation coils are in the chamber walls and that thermal mass can counter-balance the thermal mass of the beer). If this is the case, perhaps I just need to lower the output of the beer-fridge PID from 10 to something more realistic (maybe 4 or 5?).
Regarding the second problem, it could be that Kp or Ti are too low, or it could be the aforementioned problem that unrealistic expectations for the cooling PID are creating errors that accumulate in the integrator–leading to overshooting.
I’m guessing I need to run another water trial now that the fridge is down to temperature to sort out exactly how much of the problem was from a relatively warm fridge chamber.
Kp: 10; Ti: 600; Td: 60; PWM: 4; input filter delay: 18s; Derivative filter delay: 159s
This one seems to be working really well. Although it may appear that the heating is always on, the PWM is only powering the heater a very small percentage of the time when the error term is small (or slightly negative). Interestingly, as far as I can tell (please correct me if I’m wrong) the brewpi seems to handle PWM differently for how it logs cooling and heating states. For heating it logs the heating as on constantly rather then only when the heating actuator is powered. For cooling on the other hand, it seems to actually log the PWM cycles (ie. only when the cooling actuator is on).
With my setup (a heating pad and fan forced cold air) I don’t really see a need for a 30 minute gap between heating and cooling. Does anyone see a reason to not switch this to 5 minutes?
While I have some hypotheses about what needs to be done, I’d certainly appreciate some input from more knowledgeable persons. I think I’m going to setup another trial after 1) reducing the actuator switching delay, 2) increasing the beer-fridge PID Ti, 3) decreasing the max gap between beer and fridge setpoints and 4) increasing cooling PID Kp and Ti. That said, exactly how much to adjust these values (especially the Kp and Ti values is difficult to judge without experience so your input is very welcome!
Thanks in advance for any suggestions!