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-bar...
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-bar...
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.
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
- 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.
(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)
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.
Don't know how easy that is on the AC/heating, but as far as the control system, it works, and it's PID.
PID is only effective with solid state switching devices, which are not really common for residential heating/cooling.