modelClient

Demand response client

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

Information

Model for a data-driven demand response client that predicts the future load and allows to apply a load shedding factor.

This model takes as a parameter the number of samples in a day, which is generally 24 for one hour sampling or 96 for 15 minute sampling. Input to the model are the consumed energy up to the current time instant, the current temperature, the type of the day, which may be a working day, non-working day or holiday as defined in Buildings.Controls.Types.Day, a boolean signal that indicates whether it is an event day, and a signal that if true, causes the load to be shed. The input signal yShed determines how much of the load will be shed if shed=true. If shed=false, then this signal is ignored.

Output of the model is the prediction of the power that will be consumed in the current sampling interval, i.e., generally in the next 1 hour or the next 15 minutes. If the parameter nPre > 1, then the prediction is done for multiple time intervals. All of these predictions can be obtained from the output PPreNoShe. This output does not take into account yShed. The output PPre is PPre = yShed * PPreNoShe[1] if shed=true, otherwise it is PPre = PPreNoShe[1].

The baseline prediction is computed in Buildings.Controls.Predictors.ElectricalLoad.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TimetPeriod24*3600Period, generally one day
IntegernSamNumber of samples in a day. For 1 hour sampling, set to 24
IntegernPre1Number 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)
IntegernHis10Number of history terms to be stored for baseline computation
Buildings.Controls.Predictors.Types.PredictionModelpredictionModelBuildings.Controls.Predictors.Types.PredictionModel.WeatherRegressionLoad prediction model

Connectors

TypeNameDefaultDescription
Buildings.Controls.Interfaces.DayTypeInput[integer((nPre - 1)/nSam) + 2]typeOfDayType 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.BooleanInputisEventDayIf true, this day remains an event day until midnight
Modelica.Blocks.Interfaces.RealInputEConConsumed electrical power
Modelica.Blocks.Interfaces.BooleanInputshedSignal, true if load needs to be shed at the current time
Modelica.Blocks.Interfaces.RealInputyShedAmount of load to shed. Set to 0.5 to shed 50% of load
Modelica.Blocks.Interfaces.RealInputTOutOutside air temperature
Modelica.Blocks.Interfaces.RealInput[nPre - 1]TOutFutFuture outside air temperatures
Modelica.Blocks.Interfaces.RealOutputPPrePredicted power consumption for the current time interval, taking into account yShed
Modelica.Blocks.Interfaces.RealOutput[nPre]PPreNoShePredicted power consumption for the current and future time intervals, not taking into account yShed

Revisions

  • March 29, 2024, by Michael Wetter:
    Refactored implementation to avoid an infinite event iteration in OpenModelica.
    This is for #3754.
  • October 29, 2014, by Michael Wetter:
    Revised implementation.
  • March 20, 2014, by Michael Wetter:
    First implementation.