Sie sind auf Seite 1von 49

A simplified daylight model suitable for daylight controllers

David Lindelöf∗
Solar Energy and Building Physics Laboratory (LESO-PB)
Ecole Polytechnique Fédérale de Lausanne (EPFL)
CH-1015 Lausanne, Switzerland

March 1, 2007

This paper describes a simplified daylight model suitable for low-power embedded

daylight controllers. For a given blinds’ settings, it models indoor illuminances as a

linear combination of outdoor global illuminance and outdoor diffuse illuminance, for

a given position of the sun. A controller that implement this model needs to

persistently save previous measurements of illuminance, blinds’ settings and sun

positions, and this data is used to model current illuminance values. We have

validated this model against a Radiance model, and also implemented a daylight

controller that adjusts the horizontal workplane illuminance to a given setpoint with

this model. This controller has been validated against a building simulator.

Keywords: daylight modeling, daylight control, embedded controller

1. Motivation

Rational use of daylight is widely perceived as a key to substantial energy savings in buildings,

both electrical (with daylight being preferred over artificial light) and thermal (through an

optimal use of solar gains). Bourgeois et al. (2006), for instance, report that simulations show

that building occupants that actively seek daylighting reduce overall primary energy expenditure

in the perimeter zone by more than 40%.

Studies have shown, however, that building occupants are very poor at making rational

uses of the daylight control devices at their disposal. Foster and Oreszczyn (2001), for example,
∗ Corresponding author. Tel.: +41 21 693.55.56; fax: +41 21 693.27.22; email: david.lindelof@epfl.ch

1
have monitored three offices in central London whose occupants were found to leave on average

40% of the building’s glazed area occluded by their venetian blinds, without any obvious

correlation with available sunlight. This irrational behaviour leads to an increased use of electric

lighting, more than that which was assumed during the design stage.

Automating the operation of these shading devices is a solution to this problem, but is

doomed to failure if the occupants’ visual comfort is not maintained. Many control algorithms

that strive to maintain visual comfort while making an optimal use of shading devices

(particularly if implemented on a low-powered, embedded controller) will need a good, simple

daylight model of the environment being controlled. The relative errors due to this model (i.e.

the ratio between error and real illuminance) must be smaller than illuminance differences the

human eye can perceive. Luckiesh and Moss (1937) cite evidence that this limit is about 50%,

but even this is maybe too liberal. But few daylight modeling methods exist today that are both

accurate and computationally cheap enough to be used on embedded hardware.

This paper proposes a simplified daylight model intended for embedded daylight

controllers. It provides a reasonably accurate daylight prediction for a controller that measures

the indoor illuminance and the outdoor global and diffuse illuminance. When asked to predict

what illuminance would result from a given blinds’ settings, the algorithm looks back in time and

retrieves illuminance measurements that have been taken with similar blinds’ settings and a

similar sun position. The illuminance is modeled as a linear combination of outdoor global and

diffuse irradiance.

In section 2 we will describe the artificial data that has been used in this study. In section

3 we use this data to see if commonly used daylight illuminance prediction methods are accurate

enough for a daylight controller. We will see that daylit scenes where direct sun is present cannot

be accurately modeled with such models. In section 4 we will develop a linear daylight model,

valid for a given sun position. From this model we will deduce a more general model, which uses

the history of past illuminances to model the present illuminance. This model will be trained

with a subset of our artificial data, and validated on the remaining subset, in section 5. Finally,

in section 6, we will build a working daylight controller set to keep the horizontal workplane

illuminance to 500 lx and assess its performance over one year.

2
2. Data sets
Glossary

E Illuminance [lx]

Eh Horizontal illuminance [lx]

Evg Outdoor global horizontal illuminance [lx]

Evv Outdoor vertical facade illuminance [lx]

Eeg Outdoor global horizontal irradiance [W/m2 ]

Ees Direct normal irradiance [W/m2 ]

Eed Outdoor diffuse horizontal irradiance [W/m2 ]

Een Direct horizontal irradiance [W/m2 ]

DF Daylight factor

 Perez sky clearness

˜ Perez sky clearness category

θ Sun altitude

φ Sun azimuth (0° is north, 90° is east)

φf Facade normal azimuth

It is difficult if not impossible to theoretically develop a daylight model with real data.

Experiments involving daylight are by nature difficult to repeat and verify, and acquiring the

right amount of data takes far too long. We have therefore used a validated computer model to

generate the data we will train and test our model with.

The Solar Energy and Building Physics Laboratory and the Fraunhofer Institute for Solar

Energy have recently collaborated within the european Ecco-Build project on the development of

a daylight model for the Simbad (SIMBAD06) building simulation software. This Radiance-based

daylight model consists of precalculated illuminances at five different positions in a simulated

office, for each minute of a year, with weather data files for Brussels (Belgium) and for Rome

(Italy). The office is a cuboid 4.61 × 3.62 × 2.85 m3 in volume. These annual simulations were

done for three different office orientations (south, west, north). A roller blind or a venetian blind

was added to the simulated model, and different simulations were made for different discrete

blinds’ settings.

All in all, 785 annual simulations were carried out, each one yielding the five illuminances

for every minute for the 525 600 minutes in a year. Each file is 32 megabyte large, and the whole

data set represents 24 gigabytes. Jan Wienold of Fraunhofer-ISE carried out the simulations with

3
the Radiance-based Daysim (Reinhart, 2006) program on a cluster of more than 50 nodes. The

weather data was provided by Fraunhofer-ISE, who produced it with the Metenorm

(METEONORM06) program.

Each simulation yields a table with 535 600 rows, whose columns are described by Table 1.

[Table 1 about here.]

3. Daylight factor (or similar) methods

In this section we will first test two simplified illuminance prediction methods, one of which is

widely used, and compare their predictions with our simulated data. We consider a south-facing

office in Brussels without any shading device.

3.1. Daylight factors

The daylight factor (DF ) model assumes the indoor illuminance at a given point to be

proportional to the outdoor, unobstructed, horizontal illuminance, and the daylight factor is

given as that ratio of proportionality for a CIE overcast sky (CIE70). This definition is valid, and

predicts accurate daylight illuminances, only for CIE overcast skies because of their isotropy. For

such a sky, the indoor illuminance is predicted by multiplying the daylight factor by the outdoor

illuminance:

E = DF × Evg, (1)

where Evg is the outdoor horizontal illuminance and DF is the daylight factor.

Our data does not directly provide the outdoor horizontal illuminance but the outdoor

horizontal global irradiance. Since the sky luminous efficacy is a constant 179 lm/W in Radiance

(Larson and Shakespeare, 2003, p. 357), this illuminance can be obtained by multiplying the

irradiance by this efficacy. When validating a model based on daylight factors with data

generated with Radiance, we may therefore equivalently plot the illuminance against outdoor

irradiance or outdoor illuminance. In Figure 1 we have plotted the indoor horizontal illuminance

against the global horizontal irradiance Eeg, for different categories of Perez sky clearness (see

Perez et al. (1993). The Perez sky clearness category takes discrete values between 1 and 8 and

corresponds to increasingly clear skies). For the cloudiest skies (˜


 = 1), there is a good correlation

between Eeg and the horizontal illuminance, but the correlation breaks down for clearer skies.

4
[Figure 1 about here.]

[Figure 2 about here.]

In Figure 2 we plot the residuals against the fitted values of a daylight factor model, where

the daylight factor is obtained by fitting a linear model between the indoor illuminance and the

outdoor irradiance. The high-illuminance points that depart the most from the red line tend to

increase the linear coefficient and are responsible for the negative residuals at the other data

points. They probably correspond to datapoints where the sun was present and visible from the

point whose illuminance has been computed. This plot highlights the importance of taking the

sun’s position into account when predicting indoor illuminance, invalidating the daylight factor

approach.

The daylight factor method is clearly unable to predict indoor illuminances for our test

data other than under the most cloudy conditions. They were in fact never intended as a precise

daylight illuminance prediction method, but as a quick and easy way to verify the daylight

performance of a building. They are now part of many building construction codes, but one

should keep their original purpose in mind before using them for illuminance prediction.

Robinson and Stone (2004) have shown that isotropic sky models (or models without

azimuthal dependence, such as the CIE overcast sky) cannot accurately predict the vertical

irradiance on a window. Such models do not take the sun’s position into account, and those

errors will inevitably propagate on the calculation of the indoor illuminance.

3.2. Vertical irradiance

Guillemin (2003) has suggested that a better correlation than daylight factors might exist

between indoor illuminances and vertical facade illuminance. He found experimentally that for

the facades of the LESO building, the indoor illuminance could be modeled by

