Description: "Collection of models that illustrate model use and test models"

- Home > Modelica

## Buildings.Controls.Predictors.Examples

Collection of models that illustrate model use and test models

### Information

This package contains examples models for load predictors.

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

### Package Content

Name | Description
--- | ---
BESTEST | This example applies the load prediction to a BESTEST model

## Buildings.Controls.Predictors.Examples.BESTEST

This example applies the load prediction to a BESTEST model

### Information

This example applies the load prediction to the heating load of BESTEST case 600. On the right hand side of the model is the load prediction. It is configured to compute a regression based on the outdoor temperature. The output of the load prediction is compared with the actual heating power. This comparison is done in the block `preErr` which outputs the prediction error, normalized by the roughly the maximum heating power.

The figure below shows the predicted and simulated heating power, and the normalized prediction error.

Extends from Buildings.Rooms.Validation.BESTEST.Case600 (Case 600FF, but with dual-setpoint for heating and cooling).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Angle | S_ | Buildings.Types.Azimuth.S | Azimuth for south walls [rad]
Angle | E_ | Buildings.Types.Azimuth.E | Azimuth for east walls [rad]
Angle | W_ | Buildings.Types.Azimuth.W | Azimuth for west walls [rad]
Angle | N_ | Buildings.Types.Azimuth.N | Azimuth for north walls [rad]
Angle | C_ | Buildings.Types.Tilt.Ceiling | Tilt for ceiling [rad]
Angle | F_ | Buildings.Types.Tilt.Floor | Tilt for floor [rad]
Angle | Z_ | Buildings.Types.Tilt.Wall | Tilt for wall [rad]
Integer | nConExtWin | 1 | Number of constructions with a window
Integer | nConBou | 1 | Number of surface that are connected to constructions that are modeled inside the room
Generic | matExtWal |  | Exterior wall
Generic | matFlo |  | Floor
Generic | soil |  | Soil properties
Generic | roof |  | Roof
StandardResults | staRes | redeclare Buildings.Rooms.Va... | Reference results from ASHRAE/ANSI Standard 140

### Connectors

Type | Name | Description
--- | --- | ---
Bus | weaBus |

### Modelica definition

model BESTEST "This example applies the load prediction to a BESTEST model" extends Buildings.Rooms.Validation.BESTEST.Case600; ElectricalLoad preReg(predictionModel=Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression) "Load prediction based on regression"; Sources.DayType dayType(days={Buildings.Controls.Types.Day.WorkingDay}) "Day type, set to use always the same day as BESTEST case 600 has no weekly schedule"; Modelica.Blocks.Sources.BooleanConstant storeResults "Boolean signal to store the results for the regression"; Modelica.Blocks.Math.Add preErr(k1=1/4000, k2=-1/4000) "Prediction error, normalized by peak power"; equation connect(dayType.y, preReg.typeOfDay); connect(storeResults.y, preReg.storeHistory); connect(EHea.y, preReg.ECon); connect(weaBus.TDryBul, preReg.TOut); connect(preErr.u2, gaiHea.y); connect(preErr.u1, preReg.PPre[1]); end BESTEST;