ok so this is with Kp at -60 then, for the purposes of tuning though is the idea to get a slight overshoot so i would expect cooling to remain on a bit longer suggesting that Kp could be raised even more say to 65-70?
That’s correct: it’s the job of the Td setting to slow down and prevent overshoot.
So i’ve not applied any td yet so i should up the Kp further from -60 to a value that keeps the cooling on for the duration until i dont see that taper down or break in the cooling and achieve a small overshoot from the set point and then apply the TD?
You can up it some, but there’s no need to find its absolute maximum. Typically, you’d want your system optimized around steady state behaviour. Reaching fermentation temp ASAP is less important than keeping it perfectly steady for multiple days.
For this, it’s useful to look at the PID graphs, and not the graph widget. You want to know what P/I/D/Kp/Ti/Td are doing.
You are looking at it in a wrong way.
The PID sets its output based on the PID calculation, in this case the pwm setting.
The PID does not turn the cooler on or off directly. It just sets the average percentage it should be on.
The pwm manages on/off of the pin.
It the cooler turns off, if does not mean that the PID thinks the setpoint is almost reached. It could be that you are far from the setpoint, but your PID settings results in a PWM setting of 60%. If 60% of the period is elapsed, the remaining 40% will have the cooler off, and repeat.
Yep I realised that eventually.
At the moment with a 10 minute period and -100 Kp and no Ti or Td I’m not seeing any overshoot.
What’s the volume of the kettle? Sounds like the pump is very weak and you might consider upgrading it.
I have 12V pumps if you want, very similar to the ones as brewtech uses in their kits.
Its one of these, I’m using the python pump on it to drive the Glycol, yeah if the pump is too weak then if you have pumps i’d be interested.
Fermenter is a SS Brewtech 14 Gal Chronical Brewmaster Edition
So it will bring it down by 2 degrees in 10 minutes
This was the time it took to get it from 12 to 10 including the lock out from the mutex
Wait a minute, it looks like your pump didn’t turn on until 1:30.
Whenever the Sparks says the pump is on, is it actually on?
How do you control the temperature of the glycol? Does the pump run when the glycol is not being cooled?
It looks to me that you are trying to tune a PID to a pump that might or might not turn on when asked.
Hi Elco
Yes that’s because of the mutex On the heat and cool actuators, the step before that was rise to starting temp I’ve setup a loop of square steps That was just one example late in the day. As I mentioned to Bob normally I’d just reboot the spark after the rise to reset the mutex.
Yes unless it waiting on the mutex being released.
The glycol temp is controlled by a temperature dial on the maxi 310 I just monitor it via spark,the pump on the maxi runs all of the time and cools the glycol based on the temperature set via the dial
I have a three way tee on the output of the python pump with insulated glycol lines as follows.
-
A recirculating loop line effectively just goes from the python pump output back to the input to keep the glycol recirculating in the maxi chiller
-
An insulated line to the actuated ball valves for each fermenter that are opened or closed via spark when cooling required.
Should I just remove the mutex until I’ve completed tuning?
Do you have a chat facility that we could setup at some point to try and nail some of this quicker than back and forth on the community pages?
Latest graphs with mutex set to 0 at the moment for running tuning.
I think i’m happy enough with these but might be overly optimistic, i’ll leave that to the experts to tell me!
Wondering having looked at these now and got my head around it a bit better if i should be pulsing the ball valve that allows Glycol to flow by reducing the minimum on time, rather than longer on times would this give perhaps finer control?
[Edit: Have attached exported blocks]
brewblox-blocks-spark-one(1).json (10.5 KB)
PWM values are up to 100% as step response, and gradually decrease to avoid overshoot.
Steady state error seems to be <0.1 degC.
There’s always room for perfectionism, but you have good cause to be optimistic!
From what I understand about your system, you may also look into closing the immediate feedback loop in your glycol setup to improve pressure / response time.
We recently released the Logic Actuator that was often requested for these scenarios. It allows you to either:
- eliminate the feedback line, and only run the pump when either valve is open.
- add a valve to the feedback line, and close it when a valve to a fermenter is open.
Note that this is a theory: I’m not familiar enough with your glycol chiller, pump, or hosing to do more than guess that closing the feedback line would significantly increase pressure / flow speed through the fermenter lines.
Edit: to be clear: the current state is easily good enough to ferment your beer. Any future improvements are mostly made because you can, not because you have to.
The reason I added that loop, and this may be misguided is , because i cant directly control the internal python pump (without some re-wiring and other brewpi kit, at the moment anyway) and the design of the maxi cooler is to have that python pump running constantly while the chiller is on, i had worried that it would stress the pump if it was running and trying to pump but being blocked by the closed ball valves, that was the only reason i added it as it doesnt serve any other purpose.
Yeah I like this idea do you have hardware also that would help with this, i’m assuming either an SSR wired to the internal python pump or a valve of some sort that can be controlled by spark. I’d prefer not to use the valves I have at the moment which werent provided by you guys by the way
Don’t know if you saw the other edit i made to the post and if it made sense and if you had any comment on it?
Edit: I have a manual John Guest valve on the feedback loop that i can adjust the flow in the loop so its really just going in a trickle but obviously could be causing pressure loss.
Cheers
Joe
Yes, that’d be a requirement. Either approach would work.
Your reasoning is correct. Pumping into a closed line would stress the pump and hoses. That is why a closed setup would require the logic actuator to avoid that.
The minimum on time was to prevent the scenario where the valve isn’t open long enough for the glycol to reach the fermenter. You also don’t seem to have overshoot in steady state that would require shortening the minimum on time.
In my opinion, that setting is fine. No need to tweak it unless it’s causing problems.
You could run some tests where you disable the PID/PWM, and keep the fermenter valve 100% open with and without the feedback loop.
Then measure the difference in response time, and delta temp / time.
Yep love that idea!
Sorry being lazy here, whats the easiest way to do this?
Thanks for all your time and responses on this Bob
Disable the PWM block (toggle full mode to see the setting), and you can manually set the digital actuator.
Also dont know if you noticed from the block exports but I added a little bit of Td (4 minutes) to the cooling PID, i think just before the test at 4 oClock. As i noticed a slight overshoot on the tests i ran overnight, although i still had the 1 hour lockout on the mutex at that point.
Should the mutex go back on i assume for normal running conditions to prevent cooling and heating at same time?
Td seems good. Definitely keep the mutex. Apart from the obvious inefficiencies, alternating heating/cooling is a common cause of “bouncy” steady state.
So just keep it with the 5 minutes extra lock time as it is at the moment?
Yes. Just keep an eye on temp error. If you see heater/cooler overcorrecting in turn, you should increase the extra lock time.