modelClient
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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | tPeriod | 24*3600 | Period, generally one day |
| Integer | nSam | Number of samples in a day. For 1 hour sampling, set to 24 | |
| Integer | nPre | 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) |
| Integer | nHis | 10 | Number of history terms to be stored for baseline computation |
| Buildings.Controls.Predictors.Types.PredictionModel | predictionModel | Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression | Load prediction model |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.Interfaces.DayTypeInput[integer((nPre - 1)/nSam) + 2] | typeOfDay | 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 | |
| Modelica.Blocks.Interfaces.RealInput | ECon | Consumed electrical power | |
| Modelica.Blocks.Interfaces.BooleanInput | shed | Signal, true if load needs to be shed at the current time | |
| Modelica.Blocks.Interfaces.RealInput | yShed | Amount of load to shed. Set to 0.5 to shed 50% of load | |
| Modelica.Blocks.Interfaces.RealInput | TOut | Outside air temperature | |
| Modelica.Blocks.Interfaces.RealInput[nPre - 1] | TOutFut | Future outside air temperatures | |
| Modelica.Blocks.Interfaces.RealOutput | PPre | Predicted power consumption for the current time interval, taking into account yShed | |
| Modelica.Blocks.Interfaces.RealOutput[nPre] | PPreNoShe | Predicted 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.