LBL logo

Buildings.Controls.DemandResponse.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the models in Buildings.Controls.DemandResponse.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Controls.DemandResponse.BaseClasses.BaselinePrediction BaselinePrediction Predicts the baseline consumption
Buildings.Controls.DemandResponse.BaseClasses.NormalOperation NormalOperation Normal operation
Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse PartialDemandResponse Partial block that declares common data for demand response models
Buildings.Controls.DemandResponse.BaseClasses.ShedOperation ShedOperation Computes the consumption with the shed taken into account

Buildings.Controls.DemandResponse.BaseClasses.BaselinePrediction Buildings.Controls.DemandResponse.BaseClasses.BaselinePrediction

Predicts the baseline consumption

Buildings.Controls.DemandResponse.BaseClasses.BaselinePrediction

Information

Block that computes the baseline for a demand response client. This implementation computes the 10/10 average baseline. This baseline is the average of the consumed power of the previous 10 days for the same time interval. For example, if the base line is computed every 1 hour, then there are 24 baseline values for each day. Separate baselines are computed for any types of days. The type of day is an input signal received from the connector typeOfDay, and must be equal to any value defined in Buildings.Controls.Types.Day.

If a day is an event day, then any hour of this day after the event signal is received is excluded from the baseline computation. Storing history terms for the base line resumes at midnight.

If no history term is present for the current time interval and the current type of day, then the predicted power consumption PPre will be zero.

Extends from Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse (Partial block that declares common data for demand response models).

Parameters

TypeNameDefaultDescription
IntegernIn1Number of input connections
IntegernOut1Number of output connections
IntegernSam Number of intervals in a day for which baseline is computed
IntegernPre Number of intervals for which future load need to be predicted (set to one to only predict current time, or to nSam to predict one day)
PredictionModelpredictionModel Load prediction model
IntegernHis10Number of history terms to be stored

Connectors

TypeNameDescription
Step_ininPort[nIn]Vector of step input connectors
Step_outoutPort[nOut]Vector of step output connectors
input RealInputEConConsumed electrical energy [J]
output RealOutputPPre[nPre]Predicted power consumption for the current time interval [W]
input RealInputTOutFut[nPre - 1]Future outside air temperatures [K]
input RealInputTOutOutside air temperature [K]
input DayTypeInputtypeOfDay[integer((nPre - 1)/nSam) + 2]Type of day for the current and the future days for which a prediction is to be made. Typically, this has dimension 2 for predictions up to and including 24 hours, and 2+n for any additional day
input BooleanInputisEventDayIf true, this day remains an event day until midnight

Modelica definition

block BaselinePrediction "Predicts the baseline consumption" extends Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse; parameter Integer nHis(min=1) = 10 "Number of history terms to be stored"; Modelica.Blocks.Interfaces.RealInput TOut(unit="K", displayUnit="degC") if (predictionModel == Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression) "Outside air temperature"; Buildings.Controls.Interfaces.DayTypeInput typeOfDay[integer((nPre-1)/nSam)+2] "Type of day for the current and the future days for which a prediction is to be made. Typically, this has dimension 2 for predictions up to and including 24 hours, and 2+n for any additional day"; Modelica.Blocks.Interfaces.BooleanInput isEventDay "If true, this day remains an event day until midnight"; protected Buildings.Controls.Predictors.ElectricalLoad basLin( final nSam=nSam, final nPre=nPre, final nHis=nHis, final predictionModel=predictionModel) "Model that computes the base line"; Modelica.Blocks.Logical.Not stoHis "Boolean signal to set whether history should be stored"; equation connect(basLin.ECon, ECon); connect(TOut, basLin.TOut); connect(basLin.PPre, PPre); connect(stoHis.u, isEventDay); connect(stoHis.y, basLin.storeHistory); connect(basLin.typeOfDay, typeOfDay); connect(basLin.TOutFut, TOutFut); end BaselinePrediction;

Buildings.Controls.DemandResponse.BaseClasses.NormalOperation Buildings.Controls.DemandResponse.BaseClasses.NormalOperation

Normal operation

Buildings.Controls.DemandResponse.BaseClasses.NormalOperation

Information

Block that outputs the currently consumed electrical power, which is equal to its input signal.