E = a exp(b · α)Evv, (2)

where α (between 0 and 1) is the fraction of the window not covered by a textile blind, Evv is

the facade’s vertical illuminance and a and b are model parameters to be fitted. For given blinds’

settings, the indoor illuminance is therefore assumed to be proportional to the outdoor vertical

illuminance.

5
Evv is proportional to Eev, the outdoor vertical irradiance in our data for reasons

previously mentioned. Assuming an isotropic diffuse irradiance distribution, and ignoring ground

reflections, the irradiance on a vertical facade is given by

Eev = Eed/2 + Ees cos(θ) cos(φ − φf ), (3)

where θ is the sun’s elevation, φ its azimuth, and φf the azimuth of the facade’s normal, Eed is

the outdoor diffuse irradiance and Ees is the beam irradiance.

[Figure 3 about here.]

Figure 3 shows the horizontal illuminances plotted against Eev, conditioned on the sky

clearness category as above. However, again, no clear correlation can be discerned for any but the

cloudiest skies.

3.3. Fixed sun position

Figures 1 and 3 suggest that the sun’s position cannot be ignored. Let us therefore redo these

plots, selecting only those data points when the sun was not too far away from a given direction.

We select sun positions within a 5° angular diameter circle centered on elevation 30° and azimuth

190°.

[Figure 4 about here.]

The two figures shown under in 4, where different plotting symbols are used according to

the Perez clearness category of the sky, are encouraging, especially when plotting against Eev.

But they also indicate a problem in our data for skies of clearness category 1 (plotted as circles).

The Radiance extension program gendaylit is used by the Daysim program to generate

the luminance distribution of the sky for each data point. This program implements the Perez

All-Weather Sky Model (Perez et al., 1993) and takes as inputs the date, time, site coordinates,

and direct and diffuse irradiance values.

From our data, let us consider the two contiguous data points 468869 and 468870 given in

Table 2.

[Table 2 about here.]

6
Only one minute separates these two data points and the Eeg and Eed values are practically

identical, but there is a sharp discontinuity in the modeled illuminance on all sensor positions.

The first point is almost a sky of clearness category 1 ( < 1.065), and it is conceivable that

the internal algorithm of gendaylit did classify this sky as such. If this is true, then there could

be a discontinuity in the Perez model between skies of clearness category 1 and 2. This would

explain the sharp illuminance increase, and the apparent anomaly of ˜ = 1 skies in Figure 4.

When dealing with Radiance-generated data this model must therefore be fitted separately

to ˜ = 1 skies from the other skies. The result for a linear model against Eev is shown on

Figure 5. The correlation, in both cases, is now excellent.

[Figure 5 about here.]

4. Simplified daylight model for a given sun position

In the previous section we found that for a given position of the sun, the indoor illuminance could

be reasonably well predicted as being proportional to the vertical facade irradiance. For a

south-facing facade (azimuth 180°), this irradiance was given by Equation 3.

Ees, the beam irradiance, is given by

Ees = (Eeg − Eed)/ sin θ, (4)

and therefore Eev is a linear combination of Eeg and Eed. Equation 3 can be generalized as:

E = α Eeg + β Eed. (5)

cos φ cos φ
If E is indeed equal to η Eev, then by identification α = −η tan θ and β = η(1/2 + tan θ ).

When we fitted a linear model to skies of clearness category other than 1, we found that η = 44.6,

so we expect

E = 76.08Eeg − 53.78Eed. (6)

The results of fitting the model of Equation 5 to our data are given in Table 3.

[Table 3 about here.]

7
Or in other words, the 95% confidence intervals for the two coefficients are:

E = (79.4 ± 0.25)Eeg − (61.5 ± 0.49)Eed, (7)

which is not too far from what we would get if the illuminance were strictly proportional to the

vertical irradiance. Still, there is a significant mismatch, so this assumption is probably invalid.

[Figure 6 about here.]

Figure 6, where the relative residuals have been plotted against the fitted values, shows

that the relative residuals tend to be higher for lower illuminances, but 98% of the points are

within 10% relative error and 90% are within 5%. The fit may therefore be regarded as

satisfactory and better than with the model of Equation 2.

Early versions of this work were motivated by an attempt to model the indoor illuminance

E for a given geometry1 as a linear combination of direct horizontal irradiance Een and diffuse

horizontal irradiance Eed:

E = γ Een + δ Eed (8)

In fact, this relation is exact if the diffuse sky luminance is isotropic.

Many solarimeters measure Een or Eed, but seldom both. Een is a linear combination of

Eeg and Eed, and we have chosen to adopt the convention derived above:

E = α Eeg + β Eed (9)

This choice is arbitrary. We made it because our solarimeter (Delta-T Devices Ltd, 2006)

measures global and diffuse radiation.

Formally, we are fitting an overdetermined linear model. If we make N observations for the

same or similar geometries but different irradiance values, and introduce an  term to account for

1 We define a “geometry” as a scene where the positions of every object is fixed. In particular, any blinds’ settings
are fixed, as is the sun’s position. The sky’s direct and diffuse irradiance are free variables.

8
measurement and systematic errors, we can then write:

E1 = α Eeg1 + β Eed1 + 1

E2 = α Eeg2 + β Eed2 + 2
..
.

EN = α EegN + β EedN + N

This can more conveniently be written in matrix form:

E = E × ψ + ,

where E is the vector of illuminance observations, E is a n × 2 matrix with the irradiance

measurements, ψ is a 2-element vector with the fitted parameters α and β, and  is the vector of

errors.

Our goal is to find the 2-element vector ψ̂ which minimizes the norm of  (least-squares

solution). Assuming that the 2 × 2 matrix ET E is of full rank and therefore invertible, and that

the errors are normal, the solution is given by:

ψ̂ = (ET E)−1 ET E, (10)

which is one way that this model could be implemented in an embedded daylight controller.

5. Validation

In this section we use our simulated data to validate the model proposed above. It was shown to

yield appropriate results for all kinds of skies with the sun in a given position; we must now

verify if it works for other directions of the sun and for different sets of data.

5.1. Half-year training data

In this subsection we will predict the illuminances from July to December, using only the

January to June data for training. At each time step, we select from the first half year the data

points with a similar sun position and a similar sky clearness category. From these points, we

9
derive α and β, and predict the illuminance.

[Figure 7 about here.]

Figure 7 shows the predicted against the simulated horizontal illuminance. The correlation

is excellent (R2 = 0.98).

5.2. Progressive learning

How fast does the model learn? If the model is to be used in a daylight controller at all it must

learn reasonably fast. A controller that has to wait half a year before making precise predictions

is not useful.

In this section we will let the model predict the horizontal illuminance every hour, based

exclusively on data older than at least a week. On 1 February, for example, only the data up to

21 January may be used to predict the illuminance.

[Figure 8 about here.]

[Figure 9 about here.]

[Figure 10 about here.]

Figure 8 shows the predicted against simulated horizontal illuminances on a logarithmic

scale during the simulated year. The correlation is excellent (R2 = 0.99). Figure 9 shows how the

relative residuals evolve over time. One would naı̈vely expect them to be greatest in amplitude

during the first months and then gradually decrease as the algorithms learns better and better,

but instead of that they do not really improve over time. They are worst in spring and autumn,

and very good in summer and winter.

A possible explanation for this is given by Figure 10, where the number of datapoints used

at each timestep is plotted against time. The slope of the sun’s trajectory in the sky is not

constant over the year; it is greater during spring and autumn than in summer or winter.

Therefore, when predicting the illuminance on a spring day, the model has more difficulties

finding previous similar days than in summer because the sun has less often crossed that sky

patch. In summer and winter, the sun’s trajectories in the sky lie very close to one another and

the model is better at finding previous similar situations.

Note, however, that these observations hold only for the first year of operation. After a full

year of learning, the model should be much more accurate.

10
5.3. West-facing facade and venetian blinds

In this section we will carry out the same validation as in the preceding one, but for two different

situations. First for a west-facing facade orientation, and then for a south-facing facade protected

with venetian blinds fully lowered with slats in a horizontal position.

The predicted v. real illuminances scatterplots are given in Figure 11, where they are also

compared with the plot already given in Figure 8. In all cases, the correlation is excellent and the

predicted values agree well with the real ones. The case with venetian blinds performs the least

well, probably because of the increased complexity.

[Figure 11 about here.]

[Figure 12 about here.]

Histograms of the three simulations’ relative residuals are given in Figure 12. There is no

readily apparent difference between the three cases, and the model is quite able to predict the

horizontal illuminance in all situations.

6. Implementation in a daylight controller

A daylight controller has been developed at LESO-PB, that implements the ideas presented in

