This article explains:
- How to model an LED, or other complex source, in the non-sequential mode of Zemax
- How to use the source_radial to enter simple experimental data
- How to use the source_file to enter detailed experimental data
- How to build complex geometrical models of sources
The article contains sample files in a zip archive which can be downloaded from the last page of the article.
Authored By: Mark Nicholson
Modelling LEDs and Other Complex Sources
Zemax Development Corporation thanks Radiant Imaging, Opsira and Lumileds for the experimental data used in this article. Luxeon is a trademark of Lumileds, Inc.

Accurate source modelling is the key to accurate illumination system modelling. Zemax can split, scatter, diffract, refract, reflect, etc a ray, but this article discusses how to launch a bundle of rays initially, so that they are an accurate representation of the source's spatial and angular flux distributions.
We will discuss modelling a Luxeon LED in this article, but the design approach can be used for any complex source: arc lamps, incandescent lights etc.
Zemax contains many source objects that can be used as initial approximations to a source's properties. For example the source_filament is a good first approximation to an incandescent lamp, the source_volume_cylinder is useful for modelling fluorescent tubes. The key to our approach in this article is to get as close as possible to experimental, measured data in both the spatial (near field) and angular (far-field) distributions.
As the LED we are modelling is specified in photometric units, we will use photometric units also in our simulation. Under System > General > Units set it as follows:

As a result, illuminance will be in units of Lux (Lumens.m-2), luminous intensity will be in Candela (Lumens.steradian-1) and radiance will be in Candela.m-2.
Using the Source_Radial
The source_radial is the simplest way to enter data from a manufacturer's datasheet. Here for example is the luminous intensity of the Luxeon Emitter Red (LXHL-BD01), as provided on the product datasheet. The "batwing" nature of the angular profile can be clearly seen:
 | Angle (degree) | Relative Intensity (Arbitrary Units) | | 0 | 60 | | 5 | 60 | | 10 | 60 | | 15 | 64 | | 20 | 68 | | 25 | 72 | | 30 | 90 | | 35 | 100 | | 40 | 95 | | 45 | 85 | | 50 | 60 | | 55 | 25 | | 60 | 9 | | 65 | 4 | | 70 | 0 | | 75 | 0 | | 80 | 0 | | 85 | 0 | | 90 | 0 | |
In the attached zip file (which can be downloaded from the last page of this article) there is a file, radial_source.zmx. This file contains just two objects: a source_radial and a detector. The source_radial is a flat, rectangular or elliptical shaped object which emits rays with an angular distribution given by the supplied data

{Note that the source_radial allows the angular data to be made variable, and hence we can optimize to identify the desired angular performance for a given application. We will not use this capability in this article, as we are aiming to describe as fully as possible what the experimental data is. But, this is a fantastically useful capability when we are at an early stage of design and need to know what kind of distribution we need.}
The manufacturer's data sheet tells us that the source is 6 mm diameter, and has a typical output of 27 lumens: this data has been added to the source_radial as well. With 30 layout rays and 10 million analysis rays (remember layout rays are used only for the layout drawings: analysis rays are used for the detailed computations) we get:
Looking at the data in more detail we can see the spatial and angular performance of the source:
Spatial Data (Illuminance, in Lux) | Angular Data (Luminous Intensity, in Candela) |
 |  |
 |  |
There is excellent agreement between the computed Luminous Intensity and the manufacturer's datasheet, but there was no data provided by the manufacturer on the illuminance of the LED (the spatial structure of the LED). Therefore Zemax has assumed that the source is uniformly bright across its 3 mm radial aperture. In the absence of better data, this is all we can do. To improve the quality of the simulation, we need both the angular and the spatial data: this is referred to as source radiance or source luminance.
Using Radiant Imaging's ProSource
Radiant Imaging (www.radiantimaging.com) makes measurements of the radiance (or luminance) of a source by taking a series of calibrated 16-bit photographs of the source using a high-linearity, low noise camera and combining them into a database. Their ProSource software allows this data to be viewed in many ways and for rays to be generated that represent the full radiance (angular and spatial distributions) of the source.
A demonstration version of ProSource may be downloaded from the Radiant Imaging website. This article models a Luxeon LXLH-BD01 LED, which requires a fully licenced copy of ProSource to use and a license for the particular source model. Therefore, the data files generated in this section are not included for download with this article.
The key benefit in using Radiant Sources is that as the full measured data is available, effects due to reflection, scattering, total internal reflection can be seen. Here for example are photographs of the unilluminated LED and the illuminated LED:
 |  |
