Sei sulla pagina 1di 20

What is GridLAB-D?

This section provides you a preliminary


background on what GridLAB-D does
and it how does it.

GLM Files
GLM files describe simulations
Input files (Grid Lab Model)
Classes, objects, players, recorders and clocks

Strengths

Relatively easy to read and edit


Parametric syntax for managing multiple models
Single object definition can become entire populations
Object properties can have distributions

Weaknesses
Not compatible with any other software

What is a GLM File?


Residential_1home.glm
Grid Lab Models (glm)
Calls several modules, classes, objects
Could call data files.
Sets properties
Reads and writes to files

Some examples of modules


Residential
House, water heater, washer, dryer, etc.

Power flow
Underground line, transformer, bus

Climate
Climate

Tape (input and output files)


Player, recorder,

Modules Completed
Climate (handles weather data)
Buildings
Commercial (single-zone office buildings)
Residential (single-family homes, washer/dryer, dishwasher, lights,
refrigerator, microwave/range, occupancy, plugs, waterheater)

Electric network

Generators (battery, diesel, PV, wind; w/WSU & Stanford)


Network (transmission powerflow; GPU by UNC Charlotte)
PLC (controllers, network comms)
Powerflow (3 phase unbalanced distribution powerflow)
Reliability (events, metrics)

Markets (retail double auction, transaction journals)


Telemtry (players, recorders, shapers, collectors, plotting,
ODBC, Matlab, Excel)

Residential Module
House (Class)
Comes with default properties intrinsic values
Floor_area(sf)
Gross_wall_area(sf)
Ceiling_ht(ft)

Can add other properties extrinsic properties

Dishwasher
Dryer
Freezer
Clothes washer

What is a module?
Collects classes that are related
Delivers all model functionality
Loaded on-demand

May be proprietary or open-source


Most downloads from SourceForge
Vendor-based distribution possible also

Often has special/hidden features


Usually controlled by control variables

Describing models: classes


Classes define similar objects
Properties are the same for all objects
Behavior are parametrically the same also
Functions are shared

Static classes are precompiled in modules


Hard to build but very rich and detailed

Runtime classes are user-defined


Easy to build but harder to make detailed

Example

Set a house with intrinsic values


module residential; module
object house:1 { class instantiated as an object
}

Set a house with extrinsic values


module residential; module
#include "CA-Los_angeles.glm input data file
object house:1 {
floor_area random.normal(1500,300) sf; properties
heating_setpoint 70.0 degF; properties
cooling_setpoint 76.0 degF; properties
thermostat_deadband 1.0 degF; properties
}

Describing systems: objects


Objects are instances of classes
Single instance or population of instances

Object properties
Simple value or distribution of values

Parent-child relation
Primary dependency relationship
Child is dependent on parent before parent is
dependent on child
Parent aggregates information from child

Controlling time: clocks

System clock represent simulation time


Object has private synchronization clock
Time resolution is 1 second (build option)
Time TS_INIT is Jan 1, 1970 0:00:00 UTC
Cannot represent any time before TS_INIT
Local time based on time zones
Daylight savings time rules are handled

Clock
clock {
timestamp '2000-01-01 0:00:00';
timezone PST+8PDT;
}

Example of GLM file


clock {
timestamp '2000-01-01 0:00:00';
timezone PST+8PDT;
}
module climate;
module residential;
#include "CA-Los_angeles.glm"

object house:1 {
floor_area random.normal(1500,300) sf; //property
heating_setpoint 70.0 degF; //property
cooling_setpoint 76.0 degF; //property
thermostat_deadband 1.0 degF; //property

How to input data?


Tape (Module)
Player (Class instantiated as an object)
Reads a file and sets the property of an object
object player{
parent clotheswasher:4;
property enduse_queue;
file clotheswasherDemand.glt; //input file
loop 100;
}

How to output data?


Tape (Module)
Recorder (Class instantiated as an object)
Writes to a file information about a certain
property of an object at a certain interval
object recorder{
parent house:1;
property enduse_load;
file kgrecorder.txt;
interval 0;
limit 1000;
}

Describing scenarios: players

Players can alter object properties


Used to update boundary condition
Have a sense of time and can loop
Shapers are a variant of player
Schedules (using POSIX cron standard)
Amplitude: copies value directly
Pulse-width: on/off with a probability
Queues: accrues to threshold before on

Extracting results: recorders

Copies properties a appointed time


Stored readings in file, database, etc.
Triggers possible
Limits allowed
Collector is aggregation variant
Search criteria based on properties
Aggregates: mean, stdev, min, max, etc.

Histogram is special variant

Model representation

XML Files
XML files describe models
Classes, objects, players, recorders and clocks

Strengths
Highly compatible with other software
Faithful representation of a single model instance

Weaknesses

Viewing and editing only with third-party tools


Rigid (non-parametric) syntax
Not good for creating large complex models
No populations or distribution allowed

Exercises 1.1
1. You want to get the total energy consumed by
all houses of more than 2500 sf. Which object
would you use?
2. Object A is the parent of object B. Which
object is processed first on a top-down pass?
3. What is an example of a module?
4. What is an example of an object?
5. What module would you use to write files or
read files?

Potrebbero piacerti anche