Distilling with the brew pi spark

Manual pwm is not having any control loop. The setpoint filter is still active and logging data.

I had the opportunity to turn the knobs on a still over zoom, which really helped in understanding the system.

Some key observations:

  • Vapor is created on the heating element and the amount of vapour seems to not depend on the liquid temperature much. The liquid temperature will be near the boiling point, so trying to control the liquid temperature around that phase change doesn’t work. A change in heating element power causes a direct change in the amount of vapour generated.
  • The system responds really quickly to heater output. In the order of 15 seconds. There is not much of a temperature buffer. The liquid is not stirred, so the temperature directly around the element might be higher than the average liquid temp. This contributes to the heater creating vapour directly, instead of heating the liquid. Assuming liquid temperature controls the amount of vapour is wrong.
  • The measured vapour temperature at the top of the still is probably more like a measurement of temperature and flow. The vapour heats the sensor, but the probe and what it is mounted into also quickly loses heat to the environment.

Cascaded control schemes didn’t seem to work well and are more difficult to reason about.
We tried controlling the vapour temp at the top of the column with the liquid temp. This doesn’t work because of the reasons stated above.
We also tried controlling the top vapour temp based on the vapour temp at the bottom of the column. This was also difficult, I think because flow seems to have such a big effect on both measurements.

We did find settings that seem to work well for this still!

The key insight is that we had to configure the PID in a way that it almost only worked with the integrator.

We used a single PID, with the vapour temp at the end of the column as input. Setpoint filtering set to 15s. PWM period is 4 seconds.

  • A very low Kp, 1.0 in this case, so that fluctuations in the top temperature almost don’t even change the actuator output.
  • A very small Ti (30s), so even though the P part is small, it accumulates in the integrator quite fast.
  • A Td of 1 minute. This results in the direction of the temperature affecting the integrator increase/decrease too. This changes the integrator before an error gets large and keeps the temperature on target by correcting a beginning deviation quickly.
    It is set to only 1 minute so there is not much of a delay in the filter for the derivative.

With these settings, temperature errors are averaged out into the integrator and the actuator power slowly adjusts to maintain the top vapour temperature.

Somehow I had managed to miss this reply Elco and I can see you must have spent a good deal of your time on this. Thanks for doing that. My gear will be a bit different, but as it happens, I have some ferment just coming up for distilling, so I’ll give these settings an initial go.

In case they are of any use, I’ve enclosed some screen shots of my results using what I hope are the same settings. My still will be different to the one you had a chance to access remotely,of course!

Any comments welcomed, but I’m unlikely to do another run on this still for a while, so it might be a case of making changes later on and reporting back then in a few weeks.

I had a setpoint of 84 initially and left things for a while and then cranked it up to 90 as really all I’m doing this time is a stripping run.

I started with a kettle wizard from scratch and altered the settings to the ones you used. I had manually set the target value to be 25% before starting things off

Here is the regular graph and the PID