A simulation tool for building and lighting design considering ipRGC-influenced light responses

The ipRGCs in the human eye mediate several effects on people, such as alertness and circadian rhythms. The spectral, temporal and spatial characteristics of light influence the magnitude of these effects. To facilitate the anticipation of the ipRGC-influenced light (IIL) responses in building design, new simulation tools are needed. This paper presents an extension to the open-access simulation tool Lark , available as a plugin to Grasshopper for Rhino . The proposed extension includes a set of additional options, components, and templates that incorporate currently available knowledge on the IIL responses. The applicability of the extension is demonstrated in a simulation workflow.


Introduction
Since the discovery of the intrinsically photosensitive Retinal Ganglion Cells (ipRGCs) in the eye (Hattar et al., 2002), an increasing amount of research has shown that these cells mediate several physiological and psychological responses.The ipRGC-influenced light responses (IIL, also called non-visual or non-image-forming effects of light) include acute alertness and the regulation of the circadian system (Vetter et al., 2021).These responses are influenced by the quantity, spectral composition and spatial distribution of the light stimulus, as well as the timing, duration and previous light history (Khademagha et al., 2016).For researchers and designers to be able to anticipate the IIL responses of occupants, new light simulation tools are needed.Since research suggests that not only ipRGCs, but also rods, and cones play a role in mediating IIL responses, the sensitivity of the non-image-forming system cannot be described by a single action spectrum.(International Commission on Illumination, 2018).This means that simulation tools need to calculate radiometric quantities, instead of photometric, which can be weighted with the multiple action spectra.Therefore, conventional light simulation tools that simplify the visible spectrum into a three-dimensional color space are not sufficient.Lark Spectral Lighting (or simply Lark) is a simulation tool that increases the spectral resolution from three to nine channels (Inanici and ZGF Architects, 2015).It is an open-access tool available as a plugin to the virtual programming environment Grasshopper for Rhino which uses the Radiance engine (Ward and Shaskespeare, 1998) to perform light simulations.Since Radiance performs simulations with a 3-channel resolution, Lark combines the results of three individual simulations, each for different parts of the visible spectrum.Validation studies showed that this approach can predict spectral irradiance indoors with a reasonable accuracy (most errors are within a ±20% range compared to physical measurements) under daylight conditions (Pierson et al., 2021).Although Lark offered the possibility to include spectral composition with a 9-channel resolution in lighting design, until now it did not allow to analyse the spatial and temporal characteristics of light.Moreover, the Lark workflow could only be used for daylight, without the option to perform spectral electric light simulations.Since the tool was developed in 2015, it did not include the more recent α-opic metrics defined by the International Commission on Illumination (CIE), based on the sensitivities of the five photoreceptors in the human eye (S-, M-, Lcones, rods and ipRGCs) (International Commission on Illumination, 2018).The goal of this paper is to present an extension to the Lark simulation tool (here referred to as Lark 2.0) with the following features: • Option to run daylight and/or electric light spectral simulations.For the daylight simulations, a more accurate sky model is used that takes as an input the diffuse horizontal irradiance (DHI), direct normal irradiance (DNI) and dew point temperature.• Calculation of spectral irradiance and the α-opic metrics defined by CIE.• Spatially weighted image-based analysis, which makes it possible to account for the direction at which light enters the human eye, since the literature indicates that the spatial sensitivity of the IIL responses is not uniform within the field of view (Khademagha, 2021).• Calculation of time-series of light exposures using a Radiance matrix-based method (Subramaniam, 2017).The time series of light exposures can be used as input for the so-called non-visual direct response (nvR D ) model, a light-driven prediction model for alertness (Amundadottir, 2016).
The tool was applied to a simple room scenario to showcase the outputs that can be obtained by lighting designers interested in IIL responses.

Spectral simulation with Lark 2.0
The Lark 2.0 plugin for Grasshopper consists of a set of components written in IronPython as well as a set of Grasshopper templates.It was developed using Rhino for a Windows operating system.The plugin utilizes Radiance v.5.3,Ladybug v.0.0.69,Honeybee v.0.0.66 (legacy versions) and Daysim 4.0.This section describes the method for modelling spectral materials and light sources, which is an extension of the method described by Inanici et al. (2015).

Spectral materials
The tool takes as input text files containing the spectral reflectance or transmittance of respectively opaque or transparent materials.It then averages the spectral values within each of the nine channels and writes these averaged values as three individual Radiance materials (Figure 1).These three materials are used for three typical Radiance simulations, which are combined to obtain the 9-channel resolution.The wavelengths of the nine channels are displayed in Table 1.   1.For a correct energy balance, the nine discretized sky SPD values need to be scaled in such a way that, when they are multiplied by their corresponding photopic coefficients and summed up, their sum is equal to 1.These photopic coefficients are derived from the photopic spectral luminous efficiency function V(λ).They are calculated as the area under the curve of the normalized V(λ) in each of the nine spectral channels (Inanici et al., 2015).