This shows detailed optical effects due to the structure of the source. For example, the contact electrodes partially occlude the reflecting ring, and there is a criss-cross pattern superimposed over the emitting surface. A large number of photographs are taken at different angles and this is used to compute a model of the radiance (or luminance) of the source. Radiant Imaging's ProSource program allows the user to see detailed performance characteristics of the source. Here, for example, is the luminous intensity of a slice in x through the center of the LED:
This is clearly far more detailed than the data originally provided by the LED manufacturer. ProSource can export this data as a source_file, which is a table of rays that Zemax can trace:
The ringed settings indicate that:
- We will generate 10 million rays
- The rays will be generated over 2p steradians
- Importance weighting is used, so more rays are generated in brighter regions
- As the LED has a radial aperture of 3 mm, we choose to generare rays initially on a sphere of radius 3 mm
Note that the ray file must be saved in the {Zemaxroot}/object folder, and must have the extension .dat.
To use this datafile, change the source_radial to a source_file and open the Radiant_Source.dat. In order to see random rays in the layout plots, set the "Randomize rays" control under System > General > Non-Sequential to 1e+8.
Note this file will require more than 500 MB of free memory. When we trace the rays, the spatial and angular performance of the source is as follows: Spatial data (Illuminance, in Lux) | Angular Data (Luminous Intensity, in Candela) |
 |  |
 |  |
This data file is much more richly detailed in both the spatial and angular domains. The spatial results clearly show the "batwing" structure of this source, which is not predicted from the angular data alone. The angular data also shows considerably more structure than the simple curve on the manufacturer's datasheet. Note how the subsidiary structure is faithfully reproduced in the Zemax ray-tracing results:


We can also compare the spatial performance. The rays are generated on a sphere of radius 3 mm. If we trace the rays backwards, they will come to a virtual focus, where we can see the image formed. Generating 10 million rays within a cone angle of a few degrees:

and telling Zemax to trace these rays backwards:

yields the following spatial distribution at the virtual image:

compare this to the photograph in the ProSource database:

Zemax and ProSource use slightly different image gamma, but it can be seen that these images are basically identical. Notice also that if you zoom in on the Zemax detector window, two ghost images of the LED emitter can be seen: this is also in the ProSource data:

Note: this is not a photograph! This is the result of a ray-tracing simulation inside Zemax. The use of measured radiance data gives extremely accurate source modeling.
Using Opsira's Luca Raymaker
Opsira (www.opsira.de) offer a similar capability with their Luca Raymaker software, which produces ray sets from measurements made in a goniometer. The ray-generation is made as follows:

The file produced is a binary .dat which is then read into Zemax as a source_file object and then traced in the same way as the Radiant Sources described in the previous page.
Building a Complex Geometric Model
The final technique we will discuss is making up a complex geometric source model. This is a "mini-model" of the source, and uses the geometric sources supplied with Zemax along with a series of other objects intended to represent the internal construction of the source. For example, look in the folder {Zemaxroot}/samples/non-sequential/sources/led_model.zmx:

This object is made up of a series of smaller internal objects:

which can represent the LED die, electrode wires, mounting points etc. Then detailed optical properties can be applied to the faces of the various objects, and then a large number of rays traced.
These source models can be traced directly, or the rays produced can then be saved to a ray database. In the ray database viewer (Analysis > Database > Ray Database Viewer) you may select a test object, and save all rays that land on that object as a new source object. This new datafile can then be read in using a source_file object.

Complex geometrical models suffer from one big problem: you need to know what values to enter! For example, what scattering function should be used on the electrode wires? What is the reflectivity of the support structure? This kind of data is not easy to obtain. Finally, the complex model must be validated against experimental measurements: which begs the question, why not just use the experimental data in the first place?
Generally speaking experimental data is more accurate and easier to work with. But in some systems, especially where light from the source is re-imaged onto the source, the effort required to construct a good complex source is worth it. It is also possible to get the best of both world, by defining a complex object, but to launch rays initially from a measured source file:

This figure is copyright Radiant Imaging and is used with permission.
Summary and References
This article has described several techniques to model LEDs and other complex sources:
- The easiest method, and best when experimental data is scarce, is to use the source_radial or other built-in sources
- Experimental data, such as provided by Radiant Imaging and Opsira, gives the highest accuarcy and is very easy to use
- Complex source models can be useful when rays are re-imaged onto the source object