Water Heater PID Control

PID control keeps a domestic hot water tank near its setpoint while balancing heater power and losses.