Skip to content

TP-17: Controls

Technical reference for the HEM controls methodology, covering heating control types, zoning, and setback temperatures.

Overview

TP-17 defines the control logic that governs when and how heating and hot water systems operate. Controls determine the on/off state of plant at each simulation timestep, the target temperature setpoints delivered to zones, and the charge levels applied to storage heating devices.

The specification models five distinct control types, each representing a class of physical control device or strategy. These range from simple on/off programmers through to thermostatic setpoint controls with advanced start, cost-optimised scheduling, storage heater charge controllers, and composite controls that combine multiple strategies using Boolean logic. Each control type exposes a common interface: at any given timestep, the simulation can query whether the control is active, what setpoint it demands, and whether the current timestep falls within a required heating period.

Control objects sit between the occupancy schedules defined in the dwelling input and the heating system models in TP-12: Heat Pumps, TP-13: Storage Heaters, and TP-14: Boilers. The control output directly modifies the zone heat balance computed in TP-04: Space Heating Demand.

Inputs

ParameterSymbolUnitDescription
Schedule--Time series of on/off flags or setpoint values, one entry per timestep
Simulation timestephLength of each simulation step
Start day--Day of year (0 to 365) at which the schedule time series begins
Time series stephTimestep of the schedule data (may differ from the simulation timestep)
Setpoint minimum°CMinimum temperature setpoint (optional)
Setpoint maximum°CMaximum temperature setpoint (optional)
Advanced start durationhDuration before a heating period during which the system pre-heats
Charge level--Daily target charge proportion for storage heaters (0 to 1), one value per day
Temperature charge cut°CRoom temperature above which charging ceases
Temperature charge cut deltaKTime-varying adjustment applied to
Cost schedule--Time series of cost values used to rank timesteps for cost-minimising control
Daily on-timehNumber of hours per day the cost-minimising control should be active
External sensor correlation----Lookup table of external temperature vs. maximum charge factor

Calculation

Schedule Indexing

All control types share a common mechanism for mapping the current simulation time to a position in the schedule array. The schedule index at simulation step is:

Where:

  • is the current simulation timestep index
  • is the simulation timestep in hours
  • is the start day of the schedule
  • is the timestep of the schedule data in hours

When is negative (the simulation has not yet reached the schedule start day), negative-index wrapping is applied: , where is the schedule length.

Schedule Expansion

Schedules in the input specification may be defined hierarchically. A weekly schedule can reference named daily sub-schedules, and any entry can use a repeat construct to avoid redundancy. The expansion algorithm processes the schedule tree recursively:

  1. If an entry is a string, it is a reference to a named sub-schedule. Expand that sub-schedule recursively.
  2. If an entry is a dictionary with value and repeat fields, expand the value and repeat it the specified number of times.
  3. If an entry is a numeric or boolean value (or null, where permitted), it is stored directly.

The result is a flat array of values at the resolution of .

On/Off Time Control

The simplest control type models a programmer or timer. The schedule contains boolean values: true (on) or false (off). At each timestep the control returns:

Where is the schedule index at timestep . This control has no setpoint; it simply permits or blocks system operation.

Setpoint Time Control

A setpoint control models a room thermostat or programmable thermostat. The schedule contains temperature values in degrees Celsius at each timestep, with null entries indicating periods when no heating is required.

Determining the Active Setpoint

At each timestep, the setpoint is resolved by the following logic:

  1. Read the schedule value at the current index.
  2. If is not null, use it as the base setpoint.
  3. If is null, check for advanced start: look ahead up to timesteps, where:

If a non-null schedule entry is found within the look-ahead window, use that entry's setpoint as the current setpoint (the system pre-heats towards the target).

  1. If is still null after the look-ahead, fall back to the minimum or maximum setpoint limits:
    • If only is defined, use .
    • If only is defined, use .
    • If both are defined, use whichever is specified by the default_to_max flag.
    • If neither is defined, the setpoint remains null and the system is off.
  2. If a setpoint was found from the schedule, clamp it within limits:

System On/Off State

The setpoint control reports the system as "on" if any of the following hold:

  • The schedule contains a non-null value at the current index.
  • A non-null value exists within the advanced start look-ahead window.
  • A minimum or maximum setpoint limit is defined (enabling setback operation outside scheduled heating periods).

