Buildings.Occupants.Residential.AirConditioning

Package with models to simulate air conditioning behaviors in resident buildings

Information

This package contains models to simulate air conditioning behaviors in residential buildings.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Occupants.Residential.AirConditioning.Ren2014ACBedroom Ren2014ACBedroom A model to predict occupants' AC behavior in bedroom with indoor temperature
Buildings.Occupants.Residential.AirConditioning.Ren2014ACLivingroom Ren2014ACLivingroom A model to predict occupants' AC behavior in Livingroom with indoor temperature
Buildings.Occupants.Residential.AirConditioning.Validation Validation Package with examples to validate models in AC package

Buildings.Occupants.Residential.AirConditioning.Ren2014ACBedroom Buildings.Occupants.Residential.AirConditioning.Ren2014ACBedroom

A model to predict occupants' AC behavior in bedroom with indoor temperature

Buildings.Occupants.Residential.AirConditioning.Ren2014ACBedroom

Information

Model predicting the state of the AC with the indoor temperature and occupancy.

Dynamics

When the space is unoccupied, the AC is always off. When the space is occupied, the lower the indoor temperature is, the lower the chance to turn on the AC and higher the chance to turn off the AC.

References

The model is documented in the paper "Ren, X., Yan, D. and Wang, C., 2014. Air-conditioning usage conditional probability model for residential buildings. Building and Environment, 81, pp.172-182."

The model parameters are regressed from the field study in China in 2014.

Extends from Modelica.Blocks.Icons.DiscreteBlock (Graphical layout of discrete block component icon).

Parameters

TypeNameDefaultDescription
Temperatureu1304.40Threshold for turning off the AC of the Weibull Distribution [K]
Temperatureu2301.90Threshold for turning on the AC of the Weibull Distribution [K]
TemperatureDifferenceL113.34Normalization factor for turning off the AC of the Weibull Distribution [K]
TemperatureDifferenceL242.86Normalization factor for turning on the AC of the Weibull Distribution [K]
Realk11.73Shape factor for turning off the AC of the Weibull Distribution
Realk21.80Shape factor for turning on the AC of the Weibull Distribution
TimesamplePeriod120Sample period [s]
IntegerlocalSeed4000Local seed to be used to generate the initial state of the random number generator
IntegerglobalSeed30129Global seed to be combined with the local seed

Connectors

TypeNameDescription
input RealInputTInIndoor air temperature [K]
input BooleanInputoccIndoor occupancy, true for occupied
output BooleanOutputonState of AC

Modelica definition

model Ren2014ACBedroom "A model to predict occupants' AC behavior in bedroom with indoor temperature" extends Modelica.Blocks.Icons.DiscreteBlock; parameter Modelica.Units.SI.Temperature u1 = 304.40 "Threshold for turning off the AC of the Weibull Distribution"; parameter Modelica.Units.SI.Temperature u2 = 301.90 "Threshold for turning on the AC of the Weibull Distribution"; parameter Modelica.Units.SI.TemperatureDifference L1 = 13.34 "Normalization factor for turning off the AC of the Weibull Distribution"; parameter Modelica.Units.SI.TemperatureDifference L2 = 42.86 "Normalization factor for turning on the AC of the Weibull Distribution"; parameter Real k1 = 1.73 "Shape factor for turning off the AC of the Weibull Distribution"; parameter Real k2 = 1.80 "Shape factor for turning on the AC of the Weibull Distribution"; parameter Modelica.Units.SI.Time samplePeriod=120 "Sample period"; parameter Integer localSeed = 4000 "Local seed to be used to generate the initial state of the random number generator"; parameter Integer globalSeed = 30129 "Global seed to be combined with the local seed"; Modelica.Blocks.Interfaces.RealInput TIn( final unit="K", displayUnit="degC") "Indoor air temperature"; Modelica.Blocks.Interfaces.BooleanInput occ "Indoor occupancy, true for occupied"; Modelica.Blocks.Interfaces.BooleanOutput on "State of AC"; Real pOn( final unit="1", final min=0, final max=1) "Probability of turning on the AC"; Real pOff( final unit="1", final min=0, final max=1) "Probability of turning off the AC"; protected parameter Modelica.Units.SI.Time t0(final fixed=false) "First sample time instant"; output Boolean sampleTrigger "True, if sample time instant"; Integer state[Modelica.Math.Random.Generators.Xorshift1024star.nState] "State of the random number generator"; Boolean dummy "Dummy variable for state of the heater (used as random number has two return arguments, and hence negation in the call is not possible)"; initial equation t0 = time; state = Modelica.Math.Random.Generators.Xorshift1024star.initialState( localSeed = localSeed, globalSeed = globalSeed); on = false "The initial state of AC is off"; dummy = true; pOn = 0; pOff = 0; equation sampleTrigger = sample(t0,samplePeriod); when sampleTrigger then pOff = if TIn <= u1 then 1 - Modelica.Math.exp(-((u1-TIn)/L1)^k1*samplePeriod) else 0; pOn = if TIn >= u2 then 1 - Modelica.Math.exp(-((TIn-u2)/L2)^k2*samplePeriod) else 0; // Call only weibull1DOff, but swap arguments if pre(on) == false, which effectively // renders a call to weibull1DON. // This is done to have only one state for the random number generator. (dummy, state) = Buildings.Occupants.BaseClasses.weibull1DOFF( x=if pre(on) then TIn else u2, u=if pre(on) then u1 else TIn, L=if pre(on) then L1 else L2, k=if pre(on) then k1 else k2, dt=samplePeriod, stateIn=pre(state)); if occ then if pre(on) then on = not dummy; else on = dummy; end if; else on = false; end if; end when; end Ren2014ACBedroom;

