A fast daylight model suitable for embedded controllers

12
A fast daylight model suitable for embedded controllers David Lindelo ¨f * Solar Energy and Building Physics Laboratory (LESO-PB), Ecole Polytechnique Fe ´de ´rale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland Received 1 March 2007; received in revised form 19 June 2008; accepted 27 June 2008 Available online 26 July 2008 Communicated by: Associate Editor John Reynolds Abstract This paper describes a fast daylight model suitable for embedded daylight controllers. For a given room geometry (including position and tilt of venetian blinds, and the sun’s position), the indoor illuminances are modeled as a linear combination of outdoor global and diffuse irradiances. A controller can implement this model by continuously recording simultaneous measurements of illuminance, blinds’ settings and sun positions. Illuminances resulting from arbitrary blinds’ settings are then predicted from a linear fit on that data. This model has been validated against a RADIANCE model of an office room, and a ‘‘toycontroller that uses this model has been shown capa- ble of keeping the horizontal workplane illuminance close to a given setpoint. Ó 2008 Elsevier Ltd. All rights reserved. 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 (when daylight is 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 daylight reduce over- all primary energy expenditure in the perimeter zone by more than 40%. Studies have also shown, however, that building occu- pants are very poor at making a rational usage of the day- light controls at their disposal. Foster and Oreszczyn (2001), for example, 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 vene- tian blinds, without any obvious correlation with the avail- able sunlight. This irrational behaviour leads to an increased use of electric lighting, more than what was assumed during the design stage. Automating such shading devices, although tempting, will be rejected by the building occupants if their visual comfort is not maintained. Control algorithms for such devices must strike a balance between visual comfort and energy costs. Many if not most control algorithms will therefore benefit from an accurate and (particularly if implemented on an embedded controller) fast daylight model of the controlled environment. The relative errors in this model (i.e., the ratio between error and real illumi- nance) must be smaller than illuminance differences the human eye can perceive. Luckiesh and Moss (1937) cite evi- dence that this limit is about 50%, although this is probably too liberal. But few daylight modeling methods have been proposed that are both accurate (within, say, 5–10%) and computationally cheap enough to be used on embedded hardware. Robinson and Stone (2006) have recently proposed a simplified indoor illuminance prediction algorithm that achieves very good accuracy, in particular in the presence of reflecting neighbouring buildings. However, this model 0038-092X/$ - see front matter Ó 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.solener.2008.06.008 * Tel.: +41 79 415 66 41; fax: +41 21 693 27 22. E-mail address: [email protected] www.elsevier.com/locate/solener Available online at www.sciencedirect.com Solar Energy 83 (2009) 57–68

Transcript of A fast daylight model suitable for embedded controllers

Page 1: A fast daylight model suitable for embedded controllers

Available online at www.sciencedirect.com

www.elsevier.com/locate/solener

Solar Energy 83 (2009) 57–68

A fast daylight model suitable for embedded controllers

David Lindelof *

Solar Energy and Building Physics Laboratory (LESO-PB), Ecole Polytechnique Federale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland

Received 1 March 2007; received in revised form 19 June 2008; accepted 27 June 2008Available online 26 July 2008

Communicated by: Associate Editor John Reynolds

Abstract

This paper describes a fast daylight model suitable for embedded daylight controllers. For a given room geometry (including positionand tilt of venetian blinds, and the sun’s position), the indoor illuminances are modeled as a linear combination of outdoor global anddiffuse irradiances. A controller can implement this model by continuously recording simultaneous measurements of illuminance, blinds’settings and sun positions. Illuminances resulting from arbitrary blinds’ settings are then predicted from a linear fit on that data. Thismodel has been validated against a RADIANCE model of an office room, and a ‘‘toy” controller that uses this model has been shown capa-ble of keeping the horizontal workplane illuminance close to a given setpoint.� 2008 Elsevier Ltd. All rights reserved.

Keywords: Daylight modeling; Daylight control; Embedded controller

1. Motivation

Rational use of daylight is widely perceived as a key tosubstantial energy savings in buildings, both electrical(when daylight is preferred over artificial light) and thermal(through an optimal use of solar gains). Bourgeois et al.(2006), for instance, report that simulations show thatbuilding occupants that actively seek daylight reduce over-all primary energy expenditure in the perimeter zone bymore than 40%.

Studies have also shown, however, that building occu-pants are very poor at making a rational usage of the day-light controls at their disposal. Foster and Oreszczyn(2001), for example, have monitored three offices in centralLondon whose occupants were found to leave on average40% of the building’s glazed area occluded by their vene-tian blinds, without any obvious correlation with the avail-able sunlight. This irrational behaviour leads to an

0038-092X/$ - see front matter � 2008 Elsevier Ltd. All rights reserved.

doi:10.1016/j.solener.2008.06.008

* Tel.: +41 79 415 66 41; fax: +41 21 693 27 22.E-mail address: [email protected]

increased use of electric lighting, more than what wasassumed during the design stage.

Automating such shading devices, although tempting,will be rejected by the building occupants if their visualcomfort is not maintained. Control algorithms for suchdevices must strike a balance between visual comfort andenergy costs. Many if not most control algorithms willtherefore benefit from an accurate and (particularly ifimplemented on an embedded controller) fast daylightmodel of the controlled environment. The relative errorsin this model (i.e., the ratio between error and real illumi-nance) must be smaller than illuminance differences thehuman eye can perceive. Luckiesh and Moss (1937) cite evi-dence that this limit is about 50%, although this is probablytoo liberal. But few daylight modeling methods have beenproposed that are both accurate (within, say, 5–10%) andcomputationally cheap enough to be used on embeddedhardware.

Robinson and Stone (2006) have recently proposed asimplified indoor illuminance prediction algorithm thatachieves very good accuracy, in particular in the presenceof reflecting neighbouring buildings. However, this model

Page 2: A fast daylight model suitable for embedded controllers

Fig. 1. RADIANCE model of the virtual office room.

58 D. Lindelof / Solar Energy 83 (2009) 57–68

does not account for the particular reflecting characteristicsof venetian blinds.

Mahdavi (2001) is apparently the only work thatdescribes a control system using a lighting simulation pro-gram, in this case, LUMINA. The paper describes a venetianblinds control system that tilts the blinds’ slats according toprescribed indoor lighting conditions. It is, however, notclear whether this control system is fast enough to run ona real controlled office.

Spasojevic and Mahdavi (2005) report that an excellentindoor illuminance prediction can be achieved by segment-ing the sky vault in 12 sectors and measuring the luminanceof each sector. The luminance of each sector is then fed intothe LUMINA lighting simulation program, instead of a com-plete sky luminance distribution function. For an officeroom with two unshaded south-east facing windows, theauthors report a correlation between measured and simu-lated indoor illuminance of R2 = 0.89. But there does notappear to be any proof-of-concept implementation of thispromising idea.

Daylighting modeling methods based on so-called Day-light Coefficients (DC) have been shown to be accurateenough to compete with ray-tracing methods, and to becomputationally light. They do, however, require the priorcomputation of the office room’s daylight coefficients,which is often impractical.

Finally, Lehar and Glicksman (2007) have proposed analgorithm whose inputs are the geometry of the office andthe distribution of reflectances in it. Each surface in theoffice is discretized into a mesh, and the brightness of eachmesh element is given an initial brightness. The algorithmiteratively refines that guess until an equilibrium is reachedand the brightness of each mesh element is a linear combi-nation of the brightnesses of all other mesh elements. Theauthors found the algorithm’s computation time to beabout 3–5 s (which is too slow for a practical daylight con-troller, where at least tens of modelings will be made ateach time step) and that ‘‘roughly the same brightness lev-els are reported” between their model and a RADIANCE

model.In light of this review it appears that no or few day-

lighting models exist that are fast enough to serve theneeds of a daylight controller. This paper proposes sucha model.

Section 2 describes the context in which this researchwas done, and the simulation data used to derive themodel. The model was tested and validated on a simulatedoffice room, which will also be described, together with atoy controller that uses this model. The simulation datawill be analyzed in Section 3. From this analysis the generalform of the model will be derived in Section 4. This modelwill be trained with a subset of our simulation data, andvalidated on the remaining subset, in section 5. Finally,in Section 6, our toy controller will use this model duringa simulated year of operation to keep the horizontal work-plane illuminance in the simulated office room close to500 lx.

2. Simulated office room and simplified control algorithm

Notation

E illuminance [lx]

Ein hor indoor horizontal illuminance [lx]

Eg hor outdoor global horizontal illuminance [lx]

Eg vert outdoor vertical fac�ade illuminance [lx]

Ig hor outdoor global horizontal irradiance [W/m2]

Ibeam direct normal irradiance [W/m2]

Idiff hor outdoor diffuse horizontal irradiance [W/m2]

Idir hor outdoor direct horizontal irradiance [W/m2]

DF daylight factor

� Perez sky clearness

~� Perez sky clearness category

h sun altitude

/ sun azimuth (0� is north, 90� is east)

/f fac�ade normal azimuth

It is difficult, if not impossible, to develop a daylightmodel for an office room with venetian blinds on the basisof real data. Experiments involving daylight cannot, bynature, be repeated with different blinds’ settings, and theacquisition of yearly data series would take far too long.This model has therefore been developed, tested and vali-dated with data generated from computer simulations.

The Solar Energy and Building Physics Laboratory andthe Fraunhofer Institute for Solar Energy have recentlycollaborated, in the framework of the european ‘‘Ecco-Build” project, on the development of a daylight modelfor the SIMBAD (SIMBAD, 2006) building simulation soft-ware. This model consists of illuminance timeseries precal-culated at five different positions in a simulated office roomfor each minute of a year, using weather data files for Brus-sels (Belgium) and Rome (Italy).

The simulated office room is a cuboid4.61 � 3.62 � 2.85 m3 in volume. A venetian blind (or, inanother variant, a roller blind) was added to the simulatedmodel, and different simulations were made for differentsettings. These annual simulations were done for three

Page 3: A fast daylight model suitable for embedded controllers

D. Lindelof / Solar Energy 83 (2009) 57–68 59

different office orientations (south, west, and north). Fig. 1shows the RADIANCE model of this office room.

All in all, 785 annual simulations were carried out, eachone yielding the five illuminances for each of the 525,600 min in a year, and written to a 32 megabyte large file.The whole data set is 24 gigabytes large. Jan Wienold ofFraunhofer-ISE carried out the simulations with the RADI-

ANCE-based DAYSIM (Reinhart, 2006) program on a clusterof more than 50 nodes. The weather data was providedby Fraunhofer-ISE, who produced it with the METEONORM

(METEONORM, 2006) program. The sky luminous distri-bution is modeled by the gendaylit program with thePerez All–Weather Sky Model (Perez, 1993).

Each simulation file contains a table with 525 600 rows.The sun’s position is computed for each data point, as isthe sky’s Perez clearness index and clearness category.Table 1 gives example values of all simulated quantitiesfor a sample data point.

The development of new building control algorithms(not necessarily restricted to daylight control) is an activefield of research at LESO-PB. For field trials, the LESO-PB building is completely equipped with a commercialoff-the-shelf EIB/KNX building automation system. Adedicated server is connected to this automation system,and exposes all building services as remotely invokableJava objects. Thus, the designer of a new control algorithmneeds only focus on the algorithmic logic, as long as thecontrol algorithm adheres to the API exposed by the ded-icated server.

The SIMBAD building simulation software mentionedabove has been extended in order to expose its own build-ing service objects as remotely invokable Java objects withthe exact same API. Hence, a control algorithm writtenagainst this API can run indifferently against the real build-ing or the simulated building.

After the final form of the daylight model will have beendescribed in Section 4, a simple daylight controller will use

Table 1Structure of the simulated data

Field Units Description

index N/A The data point in

time POSIX time TimestepEeg Horizontal globalEed Horizontal diffuseEev W/m2 Vertical global irrEes Direct normal irra

temperature �C Outside temperatu

rightWall Right wall illuminleftWall Left wall illuminarightEye lx Right user positioleftEye Left user positionhoriz Horizontal workp

elevation � Solar elevationazimuth Solar azimuth (0�

clearness N/A Perez clearness �clearness.cat N/A Perez clearness ca

this model to keep the workplane illuminance level in thissimulated office room close to a prescribed (arbitrary)value of 500 lx. The results of this simulation will be givenin Section 6.

3. Daylight factor-inspired methods

In this section, two simplified illuminance predictionmethods will be tested and compared with the simulationdata. Unless noted otherwise, the simulated office roomuses the Brussels climate data and faces south, withoutany shading device.

3.1. Daylight factors

The daylight factor model assumes the indoor illumi-nance at a given point to be proportional to the outdoor,unobstructed, horizontal illuminance, and the daylight fac-tor is given as that ratio of proportionality for a CIE over-cast sky CIE, 1970. This definition is valid, and predictsaccurate daylight illuminances, only for CIE overcast skiesbecause of their isotropy. For such a sky, the indoor illumi-nance is predicted by multiplying the daylight factor by theoutdoor illuminance:

E ¼ DF� Eg hor ð1Þ

where Eg hor is the outdoor horizontal illuminance and DFis the daylight factor.

The simulation data does not directly provide the out-door horizontal illuminance but instead the outdoor hori-zontal global irradiance. However, the data was producedwith the RADIANCE simulation software, in which the skyluminous efficacy is a constant 179 lm/W (Ward Larson,2003 p. 357). The outdoor horizontal illuminance is thusproportional to the outdoor horizontal irradiance. Whenvalidating a model based on daylight factors with data

Example

dex 300000

2006-07-28 08:59:30irradiance 341irradiance 118

adiance 67.6diance 515

re 16.0

ance 249nce 629n eye-level illuminance 2542eye-level illuminance 3007lane illuminance 1398

25.7is north, 90� is east) 91

2.76tegory ~� 5

Page 4: A fast daylight model suitable for embedded controllers

Outdoor global horizontal irradiance [W m2]

Hor

izon

tal i

llum

inan

ce [l

x]

01000020000300004000050000

0 200 600 1000

εε~ == 1 εε~ == 2

0 200 600 1000

εε~ == 3

εε~ == 4 εε~ == 5

01000020000300004000050000

εε~ == 60

1000020000300004000050000

εε~ == 7

0 200 600 1000

εε~ == 8

Fig. 2. Horizontal illuminance vs. horizontal irradiance conditioned on Perez’s sky clearness categories. The best-fitting linear model is shown as a straightline in each panel. Not more than 5000 randomly chosen points are shown on each panel.

60 D. Lindelof / Solar Energy 83 (2009) 57–68

generated with RADIANCE, the outdoor irradiance or out-door illuminance may therefore be equivalently used.

Fig. 2 shows the indoor horizontal illuminance againstthe global horizontal irradiance Ig hor, for different catego-ries of Perez sky clearness (see Perez (1993). The Perezsky clearness category takes discrete values between 1and 8 which correspond to increasingly clear skies). Forthe cloudiest skies (~� ¼ 1), there is a good correlationbetween Ig hor and the horizontal illuminance, but the cor-relation breaks down for clearer skies.

It is known that daylight factors are poor predictors ofindoor illuminances under anything but overcast skies.Robinson and Stone (2004), for example, have shown thatisotropic sky models (or models without azimuthal depen-dence, such as the CIE overcast sky) cannot accurately pre-dict the vertical irradiance on a window. Such models donot take the sun’s position into account, and those errorswill inevitably propagate on the calculation of the indoorilluminance.

3.2. Indoor illuminance proportional to the vertical

irradiance

Guillemin (2003) has suggested that a better correlationthan daylight factors might exist between indoor illumi-nances and vertical fac�ade illuminance. He found experi-mentally that for the fac�ades of the LESO-PB building,the indoor illuminance could be modeled by

E ¼ a expðb � aÞEg vert ð2Þ

where a (between 0 and 1) is the fraction of the window notcovered by a textile blind, Eg vert is the fac�ade’s vertical illu-minance and a and b are model parameters to be fitted. Forgiven blinds’ settings, the indoor illuminance is thereforeassumed to be proportional to the outdoor verticalilluminance.

Fig. 3 shows the horizontal illuminances plotted againstIg vert, conditioned on the sky clearness category as above.However, again, no clear correlation can be discerned forany but the cloudiest skies.

3.3. Fixed sun position

The previous two subsections, and in particular Figs. 2and 3, suggest that the sun’s position cannot be ignored.These plots should therefore be redone, selecting only thosedata points when the sun was not too far away from agiven (arbitrary) direction. Data points are thereforeselected whose sun position lies within a 5� angular diame-ter circle centered on elevation 30� and azimuth 190�.

The two figures shown under Fig. 4, where differentplotting symbols are used according to the Perez clearnesscategory of the sky, are encouraging, especially whenplotting against Ig vert. But they also indicate a problemin the data for skies of clearness category 1 (plotted ascircles).

Page 5: A fast daylight model suitable for embedded controllers

Outdoor vertical irradiance [W m2]

Hor

izon

tal i

llum

inan

ce [l

x]

01000020000300004000050000

0 200 400 600 800

εε~ == 1 εε~ == 2

0 200 400 600 800

εε~ == 3

εε~ == 4 εε~ == 5

01000020000300004000050000

εε~ == 60

1000020000300004000050000

εε~ == 7

0 200 400 600 800

εε~ == 8

Fig. 3. Horizontal illuminance vs. vertical irradiance conditioned on Perez’s sky clearness categories. Not more than 5000 randomly chosen points areshown on each panel.

D. Lindelof / Solar Energy 83 (2009) 57–68 61

The RADIANCE extension program gendaylit is usedby the DAYSIM program to generate the sky’s luminance dis-tribution for each data point. This program implements thePerez All–Weather Sky Model (Perez, 1993) and takes asinputs the date, time, site coordinates, and direct and dif-fuse irradiance values.

From the simulation data, consider the two contiguousdata points 468869 and 468870 given in Table 2.

Only one minute separates these two data points and theIg hor and Idiff hor values are practically identical, but there isa sharp discontinuity in the modeled illuminances, whichalmost double in magnitude.

The first point is almost a sky of clearness category 1(� < 1.065), and it is conceivable that the internal algorithmof gendaylit did classify this sky as such. If this is true,then there could be a discontinuity in the Perez modelbetween skies of clearness categories 1 and 2. This wouldexplain the sharp illuminance increase, and the apparentanomaly of ~� ¼ 1 skies in Fig. 4.

When dealing with RADIANCE-generated data, any day-light model should therefore consider separately ~� ¼ 1 skies

Table 2Data points 468869 and 468870

Time Eev Eeg

468869 2006-11-22 14:28:30 85.6 130468870 2006-11-22 14:29:30 90.5 131

from other skies. The result for a linear model against Ig vert

is shown in Fig. 5. The correlation, in both cases, is nowexcellent.

4. Simplified daylight model for a given solar neighbourhood

In the previous section, we found that for a given solarneighbourhood, the indoor illuminance could be reason-ably well predicted as being proportional to the verticalfac�ade irradiance.

But the outdoor vertical irradiance can be expressedunder certain simplifications as a linear combination ofoutdoor horizontal global and diffuse illuminance, as fol-lows. Eg vert is proportional to Ig vert, the outdoor verticalirradiance in our data for reasons previously mentioned.Assuming the diffuse component of the sky’s radiosity tobe isotropic, and ignoring ground reflections, the irradianceon a vertical fac�ade is given by

Ig vert ¼ Idiff hor=2þ Ibeam cos h cosð/� /fÞ ð3Þ

Eed Right eye Left eye Horiz

123 3443 1912 1685123 7295 2773 3013

Page 6: A fast daylight model suitable for embedded controllers

Table 3Linear regression results on example data

Estimate Standard error t value Pr(>jtj)a 79.2165 0.1056 750.12 0.0000b �61.1011 0.2126 �287.45 0.0000

Outdoor global horizontal irradiance [W m2]

Hor

izon

tal i

llum

inan

ce [l

x]

0

10000

20000

30000

40000

0 100 200 300 400 500 600

●●●●● ●●●● ●●

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

●●

●●

●●

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

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

●● ● ●●●●

●●●

●●

●●●

●●●●

Perez sky clearness category● 1

2345678

Outdoor vertical irradiance [W m2]

Hor

izon

tal i

llum

inan

ce [l

x]

0

10000

20000

30000

40000

0 200 400 600 800

●●●

● ●●●

●●●●

●●

●●●

●●●●

●●

●● ●

●●

●●

●●●

●●

●●●●●

●●

●●

●●●●●

●●●

●●

●●●

●●

●●●●

●●●

●●

●●

●●

●●●

●●

●●

●●●●

●●

●●

●●

●●

Perez sky clearness category● 1

2345678

Fig. 4. Horizontal illuminance against Ig hor and Ig vert for a given sunposition (altitude 30�, azimuth 190�), with a second degree polynomial fitfor Ig hor and a linear fit for Ig vert.

Outdoor vertical irradiance [W m2]H

oriz

onta

l illu

min

ance

[lx]

0

10000

20000

30000

40000

0 200 400 600 800

E = 24.12 * Eev

εε~ == 1

0 200 400 600 800

E = 45.01 * Eev

εε~ ≠≠ 1

Fig. 5. Linear fit of horizontal illuminance against vertical fac�adeirradiance, for clearness category 1 skies (left panel) and other skies (rightpanel).

62 D. Lindelof / Solar Energy 83 (2009) 57–68

where h is the sun’s elevation, / its azimuth, and /f the azi-muth of the fac�ade’s normal, Idiff hor is the outdoor diffuseirradiance and Ibeam is the beam irradiance. The latter isgiven by

Ibeam ¼ ðIg hor � Idiff hor= sin h ð4Þ

and therefore Ig vert is a linear combination of Ig hor andIdiff hor, which can be generalized as

Ig vert ¼ aIg hor þ bIdiff hor ð5Þ

If E is indeed, as Section 3.3 suggests, equal to g Ig vert, thenby identification a ¼ �g cos /

tan h and b ¼ gð1=2þ cos /tan hÞ. When a

linear model was fitted to skies of clearness category otherthan 1, we found that g = 45.01, so the following shouldhold:

E ¼ 76:08� Ig hor � 53:78� Idiff hor ð6Þ

The results of fitting the model of Eq. (5) to our data aregiven in Table 3.

Or in other words, the 95% confidence intervals for thetwo coefficients are

E ¼ ð79:4� 0:25Þ � Ig hor � ð61:5� 0:49Þ � Idiff hor ð7Þ

which is not too far from Eq. (6). Still, there is a significantmismatch, and the simplification made in Eq. (3), whileyielding a good fit, is probably too gross.

Fig. 6 shows the relative residuals when fitting with thegeneral model of Eq. (5). The relative residuals tend to behigher for lower illuminances, but 98% of the points arewithin 10% relative error and 90% are within 5%. The fitmay therefore be regarded as satisfactory and better thanwith the model of Eq. (2).

The implementation of this model on an embedded con-troller in an efficient manner is not difficult. Formally, it isan overdetermined linear model. If N observations aremade for the same or similar geometries (blind’s settings

Page 7: A fast daylight model suitable for embedded controllers

Simulated illuminance [lx]

Pre

dict

ed il

lum

inan

ce [l

x]

102

103

104

102 103 104

Relative residuals

Per

cent

of T

otal

0

10

20

30

40

-1.0 0.0 0.5 1.0

0.03 ± 0.15

Fig. 7. Predicted July–December hourly indoor horizontal illuminances,using only January–June data. 1000 randomly chosen points are shownout of the 4417 simulated points. The scale is logarithmic. The line’s slopeis 1 and its intercept 0. The relative residuals are histogrammed and theirmean and standard deviation are given.

Fitted illuminance [lx]

Rel

ativ

e re

sidu

als

0.02

0.00

0.02

0.04

0.06

0.08

10000 20000 30000 40000

Fig. 6. Relative residuals vs. fitted values

D. Lindelof / Solar Energy 83 (2009) 57–68 63

and sun position) but different irradiance values, with an �term to account for measurement and systematic errors,the model becomes:

E1 ¼ aIg hor1þ bIdiff hor1

þ �1

E2 ¼ aIg hor2þ bIdiff hor2

þ �2

..

.

EN ¼ aIg horN þ bIdiff horN þ �N

This can more conveniently be written in matrix form:

E ¼ E� wþ �where E is the vector of illuminance observations, E is an � 2 matrix with the irradiance measurements, w is atwo-element vector with the fitted parameters a and b,and � is the vector of errors.

The goal is to find the two-element vector w which min-imizes the norm of � (least-squares solution). Assumingthat the 2 � 2 matrix ETE is of full rank and thereforeinvertible, and that the errors are normal, the solution isgiven by:

w ¼ ðETEÞ�1ETE ð8Þ

which is probably the most efficient way this model couldbe implemented in an embedded daylight controller.

The complete algorithm for predicting an indoor illumi-nance for an arbitrary blinds’ settings and a given sun posi-tion can therefore be expressed as follows:

1. Select previous simultaneous measurements of Ig hor,Idiff hor and E where the sun was in the same neighbour-hood as now, and where the blinds were in the samesettings;

2. Build the matrix E and the vector E;

3. Compute a and b as the elements of the two-vector(ETE�1)ETE;

4. Compute E = aIg hor + bIdiff hor where Ig hor and Idiff hor

are the current outdoor horizontal global and diffuseirradiances.

5. Validation

In this section, the model described above will be vali-dated in three different ways:

1. The January–June data will be used to predict illumi-nances between July and December;

2. Illuminances will be predicted for the whole year, usingalways data at least one week old;

3. Same as previous, but first on a west-facing simulatedoffice room, and second on a south-facing office withvenetian blinds fully extended and slats in a horizontalposition.

5.1. Half-year training data

In this subsection the illuminances from July to Decem-ber will be predicted, using only the January to June datafor training. At each time step, data points from the firsthalf of the year are selected with a similar sun positionand a similar sky clearness category. From these points, aand b are derived, and the illuminance is predicted.

Fig. 7 shows the predicted against the simulated hori-zontal illuminance. The correlation is excellent (R2 = 0.98).

Page 8: A fast daylight model suitable for embedded controllers

64 D. Lindelof / Solar Energy 83 (2009) 57–68

5.2. Progressive learning

How fast does the model learn? If the model is to beused in a daylight controller at all it must learn reasonablyfast. A controller that has to wait half a year before makingprecise predictions is not useful.

Simulated illuminance [lx]

Pred

icte

d illu

min

ance

[lx]

102

103

104

102 103 104

Relative residuals

Perc

ent o

f Tot

al

01020304050

-1.0 0.0 0.5 1.0

0.03 ± 0.10

Fig. 8. Predicted vs. simulated illuminances during progressive learning.The scale is logarithmic. The line’s slope is 1 and its intercept 0. Therelative residuals are histogrammed and their mean and standarddeviation are given.

T

Rel

ativ

e re

sidu

als

1

0

1

2

3

Jan Feb Mar Apr May Jun

Fig. 9. Relative residuals dur

In this section, the model will predict the horizontal illu-minance every hour, based exclusively on data older thanat least a week. On 1 February, for example, only the dataup to 21 January may be used to predict the illuminance.

Fig. 8 shows the predicted against simulated horizontalilluminances on a logarithmic scale during the simulatedyear. The correlation is excellent (R2 = 0.99). Fig. 9 showshow the relative residuals evolve over time. One wouldnaıvely expect them to be greatest in amplitude duringthe first months and then gradually decrease as the algo-rithms learns better and better, but instead of that theydo not really improve over time. They are worst in springand autumn, and very good in summer and winter.

A possible explanation for this is given by Fig. 10, wherethe number of data points used at each timestep is plottedagainst time. The angular distance between two consecu-tive daily solar trajectories in the sky is not constant overthe year. They are closer in summer and in winter than inspring and autumn (see Fig. 11). Therefore, when predict-ing the illuminance on a spring day, the model has moredifficulties finding previous similar geometries than in sum-mer or winter, when the sun’s consecutive trajectories in thesky lie very close to one another.

Note, however, that these observations hold only for thefirst year of operation. After a full year of learning, thisartefact should have disappeared.

5.3. West-facing fac�ade and venetian blinds

In this section the same validation as in the precedingone will be carried out, but for two different situations.

imeJul Aug Sep Oct Nov Dec

ing progressive learning.

Page 9: A fast daylight model suitable for embedded controllers

Azimuth [°]

Elev

atio

n [°]

38.0

38.5

39.0

39.5

144 144 145 146 146 146

30 March

3 April

(a) 1 April

Elev

atio

n [°]

54.5

55.0

55.5

56.010 June

Time

Num

ber o

f dat

apoi

nts

0

200

400

600

800

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

Fig. 10. Number of points retained for illuminance modeling over the yearduring progressive learning.

D. Lindelof / Solar Energy 83 (2009) 57–68 65

First for a west-facing fac�ade orientation, and then for asouth-facing fac�ade protected with venetian blinds fullylowered with slats in a horizontal position.

The predicted vs. real illuminances scatterplots are givenin Fig. 12, where they are also compared with the plot pre-viously given in Fig. 8. In all cases, the correlation is excel-lent and the predicted values agree well with the real ones.The case with venetian blinds performs the worst, probablybecause of the increased complexity.

Histograms of the three simulations’ relative residualsare given in Fig. 13. There is no readily apparent differencebetween the three cases, and the model is quite able to pre-dict the horizontal illuminance in these situations.

Azimuth [°]135 136 137 138

26 May

(b) 1 June

Fig. 11. Sun positions at one-minute intervals. Sun positions closer than1� angular distance from the 10 a.m. sun on the given dates are shown.Each trajectory corresponds to solar courses on consecutive days. Noticehow much closer to each others consecutive solar courses are in early Junecompared to early April.

6. Implementation in a simplified daylight controller

As a final test of this model, a simplified daylight con-troller has been written that uses this model to keep theindoor illuminance in the simulated office room as closeto 500 lx as possible.

To work properly, this model needs to regularly recordsimultaneous measurements of indoor and outdoor illumi-nances or irradiances, and for different blinds’ settings. Butin the simulated office there is no human to operate theblinds’, so the controller itself must do its own data acqui-sition program.

To gather enough data, the controller includes a DAQmodule that runs only on weekends. After sunrise, it iter-ates sequentially through the blinds’ positions and slatangles. The positions are discretized in steps of 20% ofthe total window opening, and the slat angles are discret-ized in steps of 10%. It stops at sunset. In each cycle, theblinds thus move through 66 different positions (6 posi-

tions � 11 slat angles). The initial position and slat angleat each cycle are chosen randomly to prevent bias.

The results are stored in a text file. Each line records thedate, the time, Ig hor, Idiff hor, the blinds’ position and slatangle and the illuminance measurements.

Another module of the controller implements the day-light model. It is responsible for predicting the horizontalilluminance for arbitrary blinds’ settings and arbitrary Ig hor

and Idiff hor values. It does this by following the method pre-sented in this paper.

Page 10: A fast daylight model suitable for embedded controllers

Real illuminance [lx]

Pred

icte

d illu

min

ance

[lx]

102

103

104

102 103 104

R2 =0.9925

Southfacing, no blinds

R2 =0.9916

Westfacing, no blinds

102

103

104R2 =0.9847

Southfacing, venetian blinds,horizontal slats

Fig. 12. Predicted vs. real illuminances during progressive learning forthree different cases. A line of slope 1 and intercept 0 is drawn in eachpanel.

Relative residuals

Perc

ent o

f Tot

al

0

10

20

30

40

50

-1.0 -0.5 0.0 0.5 1.0

-0.03 ± 0.10

Southfacing, no blinds

-0.00 ± 0.09

Westfacing, no blinds

0

10

20

30

40

50

-0.03 ± 0.12

Southfacing, venetian blinds,horizontal slats

Fig. 13. Relative residuals for the three simulations. The mean and samplestandard deviation are given.

1 The SIMBAD-based simulator developed during the Ecco-Build projectincludes a model of a lighting fixture. It provides between 0 and 780 lx onthe horizontal workplane. The controller knows the coefficient betweenthe applied power and the provided illuminance.

Illuminance [lx]

Cou

nt

0

1000

2000

3000

4000

500 1000 1500 2000 2500

Fig. 14. Illuminance distribution with daylight controller when daylightwas sufficient.

66 D. Lindelof / Solar Energy 83 (2009) 57–68

At any timestep, the controller is only allowed to usedata it had collected during the weekends leading up tothat 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 isresponsible for sending actual commands to the blindsand to the electric lighting1. Every five timesteps (or fivesimulated minutes), it models the illuminance of the officeunder different potential blinds’ settings and/or electriclighting power. The electric lighting is used only if notenough daylight is available to provide 500 lx. When theblinds move, no more movements are allowed for the next15 min. These timings are chosen because a real-worldimplementation should disallow too frequent blindsmovements.

In the final analysis, the controller’s performance will bechecked only in those cases where no electric lighting wasused, i.e., when daylight only was used to provide the500 lx.

The illuminance distribution on weekdays, when thecontroller believed no electrical lighting was needed tomaintain 500 lx, is given in Fig. 14. The distribution isclearly centered around 500 lx, but is this attributable tothe controller or is it the natural illuminance distributionwith an arbitrary blinds’ settings?

To answer this question, Fig. 15 shows the same illumi-nance distribution as in Fig. 14, but plotted in a logarith-mic scale and compared with the illuminancedistributions over the complete year for the same pointsin time in the same office with, in the first case, venetianblinds completely down and horizontal (open) slats, andin the second case, venetian blinds completely open. There

Page 11: A fast daylight model suitable for embedded controllers

Horizontal illumi

Cou

nt

0

1000

2000

3000

4000

100 102 104

January February

May June0

1000

2000

3000

4000September

100 102 104

October

Fig. 16. Illuminance distribution with daylight controller, per m

Horizontal illuminance [lx]

Perc

ent o

f Tot

al

010

2030

40

100 102 104

Algorithm

010

1520

25

Horizontal slats

010

1520

25

Retracted blinds

55

Fig. 15. Illuminance distribution with or without daylight controller. Thevertical line corresponds to 500 lx. Notice the change of vertical scale onthe lower panel.

D. Lindelof / Solar Energy 83 (2009) 57–68 67

is an obvious effect attributable to the controller’s presence.The illuminance distribution is much narrower and clearlycentered on 500 lx, and the two top panels show that this isnot a naturally occurring condition.

Excluding illuminance values below 10 lx, the samplestandard deviation of the logarithm of the illuminancewithout a controller present are 0.43 and 0.48, respec-tively. With the controller present, the sample standarddeviation narrows down to 0.219. If the parent popula-tion is normally distributed (it almost certainly is not,because the sample population is not), the controllerkeeps the horizontal workplane illuminance on averageat 503 lx, with 95% confidence intervals between 187and 1351 lx. This is good enough for most commercialapplications.

The last point worth investigating is the bin with lowilluminance values on the lower panel of Fig. 15. It corre-sponds to situations where the controller was mistaken,probably because of insufficient training data. To test thishypothesis, Fig. 16 shows how the daylight illuminance dis-tribution varied on a monthly basis. The low illuminancevalues correspond exclusively to situations in Februaryand March where the controller was mistaken. This mighthave been expected, because these months are early in theyear when the controller had not yet acquired enoughtraining data. They are lacking in January because thiswas a month during which the controller often did not haveenough data to model the daylight at all, in which case it

nance [lx]100 102 104

March April

July

0

1000

2000

3000

4000August

November

100 102 104

December

onth. The vertical line on each panel corresponds to 500 lx.

Page 12: A fast daylight model suitable for embedded controllers

68 D. Lindelof / Solar Energy 83 (2009) 57–68

was programmed to do nothing. The controller’s perfor-mance for the rest of the year is satisfactory.

7. Conclusion

This paper has described a simplified daylight modelthat considers, for a given position of the sun and for agiven blinds’ settings, the indoor illuminances as a linearcombination of outdoor horizontal global and diffuse irra-diances. The model’s inputs are previously recorded mea-surements of illuminances, blinds’ settings and sunpositions.

This model has been validated on a RADIANCE model ofan office room with a south-facing window in Brussels, firstby modeling indoor illuminances between July and Decem-ber with training data between January and June (correla-tion R2 = 0.98), and then by progressively modeling thehourly illuminances in the year using data at least one weekold. The progressive modeling has also been carried out onthe same office but facing west, and facing south with vene-tian blinds covering the window. In all cases the correlationwas found to be excellent (R2 = 0.99, 0.99, and 0.98respectively).

A toy controller was written that used this model toadjust the blinds so the indoor illuminance was kept closeto 500 lx. The controller records illuminance data only dur-ing the weekends. It was found to have a statistically signif-icant effect on the resulting illuminance distribution,keeping it to an average of 503 lx.

Source code

This paper was produced with the Sweave literate pro-gramming tool bundled with R 2.7.0 R Development CoreTeam, 2004. The master file from which both the LaTeXsource and the data analysis code were extracted is avail-able from the author’s website, http://www.visnet.ch/smartbuildings/publications. The original data cannot bedownloaded because of its size but is available uponrequest.

Acknowledgements

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

this paper and providing the author with their helpful com-ments and criticisms.

We thank Jan Wienold from the Fraunhofer Institutefor Solar Energy for providing the RADIANCE data sets usedto develop this model. He has also kindly provided theRADIANCE data files necessary to model the simulated office.

We thank Christoph Marty and Sif Khenioui from Inge-lux (Lyon, France), the principal developers of the SIMBAD

extension for daylight described in this paper.

References

Guillemin, A., 2003. Using genetic algorithms to take into account userwishes in an advanced building control system. PhD thesis, LESO-PB/EPFL.

Mahdavi, A., 2001. Simulation-based control of building systems oper-ation. Buildings and Environment 36, 789–796.

Spasojevic, B., Mahdavi, A., 2005. Sky luminance mapping for compu-tational daylight modeling. In: Proceedings of the Ninth InternationalIBPSA Conference, Montr’eal, Canada, pp. 1163–1169.

CIE-1970, 1970. Daylight. Technical report, Commission Internationalede l’Eclairage.

Robinson, D., Stone, A., 2004. Solar radiation modeling in the urbancontext. Solar Energy 11, 295–309.

Robinson, D., Stone, A., 2006. Internal illumination prediction based on asimplified radiosity algorithm. Solar Energy 80, 260–267.

Bourgeois, D., Reinhart, Christoph F., Macdonald, I., 2006. Addingadvanced behavioural models in whole building energy simulation: astudy on the total energy impact of manual and automated lightingcontrol. Energy and Buildings 38, 814–823.

Ward Larson, G., Shakespeare, R., 2003. Rendering with Radiance,Revised Edition. Space & Light.

Lehar, M.A., Glicksman, L.R., 2007. Rapid algorithm for modelingdaylight distributions in office buildings. Building and Environment42, 2908–2919.

Luckiesh, Matthew, Moss, Frank K., 1937. The Science of Seeing. D. VanNostrand Company Inc..

METEONORM-2006. Meteonorm 5.x, 2006. <http://www.meteotest.ch/en/mn_home>. Last checked 20 October 2006.

Foster, M., Oreszczyn, T., 2001. Occupant control of passive systems: theuse of venetian blinds. Building and Environment 36, 149–155.

R Development Core Team. 2004. R: A language and environment forstatistical computing. R Foundation for Statistical Computing,Vienna, Austria. <http://www.R-project.org>.

Christoph F. Reinhart, Daysim, 2006. <http://irc.nrc-cnrc.gc.ca/ie/lighting/daylight/daysim_e.html>. Last checked 20 October 2006.

Perez, R. et al., 1993. All-weather model for sky luminance distribution –preliminary configuration and validation. Solar Energy 50 (3), 235–245.

SIMBAD-2006. Simbad, 2006. <http://kheops.champs.cstb.fr/Simbadhvac/>.Last checked 20 October 2006.