4.3.3. Room heater - on/off controller

4.3.3.1. Introduction and Guide
4.3.3.2. Slave 1: thermostat controller
4.3.3.3. Room heater environment
4.3.3.1. Introduction and Guide

This example simulates a room heated by a fixed-output heater. The heater is controlled by a simple on/off controller (i.e. a thermostat).

GUIDE:

(To load this simulation select the file Room heater on-off controller from File->Simulation Examples....)

When ready to start press Run Slave Simulation. Press it again to stop or pause the simulation.

Notice as you run the simulation that the heater turns on (Heater On value is 1) as the room temperature (RoomTemp) reaches the Min Temp (19.0) and turns off (Heater On value is 0) as RoomTemp reaches the Max Temp in the thermostat. You might try playing about with register values on screen, for instance, drop the outside temperature to -20, and you'll find the heater isn't powerful enough to keep the room temperature up to the minimum required.

Now reset OutsideTemp to 5, but this time increase $1: Min Temp to 19.9 and reduce $2 Max Temp to 20.1 (i.e. reduce the hysteresis). Once the room temperature has risen, you will see that it is maintained closer to the desired value of 20, but notice that this requires the heater to turn on and off much more rapidly.

For further guidelines see Running Example Simulations

The program listing and explanatory notes for the simulation follow. Before looking at them, please read the short sections Introduction to programming simulations and Language: Quick Start Guide

4.3.3.2. Slave 1: thermostat controller

The table below show the simple program underlying the simulation of the slave controller, in this instance the thermostat.

Table 4. Slave 1: thermostat

Register
 Address
Register 
Name
Statement Notes
$0 Heater On
if $RoomTemp < $1 then 1
else if $RoomTemp > $2 then 0
CO
$1 Min Temp   SP
$2 Max Temp   SP

Notes

4.3.3.3. Room heater environment

The table below show the simple program underlying the simulation of the environment, which includes the temperature inside the room and outside of the building.

Table 5. Environment: temperatures

Property Name Statement
OutsideTemp  
RoomTemp
$$ + (3000 * $1$0 - 105 * 
($$ - $OutsideTemp )) * CycleTime / 15000

Notes

Note that the correspondence between register names and names in the techniques section is contained in the Notes column.