modelLinearInput
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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | tPeriod (from PartialSimpleTestCase) | 24*3600 | Period |
| Modelica.Units.SI.Time | tSample (from PartialSimpleTestCase) | 3600 | Sampling period |
| Integer | nPre (from PartialSimpleTestCase) | 12 | Number of time steps to predict |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ElectricalLoad | baseLoad (from PartialSimpleTestCase) | Baseload prediction | |
| Modelica.Blocks.Sources.BooleanPulse | tri (from PartialSimpleTestCase) | Sample trigger | |
| Sources.DayType | dayType (from PartialSimpleTestCase) | Outputs the type of the day for each hour where load is to be predicted | |
| Modelica.Blocks.Logical.Not | notEventDay (from PartialSimpleTestCase) | Output true if it is not an event day | |
| Modelica.Blocks.Sources.Ramp | TOut | Outside temperature | |
| Modelica.Blocks.Sources.Constant | POffSet | Offset for power | |
| Modelica.Blocks.Math.Add | PCon | Consumed power | |
| Modelica.Blocks.Math.UnitConversions.To_degC | to_degC | ||
| Modelica.Blocks.Math.Add | err | Prediction error | |
| Sampler | TSam | 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[nPre - 1] | TOutFut | Prediction of future outside temperatures |
Revisions
-
September 24, 2015 by Michael Wetter:
ImplementedSamplerto avoid a translation warning becauseSampler.firstTriggerdoes not set thefixedattribute in MSL 3.2.1. -
March 21, 2014 by Michael Wetter:
First implementation.