Spectral electric light
The necessary inputs to run an electric light simulation are the SPD of the light source and a photometric .iesfile containing the luminous intensity plot of the light source.
The SPD is discretized and scaled for correct energy balance in the same way as the SPD of the sky.The .ies file is converted to a color-neutral Radiance scene description file using a Honeybee component, which is then modified by Lark 2.0 to include the color information.

The Lark 2.0 templates
To combine the new features of Lark 2.0 with the functionality of the original Lark in an easy-to-use workflow, three Grasshopper templates were created: • A point-in-time grid-based simulation template • A point-in-time image-based simulation template • An analysis period grid-based simulation template Grid-based simulations are used for generating light quantities incident on a grid of points (or a single point) and image-based simulations are used for generating an image or a radiance map for a view direction.This section describes the main methods and outputs of these templates.

Point-in-time grid-based simulation
The point-in-time grid-based simulation template relies on a 3D model as well as the definition of spectral materials, a spectral sky model and/or spectral electric light sources, grid points, and simulation parameters to run the three Radiance simulations.These Radiance simulations are performed using the Honeybee plugin for Grasshopper.The outputs of the template include the spectral irradiance and α-opic metrics at each grid point.

Spectral irradiance
The 9-channel results of the 3 Radiance simulations are used by Lark 2.0 to derive the average spectral irradiance over each channel (Pierson et al., 2021).The spectral irradiance is extrapolated for every nanometer, assuming that it is constant within each channel and equal to the average.2) (International Commission on Illumination, 2018).This standard described a set of αopic (S-cone-opic, M-cone-opic, L-cone-opic, rhodopic and melanopic) metrics to quantify the ability of optical radiation to stimulate each photoreceptor.An excel toolbox was provided together with the standard, to facilitate the calculation of these quantities.This toolbox has been implemented in Lark 2.0.Using the spectral irradiance derived from the 9-channel results of the three Radiance simulations, Lark 2.0 calculates the following metrics (Figure 3): Spectral irradiance, E e,λ (λ), weighted with an α-opic sensitivity function, s α (λ) (Equation 1).
• α-opic equivalent daylight (D65) illuminance, E D65 v,α : Ratio between α-opic irradiance and α-opic efficacy of luminous radiation for the standard illuminant D65, K D65 α,v (which is calculated for the D65 spectrum from Equation 2) (Equation 3). (3) Point-in-time image-based simulation The point-in-time image-based simulation template relies on the same elements as the point-in-time grid-based simulation template and also runs the three Radiance simulations using the Honeybee plugin for Grasshopper.The outputs of the template include High Dynamic Range (HDR) images, spatially weighted HDR images, as well as spatially weighted spectral irradiance and α-opic CIE metrics received at that view point.

HDR images
The outputs of the three Radiance image-based simulations are three HDR images, each containing the spectral information for different parts of the visible spectrum.
Similarly to the original version of Lark, these three HDR images are merged into: • a typical HDR image of which the pixels contain RGB color information.• a grey-scale HDR image of which the pixel values have been scaled so that, when it is analyzed in an HDR image viewer applying the Radiance equation for photopic luminance calculation (Equation 4), it provides the photopic luminance, L v .
• a grey-scale HDR image of which the pixel values have been scaled so that, when it is analyzed in an HDR image viewer applying Equation 4, it provides the circadian luminance according to Lucas et al.'s circadian spectral sensitivity curve (Lucas et al., 2014).This method has been implemented in Lark 2.0 in such a way that the user can choose to apply the light spatial weighting when running a point-in-time image-based simulation (Figure 5).The HDR images used as masks to define the four FOV areas and their corresponding weighting factors defined in Khademagha (2021) are applied.However, other masks and weighting factors could be used when more research on how spatial light distribution impacts the IIL responses is available.

Spatially weighted α-opic metrics
The three Radiance-simulated HDR images can be used to derive spatially weighted spectral irradiance and spatially weighted α-opic metrics.For this purpose, a new component was developed in Lark 2.0.This component calculates from the three HDR images the same 9channel results as those outputted by the point-in-time grid-based simulation template by applying Equation 5, where E e,channelz is the irradiance over channel z (one of the nine spectral channels); L e,channelz (i) is the radiance of pixel i over channel z ; and ϵ is the cosine of the angle between the line of sight and pixel i.
E e,channelz = L e,channelz (i) * cos(ϵ)dΩ (5) Using the same procedure as in the point-in-time gridbased simulation template, the point-in-time image-based simulation template therefore allows the user to output a spatially weighted (or not spatially weighted) spectral irradiance and α-opic metrics.