this paper. Its detailed design is beyond the scope of this paper, but an important design decision

was to decouple the implementation of the control algorithm from the interface to the building

automation system. In fact, these two elements run in two separate processes, possibly on two

different machines with different operating systems.

This design decision makes it easy to test the daylight controller against a simulation

program that masquerades as a real automated building. We have extended the Simbad building

simulation software mentioned above in such a way that our daylight controller can run against it.

One element of this controller is a data acquisition (DAQ) module, programmed to run

only on weekends and to stop immediately if a user is detected. After sunrise, it iterates

sequentially through the blinds’ positions and slat angles. The positions are discretized in steps

of 20% of the total window opening, and the slat angles are discretized in steps of 10%. The

illuminance sensors in the LESO-PB offices write out their measured values about once every

40 s, so the DAQ module waits for two minutes before recording the illuminance measured by the

illuminance sensors. It stops at sunset.

11
On each cycle, the blinds thus move through 66 different positions (6 positions Ö11 slat

angles). A complete cycle, allowing for two minutes at each step, takes thus about two hours real

time. The initial position and slat angle at each cycle are chosen randomly to prevent bias.

The results are stored in a text file. On each line we record the date, the time, Eeg, Eed,

the blinds’ position and slat angle and the illuminance measurements.

Another module of the controller is responsible for predicting the horizontal illuminance

for arbitrary blinds’ settings and arbitrary Eeg and Eed values. It does this by following the

method presented in this paper.

At any timestep, the controller builds its model only from the data it was allowed to

collect during the weekends up to that timestep. It begins the year with an empty data file, and

begins collecting data on Sunday 1 January 2006.

A third module of the controller is the optimizer. It is responsible for sending actual

commands to the blinds and to the artificial lighting2 . Every five minutes realtime, it models the

illuminance of the office and explores the different blinds’ settings and artificial illuminance,

seeking to minimize a given cost function. If a new situation can be found, whose cost function is

significantly lower than that of the current situation, then the new settings are applied to the

blinds and the artificial lighting. The controller should not annoy a real user with too frequent

blinds movements, and will wait at least 15 minutes between two successive blinds movements.

(Note that this is not good enough for a succesful commercial daylight controller. Sky conditions

can show variability on shorter timescales than 15 minutes and a commercial controller must be

able to react to sudden glare.)

Our prescription to the controller will be to maintain a 500 lx horizontal workplane

illuminance throughout the year, even at night (with artificial lighting). We do so because there

are times during some days in the year when it is impossible to obtain 500 lx with daylight alone,

and it would be wrong to retain these situations in the assessment of the controller’s

performance. So we must recognize when these cases happen, and the best way is to let the

controller complement daylight with artificial lighting if need be, and later in the analysis exclude

these cases when the artificial lighting was not zero.

The cost function will include a smooth, derivable function of Eh , the horizontal workplane
−500 2
illuminance, with a minimum at 500 lx. Our suggestion is Eh500

. We also want the controller

to favour daylight over artificial illuminance, so we add an small arbitrary term proportional in
2 TheSimbad-based simulator developed during the Ecco-build project includes a model of a lighting fixture. It
provides between 0 and 780 lx on the horizontal workplane. The controller knows the coefficient between the
applied power and the provided illuminance.

12
el, the fraction between 0 and 1 of power applied to the lighting fixture. el must be multiplied by

a weight, that should be large enough to prevent the controller from using artificial lighting when

daylight could be enough but small enough that the resulting illuminance at night be close to

500 lx. A weight of 0.1 satisfies these conditions. The complete cost function is

 2
Eh − 500
f (Eh , el) = + el × 0.1 (11)
500

The illuminance distribution on weekdays, when the controller believed no artificial

illuminance was needed to maintain 500 lx, is given in Figure 13. The distribution is clearly

centered around 500 lx, but is this attributable to the controller or is it the natural illuminance

distribution with an arbitrary blinds’ settings?

[Figure 13 about here.]

To answer this question, we give in Figure 14 the same illuminance distribution as in

Figure 13, but plotted in a logarithmic scale and compared with the illuminance distributions

over the complete year for the same points in time in the same office with, in the first case,

venetian blinds completely down and horizontal (open) slats, and in the second case, venetian

blinds completely open.

[Figure 14 about here.]

There is an obvious effect attributable to the controller’s presence. The illuminance

distribution is much narrower and clearly centered on 500 lx, and the two top panels show that

this is not a naturally occuring condition.

Excluding illuminance values below 10 lx, the sample standard deviation of the logarithm

of the illuminance without a controller present are 0.43 and 0.48 respectively. With the controller

present, the sample standard deviation narrows down to 0.219. If the parent population is

normally distributed (it almost certainly is not, because the sample population is not), and

remembering that we took the logarithm of the illuminance values, this means that the controller

keeps the horizontal workplane illuminance on average at 503 lx, with 95% confidence intervals

between 187 and 1351 lx. This is good enough for most commercial applications.

The last point we would like to investigate is the bin with low illuminance values on the

lower panel of Figure 14. It corresponds to situations where the controller was mistaken,

probably because of insufficient training data. To test this hypothesis, we show in Figure 15 how

13
the daylight illuminance distribution varied on a monthly basis. The low illuminance values

correspond exclusively to situations in February and March where the controller was mistaken.

This is expected, because these months are early in the year when the controller has not yet

acquired sufficient training data. They are lacking in January because this was a month during

which the controller often did not have enough data to model the daylight at all, in which case it

was programmed to do nothing. The controller’s performance for the rest of the year is

satisfactory.

[Figure 15 about here.]

7. Conclusion

We have developed a simplified daylight model that models indoor illuminances as a linear

combination of outdoor global illuminance and outdoor diffuse illuminance, for a given position of

the sun and for a given blinds’ settings. The model needs previously recorded measurements of

illuminances, blinds’ settings and sun positions.

We have validated this model on a Radiance model of an office with a south-facing window

in Brussels, first by modeling indoor illuminances between July and December with training data

between January and June (correlation R2 = 0.98), and then by progressively modeling the hourly

illuminances in the year using data at least one week old. The progressive modeling has also been

carried out on the same office but facing west, and facing south with venetian blinds covering the

window. In all cases the correlation was found to be excellent (R2 = 0.99, 0.99, 0.98 respectively).

We have developed a prototype controller that implements this model, and is programmed

to adjust the blinds so the indoor illuminance is kept close to 500 lx. The controller records

illuminance data only during the weekends. It was found to have a statistically significant effect

on the resulting illuminance distribution.

This controller has now also been implemented on an occupied office in the LESO-PB

building and is undergoing field trials.

Acknowledgments

We thank Jean-Louis Scartezzini, Antoine Guillemin, Jessen Page and Darren Robinson for

carefully reviewing this paper and providing the author with their helpful comments and

criticisms.

14
We thank Jan Wienold from the Fraunhofer Institute for Solar Energy for providing the

Radiance data sets used to develop this model. He has also kindly provided the Radiance data

files necessary to model the simulated office.

We thank Christoph Marty and Sif Khénioui from Ingélux (Lyon, France), the principal

developers of the Simbad extension for daylight described in this paper.

A. Appendix

A.1. Source code

This paper was produced with the Sweave literate programming tool bundled with R (R

Development Core Team, 2004). In this section we give the R code that was used to carry out

the data-analysis and produce the plots in this paper. The code is written in a series of code

“chunks”, each of which is a logical unit usually responsible for the output of one graph. The

complete analysis can be reconstructed by executing this code. The original data is available

upon request from the corresponding author.

###################################################
### chunk number 1:
###################################################
# First clean up
remove(list = ls())
options(width=80)
options(digits=3)
library(lattice)
library(MASS)
library(xtable)
library(leso)
ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme
ltheme$strip.background$col <- "transparent" ## change strip bg
lattice.options(default.theme = ltheme) ## set as default
trellis.device("pdf",color=FALSE)
#library(weaver) not run, but remember to run it before sweaving with
#Sweave("foo.Rnw", driver=weaver())

###################################################
### chunk number 2:
###################################################
# Define functions for reading data, etc

# Make a yearly timeserie in steps of one minute


timeserie <- function(by="1 min",...) {
times <- seq.POSIXt(from = as.POSIXct("2006-01-01 00:00:30"),
by = by,
to = as.POSIXct("2006-12-31 23:59:30"))
return(times)

15
}

# Read an illuminance data file produced by Jan


read.illum <- function(file, ...) {
data <- scan(file) # faster than read.table
data <- matrix(data, ncol = 8, byrow = T)
data <- data[,4:dim(data)[2]] # strip date information, we build a
# timeserie later
times <- timeserie()
dataframe <- data.frame(times,
data)
names(dataframe) <- c("time", "rightWall", "eastWall",
"rightEye", "leftEye", "horiz")
return(dataframe)
}

