Skip to main content

LED-based Vis-NIR spectrally tunable light source - the optimization algorithm



A novel numerical method for calculating the contributions of individual diodes in a set of light emitting diodes (LEDs), aimed at simulating a blackbody radiation source, is examined. The intended purpose of the light source is to enable calibration of various types of optical sensors, particularly optical radiation pyrometers in the spectral range from 700 nm to 1070 nm.


This numerical method is used to determine and optimize the intensity coefficients of individual LEDs that contribute to the overall spectral distribution. The method was proven for known spectral distributions: “flat” spectrum, International Commission on Illumination (CIE) standard daylight illuminant D65 spectrum, Hydrargyrum Medium-arc Iodide (HMI) High Intensity Discharge (HID) lamp, and finally blackbody radiation spectra at various temperatures.


The method enables achieving a broad range of continuous spectral distributions and compares favorably with other methods proposed in the literature.


Numerous variants of spectral light sources based on combined radiation of individual LEDs have been reported in the past 15 years [14]. Each LED has its own spectral characteristic and contributes to the overall output spectrum in a relatively narrow range. As the number of newly-developed semiconductor light sources increases, covering wider and wider spectral range, this kind of construction becomes increasingly popular [57]. This approach allows for the generating a broad range of different output spectral distributions of almost arbitrary shape. This in turn, enables various applications such as calibration of light-measuring instruments, ambient lighting, applications in forensic science, fluorescence applications [810], etc.

Special case of light sources based on combined emission from a set of LEDs (where each individual LED has its own spectral distribution) are calibration sources [1117]. Such instruments often allow for the generation of arbitrary shaped output spectrum. For example, reference [9] describes a LED-based calibration source for an ultra-sensitive spectrometry system used for electro- and photo-luminescent measurements. However, extensive search through available literature produced only a few readily implementable prescriptions for synthesizing the output spectrum of a LED-based tunable source [15, 17]. The objective of this paper is to explore the possibilities for improving spectrum synthesis methods.

We explore the possibilities of generating various spectral shapes in the very near infrared region (VNIR) using a relatively large number of individual LEDs. It is our belief that the results of this work might be useful to other researchers in this field.

Special emphasis will be placed on generating a simulated “flat” spectrum and blackbody radiation spectra in the 700 - 1070 nm range for the 800 - 1300 °C temperature interval. However, the proposed methodology should be readily applicable to other spectral ranges and/or temperatures [18].

The basic problem of synthesizing the shape of a given spectral profile is determining the intensity of each individual LED that contributes to the overall spectrum. Each LED has a relatively narrow spectral distribution as illustrated in Fig. 1 [19]. In the first approximation, the spectral distribution of a single LED will be assumed to be Gaussian. The synthesized output spectrum is a sum of the contributions from each individual LED’s normalized spectral power distribution (SPD) weighted by a certain factor. This factor in fact corresponds to the current that drives the particular LED, in order to get unity intensity at Gaussian center.

Fig. 1

Relative SPDs of different LEDs in the spectral range 650 - 1110 nm

For a given target output spectral profile, it is therefore necessary to mathematically find the combination of values of the coefficients (driving current intensities) that best iterate the target spectrum. An algorithmic solution was developed to achieve this.

The algorithm was initially applied for the synthesis of a flat spectrum, i.e. for producing an output spectrum that has a constant intensity with respect to the wavelength in the given wavelength interval. The “flat” spectrum can be an excellent tool for direct measurements and evaluation of the responsivity function of optical sensors and systems like low-signal intensity measuring spectrometers, photomultipliers, etc., where standard lamps and black bodies introduce large relative errors due to a great intensity variation (almost two orders of magnitude).

A further refinement of the algorithm was used to synthesize arbitrarily shaped spectrum profiles and in particular to simulate blackbody radiation. Deviation of the synthesized blackbody spectra from the theoretical curve was analyzed in detail. This was done in order to estimate the temperature reading errors when the LED-based source is used as a calibration source for optical pyrometers. A LED-based system that simulates blackbody radiation would be a handy and practical solution for calibrating pyrometers in industrial installations, opposite to large blackbody furnaces.


As already mentioned, the main purpose of the proposed algorithm for a given number of LEDs is to find the coefficients (weight factors) that multiply the driving currents of a LED in such way that the summary output spectral profile represents the best possible approximation of the desired output spectral profile.

In order to simplify calculations, we assumed that the SPDs of individual LEDs are normalized. In other words, the output intensity for the emission peak of each LED has a unity value. One has to bear in mind that in practical implementations LEDs feature different emission efficiencies. Therefore, the coefficients obtained through simulation need to be multiplied by an appropriate factor that accounts for different LED efficiencies.

Table 1 shows the relative light intensity emitted by individual LEDs per unit current (i.e. emission gain) in the wavelength interval 632-1548 nm. The LEDs used were: L680, L690, L700, L710, L720, L735, L750, L760, L770, L780, L800, L810, L820, L830, L850, L870, L890, L910, L940, L970, L980, L1020, L1050, L1070, L1200, L1300, L1450 and L1550. The labels and the intensity data were adopted from [19]. Figure 2 illustrates the typical SPD of a diode from the set (L910 in this example).

Table 1 Matrix M of relative LED SPDs in the spectral range from 632 nm to 1548 nm with an increment of 4 nm. LEDs: L680, L690, …, L1550
Fig. 2