Extends from Modelica.StateGraph.StepWithSignal (Ordinary step (= step that is not active when simulation starts). Connector 'active' is true when the step is active).

Parameters

TypeNameDefaultDescription
IntegernIn1Number of input connections
IntegernOut1Number of output connections

Connectors

TypeNameDescription
Step_ininPort[nIn]Vector of step input connectors
Step_outoutPort[nOut]Vector of step output connectors
output BooleanOutputactive 
input RealInputPConConsumed electrical power [W]
output RealOutputPPrePredicted power consumption for current hour [W]

Modelica definition

block NormalOperation "Normal operation" extends Modelica.StateGraph.StepWithSignal; Modelica.Blocks.Interfaces.RealInput PCon(unit="W") "Consumed electrical power"; Modelica.Blocks.Interfaces.RealOutput PPre(unit="W") "Predicted power consumption for current hour"; equation PPre = PCon; end NormalOperation;

Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse

Partial block that declares common data for demand response models

Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse

Information

This is a partial block that declares parameters, inputs and outputs that are used by the blocks that compute the demand reponse client.

Extends from Modelica.StateGraph.Step (Ordinary step (= step that is not active when simulation starts)).

Parameters

TypeNameDefaultDescription
IntegernIn1Number of input connections
IntegernOut1Number of output connections
IntegernSam Number of intervals in a day for which baseline is computed
IntegernPre Number of intervals for which future load need to be predicted (set to one to only predict current time, or to nSam to predict one day)
PredictionModelpredictionModel Load prediction model

Connectors

TypeNameDescription
Step_ininPort[nIn]Vector of step input connectors
Step_outoutPort[nOut]Vector of step output connectors
input RealInputEConConsumed electrical energy [J]
output RealOutputPPre[nPre]Predicted power consumption for the current time interval [W]
input RealInputTOutFut[nPre - 1]Future outside air temperatures [K]

Modelica definition

partial block PartialDemandResponse "Partial block that declares common data for demand response models" extends Modelica.StateGraph.Step; parameter Integer nSam "Number of intervals in a day for which baseline is computed"; parameter Integer nPre(min=1) "Number of intervals for which future load need to be predicted (set to one to only predict current time, or to nSam to predict one day)"; parameter Buildings.Controls.Predictors.Types.PredictionModel predictionModel "Load prediction model"; Modelica.Blocks.Interfaces.RealInput ECon(unit="J") "Consumed electrical energy"; Modelica.Blocks.Interfaces.RealOutput PPre[nPre](each unit="W") "Predicted power consumption for the current time interval"; Modelica.Blocks.Interfaces.RealInput TOutFut[nPre-1](each unit="K") if (predictionModel == Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression) "Future outside air temperatures"; end PartialDemandResponse;

Buildings.Controls.DemandResponse.BaseClasses.ShedOperation Buildings.Controls.DemandResponse.BaseClasses.ShedOperation

Computes the consumption with the shed taken into account

Buildings.Controls.DemandResponse.BaseClasses.ShedOperation

Information

This model computes the predicted load as the product of the shed control signal and the consumed electrical power.

Extends from Modelica.StateGraph.Step (Ordinary step (= step that is not active when simulation starts)).

Parameters

TypeNameDefaultDescription
IntegernIn1Number of input connections
IntegernOut1Number of output connections

Connectors

TypeNameDescription
Step_ininPort[nIn]Vector of step input connectors
Step_outoutPort[nOut]Vector of step output connectors
input RealInputPConConsumed electrical power [W]
input RealInputyShedAmount of load to shed. Set to 0.5 to shed 50% of load [1]
output RealOutputPPrePredicted power consumption for current hour [W]

Modelica definition

block ShedOperation "Computes the consumption with the shed taken into account" extends Modelica.StateGraph.Step; Modelica.Blocks.Interfaces.RealInput PCon(unit="W") "Consumed electrical power"; Modelica.Blocks.Interfaces.RealInput yShed(min=-1, max=1, unit="1") "Amount of load to shed. Set to 0.5 to shed 50% of load"; Modelica.Blocks.Interfaces.RealOutput PPre(unit="W") "Predicted power consumption for current hour"; equation PPre = yShed*PCon; end ShedOperation;

http://simulationresearch.lbl.gov/modelica