Required Period

The control distinguishes between the "required period" (the occupant's scheduled heating demand) and periods where the system runs only due to advanced start or setback limits. A timestep is in the required period only if the schedule entry at the current index is non-null, without considering advanced start or min/max fallbacks.

On/Off Cost-Minimising Time Control

This control selects the cheapest hours in each day to operate, given a cost signal (e.g. time-of-use electricity tariff). It is constructed at initialisation, not evaluated dynamically.

Pre-processing Algorithm

For each day in the cost schedule:

  1. Extract the cost values for that day: , where is the number of timesteps per day.
  2. Determine the number of timesteps to activate: .
  3. Find the smallest cost values and collect their unique sorted thresholds.
  4. Iterate through the thresholds from lowest to highest. For each threshold, set all matching timesteps to "on" until timesteps have been allocated.

The result is a pre-computed boolean schedule. At runtime, the control simply returns:

Where is the pre-processed on/off schedule.

Charge Control

The charge control governs the charging of heat storage devices such as storage heaters and heat batteries. It determines the target charge level at each timestep, influenced by the control logic type, room temperature, and external conditions.

Logic Types

Five logic types are defined:

Logic typeDescription
ManualCharge level taken directly from the daily schedule with no automatic adjustment
AutomaticInternal thermostat controls charging; may be supplemented by an external weather sensor
CELECTElectronic sensors throughout the dwelling linked to a central controller that optimises individual heater charging
HHRSHHigh heat retention storage heater with timer, electronic room thermostat, and fan; estimates next-day demand from heating degree hours
Heat batteryCharge level taken directly from the daily schedule (same as manual)

Target Charge Calculation

The target charge at each timestep depends on the logic type:

Step 1: Determine nominal charge.

If the control is on (per the on/off schedule), the nominal charge level is read from the daily charge level array:

where is the current day index. If the control is off, .

Step 2: Apply temperature charge cut (automatic, CELECT, HHRSH only).

For logic types that include temperature-based cut-off, the corrected cut-off temperature is:

Where is the time-varying adjustment at the current schedule index. If the current room air temperature meets or exceeds :

Step 3: Apply logic-specific modifiers.

For manual and heat battery logic:

For automatic and CELECT logic with an external weather sensor, a limiting factor is applied:

where is obtained by linear interpolation from the external sensor correlation table. Given breakpoints and bracketing the current external temperature :

If is below the first breakpoint, takes the value at that breakpoint. If above the last, takes the value at the last breakpoint. Without an external sensor, .

For HHRSH logic, the target charge is binary:

The actual energy to store for HHRSH is determined separately (see below).

HHRSH Energy-to-Store Estimation

High heat retention storage heaters estimate the energy required for the next day based on the ratio of future to past heating degree hours. The calculation maintains rolling 24-hour buffers of energy demand, past external temperatures, and future external temperatures.

At each timestep:

  1. Append the current energy demand , current external temperature, and the external temperature forecast for 24 hours ahead to the respective ring buffers.
  2. Compute heating degree hours for the past and future 24-hour windows:

Where is the base temperature (zone setpoint) and is the external temperature at each timestep within the 24-hour window. is the number of simulation timesteps per day.

  1. Estimate the energy to store:

Where is the total demand over the past 24 hours.

If the past heating degree hours are zero (no heating was required), . If insufficient data is available (the simulation has not yet run a full 24 hours), is undefined. When the control is off, .

Combination Time Control

A combination control composes multiple sub-controls into a single logical unit using Boolean and numerical operations. This allows complex control strategies to be expressed declaratively, for example gating a setpoint schedule with an on/off override, or taking the maximum of two thermostat setpoints.

Structure

A combination control is defined as a tree of named nodes. Each node specifies:

  • An operation (AND, OR, XOR, NOT, MAX, MIN, MEAN).
  • A list of operands, each of which is either a reference to a named sub-control or a reference to another combination node.

The root node is always named "main". Evaluation begins at this node and recurses through the tree.

Supported Operations

OperationTypeBehaviour
ANDBooleanTrue if all operands are true/on
ORBooleanTrue if any operand is true/on
XORBooleanTrue if an odd number of operands are true
NOTBooleanInverts a single operand (requires exactly one)
MAXNumericalReturns the maximum setpoint among operands
MINNumericalReturns the minimum setpoint among operands
MEANNumericalReturns true if the mean of operands exceeds 0.5

Evaluation: is_on

For Boolean operations (AND, OR, XOR, NOT), each operand's is_on state is evaluated and combined. For MAX, MIN, and MEAN operations applied to the is_on query, the result is the AND of all operands (i.e. all must be on).

Evaluation: setpoint

When evaluating the setpoint of a combination, the control type of each operand determines how it contributes:

  • On/off controls contribute a boolean value (on or off).
  • Setpoint controls contribute a numeric temperature value.

The combination rules for setpoint evaluation are:

  1. On/off + setpoint (AND only): The boolean operands gate the setpoint. If all boolean operands are true, the setpoint value passes through. Otherwise, the result is null (system off). Only one numeric setpoint operand is permitted per AND node.
  2. Setpoint + setpoint: MAX returns the highest setpoint, MIN returns the lowest. MEAN returns true (1) if the average exceeds 0.5, false (0) otherwise.
  3. On/off + on/off: Not applicable for setpoint evaluation.

Evaluation: in_required_period

The required-period evaluation follows the same recursive structure. On/off controls report their is_on state. Setpoint controls report their in_required_period state (whether the schedule has a non-null entry, excluding advanced start). Mixed on/off and setpoint combinations support only the AND operation. Pure setpoint combinations support AND, OR, XOR, MAX, MIN, and MEAN.

Evaluation: target_charge

For charge-related queries, the combination tree is traversed to locate the single charge control operand. At most one charge control may exist in the combination. Its target charge value is returned directly.

Smart Appliance Control

The smart appliance control manages load-shifting of domestic appliances (e.g. dishwashers, washing machines) to minimise cost or maximise self-consumption of on-site generation. It operates by predicting total demand over a rolling 24-hour window and scheduling appliance usage events at timesteps where net demand is lowest.

The control maintains:

  • A power time series for each energy supply, representing expected appliance demand.
  • A rolling 24-hour buffer of non-appliance demand per energy supply.
  • A rolling 24-hour buffer of battery state of charge (where a battery is present).

At each timestep, the anticipated demand for a given energy supply is:

Where:

  • is the expected appliance power in W
  • is the non-appliance demand from the 24-hour buffer
  • is the predicted battery state of charge (subtracted because stored energy offsets grid demand)

When an appliance usage event is scheduled, the control updates the power time series and, if a battery is present, adjusts the predicted battery state of charge to account for the battery supplying part of the demand.

Outputs

QuantitySymbolUnitDescription
System on/off state--booleanWhether the control permits system operation at the current timestep
Setpoint temperature°CTarget temperature for the zone (null if system is off, for setpoint controls)
In required period--booleanWhether the current timestep is within the occupant's scheduled demand period
Target charge--Target charge proportion for storage devices (0 to 1)
Energy to store (HHRSH)kWhEstimated energy to be stored for the next day
Corrected charge cut temperature°CTemperature above which charging ceases, after time-varying adjustment

Assumptions

  • Schedules are periodic. When the simulation timestep does not align with the schedule resolution, the schedule index is computed by integer division and the schedule value is treated as constant over each schedule timestep.
  • The on/off cost-minimising control pre-computes the cheapest hours at initialisation. It does not respond dynamically to changing cost signals during the simulation.
  • For HHRSH energy-to-store estimation, only heating degree hours are considered. Solar gains and internal gains are not included in the demand forecast.
  • The external sensor limiting factor uses linear interpolation between breakpoints, with flat extrapolation beyond the defined range.
  • Combination controls permit at most one charge control operand. Mixed on/off and setpoint combinations support only the AND operation for setpoint and required-period queries.
  • The smart appliance control assumes perfect foresight of the appliance demand time series over the simulation period. Non-appliance demand and battery state of charge are estimated from the previous 24-hour window.
  • Advanced start uses the setpoint from the beginning of the upcoming heating period. No gradual ramp is applied.

Cross-references