Relative SPD of light emission for LED L910 in spectral width 820 - 1000 nm. Solid line: realistic profile curve. Dashed line: Gaussian profile curve with the same spectral full width at half maximum (FWHM) as L910

Determining the values of the sought coefficients in linear algebra comes down to solving m equations with n unknown coefficients a j (j = 1,…n) according to (1), where M represents the matrix of relative SPDs derived from Table 1, depending on the number of chosen diodes n and the selected spectral bandwidth m.

$$ \begin{array}{l}{a}_1{M}_{11}+{a}_2{M}_{12}+\dots +{a}_n{M}_{1n} = {I}_1\\ {}{a}_1{M}_{21}+{a}_2{M}_{22}+\dots +{a}_n{M}_{2n}\kern0.5em = {I}_2\\ {}\kern11.5em \dots \kern10em \\ {}{a}_1{M}_{m1}+{a}_2{M}_{m2}+\dots +{a}_n{M}_{mn}={I}_m\end{array} $$

The matrix form of (1) is given in (2) and (3), where A represents a matrix of unknown LED coefficients and I represent a matrix of targeted intensities. The element M ij of the matrix M represents the spectral contribution on the i-th wavelength of the j-th LED. The matrix M has the dimensions m × n with non-zero elements mainly concentrated along its diagonal. Owing to the fact that m > n, mathematical problem (1) is actually an overdetermined system.

$$ \left[\begin{array}{c}\hfill {M}_{11}{M}_{12}\dots {M}_{1n}\hfill \\ {}\hfill {M}_{21}{M}_{22}\dots {M}_{2n}\hfill \\ {}\hfill \dots \hfill \\ {}\hfill {M}_{m1}{M}_{m2}\dots {M}_{mn}\hfill \end{array}\right]\cdotp \left[\begin{array}{c}\hfill {a}_1\hfill \\ {}\hfill {a}_2\hfill \\ {}\hfill \dots \hfill \\ {}\hfill {a}_n\hfill \end{array}\right]=\left[\begin{array}{c}\hfill {I}_1\hfill \\ {}\hfill {I}_2\hfill \\ {}\hfill \dots \hfill \\ {}\hfill {I}_m\hfill \end{array}\right] $$
$$ \mathbf{M}=\left[\begin{array}{c}\hfill {M}_{11}{M}_{12}\dots {M}_{1n}\hfill \\ {}\hfill {M}_{21}{M}_{22}\dots {M}_{2n}\hfill \\ {}\hfill \dots \hfill \\ {}\hfill {M}_{m1}{M}_{m2}\dots {M}_{mn}\hfill \end{array}\right];\kern0.75em \mathbf{A}=\left[\begin{array}{c}\hfill {a}_1\hfill \\ {}\hfill {a}_2\hfill \\ {}\hfill \dots \hfill \\ {}\hfill {a}_n\hfill \end{array}\right];\kern1em \mathbf{I} = \left[\begin{array}{c}\hfill {I}_1\hfill \\ {}\hfill {I}_2\hfill \\ {}\hfill \dots \hfill \\ {}\hfill {I}_m\hfill \end{array}\right] $$

The optimal solution to this kind of problem can be sought by several different methods (e.g. see [2024]). We proposed yet another innovative approach, starting from the following assumptions:

  • The target spectral profile is well-defined.

  • The interval of the simulated wavelengths is covered by n LED sources.

  • Each LED’s SPD can be initially approximated by a Gaussian, to accelerate calculations. However, final calculations are performed using real SPDs.

  • The contribution of each LED to the summary spectrum is determined by a coefficient a j (j = 1,…n), which is proportional to the driving current of that LED.

  • All coefficients a j must be in the interval lb a  < a j  < ub a . The values of the lower lb a and the upper ub a interval boundary depend on the shape of the target.

The system of Eq. (1) in the new approach is solved by allowing for the summed intensities I 1 , I 2 , …,I m to slightly deviate from the prescribed values of the target intensities I T1 , I T2 , …,I Tm . The coefficients a 1 , a 2 ,.., a n are varied within their expected range and for each variation a standard deviation from the target intensities I T1 , I T2 , …,I Tm is calculated and stored. This procedure enables finding of the variation of coefficients a 1 , a 2 , …, a n that yields the minimum deviation of the combined LEDs spectral distribution from the target SPD. The outline of the proposed optimization algorithm is presented in the flowchart shown in Fig. 3.

Fig. 3

Flowchart of the proposed optimization algorithm

Each coefficient a j is determined with resolution res, which gives a number of possible values for each a j as:

$$ N=\left(u{b}_a-l{b}_a\right)/res $$

Under these assumptions, it is possible to generate Vr different spectra (variations with repetition):

$$ Vr={N}^n $$

The criterion for selecting the best variation is minimal standard deviation from the target SPD. Taking into account the spectral range in which optical pyrometers would operate and the purpose for which it would be used, the spectral interval of interest in our research was 700 - 1070 nm. Choosing of the best values for the coefficients a 1 , a 2 ,.., a n by finding the variation that produces the minimum deviation of the synthesized spectrum in mentioned spectral region, was limited by the availability of LEDs on the market. Due to this constraint, we covered the interval by n = 24 LED models: L680, L690, L700, L710, L720, L735, L750, L760, L770, L780, L800, L810, L820, L830, L850, L870, L890, L910, L940, L970, L980, L1020, L1050 and L1070. To broaden the dynamic range, a group of four identical devices were used for each diode model. Since we wished to determine the coefficients accurately to the third decimal place (res = 0.001), according to (4) it followed that N = 4000. Based on (5), for 24 LED models the overall number of variations was Vr = 400024. The number of variations represented a formidable computing challenge and it was necessary to further reduce it. This was achieved by: (i) reducing the number of possible coefficient values and (ii) reducing the number of diodes that were simultaneously active during the optimization run.