Analysis period grid-based simulation
The analysis period grid-based simulation template relies on the same inputs as the point-in-time grid-based simulation template and can be used for an annual or sub-annual daylight simulation period.The outputs of the template include a time series of the previously described α-opic metrics and the results of the nvR D model.The next paragraphs describe the nvR D model and the method for calculating a time series of light stimuli.

Non-visual direct response model (nvR D )
The previously described CIE tool and Khademagha's method can be used to evaluate the spectral and spatial distribution of a light stimulus.As they are only applicable for point-in-time evaluations, they do not include information about time dynamics.In contrast, the nvR D model uses as input a time series of light stimuli (i.e., effective irradiance) in order to predict an alerting response (Amundadottir, 2016).Effective irradiance is defined as spectral irradiance weighted by the spectral sensitivity curve of the ipRGCs (similar to melanopic irradiance from CIE in Figure 2 but without normalizing the sensitivity function to have a maximum of 1).The alerting response is calculated through the use of four functions that account for the temporal integration of the retina, the adaptation to continuous light exposure, the previous photic history, and the non-linear dose-response relationship.The non-linear dose-response relationship is represented by a sigmoid curve with a steep increase and a point of saturation after which light does not cause a further increase to the alerting response.The nvR D model gives a time series of relative alerting responses (r D ) as an output, which can be integrated over time in a cumulative response (R D ).The magnitude of R D represents the potential of a space to induce alertness.The nvR D model has been implemented in Lark 2.0, so that a R D value is calculated for each timestep of the simulated period for an average person with no memory of long-term light exposure (i.e., calculation done over each day separately) and an already entrained behavior.

Simulation of period
Since the nvR D model takes a time series of light stimuli as an input, it is necessary to implement a dynamic simulation method that facilitates the calculation of this input.Looping through multiple point-in-time simulations means that simulation time increases linearly with the number of iterations.Instead, the implementation of a matrix-based Radiance method, developed for climatebased daylight modelling (CBDM) (Subramaniam, 2017), speeds up the calculation of a time series of daylight spectral irradiances.
In Lark 2.0, a version of the Daylight Coefficient (DC) method for dynamic daylighting simulations (DDS) (Bourgeois et al., 2008) was implemented.The DC method defines a daylight coefficient for a point and view direction within a space as the ratio between illuminance (or irradiance) on that point due to a sky patch and the product of luminance (or radiance) of that sky patch with its angular size.Total illuminance (or irradiance) on the point is the sum of the contributions of all sky patches.The illuminance (or irradiance) of a series of sky conditions can be calculated by a matrix multiplication of the DC matrix with a sky matrix.The original DC method approximated the sun using a few sky patches.Due to inaccuracies caused by this assumption, accurate sun positions are used in the DDS method.The implementation of this method is straightforward by using the Radiance programs: 1) rfluxmtx, for the DC matrix calculation (or the rcontrib program with additional steps), 2) gendaymtx, for the calculation of the sky matrix from annual or sub-annual weather data, and 3) dctimestep, for the multiplication of the matrices.In Lark 2.0, these programs are called twice for each of the three simulations: first for the calculation of the sky contributions (using the -s option in gendaymtx), and next, for the calculation of the sun contribution (using the -d option in gendaymtx).For the sky calculation, a color triplet is used (using the -c option in gendaymtx), whereas the sun is assumed to be white.The workflow is based on the tutorial by Subramaniam (2017), following the steps of the DDS method.It can be used to calculate a time series of cumulative alerting responses R D or a time series of α-opic metrics for a user-defined analysis period.

Simulation of sub-hourly analysis period
The recommended timestep for the effective irradiance input of the nvR D model is six minutes (Amundadottir, 2016), but annual weather data are usually available with an hourly timestep.To model the sub-hourly dynamic and random variation of daylight, the ds shortterm program of Daysim was used (Walkenhorst et al., 2002).This program uses a stochastic model to create 1-minute diffuse horizontal and direct normal irradiance values given hourly mean values (which are available in a weather file).This model better represents the dynamic nature of daylight compared to a constant mean hourly value or a linear interpolation between hours (Figure 6).