Buildings.Occupants.Residential.AirConditioning.Ren2014ACLivingroom Buildings.Occupants.Residential.AirConditioning.Ren2014ACLivingroom

A model to predict occupants' AC behavior in Livingroom with indoor temperature

Buildings.Occupants.Residential.AirConditioning.Ren2014ACLivingroom

Information

Model predicting the state of the AC with the indoor temperature and occupancy.

Dynamics

When the space is unoccupied, the AC is always off. When the space is occupied, the lower the indoor temperature is, the lower the chance to turn on the AC and higher the chance to turn off the AC.

References

The model is documented in the paper "Ren, X., Yan, D. and Wang, C., 2014. Air-conditioning usage conditional probability model for residential buildings. Building and Environment, 81, pp.172-182."

The model parameters are regressed from the field study in China in 2014.

Extends from Modelica.Blocks.Icons.DiscreteBlock (Graphical layout of discrete block component icon).

Parameters

TypeNameDefaultDescription
Temperatureu1303.40Threshold for turning off the AC of the Weibull Distribution [K]
Temperatureu2300.90Threshold for turning on the AC of the Weibull Distribution [K]
TemperatureDifferenceL1152.88Normalization factor for turning off the AC of the Weibull Distribution [K]
TemperatureDifferenceL215.87Normalization factor for turning on the AC of the Weibull Distribution [K]
Realk11.30Shape factor for turning off the AC of the Weibull Distribution
Realk22.22Shape factor for turning on the AC of the Weibull Distribution
TimesamplePeriod120Sample period [s]
IntegerlocalSeed4001Local seed to be used to generate the initial state of the random number generator
IntegerglobalSeed30129Global seed to be combined with the local seed

Connectors

TypeNameDescription
input RealInputTInIndoor air temperature [K]
input BooleanInputoccIndoor occupancy, true for occupied
output BooleanOutputonState of AC

Modelica definition

model Ren2014ACLivingroom "A model to predict occupants' AC behavior in Livingroom with indoor temperature" extends Modelica.Blocks.Icons.DiscreteBlock; parameter Modelica.Units.SI.Temperature u1 = 303.40 "Threshold for turning off the AC of the Weibull Distribution"; parameter Modelica.Units.SI.Temperature u2 = 300.90 "Threshold for turning on the AC of the Weibull Distribution"; parameter Modelica.Units.SI.TemperatureDifference L1 = 152.88 "Normalization factor for turning off the AC of the Weibull Distribution"; parameter Modelica.Units.SI.TemperatureDifference L2 = 15.87 "Normalization factor for turning on the AC of the Weibull Distribution"; parameter Real k1 = 1.30 "Shape factor for turning off the AC of the Weibull Distribution"; parameter Real k2 = 2.22 "Shape factor for turning on the AC of the Weibull Distribution"; parameter Modelica.Units.SI.Time samplePeriod=120 "Sample period"; parameter Integer localSeed = 4001 "Local seed to be used to generate the initial state of the random number generator"; parameter Integer globalSeed = 30129 "Global seed to be combined with the local seed"; Modelica.Blocks.Interfaces.RealInput TIn( final unit="K", displayUnit="degC") "Indoor air temperature"; Modelica.Blocks.Interfaces.BooleanInput occ "Indoor occupancy, true for occupied"; Modelica.Blocks.Interfaces.BooleanOutput on "State of AC"; Real pOn( unit="1", min=0, max=1) "Probability of turning on the AC"; Real pOff( unit="1", min=0, max=1) "Probability of turning off the AC"; protected parameter Modelica.Units.SI.Time t0(final fixed=false) "First sample time instant"; output Boolean sampleTrigger "True, if sample time instant"; Integer state[Modelica.Math.Random.Generators.Xorshift1024star.nState] "State of the random number generator"; Boolean dummy "Dummy variable for the state of the heater (used as random number has two return arguments, and hence negation in the call is not possible)"; initial equation t0 = time; state = Modelica.Math.Random.Generators.Xorshift1024star.initialState( localSeed = localSeed, globalSeed = globalSeed); on = false "The initial state of AC is off"; dummy = true; pOn = 0; pOff = 0; equation sampleTrigger = sample(t0,samplePeriod); when sampleTrigger then pOff = if TIn <= u1 then 1 - Modelica.Math.exp(-((u1-TIn)/L1)^k1*samplePeriod) else 0; pOn = if TIn >= u2 then 1 - Modelica.Math.exp(-((TIn-u2)/L2)^k2*samplePeriod) else 0; // Call only weibull1DOff, but swap arguments if pre(on) == false, which effectively // renders a call to weibull1DON. // This is done to have only one state for the random number generator. (dummy, state) = Buildings.Occupants.BaseClasses.weibull1DOFF( x=if pre(on) then TIn else u2, u=if pre(on) then u1 else TIn, L=if pre(on) then L1 else L2, k=if pre(on) then k1 else k2, dt=samplePeriod, stateIn=pre(state)); if occ then if pre(on) then on = not dummy; else on = dummy; end if; else on = false; end if; end when; end Ren2014ACLivingroom;