The number of possible coefficient values was reduced by an iterative procedure, where N = 3 was kept fixed, while the interval and the resolution were simultaneously decremented.

The reduction in the number of active diodes during optimization was effectively achieved by shortening the wavelength interval for the optimization search. This procedure started by taking the first n' diodes (arranged by increasing wavelength). The number n' was chosen so that computer optimization over the shortened wavelength interval could be carried out in a reasonable time. The next step involved shifting of the “optimization window” by two spaces to the right. Thus, a new set on n' diodes underwent an optimization run. The coefficients left of the current window remained as calculated in the previous run. The procedure was repeated until the optimization window reached the rightmost diode (the diode with the longest wavelength). Figure 4 is a graphical representation of the procedure.

Fig. 4

Graphical representation of window movement (WM) when calculating coefficients for n = 24 and n' = 8 LEDs in one iteration cycle

The search for the coefficients in the optimization window was performed using the following method: three values (N = 3) of the coefficients were evaluated for each iteration step and each diode. In the first iteration (c = 0), these values were given by (6) (brackets denote a set of elements) and represented the lower boundary (lb a ), the upper boundary (ub a ), and their arithmetic average.

$$ {a}_{j,c=0}\in \left\{l{b}_a;\ \frac{u{b}_a-l{b}_a}{2};\ u{b}_a\right\} $$

The computer program evaluated all 3n' variations of the coefficients and chose one that yielded a minimal deviation of intensities I 1 , I 2 , …,I m from the target intensities I T1 , I T2 , …,I Tm . For each evaluated coefficient variation, the criterion for minimal deviation was taken to be standard deviation σ min according to (7):

$$ \sigma =\sqrt{\frac{1}{m}{\displaystyle {\sum}_{i=0}^m{\left({I}_i-{I}_{Ti}\right)}^2}} $$

In the next iteration cycle, the value chosen from the previous cycle was surrounded by shorter interval boundaries (step) according to (8). The function f(c) depends of the iteration number c. Selection of the step is of utmost importance for convergence. If the step is too narrow, the possibility exists that the real value of the coefficient will be missed. Conversely, if the step is too broad, the number of iterations increases and convergence is too slow.

$$ step=\frac{1}{2}\left(u{b}_a-l{b}_a\right)\cdotp f(c) $$

Numerous functions f(c) were tested to find a way to systematically decrease the interval step. The simplest of these functions was given by (9).

$$ f(c)={\beta}^c $$

where β is the fitting parameter, β (0, 1). However, the best results were achieved with the function given by (10):

$$ f(c)={\beta}^{c\cdotp \ln \left(c+1\right)} $$

Consequently, (8) became:

$$ step=\frac{1}{2}\left(u{b}_a-l{b}_a\right)\cdotp {\beta}^{c\cdotp \ln \left(c+1\right)} $$

After the initial iteration (c = 0) and determination of the best variation of the coefficients, the following iterations (c ≥ 1) were performed in an identical manner, bearing in mind that the three possible values of each coefficient a j,c were chosen from the set given by (12) or, alternatively written, (13). The only condition that needed to be met was that the coefficients from the previous (c-1)-th iteration satisfy lb a  < a j,c-1 < ub a . If a coefficient from the (c-1)-th iteration satisfied a j,c-1 ≤ lb a , than a j,c in the c-th iteration, it assumed values given by (14). Finally, if a coefficient from the (c-1)-th iteration satisfied a j,c-1 ≥ ub a , then the three possible values for the c-th iteration were given by (15).

$$ {a}_{j,c}\in \left\{\begin{array}{c}\hfill {a}_{j,c-1}- step;\hfill \\ {}\hfill {a}_{j,c-1};\ \hfill \\ {}\hfill {a}_{j,c-1}+ step\hfill \end{array}\right\} $$
$$ {a}_{j,c}\in \left\{\begin{array}{c}\hfill {a}_{j,c-1}-\frac{1}{2}\left(u{b}_a-l{b}_a\right){\beta}^{c\cdotp \ln \left(c+1\right)};\ \hfill \\ {}\hfill {a}_{j,c-1}; \hfill \\ {}\hfill {a}_{j,c-1}+\frac{1}{2}\left(u{b}_a-l{b}_a\right){\beta}^{c\cdotp \ln \left(c+1\right)}\hfill \end{array}\right\} $$
$$ {a}_{j,c}\in \left\{\begin{array}{c}\hfill l{b}_a;\ \hfill \\ {}\hfill l{b}_a\left(1-\frac{1}{2}{\beta}^{c\cdotp \ln \left(c+1\right)}\right)+\frac{u{b}_a}{2}{\beta}^{c\cdotp \ln \left(c+1\right)};\ \hfill \\ {}\hfill l{b}_a\left(1-{\beta}^{c\cdotp \ln \left(c+1\right)}\right)+u{b}_a{\beta}^{c\cdotp \ln \left(c+1\right)}\hfill \end{array}\right\} $$
$$ {a}_{j,c}\in \left\{\begin{array}{c}\hfill u{b}_a;\ \hfill \\ {}\hfill u{b}_a\left(1-\frac{1}{2}{\beta}^{c\cdotp \ln \left(c+1\right)}\right)+\frac{l{b}_a}{2}{\beta}^{c\cdotp \ln \left(c+1\right)}; \hfill \\ {}\hfill u{b}_a\left(1-{\beta}^{c\cdotp \ln \left(c+1\right)}\right)+l{b}_a{\beta}^{c\cdotp \ln \left(c+1\right)}\hfill \end{array}\right\} $$