# Read a weather data file


read.weather <- function(file, ...) {
data <- scan(file)
data <- matrix(data, ncol = 11, byrow = T)
data <- data[,4:dim(data)[2]] # strip date information, we build a
# timeserie later
times <- timeserie()
dataframe <- data.frame(times,
data)
names(dataframe) <- c("time", "Eev", "Eeg", "Eed", "sunAngle",
"sunDetection", "temperature", "sunAltitude",
"sunAzimuth")
dataframe$sunAltitude <- dataframe$sunAltitude * 180 / pi
dataframe$sunAzimuth <- dataframe$sunAzimuth * 180 / pi
sunDetection.ecco <- as.numeric(dataframe$Eeg/dataframe$Eed > 1.25 &
dataframe$Eeg > 24)
dataframe$sunDetection.ecco <- sunDetection.ecco
return(dataframe)
}

### Combine an illuminance and a weather file into a single data frame
read.data <- function(file.ill, file.weather, ...) {
illum <- read.illum(file.ill)
weather <- read.weather(file.weather)
data <- data.frame(weather, illum[-1])

## I don't trust the sun positions given in the Weather Database files
## so I compute them myself.
sunPositions <- with(as.POSIXlt(data$time, "GMT"),
sunPosition(year+1900, mon+1, mday, hour, min,
sec, lat = 50.87, lon = 4.37)) # Brussels: 50°52'N, 4°22'E
data <- cbind(data, sunPositions)

## Direct beam irradiance


data$Ees <- ifelse(data$elevation >= 10,
(data$Eeg - data$Eed) / sin(data$elevation * pi / 180),
0)

## Facade normal irradiance


data$Eev <- with(data,
Eed / 2 + Ees * cos(elevation * pi / 180) *
cos(azimuth * pi / 180 - pi))

16
data$Eev[data$Eev < 0] <- 0

## Clearness and clearness category


data$clearness <- with(data, clearness(Eed, Ees, 90 - elevation))
data$clearness.cat <- as.factor(e.category(data$clearness))

data
}

## A function to read .mat files produced by the SIMBAD simulator


read.simbad <- function(file, ...) {
require(R.matlab)
names <- c("Seconds",
"Month",
"Day",
"Hours",
"Minutes",
"Occupancy",
"Lumiere",
"Force",
"VDP",
"IndoorTemp",
"SolarGains",
"DaylightIlluminance",
"ArtificialIlluminance",
"TotalElectricalConsumption",
"TotalIlluminance",
"FractionBlindsOpen",
"FractionSlatsOpen",
"CoolingFlux")
mat <- readMat(file)$HVAC
mat <- as.data.frame(t(mat))
names(mat) <- names
mat
}

###################################################
### chunk number 3: ceremony
###################################################
data <- read.data("DataBase/illum_v001_90_66_N.ill",
"DataBase/Weather DataBase/BrusselSouth.txt")

###################################################
### chunk number 4:
###################################################
point <- 300000 # sometime in July

###################################################
### chunk number 5:
###################################################
## A function that prints the strips with the tilde(epsilon) symbol correctly.
strip.sky.cat <- function (which.panel, factor.levels, ...) {
names <- substitute(expression(tilde(epsilon)==which),
list(which=which.panel))
strip.default(factor.levels=rep(eval(names),8),

17
which.panel=which.panel,
...)
}

plot.df <- with(data[data$elevation > 10,],


xyplot(horiz ~ Eeg | clearness.cat, pch = ".", cex=2,
panel = function (x,y,...) {
samp <- sample(1:length(x), min(5000, length(x)))
panel.abline(lm(y ~ x + 0))
panel.xyplot(x[samp], y[samp], ...)
},
strip = strip.sky.cat,
ylab = "Horizontal illuminance [lx]",
xlab = expression(paste("Eeg [", W/m^2, "]"))
)
)

###################################################
### chunk number 6:
###################################################
print(plot.df)

###################################################
### chunk number 7:
###################################################
df <- lm(horiz ~ Eeg, data, subset= elevation > 10)
## plot(df, which = 1, pch = ".", cex = 2, id.n = 0,
## panel = function(x, y, ...) {
## samp <- sample(1:length(x), 5000)
## points(x[samp], y[samp], ...)
## panel.smooth(x, y, pch = "")
## })
dflm <- xyplot(residuals ~ fitted.values,
df,
pch = ".", cex = 2,
panel = function(x, y, ...) {
samp <- sample(1:length(x), 5000)
panel.points(x[samp], y[samp], ...)
panel.loess(x, y, col="red")
},
ylab = "Residuals [lx]",
xlab = "Fitted values [lx]"
)
print(dflm)

###################################################
### chunk number 8:
###################################################
plot.eev.df <- with(data[data$elevation > 10,],
xyplot(horiz ~ Eev | clearness.cat, pch = ".", cex=2,
panel = function (x,y,...) {
samp <- sample(1:length(x), min(5000, length(x)))
#samp <- 1:length(x)
panel.abline(lm(y ~ x + 0))
panel.xyplot(x[samp], y[samp], ...)

18
},
strip = strip.sky.cat,
ylab = "Horizontal illuminance [lx]",
xlab = expression(paste("Eev [", W/m^2, "]"))
)
)

###################################################
### chunk number 9:
###################################################
print(plot.eev.df)

###################################################
### chunk number 10:
###################################################
## Implementation of the Haversine formula for angular distances
haversine <- function(point.1, point.2) {
## Assume point.1 and point.2 to be lists with elements elevation and
## azimuth, both in degrees.
DEG2RAD <- pi / 180
## Follow Wikipedia's notation
theta.1 <- point.1$elevation * DEG2RAD
theta.2 <- point.2$elevation * DEG2RAD
delta.lambda <- (point.1$azimuth - point.2$azimuth) * DEG2RAD
sin.half.delta.altitude <-
sin((theta.2 - theta.1) / 2)
sin.half.delta.azimuth <-
sin(delta.lambda / 2)
result <-
2 * asin(sqrt(sin.half.delta.altitude *
sin.half.delta.altitude +
cos(theta.1) * cos(theta.2) *
sin.half.delta.azimuth *
sin.half.delta.azimuth)) /
DEG2RAD
result
}
## Example given in Wikipedia
stopifnot(all.equal(haversine(list(elevation=36.12,azimuth=-86.67),
list(elevation=33.94,azimuth=-118.4)),
25.95841,
tolerance=0.0001))

#joshua <- (data$elevation - 30) ^ 2 + (data$azimuth - 190) ^ 2 < 5


joshua <- haversine(data, list(elevation=30, azimuth=190)) < 2.5

###################################################
### chunk number 11:
###################################################
key.joshua.df <- list(title="Perez sky clearness category",
cex.title = 1,
points = list(pch = 1:8, col = "blue"),
text = list(as.character(1:8)),
corner = c(0,1),
x = .3,

19
y = .8,
)
plot.joshua.eev.df <- with(data[joshua,],
xyplot(horiz ~ Eev,
panel = function (x,y,groups,...) {
samp <- sample(1:length(x), min(5000, length(x)))
#samp <- 1:length(x)
panel.abline(lm(y ~ x + 0))
panel.xyplot(x[samp], y[samp],
pch = groups[samp],
...)
},
groups = clearness.cat,
key = key.joshua.df,
ylab = "Horizontal illuminance [lx]",
xlab = expression(paste("Eev [",
W/m^2, "]"))
)
)

###################################################
### chunk number 12:
###################################################
# sunAzimuth is missing between points 403921 and 404040 in BrusselSouth.txt
plot.joshua.df <- with(data[joshua,],
xyplot(horiz ~ Eeg,
panel = function(x, y, groups, ...) {
fit <- lm(y ~ x + I(x^2))
x.sort <- sort(x)
y.fit <- predict(fit, data.frame(x = x.sort))
panel.xyplot(x.sort, y.fit, type="l",
lwd=1, col="black")
panel.xyplot(x, y, pch = groups, ...)
},
cex = 1,
groups = clearness.cat,
ylab = "Horizontal illuminance [lx]",
xlab = expression(paste("Eeg [",
W/m^2, "]")),
key = key.joshua.df
)
)

###################################################
### chunk number 13:
###################################################
print(plot.joshua.df)

###################################################
### chunk number 14:
###################################################
print(plot.joshua.eev.df)

###################################################

20
### chunk number 15:
###################################################
xtable(format(data[468869:468870,c(1:4,11:15)]),
caption="Data points 468869 and 468870",
label="tab:datapoints")

