LBL logo

Buildings.Controls.Predictors.Validation

Collection of models that validate the load predictors

Information

This package contains models that use the load predictor with simple input data which may not be realistic, but for which the correct output can be obtained through inspection. The examples plot various outputs, which have been verified against these exact outputs. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Controls.Predictors.Validation.ConstantInput ConstantInput Demand response client with constant input for actual power consumption
Buildings.Controls.Predictors.Validation.ConstantInputDayOfAdjustment ConstantInputDayOfAdjustment Demand response client with constant input for actual power consumption
Buildings.Controls.Predictors.Validation.LinearInput LinearInput Demand response client with actual power consumption being linear in the temperature
Buildings.Controls.Predictors.Validation.LinearInputDayOfAdjustment LinearInputDayOfAdjustment Demand response client with constant input for actual power consumption
Buildings.Controls.Predictors.Validation.SineInput SineInput Demand response client with sinusoidal input for actual power consumption
Buildings.Controls.Predictors.Validation.SineInputDayOfAdjustment SineInputDayOfAdjustment Demand response client with constant input for actual power consumption
Buildings.Controls.Predictors.Validation.BaseClasses BaseClasses Package with base classes for Buildings.Controls.Predictors.Examples

Buildings.Controls.Predictors.Validation.ConstantInput Buildings.Controls.Predictors.Validation.ConstantInput

Demand response client with constant input for actual power consumption

Buildings.Controls.Predictors.Validation.ConstantInput

Information

This model is identical to Buildings.Controls.Predictors.Validation.ConstantInputDayOfAdjustment, except that this model does not use any day-of adjustment for the predicted load.

This model has been added to the library to verify and demonstrate the correct implementation of the day-of adjustment for a simple input scenario.

Extends from Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase (Partial base class for simple test case of base load prediction).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

model ConstantInput "Demand response client with constant input for actual power consumption" extends Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase; Modelica.Blocks.Sources.Constant PCon(k=1) "Measured power consumption"; Modelica.Blocks.Continuous.Integrator integrator "Integrator to compute energy from power"; equation connect(PCon.y, integrator.u); connect(integrator.y, baseLoad.ECon); end ConstantInput;

Buildings.Controls.Predictors.Validation.ConstantInputDayOfAdjustment Buildings.Controls.Predictors.Validation.ConstantInputDayOfAdjustment

Demand response client with constant input for actual power consumption

Buildings.Controls.Predictors.Validation.ConstantInputDayOfAdjustment

Information

This model is identical to Buildings.Controls.Predictors.Validation.ConstantInput, except that the demand respond client is configured to use the day-of adjustment.

This model has been added to the library to verify and demonstrate the correct implementation of the baseline prediction model based on a simple input scenario.

Extends from Buildings.Controls.Predictors.Validation.ConstantInput (Demand response client with constant input for actual power consumption).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

model ConstantInputDayOfAdjustment "Demand response client with constant input for actual power consumption" extends Buildings.Controls.Predictors.Validation.ConstantInput( baseLoad(use_dayOfAdj=true)); end ConstantInputDayOfAdjustment;

Buildings.Controls.Predictors.Validation.LinearInput Buildings.Controls.Predictors.Validation.LinearInput

Demand response client with actual power consumption being linear in the temperature

Buildings.Controls.Predictors.Validation.LinearInput

Information

This model is identical to Buildings.Controls.Predictors.Validation.SineInput, except that the input client.PCon is linear in the temperature.

This model has been added to the library to verify and demonstrate the correct implementation of the baseline prediction model based on a simple input scenario. Note that in the first day, no prediction is made as no historical data are available. In the second day, the prediction differs from the actual (linearly increasing) consumption because only one data point exists for the respective sampling interval, and hence the linear regression is underdetermined. In the third day, the prediction starts as correct because two data points exist for each sampling interval. Later in the third day, there is again a prediction error as the second day was an event day and hence no data was recorded once the event day signal has been received and until midnight the same day.

Extends from Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase (Partial base class for simple test case of base load prediction).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