With each subsequent iteration, the intervals from which each coefficient was sampled, decreased. The procedure was repeated until all the intervals fall below the sought resolution res. The alternative criterion for the end of simulation was when the best variation of the coefficients’ c-th iteration conceded with the best variation from the previous (c-1)-th variation.

Among various monotonically decreasing functions that we investigated, β c · ln(c + 1) (Fig. 5) proved to be one of the simplest and most efficient for the determining the decreasing step during the iterations. This function had a single parameter β that needs to be defined prior to the simulation. The value of β determined the number of iterations. If β was small, the simulation executed quickly but was likely to miss the optimum set of coefficients. A higher value of β yielded better results at the expense of an increased number of iterations. Above certain values of β, the computing time increased with no noticeable improvement in accuracy. For most target spectral profiles, this point of diminishing returns was found to be at β = 0.99.

Fig. 5

Shape of function f(c) = β c · ln(c + 1) for different values of coefficient β

The logarithmic part of function (10) prevented the program from executing an unnecessarily large number of steps after a certain resolution was achieved. For example, if the currently achieved resolution is 0.01 (lb a  = 0, ub a  = 4, β = 0.9) for function (9), which has no logarithm, it takes 11 more iterations to get to the target resolution of 0.005 (Table 2). By contrast, function (10) achieves a resolution of 0.005 in only three additional steps for the same values of the coefficients (Table 3). We believe that the use of function (10) for this particular optimization problem significantly enhances the efficiency of the simulation and represents one of the most important improvements in comparison to previous algorithms.

Table 2 Number of iteration cycles for res = 0.005 and function (9)
Table 3 Number of iteration cycles for res = 0.005 and function (10)

One of the common approaches (e.g. see [15, 17]) for estimating how good the overlap is between the LED source and the target SPD is to introduce parameter p:

$$ p=\frac{{\displaystyle {\sum}_{380}^{780}}\left|{\displaystyle {\sum}_{i=1}^n}{k}_i^{j-1}{S}_{LE{D}_i}\left(\lambda \right)-{S}_{TARGET}\left(\lambda \right)\right|}{{\displaystyle {\sum}_{380}^{780}}{S}_{TARGET}\left(\lambda \right)} $$

In our research we also used parameter p along with standard deviation σ as a criterion for choosing the best variation of coefficients a j .

Results and discussion

Simulation results

The proposed algorithm was encoded in the C programming language. The program outputs the best coefficients, the minimum achieved standard deviation, the average value of the intensities, and the maximum deviation of intensities from target values. The values of parameter p for different search steps (step) (Table 4) are also contained in the program’s output. The results from Table 4 suggest that standard deviation of the maximum intensity deviation rapidly falls as the values of the step decrease.

Table 4 Representative values of minimum standard deviation σ min (7) and parameter p (16) as a function of step for spectral range 700 - 1070 nm, lb a  = 0, ub a  = 4, n' = 13, β = 0.99

A separate program written in C# used the text output of the main simulation and generated textual and graphical reports. Running of the actual program for different values of n' showed that it produced the best results for n' = n. However, with increasing n', the simulation time sharply increased and the simulation quickly became infeasible. With the computer currently at our disposal (PC, CPU 3 GHz, 4GB RAM), the limit for simulations of reasonable length was set at n' = 13.

Figure 6 illustrates typical simulation results for the “flat” target spectrum. It also indicates the position of the maximum of intensity deviation with respect to the intensity of the targeted spectrum. This particular example of spectrum synthesis serves a dual purpose: (i) the simplicity of the spectrum shape allows for easy analysis of the errors introduced by the algorithm and (ii) a physical device with a flat output spectrum can serve as a very useful tool for calibration and characterization measurements of various types of spectrophotometers.

Fig. 6

“Synthetized” spectrum (solid line) and position of maximum deviation (maxDev) from flat spectrum (dashed line) in 700-1070 nm spectral range

Figure 7 illustrates the typical convergence pattern of a single LED coefficient (L850 in this example), as a function of the iteration number c. Convergence of coefficients of the remaining LEDs in the array follows a similar pattern. It is readily apparent that the coefficient oscillates around the optimal value, with the amplitude of oscillations diminishing as c rises, according to the given logarithmic function (11). The iteration process is repeated until the amplitude of oscillations falls below the sought resolution.

Fig. 7

Convergence pattern of simulation results (LED with peak at 850 nm) for the simulation presented in Fig. 6

Finally, Fig. 8 is a graphical representation of deviations from the targeted flat curve in the spectral range 700 - 1070 nm of the obtained spectrum. Due to the SPD characteristics of the LEDs used in the simulation (Figs. 1 and 2), deviations were mostly pronounced in the 840 - 860 nm spectral range (~5 %). In the rest of the spectrum they did not exceed 4 %.

Fig. 8