###################################################
### chunk number 16:
###################################################
plot.joshua.eev.eps <- with(data[joshua,],
xyplot(horiz ~ Eev | clearness.cat != 1,
panel = function (x,y,...) {
fit <- lm(y ~ x + 0)
panel.abline(fit)
panel.text(300, 30000,
paste("E =",
format(coef(fit)[1], dig=4, ns=2), "* Eev"))
panel.xyplot(x, y, ...)
},
strip = function(factor.levels,...) {
strip.default(factor.levels =
expression(tilde(epsilon)==1,
tilde(epsilon)!=1),...)
},
ylab = "Horizontal illuminance [lx]",
xlab = expression(paste("Eeg [",
W/m^2, "]"))
)
)

###################################################
### chunk number 17:
###################################################
print(plot.joshua.eev.eps)

###################################################
### chunk number 18:
###################################################
ldm.fit <- lm(horiz ~ Eeg + Eed + 0, data = data, subset = joshua &
clearness.cat!=1, y=TRUE)
#summary(ldm.fit)

###################################################
### chunk number 19:
###################################################
xtable(ldm.fit, caption="Linear regression results on example data.", label="tab:ldmfit")

###################################################
### chunk number 20:
###################################################
print(xyplot(residuals(ldm.fit) / ldm.fit$y ~ fitted(ldm.fit),
xlab = "Fitted illuminance [lx]",
ylab = "Relative residuals"))

21
###################################################
### chunk number 21: half.validation
###################################################
# I put this in a separate function to 1) avoid clutter, 2) use the
# caching of weaver(). The complete run takes almost 5 hours.
run.half.validation <- function(select= 1:265020) {
# There are 260640 minutes in the first half year, minus 60 minutes because of DST
year.middle <- 260580
first.half <- 1:year.middle
second.half <- (year.middle+1):length(data$time) # 265020 points
data.first.half <- data[first.half,]
predict.illuminance <- rep(NA,length(second.half))
# Extract some vectors from our data, otherwise it's way too slow
test.elevation <- data$elevation[second.half]
test.azimuth <- data$azimuth[second.half]
test.eeg <- data$Eeg[second.half]
test.eed <- data$Eed[second.half]
test.clearness <- data$clearness.cat[second.half]
design.matrix <- cbind(data.first.half$Eeg, data.first.half$Eed)
response <- data.first.half$horiz
# Fit once and for all for sun below horizon
SUNSET <- 5
low.sun.fit <- lm(horiz ~ Eeg + Eed + 0, data = data.first.half,
subset = elevation < SUNSET)
predict.illuminance[test.elevation < SUNSET] <-
predict(low.sun.fit, list(Eeg=test.eeg[test.elevation < SUNSET],
Eed=test.eed[test.elevation < SUNSET]))

# Now loop over remaining points


for ( point in select ) {
if (point %% 600 == 1) cat(point, "\n")
if (test.elevation[point] < SUNSET) next

# Find similar sun positions


# Using * instead of ^ is significantly faster
joshua <- haversine(data.first.half,
list(elevation=test.elevation[point],
azimuth=test.azimuth[point])) < 2.5
if (test.clearness[point] == 1) {
joshua <- joshua & data.first.half$clearness.cat == 1
} else {
joshua <- joshua & data.first.half$clearness.cat != 1
}
if (sum(joshua) < 3) {
predict.illuminance[point] <- NA
} else {
ldm.fit <- lm.fit(design.matrix[joshua,],
response[joshua])
predict.illuminance[point] <-
ldm.fit$coefficients %*% c(test.eeg[point], test.eed[point])
}
#if (point == 88823) recover()
#if (abs(predict.illuminance[point] -data$horiz[second.half][point]) > 700) recover()
}
predict.illuminance
}

22
half.select <- seq(1, 265020, 60)
predict.half.illuminance <- run.half.validation(half.select)
real.half.illuminance <- data$horiz[(525600 -
length(predict.half.illuminance) + 1):525600]

###################################################
### chunk number 22:
###################################################
half.plot <-
xyplot(predict.half.illuminance[half.select] ~ real.half.illuminance[half.select],
panel = function(x,y,...) {
samp <- sample(1:length(x), min(1e3, length(x)))
panel.xyplot(jitter(x[samp]), jitter(y[samp]),...)
panel.abline(0,1)
},
## select =
## predict.half.illuminance[half.select] > 0 &
## real.half.illuminance[half.select] > 0, ,
ylab = "Predicted illuminance [lx]",
xlab = "Real illuminance [lx]",
scales =
list(log=TRUE,
at = c(1e2,1e3,1e4),
labels = expression(10^2, 10^3, 10^4))
)
print(half.plot)

###################################################
### chunk number 23:
###################################################
lm.half <- lm(formula =
log(predict.half.illuminance[half.select]) ~ log(real.half.illuminance[half.select]),
subset =
predict.half.illuminance[half.select] > 0 &
real.half.illuminance[half.select] > 0,
)
corr <- summary(lm.half)$r.squared
confint.half <- confint(lm.half)

###################################################
### chunk number 24: progressive
###################################################
run.progressive.validation <- function(select=seq(11, 525600, 10),
useClearness=TRUE, predict=TRUE,
data) {
illuminances=rep(NA, length(data[[1]]))
joshua.size=rep(NA, length(data[[1]]))
joshua.spot=rep(NA, length(data[[1]]))
design.matrix <- cbind(data$Eeg, data$Eed)
response <- data$horiz
elevation <- data$elevation
azimuth <- data$azimuth
joshua <- rep(FALSE, length(data[[1]]))
lag <- 1440 # One day lag

23
for ( point in select ) {
if (point < lag+1) next
if (point %% 11 == 0) cat(point, "\n")
joshua[1:(point-lag)] <- haversine(list(elevation=elevation[1:(point-lag)],
azimuth=azimuth[1:(point-lag)]),
list(elevation=elevation[point],
azimuth=azimuth[point])) < 2.5

# Treat clearness==1 cases differently


if (useClearness) {
if (data$clearness.cat[point] == 1) {
joshua[1:(point-1)] <- joshua[1:(point-1)] & data$clearness.cat[1:(point-1)] == 1
} else {
joshua[1:(point-1)] <- joshua[1:(point-1)] & data$clearness.cat[1:(point-1)] != 1
}
}

joshua.size[point] <- sum(joshua)

# Approximate area covered by joshua points


# joshua.spot[point] <- (max(elevation[joshua]) +
# min(elevation[joshua])) / 2 - elevation[point]

# Predict
if (predict) {
if (sum(joshua) < 3) {
illuminances[point] <- NA
} else {
ldm.fit <- lm.fit(design.matrix[joshua,],
response[joshua])
# recover()
illuminances[point] <-
ldm.fit$coefficients %*% c(data$Eeg[point], data$Eed[point])
}
}
}
predictions <- data.frame(illuminances,
joshua.size,
# joshua.spot,
residuals=response-illuminances)
predictions
}

noon <- seq(721,525600,1440)


hours <- seq(1,525600,60)
hours <- hours[data$elevation[hours] > 10]
prog.predict <- run.progressive.validation(hours, data=data)

###################################################
### chunk number 25:
###################################################
print(xyplot(prog.predict$illuminances[hours] ~ data$horiz[hours],
panel = function(...) {
panel.xyplot(...)

24
panel.abline(0,1)
},
xlab = "Real illuminance [lx]",
ylab = "Predicted illuminance [lx]",
scales =
list(log=TRUE,
at = c(1e2,1e3,1e4),
labels = expression(10^2, 10^3, 10^4))))

###################################################
### chunk number 26:
###################################################
print(xyplot(prog.predict$residuals[hours] / data$horiz[hours] ~ data$time[hours],
scales=list(x=list(format="%b",at=timeserie("1 month"))),
xlab = "Time",
ylab = "Relative residuals")
)

###################################################
### chunk number 27:
###################################################
print(xyplot(prog.predict$joshua.size[hours] ~ data$time[hours], type="l",
scales=list(x=list(format="%b",at=timeserie("1 month"))),
xlab = "Time",
ylab = "Number of datapoints")
)

###################################################
### chunk number 28: westprogressive
###################################################
data.west <- read.data("DataBase/illum_v002_90_66_N.ill",
"DataBase/Weather DataBase/BrusselWest.txt")
prog.predict.west <- run.progressive.validation(hours, data=data.west)

###################################################
### chunk number 29: vbprogressive
###################################################
data.vb <- read.data("DataBase/illum_v001_0_0_N.ill",
"DataBase/Weather DataBase/BrusselSouth.txt")
prog.predict.vb <- run.progressive.validation(hours, data=data.vb)

