I’m controlling a fermentation fridge using a Spark + PI running brewblox. It controls well at fermentation temperatures (~20C) but the PID parameters are sub-optimal when I cold crash and at the resulting low temperatures (~1.5C). I’m planning to try to identify a set of PID parameters that work better for this but in the meantime, I manually adjust the I term to avoid large overshoot as the control loop settles after crashing. I realise this probably isn’t the best way of doing things but I hoped it was a workable “hack” that could be used in order to achieve acceptable control in the short term.
The problem I’m encountering is that the I term randomly changes by large amounts for no apparent reason. In the attached graph, the changes in I at ~16:56, 23:47 and 09:27 are manual changes, but the sudden drop to 0 at ~06:32 is not. It just spontaneously dropped to 0, without any intervention. Is this a bug, or is it an expected side effect of making manual changes to I?
Here’s a log: https://termbin.com/5gva
Your log shows some controller resets around that time. I is not a persistent setting, and is initialized at 0 after a controller reboot. The resets are either caused by a bug, or by memory being full.
What are the two percentage numbers displayed in the top right of the LCD screen?
Could you please run
brewblox-ctl particle -c eeprom to export the binary memory of your controller?
Beyond that: the next release (likely tomorrow) includes some changes to how the integrator is handled. It will now add P+D to output every period, improving its step response, especially when approaching the setpoint (when D becomes negative).
We’ll try and get the bug to reproduce. Feel free to post some graphs of a cold crash if you want us to have a look at your PID settings as well.
Thanks for the quick reply Bob.
The percentages are 79 and 94%.
The particle command prompts for a USB connection, which is moderately difficult given the way I have my control panel set up. Is it possible to run it over wifi?
Thanks as well for the offer of help re the PID settings. I’ll get some clean graphs and post them later
The eeprom command requires USB, but you can leave that for now I think. Memory usage seems a likely culprit.
You may want to check whether you have some leftover blocks left. The easiest way to do that is to go to the Spark service page, and toggle the relation view.
A fridge fermentation setup has:
- 2x sensor
- 2x setpoint
- 2x PID
- 2x PWM
- 2x actuator
- 1x mutex
- 1x Spark Pins
I have more blocks than this (see image) but it’s intentional. I use the same setup to control + monitor a 3 vessel brewing rig (HLT, BK, MLT). I don’t run the fermentation fridge and brewing system at the same time but I do leave the blocks I’m not using in place. Is it possible to disable/unload unused blocks without fully removing them?
Not really, but your configuration shouldn’t cause problems yet either. Typically you can run about twice this number of blocks before you start getting memory issues.
@Elco probably will have to weigh in on this, as he’s the resident firmware guru.