Ratio of target SPD (flat curvedashed line) to the simulation results (solid line) presented in Fig. 6

Verification of the algorithm using programming package mathematica

The algorithmic solution presented in this paper was also verified with the computer algebra system MATHEMATICA, which is highly applicable to problems that involve symbolic computations. Here, similar to what we did in our algorithmic solution, we adopted that the desired intensities I 1 , I 2 , …, I m have the same constant value, i.e. I 1  = I 2  = … = I m  = 1. Also, we added ε i , \( i=\overline{1,\kern0.5em m} \), to the right sides of the equations from (1), where ε i is the difference between the i-th obtained intensity I i and the desired light-emitting intensity value I equal to 1 (17, 18). We also considered the limits (19) for the unknowns a j , \( j=\overline{1,n}. \)

$$ {\displaystyle {\sum}_{j=1}^n{a}_j{M}_{ij}=1+{\varepsilon}_i,}\kern1.5em i=\overline{1,m}, $$
$$ -1\le {\varepsilon}_i\le 1,\kern4.75em i=\overline{1,m}, $$
$$ 0\le {a}_j\le 4,\kern5.5em j=\overline{1,n} $$

The standard deviation of the dispersion of intensities (2) obtained in this way, compared to the desired intensity values equal to 1, needed to be minimized (21):

$$ \sigma =\sqrt{\frac{1}{m}{\displaystyle {\sum}_{i=0}^m{\left({I}_i-1\right)}^2}}=\sqrt{\frac{1}{m}{\displaystyle {\sum}_{i=0}^m{\varepsilon_i}^2}} $$

Therefore, we obtained the following single-objective optimization problem in (2), which was subjected to (17, 18, and 19).

$$ \min \sqrt{\frac{1}{m}{\displaystyle {\sum}_{i=0}^m{\varepsilon_i}^2}} $$

The above-mentioned optimization problem is a variation of the standard linear programming problem; it contains n + m unknowns and is subject to the constraints determined by m equations and n + m inequalities. There are several methods that can be applied to solve this problem (e.g. see Tikhonov’s method [2528]). The classical approach is to introduce so-called free variables, in order to transform the primal problem to its standard form, containing only equations. After that, the Simplex method is certainly the approach of choice for solving the obtained linear programming problem [29, 30].

A built-in MATHEMATICA function NMinimize[{f,cons}, vars] minimizes the objective function f numerically, subject to the constraints provided by the list cons, and variables given by the list vars. Therefore, the following implementation was considered:

$$ \mathrm{MinDeviation}\left[M\_ List\right]\ :=\mathrm{Module}\Big[\left\{m,\ n,\ cons,\ f,\ vars\right\}, $$
$$ \left\{m,\ n\right\}=\mathrm{Dimensions}\left[\mathbf{M}\right]; $$
$$ cons=\mathrm{Union}\left[\mathrm{Table}\left[{\displaystyle {\sum}_{j=1}^{24}\mathbf{M}}\left[\left[i,j\right]\right]\ast a\left[j\right]==1+\mathrm{e}\mathrm{p}\mathrm{s}\left[i\right],\ \left\{i,\ 1,\ m\right\}\right],\kern0.5em \mathrm{Table}\left[-1\le \mathrm{e}\mathrm{p}\mathrm{s}\left[i\right]\le 1,\ \left\{i,\ 1,\ m\right\}\right]\right.,\mathrm{Table}\left.\left[0\le a\left[j\right]\le 4,\ \left\{j,\ 1,\ n\right\}\right]\right]; $$
$$ vars=\mathrm{Union}\left[\mathrm{Table}\left[\mathrm{e}\mathrm{p}\mathrm{s}\left[i\right],\ \left\{i,\ 1,\ m\right\}\right],\ \mathrm{Table}\left[a\left[j\right],\ \left\{j,\ 1,\ n\right\}\right]\right]; $$
$$ \mathrm{f}=\mathrm{Sqrt}\left[\frac{1}{m\ast {\displaystyle {\sum}_{i=1}^m}\left(\mathrm{e}\mathrm{p}\mathrm{s}\left[i\right]\hat{\mkern6mu} 2\right)}\right]; $$
$$ \mathrm{Return}\left[\mathrm{NMinimize}\left[\left\{\mathrm{f},\ cons\right\},\ vars\right]\right];\Big]; $$

The matrix M, where M = (M ij ), 1 ≤ i ≤ m, 1 ≤ j ≤ n, is an SPD matrix of the LEDs extracted from Table 1. The dimensions of the matrix are m × n, where m is the selected spectral bandwidth and n is the number of selected diodes. For this matrix, the minimal standard deviation was equal to 0.019792.

Therefore, the maximal absolute declination was obtained for the coefficient ε 37  = 0.0565 = 5.65 %. Notice that the constraints –1 ≤ ε i  ≤ 1, \( i=\overline{1,m} \) in our mathematical model can be formulated as –0.06 ≤ ε i  ≤ 0.06, \( i=\overline{1,m} \), since the maximal absolute declination never exceeded 6 % in our computations in MATHEMATICA.

The solutions obtained by means of this software showed considerable overlaps with the data received from our method (Table 5).

Table 5 LED coefficients obtained with MATHEMATICA software and our algorithmic solution for a “flat” curve in the spectral range 700 - 1070 nm

Comparison with an existing algorithmic solution