###################################################
### chunk number 30:
###################################################
ill.south <- data.frame(predicted.illuminance=prog.predict$illuminances[hours],
real.illuminance=data$horiz[hours],
case="South-facing, no blinds")
ill.west <- data.frame(predicted.illuminance=prog.predict.west$illuminances[hours],
real.illuminance=data.west$horiz[hours],
case="West-facing, no blinds")
ill.vb <- data.frame(predicted.illuminance=prog.predict.vb$illuminances[hours],
real.illuminance=data.vb$horiz[hours],

25
case="South-facing, venetian blinds,\nhorizontal slats")
ill.three <- rbind(ill.south, ill.west, ill.vb)
three.plot <- with(ill.three,
xyplot(predicted.illuminance ~ real.illuminance | case,
subset = predicted.illuminance > 0 &
real.illuminance > 0,
panel = function(x,y,...) {
panel.xyplot(x,y,...)
panel.abline(0,1)
fit <- lm(y~x)
corr <- format(summary(fit)$r.squared, digits=4)
panel.text(2,4,substitute(R^2== corr, list(corr=corr)))
# expression(paste(R^2=, corr)))
},
par.strip.text = list(lines=2.5),
xlab = "Real illuminance [lx]",
ylab = "Predicted illuminance [lx]",
scales =
list(log=TRUE,
at = c(1e2,1e3,1e4),
labels = expression(10^2, 10^3, 10^4))
)
)
print(three.plot)

###################################################
### chunk number 31:
###################################################
all.residuals <- c(prog.predict$residuals[hours] / data$horiz[hours],
prog.predict.west$residuals[hours] / data.west$horiz[hours],
prog.predict.vb$residuals[hours] / data.vb$horiz[hours],)
meta.residuals <- data.frame(Residuals=all.residuals,
Simulation=c(rep("South-facing, no blinds",length(hours)),
rep("West-facing, no blinds",length(hours)),
rep("South-facing, venetian blinds,\nhorizontal slats",length(hours))))

###################################################
### chunk number 32:
###################################################
print(histogram(~ Residuals | Simulation,
data=meta.residuals[abs(meta.residuals$Residuals)<1,],
nint=20,endpoints=c(-1,1),
index.cond=list(c(1,3,2)),
par.strip.text = list(lines=2.5),
xlab = "Relative residuals"))

###################################################
### chunk number 33: load.simbad
###################################################
filename <- "simulation_runs/2007-01-08T1700.mat"
data.simul <- read.simbad(filename)
weather <- read.weather("DataBase/Weather DataBase/BrusselSouth.txt")
data.simul <- cbind(data.simul, weather[1:length(data.simul[[1]]),])
data.simul <- data.simul[-length(data.simul[[1]]),]

26
###################################################
### chunk number 34: reference
###################################################
ill.0.0 <- read.illum("DataBase/illum_v001_0_0_N.ill")
ill.90.66 <- read.illum("DataBase/illum_v001_90_66_N.ill")

###################################################
### chunk number 35:
###################################################
hist.simul.ill <- histogram(~TotalIlluminance, data.simul, breaks=seq(0,40000,50), xlim=c(0,3000),
subset=(ArtificialIlluminance<10 & as.POSIXlt(time)$wday %in% 1:5 ),
type="count",
xlab = "Illuminance [lx]"
)

###################################################
### chunk number 36:
###################################################
print(hist.simul.ill)

###################################################
### chunk number 37:
###################################################
#xyplot(TotalIlluminance ~ time, data, type="l",
#xlim=c(as.POSIXct("2006-01-11"), as.POSIXct("2006-01-12")),
# ylim=c(0,1500))
select.daylight.enough <-
with(data.simul,
ArtificialIlluminance<10 &
as.POSIXlt(time)$wday %in% 1:5
)

ill.simul <- with(data.simul,


TotalIlluminance[select.daylight.enough])
all.ill <- data.frame(illuminance=ill.simul, origin=rep("Algorithm",length(ill.simul)))
all.ill <- rbind(all.ill,
data.frame(illuminance=ill.0.0$horiz[select.daylight.enough],
origin=rep("Horizontal slats",length(ill.0.0$horiz[select.daylight.enough]))))
all.ill <- rbind(all.ill,
data.frame(illuminance=ill.90.66$horiz[select.daylight.enough],
origin=rep("Retracted blinds",length(ill.90.66$horiz[select.daylight.enough]))))

all.histo <- histogram(~(illuminance+1)|origin, all.ill,


layout=c(1,3),aspect=1,
ylim=list(c(0,45),c(0,25),c(0,25)),
scales=list(
x=list(log=TRUE,
labels = expression(NULL, 10^0, NULL, 10^2, NULL,
10^4)),
y=list(relation="free")),
panel = function(...) {
panel.histogram(...)
panel.abline(v=log10(500))
},

27
nint = 21,
xlab = "Horizontal illuminance [lx]")

###################################################
### chunk number 38:
###################################################
print(all.histo)

###################################################
### chunk number 39:
###################################################
controller.sd <- sd(log10(ill.simul[ill.simul>10]))
controller.mean <- 10**mean(log10(ill.simul[ill.simul>10]))

###################################################
### chunk number 40:
###################################################
hist.simul.ill.month <-
histogram(~(TotalIlluminance+1)|months(time), data.simul,
subset=(ArtificialIlluminance<10 & as.POSIXlt(time)$wday %in% 1:5 ),
type="count", index.cond=list(c(5,4,8,1,9,7,6,2,12,11,10,3)),
scales=list(x=list(log=TRUE,
labels = expression(NULL, 10^0, NULL, 10^2, NULL, 10^4))),
panel = function(...) {
panel.histogram(...)
panel.abline(v=log10(500))
},
xlab = "Horizontal illuminance [lx]"
)

###################################################
### chunk number 41:
###################################################
print(hist.simul.ill.month)

###################################################
### chunk number 42:
###################################################
Stangle("daylightsystemidentification.Rnw")

References

Denis Bourgeois, Christoph Reinhart, and Iain Macdonald. Adding advanced behavioural models

in whole building energy simulation: a study on the total energy impact of manual and

automated lighting control. Energy and Buildings, 38:814–823, 2006.

28
CIE70. Daylight. Technical report, Commission Internationale de l’Eclairage, 1970.

Delta-T Devices Ltd. Sunshine sensor BF3, 2006. URL

http://www.delta-t.co.uk/products.html?product2005092016583. Last checked 23

october 2006.

Michelle Foster and Tadj Oreszczyn. Occupant control of passive systems: the use of Venetian

blinds. Building and Environment, 36:149–155, 2001.

Antoine Guillemin. Using Genetic Algorithms to Take into Account User Wishes in an Advanced

Building Control System. PhD thesis, LESO-PB/EPFL, 2003.

Greg Ward Larson and Rob Shakespeare. Rendering with Radiance, revised edition. Space &

Light, 2003.

Matthew Luckiesh and Frank K. Moss. The science of seeing. D. Van Nostrand Company, Inc.,

1937.

METEONORM06. Meteonorm 5.x, 2006. URL http://www.meteotest.ch/en/mn_home. Last

checked 20 October 2006.

Richard Perez et al. All-weather model for sky luminance distribution—preliminary configuration

and validation. Solar Energy, 50(3):235–245, 1993.

R Development Core Team. R: A language and environment for statistical computing. R

Foundation for Statistical Computing, Vienna, Austria, 2004. URL

http://www.R-project.org.

Christoph Reinhart. Daysim, 2006. URL

http://irc.nrc-cnrc.gc.ca/ie/lighting/daylight/daysim_e.html. Last checked 20

October 2006.

D. Robinson and A. Stone. Solar Radiation Modeling in the Urban Context. Solar Energy, 11:

295–309, 2004.

SIMBAD06. Simbad, 2006. URL http://kheops.champs.cstb.fr/Simbadhvac/. Last checked

20 October 2006.

29
List of Figures
1. Horizontal illuminance v horizontal irradiance conditioned on Perez’s sky clearness
categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2. Residuals v fitted values for the daylight factor model. . . . . . . . . . . . . . . . . 32
3. Horizontal illuminance v vertical irradiance conditioned on Perez’s sky clearness
categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4. Horizontal illuminance against Eeg and Eev for a given sun position. . . . . . . . . 34
5. Linear fit of horizontal illuminance against vertical facade irradiance. . . . . . . . . 35
6. Relative residuals v fitted values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7. Predicted July–December hourly illuminances, using only January–June data. . . . 37
8. Predicted v real illuminances during progressive learning . . . . . . . . . . . . . . . 38
9. Relative residuals during progressive learning . . . . . . . . . . . . . . . . . . . . . 39
10. Number of points retained for illuminance modeling over the year during progressive
learning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11. Predicted v real illuminances during progressive learning for three different cases. . 41
12. Relative residuals for the three simulations. . . . . . . . . . . . . . . . . . . . . . . 42
13. Illuminance distribution with daylight controller when daylight was sufficient. . . . 43
14. Illuminance distribution with or without daylight controller. . . . . . . . . . . . . . 44
15. Illuminance distribution with daylight controller, per month. . . . . . . . . . . . . 45

