Package with models for load prediction
This package contains components models for load prediction.
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
ElectricalLoad | Block that predicts an electrical load |
Types | Types for prediction models |
Examples | Collection of models that illustrate model use and test models |
Validation | Collection of models that validate the load predictors |
BaseClasses | Package with base classes |
Block that predicts an electrical load
Data-driven model that predicts the electrical load. This load prediction can for example be used in a demand response client.
The model computes either an average baseline or a linear regression with respect to outside temperature. For both, optionally a day-of adjustment can be made.
Separate loads 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.
This input is a vector where the first element corresponds to the
current day, the next element to tomorrow, and so on.
The dimension of this input vector is typically 2 if
the demand is to be predicted for the next 24 hours.
If it is for the next 48 hours, then the dimension is 3.
Using a vector is required as the prediction could be
from noon of a workday to noon of a holiday or week-end day.
The average baseline is the average of the consumed power of the previous
nhis days for the same time interval. The default value is
nhis=10 days.
For example, if the prediction is mode for 1 hour time windows,
then there are 24 baseline values for each day,
each being the average power consumed in the past 10 days that have the same
typeOfDay
.
The linear regression model computes the predicted power as a linear function of the current outside temperature. The two coefficients for the linear function are obtained using a regression of the past nhis days.
If the input signal storeHistory
is true
, then
the prediction is no longer carried out for this day until midnight.
For example, if used for a demand respond client, on an event day,
one may want to set storeHistory=true
when the building operates
in demand respond mode. Then any time interval after this signal
is received is excluded from the baseline computation.
Storing history terms for the baseline resumes automatically 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.
If the parameter use_dayOfAdj = true
, then the
day-of adjustment is computed. (Some literature call this
morning-of adjustment, but we call it day-of adjustment because
the adjustment can also be in the afternoon if the peak is
in the late afternoon hours.)
The day-of adjustment can be used with any of the above baseline computations.
The parameters dayOfAdj_start
and dayOfAdj_end
determine the time window during which the day-of adjustment is computed.
Both need to be negative times, measured in seconds prior to the time
at which the power consumption is predicted.
For example, to use a day-of adjustment for the window of 4 to 1
hours prior to the event time, set
dayOfAdj_start=-4*3600
and dayOfAdj_end=-3600
.
The day-of adjustment is computed as follows: First, the average power Pave consumed over the day-of time window is computed. Next, the average power Phis is computed for the past nhis days. Then, the adjustment factor is computed as
a = min(amax, max(amin, Pave ⁄ Phis),
where amin and amax are the minimum
and maximum adjustment factors as defined by the parameters
adjFacMin
and adjFacMax
.
Extends from Modelica.Blocks.Icons.DiscreteBlock (Graphical layout of discrete block component icon).
Type | Name | Default | Description |
---|---|---|---|
Integer | nSam | 24 | Number of intervals in a day for which baseline is computed |
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 |
PredictionModel | predictionModel | Types.PredictionModel.Weathe... | Load prediction model |
Day of adjustment | |||
Boolean | use_dayOfAdj | true | if true, use the day of adjustment |
Time | dayOfAdj_start | -14400 | Number of hours prior to current time when day of adjustment starts [s] |
Time | dayOfAdj_end | -3600 | Number of hours prior to current time when day of adjustment ends [s] |
Real | minAdjFac | 0.8 | Minimum adjustment factor |
Real | maxAdjFac | 1.2 | Maximum adjustment factor |
Type | Name | Description |
---|---|---|
input RealInput | TOut | Outside air temperature [K] |
input RealInput | TOutFut[nPre - 1] | Future outside air temperatures [K] |
input RealInput | ECon | Consumed electrical energy [J] |
output RealOutput | PPre[nPre] | Predicted power consumptions (first element is for current time [W] |
input 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 |
input BooleanInput | storeHistory | If false, history terms are no longer stored for the remainder of the day |