Case study
To showcase its capabilities, Lark 2.0 was tested with a simple room model, assumed to be located in Geneva, Switzerland.This case study demonstrates the applicability of the tool in a simulation workflow and provides an example of how architectural and lighting design decisions can incorporate aspects related to IIL responses of occupants.The room has a size of 3m x 5.8m x 3m, a 2m x 1.3m window towards south and a ceiling-mounted fluorescent luminaire Philips TBS600 1xTL5 49W HFP (Figure 7).The test grid point was located in the middle of the room 1.2m from the floor with a direction towards the window.Surrounding buildings were not modelled for this simulation.
For the SPD of the sky, the CIE Standard Illuminant D65 was used.The material luminous reflectance values were 93% for the ceiling, 33% for the floor and 83% for the wall, and the luminous glazing transmittance was 85%.
The spectral material properties as well as the fluorescent light SPD are displayed in Figure 8, and the simulation parameters in Table 2.Both the point-in-time image-based and analysis period grid-based simulations were run.

Point-in-time image-based simulation
The point-in-time simulation was run for April 1 st at 4pm under daylight and electric light.The simulation time was 10 minutes on a virtual machine running Windows 10 with 8GB RAM and 4 CPU cores.Applying the spatial weighting on the simulation results with the previously described masks took a few additional seconds.Both non-spatially-weighted and spatially-weighted melanopic Equivalent Daylight Illuminance (E D65 v,mel ) and photopic illuminance (E v ) were calculated and are available in Table 3.The non-spatially-weighted and spatially-weighted HDR images of circadian luminance using the sensitivity curve from Lucas et al. (2014) are shown in Figure 5. Since most of the light is coming from the upper-inner FOV that has the highest weighting factor, the spatially-weighted quantities are higher than the non-spatially weighted ones.and R D respectively.Electric light was not included in the simulation of the analysis period.The simulation time was respectively 8 and 35 minutes on a Windows 10 computer with 16GB RAM and a Intel Core i7-9750H processor.Figure 9 displays the hourly annual E D65 v,mel .This result can be evaluated according to recent recommendations on healthy daytime indoor light exposure (Brown et al., 2022) or the WELL building standard (International WELL Building Institute, 2021).In this case study, relatively high E D65 v,mel values are observed, since a view direction towards a south unobstructed window was modelled.

Conclusion
This paper presented the development of a simulation tool for the prediction of IIL responses.It was created as an extension to the existing Lark Spectral Lighting plugin for Grasshopper that included an increased (9-channel) spectral resolution to lighting simulations.In addition to the spectral resolution, Lark 2.0 introduced workflows to evaluate the spatial and temporal distribution of a light stimulus.The simulation tool was applied on a case study of a simple room to demonstrate its expected use.
The knowledge on IIL responses is still growing and a variety of metrics and methods exists to quantify light considering these responses.With this simulation tool, a few of those metrics and methods are made available, including the CIE α-opic metrics, the nvR D model and spatiallyweighted light metrics.Since the precise relationships between (day)light and specific human responses are not yet well-established, it is recommended to use these metrics for relative comparisons of design options, rather than for absolute predictions.The presented simulation tool is available at https://www.food4rhino.com/en/app/lark-spectral-lighting.It is free, open-access and flexible, so that modifications or new features can be easily incorporated in the future as further research becomes available.

Figure 2 :
Figure 2: Normalized sensitivity functions of S, M, L cones, rods and ipRGCs.Using the spectral irradiance derived from the 9-channel results of the three Radiance simulations, Lark 2.0 calculates the following metrics (Figure3):

Figure 3 :
Figure 3: Implementation of the CIE toolbox in a Grasshopper component.

Figure 5 :
Figure 5: Falsecolor HDR images of circadian luminance using the sensitivity curve from Lucas et al. (2014) without (left) and with (right) the spatial weighting.

Figure 6 :
Figure 6: Example of hourly and sub-hourly values of diffuse horizontal irradiance (using the EnergyPlus epw file for Geneva, January 1 st ).The sub-hourly values are modelled using the ds shortterm program.

Figure 7 :
Figure 7: Simple room model.The red arrow indicates the grid point and direction.The red web under the luminaire indicates the luminous intensity plot.

Figure 9 :
Figure 9: Hourly annual E D65 v,mel for a south facing view direction.

Figure 10
Figure 10 displays the maximum daily R D over the entire year.Since R D is a cumulative metric, its maximum daily value increases during the summer months when daylight duration is longer.Since there is no absolute R D scale, the R D values should be used relatively to each other, to compare different design options.

Figure 10 :
Figure 10: Maximum daily cumulative response R D over one year computed for a 6-minute timestep and a south facing view direction.

Table 1 :
Wavelength start and end of the nine spectral channels.
Spectral sky modelIn the original version of the tool, the gensky program of Radiance was used to generate the CIE standard sky luminance distributions.In Lark 2.0, the gendaylit program is used instead to generate a Perez sky model, similarly to a previous update of the Lark spectral sky component (Bal- CIE α-opic metricsIn 2018, CIE released a standard describing the relative spectral sensitivity functions of the five photoreceptors in the human eye (Figure

Table 3 :
Point-in-time image-based simulation outputs.