7 ms·
> “The simple stupid approach for the logic is as follows: keep the apartment temperature as close as possible to the temperature we set. This is not realistic
by insaneirish 6y ago
> “The simple stupid approach for the logic is as follows: keep the apartment temperature as close as possible to the temperature we set. This is not realistic as it would keep turning the system on and off very frequently, thus why the system needs a tolerance window.“
Certainly an accurate observation, and what is typically known as hysteresis for those playing along at home.
I mention this because sometimes when you self-discover something, you struggle to identify the most common word to describe it, which can obscure lots of research and prior art about that thing.
Because applications of control theory are so practical and likely to be empirically observed, it’s probably pretty common to have observations like this.
- m463 6y ago> you struggle to identify the most common word to describe it In case of temperature control, the magic word (acronym) was "PID" which I learned from a friend who set up an open-source bbq controller: https://www.raspberrypi.org/blog/heatermeter-open-source-barbecue-controller/ https://www.raspberrypi.org/blog/heatermeter-open-source-bar... https://en.wikipedia.org/wiki/PID_controller https://en.wikipedia.org/wiki/PID_controller
- wolfgang42 6y agoBang-bang[1] works fine for home heating applications, and is used by every thermostat I’ve ever seen. PID is more useful if your system requires/allows fine adjustments rather than just switching on and off. [1] https://en.wikipedia.org/wiki/Bang%E2%80%93bang_control https://en.wikipedia.org/wiki/Bang%E2%80%93bang_control
- mtsr 6y agoMy 18 year old central heating system already supports modulation. Surely these days most support it through some open control standard such as OpenTherm?
- eythian 6y agoMine also, my heating is often running at ~40° unless it's bringing it up from being off overnight or something. Recently I installed a Nest thermostat and doing reading around it suggested that in the US (I'm in the EU) OpenTherm may not be so common, so perhaps they don't tend to use systems that can do modulation much there.
- froh 6y agoIt seems like the PID can be used to control the bang bang intervals?
- rckoepke 6y agoAbsolutely - I've done this in industrial facilities and it's very common with LED's where it's generally called PWM (Pulse Width Modulation). Somewhat obviously, you'd generally use a "hidden layer" converting the % output of the PID algorithm to % duty cycle. This works if your device can have a short enough cycle time for the PID algorithm to receive reasonable response feedback to its output. Ideally for PID to duty cycle conversions, your system should be low frequency (large "inertia") and the physical actuator/device you're controlling should have a high frequency (able to turn on/off rapidly, as LED's can with PWM). The difficulty for home HVAC is that you'd like to start/stop it as rarely as possible to extend the life of the motors. The cycle frequency ends up being in the same order of magnitude relative to the frequency that the house heats and cools. Obviously you can tune these things until the cows come home, and eventually you'll probably find some good settings. In reality, most people/installers/technicians will improperly tune a PID loop, especially if it converts to % duty cycle. Hysteresis will almost always work better for home HVAC. Alternatively, you can install (somewhat expensive) variable speed AC units and then happily use PID. You'll probably save a bit of energy and be more comfortable overall with more precise management of not only temperature, but also humidity.
- deleted 6y ago[deleted]
- froh 6y agoTIL, thank you:-)
- tW4r 6y agoDo you perhaps have recommendations on how to control: 1x central heater with: .. state: on or off .. actions on or off Nx Temperature regulator valves .. state: current temp, target temp, percentage open .. actions: set target temp only What control loop do I use to control the central heater on|off based on the state of the TRVs? To maintain distinct temperatures in different zones’ TRVs
- nom 6y agoIf your regulator valves close completely when target temp is reached, this should work: - Set target temp for each room. - Implement 2-step control using min(current_temps[]) and max(current_temps[]) So basically: - if any room is below set_temp - X degrees, turn on - if any room is above set_temp + Y degrees, turn off Log and plot the temperatures, you should see some kind of sawtooth wave that flattens at the peaks due to the valves closing. Adjust the X/Y values to start/stop heating earlier or later to reduce the temperature variance.
- tW4r 6y agoThanks a ton! I'll try it out, maybe even do a write up if I succeed
- m463 6y agoand now I have two more magic words :) (btw I wasn't saying PID is what this situation needs, I meant that knowing that term unlocked a whole lot of interesting history and applications and more)
- dokem 6y agoYou are still talking about different systems dispute them both having to do with temperature. An AC unit can only be on or off, so you need a window, hysteresis, to keep from toggling on and off constantly. If you can input an analog signal, like control how much power goes into the heating coil in a BBQ, the PID is applicable. PID, if tuned properly, will find the right amount of power to feed the heating element to keep the oven at the desired temperature. This is not possible if you can only turn the AC on/off with significant lag, so you need hystereiys.
- lucianbr 6y agoPID can be used with an on/off control, you do something like PWM: on X minutes out of every hour, and vary the X as the analog parameter. Don't know how easy that is on the AC/heating, but as far as the control system, it works, and it's PID.
- conk 6y agoPID can’t be used for control of any device that uses a relay. PWM will have the effect of just changing the coil voltage. Even if you could switch a relay on/off quickly you’d just prematurely burn out the contacts. PID is only effective with solid state switching devices, which are not really common for residential heating/cooling.
- lsorber 6y agoDid you even need the D, wouldn't a PI controller be sufficient?
- lmilcin 6y agoPID is very simple control loop that will show over/undershoot every time there is external change (for example somebody opens a window) and will take a long time to settle when disturbed. I would use a simple model of the room (as a thermal mass with three components -- heater, air and walls -- that heat up / cool down / exchange energy at different rates). Then I would run moving horizon estimator to predict future effect of turning on/off the heating system (for example, if I turn it off now, what will be the final temperature before it starts to drop again?) Then you include Kalman filters to discover basic parameters of the model and then update them as system change (for example external temperature changes) so that predictions of the model are accurate. You can even monitor the parameters of the model and response of the system and recognize different situations like open doors, windows, etc. For example, I have made similar for my dumb espresso machine and by monitoring parameters of the model I can detect boiler scale buildup and then I can detect whether I have cleaned all scale from the boiler or there is still some of it left. It is all very simple because there are two parameters of the system: thermal mass and delay from when the heater is engaged to when the water has reached its temperature. By detecting that thermal mass has decreased and that the delay has increased it can automatically tell there is scale buildup.