In order to evaluate potential merits of the newly-developed algorithm, a comparison was made with the algorithmic solution described in [15]. This previously-published algorithm solely depends on the minimization of parameter p (16). To make a meaningful comparison, the same set of assumptions were made as in [15]: individual LED spectra were taken as having a Gaussian shape with 20 nm FWHM. The simulations were performed for the visible spectrum (380 - 780 nm). The peek wavelengths for a given set of LEDs were chosen to be equidistant at 20, 10 and 5 nm. This effectively means that three sets of 20, 40 and 80 LEDs, respectively, were tested.

The validity of our optimization algorithm was tested for two well-known light spectra: CIE standard daylight illuminant D65 and HMI HID lamp. The simulation results with 5 nm LED intervals for the spectral range 380 – 780 nm are presented in Figs. 9 and 10. The figures show that the proposed algorithm simulated the spectra very accurately.

Fig. 9

SPD of daylight illuminant D65 (solid line) and our simulation results with 5 nm LED intervals (circles)

Fig. 10

SPD of an HMI HID lamp (solid line) and our simulation results with 5 nm LED intervals (circles)

Table 6 shows a comparison between the results for parameter p of the two different algorithms. It is immediately apparent that the new algorithm yielded somewhat better results (lower value of p) for the 20 nm distance between peeks. For more densely populated sets of LEDs (10 nm and 5 nm inter-peak distance), our algorithm produced the same or slightly higher values of p for the CIE D65 and HMI HID lamps.

Table 6 Parameter p for wavelength intervals over the spectral range from 380 nm to 780 nm

Based on the presented comparisons, we believe that the newly-developed algorithm offers some improvements, particularly in the case of sparsely populated sets of LEDs and/or target SPDs with more pronounced peeks.

Simulation of blackbody radiation

One of the SPDs of particular interest in our research was the spectrum of blackbody radiation in VNIR (700 - 1070 nm,) corresponding to blackbody temperatures above 800 °C [31, 32]. As previously mentioned, this kind of source could be useful for the calibration of optical pyrometers that operate in the range from 700 to 1070 nm.

Synthesis of Planck’s curve in the given wavelength interval and for the temperatures of interest presented an additional challenge for the algorithm described in this paper. Namely, the spectra cover a very broad dynamic range with orders-of-magnitude different intensities at the endpoints. Our algorithm is limited in the sense that ub a determines the dynamic range of the synthetized spectrum. To address this problem, the initial values of the lower (lb a ) and upper (ub a ) boundaries for the coefficients a j were changed. Thus, for t = 800 °C boundaries they were lb a  = 0 and ub a  = 4, while for t = 1300 °C ub a was increased to ub a  = 30. It was also determined that for this kind of target SPD, the optimal value of parameter β was β = 0.992.

Using the modifications mentioned in the previous paragraph, the newly-developed algorithm was applied to a set of real LEDs (using real SPDs for each LED from the set), in order to derive the intensity coefficients a j and simulate Planck’s law curve for temperatures between 800 °C and 1300 °C. Representative results of these simulations are presented in Fig. 11. Numerical results of the simulations for three different temperatures are given in Table 7, along with the values of a j calculated using MATHEMATICA software. The similarity of the coefficients obtained by our algorithm and MATHEMATICA was yet another verification of the validity of our approach.

Fig. 11

Blackbody relative radiant intensities for 800, 900, 1000, 1100, 1200 and 1300 °C (dashed lines) and LED SPDs (solid lines) for the spectral width of 700 - 1070 nm

Table 7 LED coefficients produced by MATHEMATICA and our algorithmic solutions for different temperatures in the spectral range 700 - 1070 nm

In order to verify that the synthesized blackbody spectra can indeed be used for calibrating optical pyrometers, the errors introduced by this non-ideal calibration source needed to be estimated. The basic assumption was that in the 800 - 1300 °C temperature range, the most common sensors used in pyrometry are PIN diodes with typical spectral sensitivity characteristics in the spectral range 600 - 1100 nm, as illustrated in Fig. 12 [3335].

Fig. 12

Typical responsivity curve S(λ) of top silicon PIN diode depending on wavelength [36]

The output voltage of the PIN diode amplifier is proportional to the spectral radiance and for the spectral range (λ 1 , λ 2 ) it depends on the blackbody temperature as:

$$ \mathrm{U}(T)=C\times {\displaystyle {\int}_{\lambda_1}^{\lambda_2}\mathrm{N}\left(\lambda, T\right)\mathrm{S}\left(\lambda \right)d\lambda } $$

where: C is the proportionality constant which includes amplification and optical characteristics of a sensor and optical parts of the pyrometer, and S(λ) is the spectral responsivity of the PIN diode. The quantity Nλ (λ,T) is the spectral radiance in the given temperature range and can be derived from Planck’s law:

$$ {\mathrm{N}}_{\uplambda}\left(\lambda, T\right)=\frac{2h{c}^2}{\lambda^5}\frac{1}{\ {e}^{\frac{hc}{\lambda {k}_BT}}-1} $$

By substituting the values of the ideal blackbody spectral radiance (23) with radiance values obtained from the simulation, it is possible to calculate the difference in temperature readings between the ideal blackbody and the synthesized calibration source.

Our calculations showed that the errors in temperature readout due to the non-ideality of the LED source did not exceed 0.1 °C in the temperature range of interest.