model LinearInput "Demand response client with actual power consumption being linear in the temperature" extends Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase (baseLoad(predictionModel=Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression)); Modelica.Blocks.Sources.Ramp TOut( y(unit="K", displayUnit="degC"), offset=283.15, height=10, duration(displayUnit="h") = 61*24*3600) "Outside temperature"; Modelica.Blocks.Sources.Constant POffSet(k=1) "Offset for power"; Modelica.Blocks.Math.Add PCon(k2=0.2) "Consumed power"; Modelica.Blocks.Math.UnitConversions.To_degC to_degC; Modelica.Blocks.Math.Add err(k2=-1) "Prediction error"; Modelica.Blocks.Discrete.Sampler TSam(samplePeriod=tSample) "Sampler to turn TOut into a piece-wise constant signal. This makes it easier to verify the results"; Modelica.Blocks.Continuous.Integrator integrator "Integrator to compute energy from power"; Modelica.Blocks.Sources.RealExpression TOutFut[nPre - 1](each y=293.15) if nPre > 1 "Prediction of future outside temperatures"; equation connect(POffSet.y, PCon.u1); connect(TOut.y, TSam.u); connect(TSam.y, baseLoad.TOut); connect(PCon.y, integrator.u); connect(integrator.y, baseLoad.ECon); connect(err.u2, PCon.y); connect(to_degC.u, TSam.y); connect(to_degC.y, PCon.u2); connect(baseLoad.PPre[1], err.u1); connect(baseLoad.TOutFut, TOutFut.y); end LinearInput;

Buildings.Controls.Predictors.Validation.LinearInputDayOfAdjustment Buildings.Controls.Predictors.Validation.LinearInputDayOfAdjustment

Demand response client with constant input for actual power consumption

Buildings.Controls.Predictors.Validation.LinearInputDayOfAdjustment

Information

This model is identical to Buildings.Controls.Predictors.Validation.LinearInput, except that the demand respond client is configured to use the day-of adjustment.

This model has been added to the library to verify and demonstrate the correct implementation of the baseline prediction model based on a simple input scenario.

Extends from Buildings.Controls.Predictors.Validation.LinearInput (Demand response client with actual power consumption being linear in the temperature).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

model LinearInputDayOfAdjustment "Demand response client with constant input for actual power consumption" extends Buildings.Controls.Predictors.Validation.LinearInput( baseLoad(use_dayOfAdj=true)); end LinearInputDayOfAdjustment;

Buildings.Controls.Predictors.Validation.SineInput Buildings.Controls.Predictors.Validation.SineInput

Demand response client with sinusoidal input for actual power consumption

Buildings.Controls.Predictors.Validation.SineInput

Information

Model that demonstrates and tests the demand response model. Input to the model is a sinusoidal consumed electrical power which has been discretized using a sampler. Because of this discretization and because of the periodicity of the input signal, the baseline prediction model will be able to predict the load exactly. The baseline prediction model also takes as an input signal the day type, and a demand response signal. Every seventh day, there is a demand response signal.

After at least one initial working day and non-working days at which no demand response is requested, the predicted power client.PPre exactly matches the consumed power client.PCon.

This model has been added to the library to verify and demonstrate the correct implementation of the baseline prediction model based on a simple input scenario.

Extends from Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase (Partial base class for simple test case of base load prediction).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

model SineInput "Demand response client with sinusoidal input for actual power consumption" extends Buildings.Controls.Predictors.Validation.BaseClasses.PartialSimpleTestCase; Modelica.Blocks.Sources.Cosine PBas( amplitude=0.5, offset=0.5, freqHz=1/tPeriod, phase=3.1415926535898) "Measured power consumption"; Modelica.Blocks.Discrete.Sampler P(samplePeriod=tSample) "Sampler to turn PCon into a piece-wise constant signal. This makes it easier to verify the results"; Modelica.Blocks.Continuous.Integrator integrator "Integrator to compute energy from power"; Modelica.Blocks.Sources.RealExpression realExpression( y=if (dayType.y[1] == Buildings.Controls.Types.Day.WorkingDay) then 0 else 1); Modelica.Blocks.Math.Add PCon "Consumed power"; equation connect(P.y, integrator.u); connect(integrator.y, baseLoad.ECon); connect(PCon.u2, PBas.y); connect(realExpression.y, PCon.u1); connect(PCon.y, P.u); end SineInput;

Buildings.Controls.Predictors.Validation.SineInputDayOfAdjustment Buildings.Controls.Predictors.Validation.SineInputDayOfAdjustment

Demand response client with constant input for actual power consumption

Buildings.Controls.Predictors.Validation.SineInputDayOfAdjustment

Information

This model is identical to Buildings.Controls.Predictors.Validation.SineInput, except that the demand respond client is configured to use the day-of adjustment.

This model has been added to the library to verify and demonstrate the correct implementation of the baseline prediction model based on a simple input scenario.

Extends from Buildings.Controls.Predictors.Validation.SineInput (Demand response client with sinusoidal input for actual power consumption).

Parameters

TypeNameDefaultDescription
TimetPeriod24*3600Period [s]
TimetSample3600Sampling period [s]
IntegernPre12Number of time steps to predict

Modelica definition

model SineInputDayOfAdjustment "Demand response client with constant input for actual power consumption" extends Buildings.Controls.Predictors.Validation.SineInput( baseLoad(use_dayOfAdj=true)); end SineInputDayOfAdjustment;

Automatically generated Mon Jul 13 14:22:35 2015.