Will update after some tests.
Right now i am testing in Beer mode in a small glass of water. It seems my heater is on far too long.
Are you running release 0.4.0? This is printed when the script starts.
I am surprised by the behavior. Are you running on the default settings?
Is your PWM period for the heater the default of 4 seconds? What is Kp? Ti, Td?
How many watts is your heater?
Edit: I think I see what the issue is. The default heater integral time constant is just 120 seconds. Combined with a cooler and the minimum dead time, this is probably too short and causes integrator windup. It is probably better to set Ti and Td to the same values as for the cooler.
Try increasing setting Ti for the heater to 1800s, perhaps it is even better to set Ti to twice the cooler period for both heater and cooler. To prevent overshoot for the heater, set Td of the heater to 60.
Thank you for your input and I’ll adjust the algorithm and default settings to better handle a situation like this.
Yes. Running 0.4.0.
First of i was running default settings.
BtF KP 5
BtF Ti 7200
BtF Td 50
Cooler Kp 5
Cooler Ti 1800
Cooler Td 60
Cooler PWM 1200
Heater Kp 5
Heater Ti 120
Heater Td 0
Heater PWM 4
Sinse then i tried changing all Kp values to 2 but i see no change.
Changing my settings as you suggested now.
I think I have recreated this behavior locally.
Can you try:
Cooler Kp 5
Cooler Ti 2400
Cooler Td 60
Cooler PWM 1200
Heater Kp 5
Heater Ti 2400
Heater Td 60
Heater PWM 4
changing right now !
Ok. Running your settings now. Will post results.
Another piece of advice: a too low Kp value will actually result in integrator windup. This is because the proportional part will do very little, so the integrator has to wind up to create some action.
As long as the proportional part makes the actuator clip to the maximum, the integrator won’t increase and will even decrease. You can see what the P, I and D parts are on the control algorithm tab.
I cannot get the control algorithm tab working.
I says “Click refresh to receive controller from device.” if i press refresh the script stops and starts over. No JSON output is seen.
Got this in the log
Traceback (most recent call last):
File “/home/brewpi/brewpi.py”, line 725, in
ser.write(‘l’)
File “/usr/local/lib/python2.7/dist-packages/serial/serialposix.py”, line 518, in write
raise SerialException(‘write failed: %s’ % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error
Cooler Kp 5
Cooler Ti 2400
Cooler Td 60
Cooler PWM 1200
Heater Kp 5
Heater Ti 2400
Heater Td 60
Heater PWM 4
Gives this:
One cycle:
I know what causes this and will try to release a fix today. For now, try uninstalling your heater.
By the way, I don’t think you will have this problem when you are testing with a larger volume. The glass of water reacts as quick as the fridge, contributing to the the alternating behavior.
Yes i know it is extreme conditions. But i am testing it to see how it reacts so i know when i am using it live so that i know what i might run in to and how to adjust. We have typically around 60 liters when we ferment so obiviously the reults is very different.
OK. Posting the promised graph in fridge constant as i had problems with earlier. This is with 0.4.0 and your settings posted in this thread. Looks nearly the same to me.
First Mashing test (water) with 0.4.0 using settings from @Elco.
It has some overshoot but good as a first test. Test is done with about 30 liters of water. My heater draws lots of current !!!
Where is your fridge sensor and where is your beer sensor?
I think it is strange that in general your beer sensors is higher than your fridge sensor.
If you are not using the fridge sensor in the HLT (which is always higher than your beer sensor), then it is better to use fridge constant mode.
If you explain how your setup looks, I can suggest settings.
Jupp. It was me mixing things up… have done a lot of tests an generally it looks Reilly good and stable in most normal situations. Will start a brew tomorrow to test it out live.
Problem is most probably solved in 0.4.1. Running with default settings. I chnged to 0.4.1 at the Annotation mark. The high spikes is not present anymore…
Nice! Thanks for the feedback.