
Notes on associating measured data with a simulation

One task in simulation work is to calibrate models.  If measurements are
available it is useful to assess the fit between the model predictions and
actual performance.

The ESP-r temporal file supports two entity types for measured data: 
DBTZNM (measured dry bulb temperature) and SURTM (measured
surface temperature).  If such temporal entities are associated with a
model the results analysis module can report on and display measured
data with the same facilities as are available for predicted data.

To demonstrate this lets associate half-hourly surface temperature and air
temperature data for the period 1 February to 12 February with a standard
exemplar model (cellular_bc.cfg).  The initial portion of the data file
(measurements shown below) has two lines of description followed by 4 
columns of comma separated data.
  
Period: Wed-01-Feb@00h15 to Sun-12-Feb@23h45 @30m
Time manager_a dbT floor:manager_a SurT spandral:manager_a SurT
32.0104,16.30,17.39,16.24
32.0313,16.22,17.30,16.14
32.0521,16.15,17.22,16.07
32.0729,16.07,17.15,15.99
32.0938,15.97,17.07,15.89
32.1146,15.89,16.99,15.80
32.1354,15.81,16.91,15.72
32.1563,15.73,16.84,15.66
32.1771,15.66,16.77,15.59
32.1979,15.60,16.70,15.51
32.2188,15.53,16.64,15.44
32.2396,15.45,16.57,15.37
32.2604,17.21,16.79,15.44
32.2813,19.00,17.13,15.91
32.3021,19.00,17.32,16.60
 . . .

The first colum is the Julian day of the year and fraction of the day,
the 2nd column is the dry bulb temperature of the room, the 3rd column
is the floor temperature and the 4th column is the inside face of the
spandrel.  

To associate this data with the model we need to create a temporal file
of half houly data for the period 1 Feb to 12 Feb. In the project manager
go to Model Management -> browse/edit/simulate -> model context ->
impose measured data. Choose create temporal entities file. Accept the
suggested temporal file name. In the [Temporal definitions] menu
select option 1 to setup the temporal file. Confirm again the name
of the temporal file and for the [Empty file] dialog choose setup
initial data.

The period of the temporal file should match the period of the data
we are going to import. To match the day of the week for the climate
data of the model use 1967 and the temporal start will be 1 Feb and
the temporal file end will be 12 Feb with two timesteps per hour. You
are asked for documentation. The nature of the data is a good thing
to record. After filling in the documentation the list of available
temporal types is presented. Select [Zone db T to display] and give a name
for the entry e.g. office_dbt. The file will be updated and the entry
name shown a second time.

To save time, create two more temporal entries of type SURTM and name
them floor_t and spandrel_t.  The interface should look like Figure 1.
To import the data into each of the temporal entries select an entry
and at the bottom of the menu locate the [set display period or import 
raw data] option. Next select the import column data. You are asked
whether the imported data is at the start of the temporal file or
at a different point in the temporal file. Since our data is from
the start of day choose timestep one. 

An [Import specs] menu is presented. Changes are required to several of
the items before the import can be comissioned. First the import
file name needs to be changed to match that of the data file. Note
it is best to give the full path to the data file. The next item to
change is the [Begin reading @ line] entry. The measurements file
had two lines of text so we want to read from line 3.  Next we need
to say which column to read for the zone dry bulb temperature - in
our data file this will be column 2.  Now select [import data]. After
exiting you should see the graph and timestep includes your data.

Do the same with the floor_t and spandrel_t entries.  Be sure to check
that the [begin reading] and colum associations are correct before
selecting the import option.  And before leaving the temporal definitions
menu choose to save the ASCII temporal file. The spandrel temperatures
after import should look like Figure 2.

The next step is to associate the temporal entries with the model.
Choose the manage associations option. Since there are no current
associations your only option is to add an association. You will be
asked for the index of the temporal item as well as the part of the
model that it matches.  For office_dbt the match will be to manager_a
and for floor_t the match will be to manager_a and floor. For spandrel_t
the match is to manager_a and spandrel.

The associations should look like Figure 3. Make a note of these
associations so that you can be sure of your selections in the
results analysis module.

The measured data is for the first dozen days in February and
the initial simulation parameter set for the cellular_bc model
is 6 Februrary to 12 February with 3 startup days. The temporal data
needs to include the startup period so this is within the period
of the temporal data. The simulator will attempt to scan for the
initial timesteps of the 13th of February which is not in the
temporal data so it is necessary to change the end of the simulation
period to the day before the end of the temporal data.

Run the simulation.  The temporal entries for measured data do not
influence the simulation process only the results analysis. In the
results module you might notice brief messages about opening up the
temporal scratch file. Focus on the manager_a by using the [Select zones]
option. To plot the zone db temperature in a graph and then add
in the measured data choose Results analysis -> graphs -> time:var graph.
Select temperatures -> zone db followed by Measured:temporal ->
zone db. Note a list of the available temporal entries is listed
in the text feedback area. The graph should look like Figure 4.

You can also look at the statistics of the predictions and measured 
data.  Results analysis -> Enquire about -> summary statistics. Choose
temperatures -> zone db followed by Measured:temporal -> zone dbT.
And you will find [Measured:temporal] in the Frequency histogram
reporting option and the hours above or hours below reporting options.

The figures above refer to image files in the model images folder.

 