This paper examined the feasibility of using a set of LED sources whose cumulative output simulated the “flat” spectrum as well as the blackbody radiation spectrum in the 700 - 1070 nm interval and in the 800 - 1300 °C temperature range. Our research team intends to use the actual composite LED source primarily to calibrate optical pyrometers. We developed a novel algorithm that calculates the intensities of each individual LED in the composite source, in order to achieve the desired output spectral profile. Apart from the “flat” and blackbody spectra, the algorithm was tested on various other target spectral profiles. Especially the “flat” spectrum which is very important as it might enable evaluation and direct measurements of spectral responses of various types of optical sensors and systems. We demonstrated that the proposed algorithm compares favorably with other methods for shaping the output spectral profile of tunable LED light sources. It provides an efficient theoretical base for practical realization of calibration sources.



International Commission on Illumination


Full width at half maximum


High intensity discharge


Hydrargyrum medium-arc iodide


Light emitting diode


Spectral power distribution


Very near infrared region


  1. 1.

    Ries, H., Leike, I., Muschaweck, J.: Optimized additive mixing of colored light-emitting diode sources. Opt. Eng. 43, 1531–1536 (2004)

    ADS  Article  Google Scholar 

  2. 2.

    Li, Y.-L., Shah, J.M., Leung, P.-H., Gessmann, T., Schubert, E.F.: Performance characteristics of white light sources consisting of multiple light emitting diodes. Proc. SPIE 5187, 178–184 (2004)

    ADS  Article  Google Scholar 

  3. 3.

    Shang, P. Y., Tang, C. W., Huang, B. J.: Charaterizing LEDs for mixture of colored LED light sources, in 2006 Int. Conf. Electron. Mater. Packag. EMAP 2006, (IEEE, Kowloon, 2006)

  4. 4.

    Lu, S.S.L.W., Zhang, T., He, S.M., Zhang, B., Li, N.: Light-emitting diodes for space applications. Opt. Quant. Electron. 41, 883–893 (2009)

    Article  Google Scholar 

  5. 5.

    Finlayson, G., Mackiewicz, M., Hurlbert, A., Pearce, B., Crichton, S.: On calculating metamer sets for spectrally tunable LED illuminators. J. Opt. Soc. Am. A Opt. Image Sci. Vis. 31, 1577–1587 (2014)

    ADS  Article  Google Scholar 

  6. 6.

    Hirvonen, J.M., Poikonen, T., Vaskuri, A., Kärhä, P., Ikonen, E.: Spectrally adjustable quasi-monochromatic radiance source based on LEDs and its application for measuring spectral responsivity of a luminance meter. Meas. Sci. Technol. 24, 115201–115208 (2013)

    ADS  Article  Google Scholar 

  7. 7.

    Mackiewicz, M., Crichton, S., Newsome, S., Gazerro, R., Finlayson, G. D., Hurlbert, A.: Spectrally tunable led illuminator for vision research, in Conf. Colour Graph. Imaging, Vision, CGIV 2012, (Society for Imaging Science and Technology, Amsterdam, 2012)

  8. 8.

    Kolberg, D., Schubert, F., Lontke, N., Zwigart, A., Spinner, D.M.: Development of tunable close match LED solar simulator with extended spectral range to UV and IR. Energy Procedia 8, 100–105 (2011)

    Article  Google Scholar 

  9. 9.

    Kasalica, B.V., Belca, I.D., Stojadinovic, S.D.J., Zekovic, L.J.D., Nikolic, D.: Light-emitting-diode-based light source for calibration of an intensified charge-coupled device detection system intended for galvanoluminescence measurements. Appl. Spectrosc. 60, 1090–1094 (2006)

    ADS  Article  Google Scholar 

  10. 10.

    O’Hagan, W.J., McKenna, M., Sherrington, D.C., Rolinski, O.J., Birch, D.J.S.: MHz LED source for nanosecond fluorescence sensing. Meas. Sci. Technol. 13, 84–91 (2002)

    ADS  Article  Google Scholar 

  11. 11.

    Fryc, I., Brown, S.W., Ohno, Y.: A spectrally tunable LED sphere source enables accurate calibration of tristimulus colorimeters. Proc. SPIE 6158, 61580E (2004)

    Google Scholar 

  12. 12.

    Brown, S.W., Santana, C., Eppeldauer, G.P.: Development of a tunable LED-based colorimetric source. J. Res. Natl. Inst. Stand. Technol. 107, 363–371 (2002)

    Article  Google Scholar 

  13. 13.

    Fryc, I., Brown, S.W., Eppeldauer, G.P., Ohno, Y.: LED-based spectrally tunable source for radiometric, photometric, and colorimetric applications. Opt. Eng. 44, 111308–111309 (2005)

    ADS  Article  Google Scholar 

  14. 14.

    Burgos, F. J., Perales, E., Herrera-Ramírez, J. A., Vilaseca, M., Martínez-Verdú, F. M., Pujol, J.: Reconstruction of CIE standard illuminants with an LED-based spectrally tuneable light source, in 12th Int. AIC Congr. AIC 2013, (2013)

  15. 15.

    Fryc, I., Brown, S.W., Ohno, Y.: Spectral matching with an LED-based spectrally tunable light source. Proc. SPIE 5941(59411I), 300–308 (2005)

    ADS  Google Scholar 

  16. 16.

    Brown, S.W., Rice, J.P., Neira, J.E., Johnson, B.C., Jackson, J.D.: Spectrally tunable sources for advanced radiometric applications. J. Res. Natl. Inst. Stand. Technol. 111, 401–410 (2006)

    Article  Google Scholar 

  17. 17.

    Yuan, S.J., Huimin Yan, K.: LED-based spectrally tunable light source with optimized fitting. Chinese Opt. Lett. 12, 32301 (2014)

    Article  Google Scholar 

  18. 18.

    Hsu, C.-W., Hsu, K.-F., Hwang, J.-M.: Stepless tunable four-chip LED lighting control on a black body radiation curve using the generalized reduced gradient method. Opt. Quant. Electron. 48, 1–8 (2016)

    Article  Google Scholar 

  19. 19.

    Lasertechnik, R.: Roithner Lasertechnik - LEDs. 2014, <> Accessed 9 Apr 2014

  20. 20.

    Van Benthem, M.H., Keenan, M.R.: Fast algorithm for the solution of large-scale non-negativity-constrained least squares problems. J. Chemom. 18, 441–450 (2004)

    Article  Google Scholar 

  21. 21.

    Chalmers, A., Soltic, S.: Light source optimization: spectral design and simulation of four-band white-light sources. Opt. Eng. 51, 044003–1 (2012)

    ADS  Article  Google Scholar 

  22. 22.

    Kim, H., Park, H., Eldén, L.: Non-negative tensor factorization based on alternating large-scale non-negativity-constrained least squares, in Proc. 7th IEEE Int. Conf. Bioinforma. Bioeng. (BIBE, Boston, 2007)

  23. 23.

    Bro, R., Jong, S.: A fast non-negativity-constrained least squares algorithm. J. Chemom. 11, 393–401 (1997)

    Article  Google Scholar 

  24. 24.

    Rokhlin, V., Tygert, M.: A fast randomized algorithm for overdetermined linear least-squares regression. Proc. Natl. Acad. Sci. 105, 13212–13217 (2008)

    ADS  MathSciNet  Article  MATH  Google Scholar 

  25. 25.

    Lampe, J., Voss, H.: Large-scale Tikhonov regularization of total least squares. J. Comput. Appl. Math. 238, 95–108 (2013)

    MathSciNet  Article  MATH  Google Scholar 

  26. 26.

    Golub, G.H., Hansen, P.C., O’Leary, D.P.: Tikhonov regularization and total least squares. Siam J. Matrix Anal. Appl. 21, 185–194 (1999)

    MathSciNet  Article  MATH  Google Scholar 

  27. 27.

    Wei, Y., Zhang, N., Ng, M.K., Xu, W.: Tikhonov regularization for weighted total least squares problems. Appl. Math. Lett. 20, 82–87 (2007)

    MathSciNet  Article  MATH  Google Scholar 

  28. 28.

    Beck, A., Ben-Tal, A.: On the solution of the Tikhonov regularization of the total least squares problem. SIAM J. Optim. 17, 98–118 (2006)

    MathSciNet  Article  MATH  Google Scholar 

  29. 29.

    Nash, J.C.: The (Dantzig) simplex method for linear programming. Comput. Sci. Eng. 2, 29–31 (2000)

    Article  Google Scholar 

  30. 30.

    Forrest, J.J., Goldfarb, D.: Steepest-edge simplex algorithms for linear programming. Math. Program. 57, 341–374 (1992)

    MathSciNet  Article  MATH  Google Scholar 

  31. 31.

    Planck, M.: The theory of heat radiation. Search 30, 85–94 (1914)

    Google Scholar 

  32. 32.

    Chandrasekhar, S.: Radiative Transfer, in Energy (Dover Publication Inc, New York, 1960)

  33. 33.

    Photonics H.: Characteristics and use of infrared detectors, Small, 43 (2004)

  34. 34.

    Bellotti, E., D’Orsogna, D.: Numerical analysis of HgCdTe simultaneous two-color photovoltaic infrared detectors. IEEE J. Quantum Electron. 42, 418–426 (2006)

    ADS  Article  Google Scholar 

  35. 35.

    Rogalski, A.: Infrared detectors: an overview. Infrared Phys. Technol. 43, 187–210 (2002)

    ADS  Article  Google Scholar 

  36. 36.

    OSI Optoelectronics: Two Color Sandwich Detectors. Silicon Photodiodes, 2015, <> Accessed 2 Apr 2016.

Download references


The light spectra data of the CIE standard daylight illuminant D65 and HMI HID lamp were obtained from the National Institute of Standards and Technology (NIST), courtesy of Irena Fryc, private communication – Bialystok University of Technology, Poland.


This ongoing research is funded was funded by the Ministry of Education, Science and Technological Development under project No. 171035.

Authors’ contributions

ML developed the proposed algorithm for tunable light sources and carried out all the simulations. VL programmed the algorithm in C and the graphical view of the algorithm in C#. IB proposed the specification and the initial design of the tunable light source. BK provided expert advice. IS programmed the algorithm using Mathematica software. MV coordinated the work and contributed to writing. All the authors have read and approved the final manuscript.

Competing interests

The authors declare that they have no competing interests.

Author information



Corresponding author

Correspondence to M. Lukovic.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Lukovic, M., Lukovic, V., Belca, I. et al. LED-based Vis-NIR spectrally tunable light source - the optimization algorithm. J. Eur. Opt. Soc.-Rapid Publ. 12, 19 (2016).

Download citation


  • Algorithmic solution
  • LEDs
  • Calibration source
  • Blackbody
  • Optical pyrometers