modelLinearInput

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

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

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.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TimetPeriod (from PartialSimpleTestCase)24*3600Period
Modelica.Units.SI.TimetSample (from PartialSimpleTestCase)3600Sampling period
IntegernPre (from PartialSimpleTestCase)12Number of time steps to predict

Components

TypeNameDefaultDescription
ElectricalLoadbaseLoad (from PartialSimpleTestCase)Baseload prediction
Modelica.Blocks.Sources.BooleanPulsetri (from PartialSimpleTestCase)Sample trigger
Sources.DayTypedayType (from PartialSimpleTestCase)Outputs the type of the day for each hour where load is to be predicted
Modelica.Blocks.Logical.NotnotEventDay (from PartialSimpleTestCase)Output true if it is not an event day
Modelica.Blocks.Sources.RampTOutOutside temperature
Modelica.Blocks.Sources.ConstantPOffSetOffset for power
Modelica.Blocks.Math.AddPConConsumed power
Modelica.Blocks.Math.UnitConversions.To_degCto_degC
Modelica.Blocks.Math.AdderrPrediction error
SamplerTSamSampler to turn TOut into a piece-wise constant signal. This makes it easier to verify the results
Modelica.Blocks.Continuous.IntegratorintegratorIntegrator to compute energy from power
Modelica.Blocks.Sources.RealExpression[nPre - 1]TOutFutPrediction of future outside temperatures

Revisions

  • September 24, 2015 by Michael Wetter:
    Implemented Sampler to avoid a translation warning because Sampler.firstTrigger does not set the fixed attribute in MSL 3.2.1.
  • March 21, 2014 by Michael Wetter:
    First implementation.