30
0 200 600 1000
~
ε =7 ~
ε =8
50000
40000
30000
20000
10000
0
Horizontal illuminance [lx]

~
ε =4 ~
ε =5 ~
ε =6
50000
40000
30000
20000
10000
0
~
ε =1 ~
ε =2 ~
ε =3
50000
40000
30000
20000
10000
0

0 200 600 1000 0 200 600 1000

Eeg [W m2]

Figure 1: Horizontal illuminance v horizontal irradiance conditioned on Perez’s sky clearness cate-
gories. The best-fitting linear model is shown as a straight line in each panel. Not more
than 5000 randomly chosen points are shown on each panel.

31
40000

30000
Residuals [lx]

20000

10000

−10000

0 5000 10000 15000


Fitted values [lx]

Figure 2: Residuals v fitted values for the daylight factor model. The solid line is obtained by
smoothing the scatterplot.

32
0 200 400 600 800
~
ε =7 ~
ε =8
50000
40000
30000
20000
10000
0
Horizontal illuminance [lx]

~
ε =4 ~
ε =5 ~
ε =6
50000
40000
30000
20000
10000
0
~
ε =1 ~
ε =2 ~
ε =3
50000
40000
30000
20000
10000
0

0 200 400 600 800 0 200 400 600 800


2
Eev [W m ]

Figure 3: Horizontal illuminance v vertical irradiance conditioned on Perez’s sky clearness cate-
gories. Not more than 5000 randomly chosen points are shown on each panel.

33
40000

Perez sky clearness category


● 1
30000 2
3
Horizontal illuminance [lx]

4
5
6
7
8
20000

10000
●●

● ● ●●
●●
● ●
●●

●●●

●●●

●●
●●● ●

●●

●●

●●

●●

●●●
●●
● ●
●●●
● ● ●● ●
●●● ●●
0

0 100 200 300 400 500 600

Eeg [W m2]

(a) Eeg

40000

Perez sky clearness category


● 1
30000 2
3
Horizontal illuminance [lx]

4
5
6
7
8
20000

10000
●●


●●


●●●



●●



●●


●●

●●


●●●
●●

● ●●
●●

0 ●

0 200 400 600 800


34 2
Eev [W m ]

(b) Eev
0 200 400 600 800
~
ε =1 ~
ε ≠1
40000 ● ●

● ●
● ●●
●●
● ● ●●


●●


●●


●●
●●
● ●


●● ●
● ●



30000 E = 24.12 * Eev E = 45.01 * Eev ●●


Horizontal illuminance [lx]

●●



●●
●●
● ●●
●●
●●●●

●●
● ●

● ●
●●
20000 ●

●●●●
●●

●●


●●
●●●



●●●●

●●
●●●



●●

●●


●●
●●
●●


●●●



●●

●●

●●●●
●●

●●
●●●
●●



●●
●●

● ●

●●
●●


●●●

●●
●●
●●
10000 ●●

●●

● ●●

● ●

●●●
●●








●●

●●


●●


●●


●●
●●●



0

0 200 400 600 800

Eeg [W m2]

Figure 5: Linear fit of horizontal illuminance against vertical facade irradiance, for clearness cate-
gory 1 skies (left panel) and other skies (right panel).

35
0.08



●●


0.06 ●●

● ●
●●●
●●




●● ● ●
0.04 ●● ●
● ●
Relative residuals

● ●


● ●

● ● ● ●

● ●●●● ●
● ● ●
0.02 ●●
● ● ●


●●


● ●

● ● ●●● ●
● ●
● ● ●
● ●● ●●
● ●●
●●
● ●
● ●● ● ●●
● ●● ●●

●● ●
● ●●
●● ● ●● ● ●●● ● ● ●●
● ●
●● ● ● ●
● ● ●● ●●● ● ● ●● ●

● ● ●● ● ●
● ● ●● ● ●●
0.00 ●
●● ●
● ●● ●
●● ● ●

● ●
● ● ●●● ●●● ● ●

● ● ● ● ● ● ●
● ●● ● ● ●● ●●
● ● ● ●●●
● ● ● ●
● ●
●●● ●●●
● ● ● ●● ●
● ● ● ●


● ● ● ● ● ●● ●
●●
● ●

● ●
● ● ●●

● ● ●●
● ● ● ● ●

● ●●● ●● ● ●● ●●
● ●● ● ● ●
● ● ●●
−0.02 ●● ● ● ● ● ●●
● ●● ● ● ●

● ●●
● ●
● ● ●


10000 20000 30000 40000


Fitted illuminance [lx]

Figure 6: Relative residuals v fitted values

36
● ●
●●
●●●
●●

●●●●
●●
●●●
●● ●

●● ●



●●
● ●
●●

●●

● ●● ●
104 ●
●●
●●●●

● ●
●●●
●●●
●● ● ●

●●


●●● ●
●●●●
●●

●●
● ●

●●
Predicted illuminance [lx]

●●●●

● ●●
●●


●●


● ●●

●●
●●
●●


● ●
●●

●●




●●●
● ●
●●



●●● ●
●●
●● ●

●●●

●●



●●

●●

●●
●●


●●


●●

●●
103 ● ●● ●
●●
●●




●●





●●

●●

●●

● ●●●
●●
●●
●●

●●●
●●


●●
●●●●

● ●●●●●●

● ●●●
● ●


●●
●●●●

●●●●
● ●●

●●●●●●
●● ●● ●
●●
●●●●● ●

●●●
●●
● ●
●● ●●
● ● ● ●
●●●

●● ●
102 ●
●● ●
●●

● ● ●
● ● ●






●● ●●

102 103 104


Real illuminance [lx]

Figure 7: Predicted July–December hourly illuminances, using only January–June data. 1000 ran-
domly chosen points are shown out of the 4417 simulated points. Notice the logarithmic
scale.

37

●●
●●



●●

●●
●●


●●

●●



●● ●

●●●
● ●●
●●●●

●●
●●

●●
●●








●●●●●


●●
● ●

●●


●●
●●●●●

●●

●●
● ● ●
● ●●
●●

●●●
●● ●
● ●●●
●●
●●
●●

●●

●●



●● ●
● ●●
●●●●
● ●● ● ●
●●


●●


●●


104 ●
●● ●
●●● ●
● ●●●●








●●



















●●

●●


●● ● ●●●
●●●
●●

●●●
●●
● ●● ●

●●
●●●


●●●● ●●●●●



●●●
●●●● ●
●●
●●

●●



●●

●●


●●●
●●
●●


●●●
●●●●

●●








●●












●●●●

●●●●


●●


●●

●●● ●
●●●
●●





●●



●●



●●●
Predicted illuminance [lx]


●●


●●

●●


●● ●●
●● ●


●●










●●

●●●

●●

●●



●●


●●●●●


●●



●●



●●

●●●




●●





●●



●●●
●●●

















●●








●●●●●●

●●●

●●


●●





●●


●●

●●●●
●●
●● ●●
● ●●
●●









●●●
●●


● ●
●●
●●



●●

● ●
●● ●
●●●●
●●

●●














●●●





●●● ●
● ● ●●

●●



●●






●●


●●

●●



●●


●●

●●
● ●
103 ●● ●●●

●●








●●










































●●
●●●
● ●
●●
●●


●●



●●



●●

●●

●●●●


●●




●●


●●

●●
●●
●●


●●
●●


●●

●●●


●●

●●



●●




●●




●●




● ● ●
●●●

●●




●●


●●


●● ●
● ●●

●●

●●


●●


●●
●●

●●


●●

●●


●●



●●


●●


●●

●●


●●

●●
●● ● ●
●●
●●
●●


●●●



●●

● ●●


●●

●●

●●●●
●●
●●
● ●●


●●

●●

●●●

●●


●●

● ●●
●●


●●● ●
●● ●
●●


●●●

●●

●●


●●

●●
● ●●

●●

●●


●●
●●
●●●●●



● ●

●●●●●●●

●●

●●
● ●
● ●●●
102 ● ●
●●●
● ●

●● ●
●●


●●

● ●
● ●

102 103 104


Real illuminance [lx]

