Skip to content

HeatPumpControl

Control of trano's air-to-water heat pump (Buildings model): heating curve, heating season, buffer charged between TSupSet - dTHys/2 and TSupSet + dTHys/2, compressor PI on the condenser outlet towards TSupSet + dTHys (minimum speed yComMin), held on at least minOnTime once started and off at least minOffTime once stopped

FastSmoothBuildings.Controls.HeatPumpControl, model (source)

Purpose

Control of trano's air-to-water heat pump (Buildings model): a heating curve, a heating season, the charging of the buffer within a band, a PI controller of the compressor speed on the condenser outlet and the minimum on and off times of the safety control.

Equations

Heating curve, linear in the outdoor temperature between the design point and the heating limit, bounded by smoothMin and smoothMax of width dT:

TSupSet = smoothMin(TSet, smoothMax(TSupMin, TSet + (TSupMin − TSet) (TOut − TOutDes)/(TOutHeaLim − TOutDes), dT), dT).

Two Hysteresis states and the filtered measurement:

  • warOut: 1 (outside the heating season) when TOut rises above TOutHeaLim + 1 K, 0 when it falls below TOutHeaLim − 1 K;
  • bufCha: charging the buffer, from TBuf < TSupSet − dTHys/2 until TBuf > TSupSet + dTHys/2, charging at the start (y_start = 1);
  • τSen dTCon/dt = TConOut − TCon, TCon(0) = TSet.

Compressor:

heaReq = demand (1 − warOut.y) bufCha.y,   y = heaOn conCom.y,

heaOn is the state of the compressor, a bistable state as the hystereses: it follows the request heaReq, except that it stays on until it has run minOnTime and off until it has been off minOffTime (the safety control of the Buildings model, without an event):

τSwi dheaOn/dt = regStep(heaTar − 0.5, 1, 0, 0.25) − heaOn,   heaTar = heaOn (1 − (1 − heaReq) mayStop) + (1 − heaOn) heaReq mayStart.

aOn ramps from 0 at the rate 1/minOnTime while the compressor runs (heaOn above 0.9), up to 1.05, and falls back to 0 within τSwi once it is off (heaOn below 0.1); mayStop goes from 0 to 1 as aOn passes 1, that is after minOnTime within 1 %. aOff and mayStart do the same for the time off; the compressor may start at the beginning (aOff(0) = 1.05). Neither share moves while the compressor switches, so the permission that started a switch holds until the switch is done. A minimum time shorter than τSwi counts as τSwi.

conCom a PI controller of the error TSupSet + dTHys − TCon between yComMin and 1, enabled by heaOn and relaxed to yComMin while disabled. The compressor stops through the product with heaOn, whose factors are bistable states that switch within their time constants: the control has no event.

Parameters

NameDefaultMeaning
TSet323.15 Ksupply temperature at the design outdoor temperature
TSupMin303.15 Ksupply temperature at the heating limit
TOutDes265.15 Kdesign outdoor temperature
TOutHeaLim289.15 Kheating limit
dTHys5 Kband of the buffer charging
kCom, TiCom0.1, 300 s gain and integral time of the compressor controller
yComMin0.3minimum compressor speed
minOnTime, minOffTime300 s, 300 s minimum time the compressor runs once started and stays off once stopped
tauSwi10 sswitching time of the compressor
tauSen30 stime constant of the condenser outlet temperature
dT0.1 Kwidth of the smooth limits of the heating curve
dY10−3 (1 − yComMin) half-width of the smooth limits of the compressor speed

The hystereses keep their defaults (tau = 10 s, dU a tenth of their band: 0.2 K for warOut, dTHys/10 for bufCha), which modifiers such as bufCha.tau can change. With dT and dY, they are the smoothing that a calibration can widen.

Use

In Examples.HeatPumpCircuit, the demand from BoilerDemand.

Parameters

Parameter Type Unit Default Description
TSet Real K 323.15 Supply temperature at the design outdoor temperature
TSupMin Real K 303.15 Supply temperature at the heating limit
TOutDes Real K 265.15 Design outdoor temperature
TOutHeaLim Real K 289.15 Heating limit
dTHys Real K 5 Band of the buffer charging
kCom Real 0.1 Gain of the compressor controller
TiCom Real s 300 Integral time of the compressor controller
yComMin Real 0.3 Minimum compressor speed
minOnTime Real s 300 Minimum time the compressor runs once started
minOffTime Real s 300 Minimum time the compressor stays off once stopped
tauSwi Real s 10 Switching time of the compressor
tOn Real s if minOnTime > tauSwi then minOnTime else tauSwi Time of the ramp of aOn: the minimum on time, at least the switching time
tOff Real s if minOffTime > tauSwi then minOffTime else tauSwi Time of the ramp of aOff: the minimum off time, at least the switching time
tauSen Real s 30 Time constant of the condenser outlet temperature
dT Real K 0.1 Width of the smooth limits of the heating curve
dY Real 1e-3*(1 - yComMin) Width of the smooth limits of the compressor speed

Revisions

  • October 2026: moved from trano's FastModel.Controls.