Figure 8: Predicted v real illuminances during progressive learning

38

3

2
Relative residuals

● ●
● ●●
● ● ● ●● ●● ● ●●
● ● ● ● ● ● ●● ●
●● ● ● ●● ● ●●
●● ●● ● ●
● ● ●●●●● ●● ●
●●●●● ● ● ● ● ● ●●
● ●●

● ●●●●●●● ●
●●●
●● ● ●● ●● ●● ●● ●●
● ●●●● ●
● ●●


●●
●●●●●●

● ●
●●●● ● ●
●● ●●●● ●● ●
● ●
●●
●●
●●●
●●●



●●●


●●
●●
●●●
●●


●●●



●●
●●






●●


●●



●●














●●









●●
●●


●●



●●



●●
●●


●●






●●
●●●






●●











●●

●●









●●

●●
●●

● ●

●● ●

●●●


●●
● ●
●●
● ●●●

●●●●●


●●
●●


●●●
●●


● ● ●
●●●●
●●
●●
●● ●

● ●

●●


● ●●

●●
●●
●●●
●●
●●
●●

●●
● ●
●●

●●
●●●
●●●●

●●●

●●
●●●

●●

●●
● ●

●●
●●●
●●
●●

●●
●●

●●●
●●



●●
●●

●●●


●●


●●

●●


●●

●●


●●

●●



●●

●●

●●

●●

●●



●●
●●

●●

●●
●●
●●

●●



●●


●●


●●

●●●


●●




●●

●●
●●


●●
●●
●●

●●
●●


●●
●●

●●
●●
● ●●●

●●●●●
●●●●
● ●
●●●
● ●●●●●●

0 ●







●●●



● ●












●●
















●●






































































●●

























●●





























































































●●













































●●













































●●















































●●
























●●























●●




















●●













●●


























●●


















●●








●●

































































●●














●●

●●

●●























●●

●●







●●●●




















● ●●
●●● ●
● ●●

●●

●●


●●


●●
●●●
●●


●●

●●●


●●●
●●



●●
●●

●●●●●

















●●




●●


●●●



●●

●●●


● ●
● ● ● ● ●
●●●●●● ●●●●● ● ● ●●● ●●●
●● ● ●● ●● ● ●
●● ● ●
●● ● ●●●●●●●
● ●●●●
●●






●●
●●●●●
●●●






●●

●●


●●






●●

●●●

● ●
●●
●●

●●
●●
●● ●

●●

●●
●●







●●●



●●●



●● ●●
●● ● ●
●●

●●● ●● ●
● ●
● ● ●
● ●
● ● ●
● ● ● ● ● ●● ●
●●●
●● ● ●
●● ●●●●● ●●●
●●

●● ●
●●●●● ●●●
●●●● ●●
●●

●●●● ●● ●
● ●

●●
●●●●

● ● ●
●●
●●

●● ● ●● ● ●
● ●●
●● ●●●●●● ●
●●●

●● ●
●●●●●
● ●●

●● ● ● ● ● ●●● ●●●●● ● ● ● ● ● ●
● ●● ● ●●




●●●● ●
● ●
● ● ● ●
●● ● ● ●
● ● ● ● ●

● ●
● ●
● ●●


−1 ● ●
● ●

● ● ●
●●● ●

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Time

Figure 9: Relative residuals during progressive learning

39
800

600
Number of datapoints

400

200

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Time

Figure 10: Number of points retained for illuminance modeling over the year during progressive
learning.

40
South−facing, venetian blinds,
horizontal slats

●●●●

●● ●
●●
● ●●
●● ●
●●

●●
●●

●●●


R = 0.9847
2 ● ●●●●●●

●●



●●




●●
●●























●●

●●





●●



●●
104


● ●
●●
●●


●●
●●

●●

●●

●●

●●

●●
●●●


● ●


●●

●●



●●

●●
●●●
●●
●●●




●●



●●


●●

●●

●●


●●


●●
●●
●●


●●



●●


●●



● ●
● ●●
●●



●●
● ●

● ● ●

●●













































●●


●● 103

●●●
●●



●●




●●

●●

●●



●●




●●




●●
● ●●●
●●




●●






●●



●●
● ●
●●


●●




●●

●●
●● ●●

●●



●●



●●

Predicted illuminance [lx]

● ●
●●





●●


●●

●●

●●

























● 102
●●
●●
●●
●●
●●
● ●

●● ●

● ●

South−facing, no blinds West−facing, no blinds


●●

●●●












●●●


●●



●●



●●

● ●●





●●

●●
●●●
● ●●


●●


● ●


●●


●●



●●● ●●


10 4
R = 0.9925
2





















●●





































●●

R = 0.9916
2 ● ●●●
●●●●





●●





●●


●●































●●

●●


●●



●●


●● ●●
● ●

●●


●●
●●●

●●





●●



●●
●● ●
● ●
●●

●●



●●
●●


●●


●●





●●

●● ●● ●●
●●





●●



● ●
●●


●●




●●

●●
●● ●
●● ●●●

●●



●●


●●

●●●
●●● ●
●●




●●











●●

● ● ● ●
●●




●●



●●


●●●
●● ●●●

●●

●●





●●

●● ● ●●
●●



●●





●●

103 ●













































●●


●●


●●


















































●●
● ●●●●


●●



●●


● ●



●●




●●




●●


●●

●●





●●



● ●●
●●



●●





●●



●●

● ●

●●

●●

● ● ●


●●


●●
●● ●
●●






















● ● ●
























● ●

●●


●●

●●
● ●
●●
●●




●●


●●




●●


●●
●● ●●

●●


●●
●●
● ●
● ●●
102 ●●

●●

●●


● ● ●
●●
●●●
●●







●● ●●●●
● ● ●● ●

● ●

102 103 104


Real illuminance [lx]

Figure 11: Predicted v real illuminances during progressive learning for three different cases. A
line of slope 1 and intercept 0 is drawn in each panel.

41
South−facing, venetian blinds,
horizontal slats
50

40

30

20

10
Percent of Total

South−facing, no blinds West−facing, no blinds


50

40

30

20

10

−1.0 −0.5 0.0 0.5 1.0


Relative residuals

Figure 12: Relative residuals for the three simulations.

42
4000

3000
Count

2000

1000

500 1000 1500 2000 2500


Illuminance [lx]

Figure 13: Illuminance distribution with daylight controller when daylight was sufficient.

43
5 10 15 20 25
0 Retracted blinds

Horizontal slats
5 10 15 20 25
Percent of Total
0

Algorithm
10 20 30 40
0

100 102 104


Horizontal illuminance [lx]

Figure 14: Illuminance distribution with or without daylight controller. The vertical line corre-
sponds to 500 lx. Notice the change of vertical scale on the lower panel.

44
100 102 104 100 102 104

September October November December


4000

3000

2000

1000

0
May June July August
4000

3000
Count

2000

1000

0
January February March April
4000

3000

2000

1000

100 102 104 100 102 104


Horizontal illuminance [lx]

Figure 15: Illuminance distribution with daylight controller, per month. the vertical line on each
panel corresponds to 500 lx.

45
List of Tables
1. Structure of the simulated data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2. Data points 468869 and 468870 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3. Linear regression results on example data. . . . . . . . . . . . . . . . . . . . . . . . 49

46
Field Units Description Example
index N/A The datapoint index 300000
time POSIX time Timestep 2006-07-28 08:59:30
Eeg Horizontal global irradiance 341
Eed Horizontal diffuse irradiance 118
W/m2
Eev Vertical global irradiance 67.6
Ees Direct normal irradiance 515
temperature °C Outside temperature 16.0
rightWall Right wall illuminance 249
leftWall Left wall illuminance 629
rightEye lx Right user position eye-level illuminance 2542
leftEye Left user position eye-level illuminance 3007
horiz Horizontal workplane illuminance 1398
elevation Solar elevation 25.7
°
azimuth Solar azimuth (0° is north, 90° is east) 91
clearness N/A Perez clearness  2.76
clearness.cat N/A Perez clearness category ˜ 5

Table 1: Structure of the simulated data.

47
time Eev Eeg Eed rightWall eastWall rightEye leftEye horiz
468869 2006-11-22 14:28:30 85.6 130 123 192 392 3443 1912 1685
468870 2006-11-22 14:29:30 90.5 131 123 353 636 7295 2773 3013

Table 2: Data points 468869 and 468870

48
Estimate Std. Error t value Pr(>|t|)
Eeg 79.2165 0.1056 750.12 0.0000
Eed −61.1011 0.2126 −287.45 0.0000

Table 3: Linear regression results on example data.

49

Das könnte Ihnen auch gefallen