Construction and Optimization of Through-Hole LED Models for Use in Designing Traffic Signboards

A modeling procedure was proposed for the through-hole LEDs commonly used in traffic signs. The measurements from a sample batch of LEDs were performed at several midfield distances to provide a set of representative angular intensity distributions as the target pattern in the modeling process. The flat outer dimensions of the LED were accurately measured while the curvature and refractive index of the packaging dome were roughly estimated. These physical parameters were used to build a preliminary LED model in the Monte Carlo simulation software. The simulated angular intensity distribution at each distance was generated by tracing 20,000,000 rays. The normalized cross correlation (NCC) between the measured and simulated data was calculated to represent the resemblance of the model to the real LED. The roughly estimated parameters were then varied within their physical limits to optimize the NCC value. The possibilities of two parameters having interactions were also considered. The final model has all NCCs above 98.8% between the target and simulated patterns.


Introduction
With the popularity of LEDs growing around the world, they are gradually replacing the lighting in both indoor and outdoor applications, including various types of traffic signboards.Often overlooked in the application phase is that LEDs are more probable to induce glare that affects the legibility and visual comfort of traffic signs, which are the primary purposes of traffic signs.This is mainly due to some of the characteristics of LEDs, such as having a small die size or light emitting area and high directivity.Some research done on LED billboards [1], which are similar to freeway traffic signboards, has shown that the high luminance of billboards can also cause discomfort.
Other design factors such as how the LEDs are incorporated into the traffic signs also impact the effectiveness of signs [2].Some research has shown that the background luminance does influence the preferred sign luminance [3], which is related to the contrast.Even the shape, size, and font of the characters on the signage influence legibility [4][5][6].
Our previous study has shown that there was some relationship between luminance, legibility, and visual comfort of LED traffic signs [7].Broader range of contrast and luminance were then used in another trial [8] to find the upper limit of acceptable luminance.We found that a contrast ratio around 10 between the white font and green background of the sign has the best ratings in legibility and comfort.
Currently, most dot-matrix LED signs deploy with highly directional through-hole LEDs.These LEDs are chosen for the fact that they are easy to obtain and cost effective.However, they do not provide much backward illumination and thus create nearly infinite contrast ratio between the lighted message and other areas on the signboard.The sign will appear to be "ghostly", floating in the Crystals 2019, 9, 96 2 of 21 air, and the ultrahigh contrast degrades the legibility and visual comfort.One solution is designing a small, cost-effective, and straightforward optical element that clips or adheres to the packaging of through-hole LEDs to induce partial backward lighting, which is the motive of the present study.
When designing optical elements for LEDs in traffic signs we must make sure, while meeting the national standard of luminance and contrast for traffic signs, that we do not induce glare.With this in mind, we need a way to simulate the optical characteristics of such design reliably and accurately.To do so, a precise optical model of the light source, the through-hole LEDs, is indispensable [9][10][11].
Existing modeling techniques would start from modeling the bare die [12,13], then proceed to model the phosphor scattering and conversion efficiency [14,15] to obtain the complete model.However, for off-the-shelf through-hole LEDs, the die and phosphor data are commonly not published, making such modeling not feasible.Moreover, this type of modeling has a slow turnaround and is labor intensive.
Considering that the designed optical element will be fairly close to the light source, the modeling will be mainly done in the midfield region [12].Unfortunately, due to the high tolerance of the manufacturing process, the midfield modeling of through-hole LEDs is not a trivial task.Hence, we use a proven modeling methodology [12,16] and expand its capabilities to model through-hole LEDs.
To accurately simulate the radiation patterns of through-hole LEDs for further optical design, we modified the existing modeling flow for LED dies [12] for use with through-hole LEDs in the midfield region.The modifications involve regression fitting of several LED parameters combined with the averaging of multiple LEDs, mainly to cope with the high manufacturing tolerance found in this type of LEDs.
Our modeling process starts from finding or estimating some key factors of the LED for the Monte Carlo ray tracing [17], such as the physical dimensions and refractive index that will be optimized in the regression fitting.The target radiation patterns for use in the simulation are obtained by measuring the angular intensity distributions of multiple LEDs at several distances.The parameters of the LED model are optimized in terms of the normalized correlation coefficient (NCC) between the measured and simulated data.With countermeasures mentioned above, we have constructed a precise model of through-hole LEDs for use in designing traffic signboards.

Assumptions
To simplify the simulation throughout this research, we made several assumptions:

•
The light distribution from the through-hole LED are assumed to be axial symmetric.Thus, all the data collected are one-dimensional.

•
The actual power is not considered; all the calculations and simulations are done with normalized power.

•
The simulation does not consider wavelength; in other words, the chromatic effects and dispersion were not accounted for in the simulation.
As seen in Figure 1, the through-hole LEDs are approximately axial symmetric.Although the LED die is not axial symmetric, we assume the scattering properties of the phosphor and dimensions of the cup have made the light source effectively an axial symmetric Lambertian emitter [15].In addition, for our final application, dot-matrix LED signs, the nonsymmetrical effects are not a main concern.So, axial symmetry is assumed throughout our research and the data and simulation are done in one dimension to save time.
Since the operation of signs is either on or off, and with a designed luminance in the on state, the originating power from the through-hole LEDs is not our main concern.Thus, most of the measurements and simulation results in this research are first normalized then compared.If the true power levels are needed, scaling can be applied to the whole normalized distribution to obtain the real power.
Another concern for the modeling is the non-uniform peak luminance between LEDs when many LEDs are arrayed in practical applications.This can be solved by precise binning in the LED selection process and constant current power supply design.Also, our main application of this model will be on traffic signs with direct-view LEDs, whose tolerance for non-uniform illumination is high [18].
Normally, when modeling extended white light sources for illumination, chromatic issues are of utmost importance due to the need to represent the object's color under illumination accurately, especially at the edges of the illumination.Although, strictly speaking, lighting for traffic signs are also considered illumination, due to the reliability concerns and high initial cost, considering chromatics is usually not the primary concern.So, the chromatic effects are not accounted for in this study to simplify the simulation factors.

LED Samples
There are many kinds of LED packaging styles, but for basic illumination and traffic signs, through-hole LEDs are the most commonly used.So, we used five samples of the same through-hole white-light LEDs in this research, which were kindly provided by the contract manufacturer of freeway LED signs.The LED is shown in Figure 1.Each gap on scale in the right section of Figure 1  power levels are needed, scaling can be applied to the whole normalized distribution to obtain the real power.Another concern for the modeling is the non-uniform peak luminance between LEDs when many LEDs are arrayed in practical applications.This can be solved by precise binning in the LED selection process and constant current power supply design.Also, our main application of this model will be on traffic signs with direct-view LEDs, whose tolerance for non-uniform illumination is high [18].
Normally, when modeling extended white light sources for illumination, chromatic issues are of utmost importance due to the need to represent the object's color under illumination accurately, especially at the edges of the illumination.Although, strictly speaking, lighting for traffic signs are also considered illumination, due to the reliability concerns and high initial cost, considering chromatics is usually not the primary concern.So, the chromatic effects are not accounted for in this study to simplify the simulation factors.

LED Samples
There are many kinds of LED packaging styles, but for basic illumination and traffic signs, through-hole LEDs are the most commonly used.So, we used five samples of the same through-hole white-light LEDs in this research, which were kindly provided by the contract manufacturer of freeway LED signs.The LED is shown in Figure 1.Each gap on scale in the right section of Figure 1 is 1 mm wide.

Measuring and Modeling Process
The whole measuring and modeling process is shown in Figure 2. Firstly, the angular intensity distributions of LED samples are measured to form the target pattern in the simulation.Secondly, an initial LED model is constructed using the physical parameters of through-hole LED samples.The angular intensity distributions of the LED model are then generated by Monte Carlo ray tracing and compared with the target pattern.The parameters of the LED model are tweaked repeatedly until the normalized correlation coefficient (NCC) between the measured and simulated data exceeds the preset threshold, 95%.

Measuring and Modeling Process
The whole measuring and modeling process is shown in Figure 2. Firstly, the angular intensity distributions of LED samples are measured to form the target pattern in the simulation.Secondly, an initial LED model is constructed using the physical parameters of through-hole LED samples.The angular intensity distributions of the LED model are then generated by Monte Carlo ray tracing and compared with the target pattern.The parameters of the LED model are tweaked repeatedly until the normalized correlation coefficient (NCC) between the measured and simulated data exceeds the preset threshold, 95%.

Measurement
The measurement platform shown in Figure 3 consists of the LED on a motorized rotary stage and the detector attached to an optical rail, so the angular intensity distribution of the LED can be measured at different distances, as illustrated in Figure 4.Each measurement started from mounting the through-hole LED in a 3D-printed holder [19] with friction fit and the power wires securely supported with tape on both sides.The LED was lit for at least 30 min to let the current stabilize.After reaching thermal equilibrium, the current difference between different LEDs operated at 4 volts is less than 1%.Then we took measurements at 10, 15, 20, 25, 35, 50, and 100 mm distances, with an expanded −100° ~ +100° range with a 1° interval to make sure that we have accurate data to compare with.The −100° ~ +100° range is limited due to the holder interfering at angles beyond that big angles.
Absolute intensity across LEDs generally varies by die batch and binning quality.Therefore, in the modeling process we mainly focus on the normalized angular intensity distribution.It is also technically difficult to design a simple system to obtain a precise solid angle at different distances.Consequently, since the absolute values are not considered for this study, we modified a power meter by attaching a pinhole directly in front of the detector, as shown in Figure 4.By doing so, we can assume that the intensity distribution within each single measurement is negligible since the detector size is indefinitely small.Then, by normalizing the measured data with respect to the highest amplitude in each data set and assuming that the intensity is uniform across the 1° solid angle, we can obtain the normalized angular intensity distribution.
Each distance per LED was measured three times, with each time in the opposite direction to minimize systematic error.The variance between measurements is four orders smaller than the value measured, indicating that the system has high repeatability.When all seven distances' normalized angular intensity distributions were obtained, the data collection for this LED was finished and ready for further post-processing and analysis.The whole process was then repeated for all five throughhole LEDs used as samples for our model.

Measurement
The measurement platform shown in Figure 3 consists of the LED on a motorized rotary stage and the detector attached to an optical rail, so the angular intensity distribution of the LED can be measured at different distances, as illustrated in Figure 4.Each measurement started from mounting the through-hole LED in a 3D-printed holder [19] with friction fit and the power wires securely supported with tape on both sides.The LED was lit for at least 30 min to let the current stabilize.After reaching thermal equilibrium, the current difference between different LEDs operated at 4 volts is less than 1%.Then we took measurements at 10, 15, 20, 25, 35, 50, and 100 mm distances, with an expanded −100 • ~+100 • range with a 1 • interval to make sure that we have accurate data to compare with.The −100 • ~+100 • range is limited due to the holder interfering at angles beyond that big angles.

NCC and LED Selection
Normalized cross correlation (NCC), as given in Equation ( 1), is used extensively throughout this research.
where  and  are individual data points in data sets A and B, respectively, and  and  are the means of data points in data sets A and B, respectively.The value of NCC is between 0 and 1, with 1 for identical data sets and 0 for completely no correlation.When we have two similar data sets and we are interested in exactly how "similar" they are, we can utilize NCC, which suits our application perfectly due to the heavily normalized nature of the modeling process.
To battle the high tolerance found naturally in the manufacturing of through-hole LEDs, we measured multiple one-dimensional angular intensity patterns at interested distances from five LEDs, forming a database of normalized angular intensity distributions.Then, we calculated the NCC values between the different LEDs' normalized angular intensity distributions, and found a group of LEDs that were highly correlated.From that group of LEDs, we then obtained a representative angular intensity distribution by averaging through the group and used that as the target pattern in later modeling process.Absolute intensity across LEDs generally varies by die batch and binning quality.Therefore, in the modeling process we mainly focus on the normalized angular intensity distribution.It is also technically difficult to design a simple system to obtain a precise solid angle at different distances.Consequently, since the absolute values are not considered for this study, we modified a power meter by attaching a pinhole directly in front of the detector, as shown in Figure 4.By doing so, we can assume that the intensity distribution within each single measurement is negligible since the detector size is indefinitely small.Then, by normalizing the measured data with respect to the highest amplitude in each data set and assuming that the intensity is uniform across the 1 • solid angle, we can obtain the normalized angular intensity distribution.
Each distance per LED was measured three times, with each time in the opposite direction to minimize systematic error.The variance between measurements is four orders smaller than the value measured, indicating that the system has high repeatability.When all seven distances' normalized angular intensity distributions were obtained, the data collection for this LED was finished and ready for further post-processing and analysis.The whole process was then repeated for all five through-hole LEDs used as samples for our model.

NCC and LED Selection
Normalized cross correlation (NCC), as given in Equation ( 1), is used extensively throughout this research.
where A θ and B θ are individual data points in data sets A and B, respectively, and A and B are the means of data points in data sets A and B, respectively.The value of NCC is between 0 and 1, with 1 for identical data sets and 0 for completely no correlation.When we have two similar data sets and we are interested in exactly how "similar" they are, we can utilize NCC, which suits our application perfectly due to the heavily normalized nature of the modeling process.
To battle the high tolerance found naturally in the manufacturing of through-hole LEDs, we measured multiple one-dimensional angular intensity patterns at interested distances from five LEDs, forming a database of normalized angular intensity distributions.Then, we calculated the NCC values between the different LEDs' normalized angular intensity distributions, and found a group of LEDs that were highly correlated.From that group of LEDs, we then obtained a representative angular intensity distribution by averaging through the group and used that as the target pattern in later modeling process.
When choosing the highest LED NCC group, we biased slightly to the closer distances due to the main application of this model being at that distance.Also, when we obtained the representative angular intensity distribution, we also double checked how representative it is via calculating the NCC Crystals 2019, 9, 96 6 of 21 between it and the original LED distribution.Once the NCC is above 95%, we have confidence that the representative angular intensity distribution is satisfactory.

LED Modeling
For our simulation, we used a well-known Monte Carlo ray tracing software, ASAP Next Gen.Each run in this study will trace 20,000,000 rays.After ray-tracing, we dumped the distribution data into a text file and did further calculations and data plotting with in-house written MATLAB codes.Once we had the representative angular intensity distribution, we started to model the through-hole LED in Monte Carlo simulation software.The verification used in the simulation is a ring of circular detectors as shown in Figure 5, positioned on a circular path, centered at the origin point of the system.This is just like what is used in the measurement setup, and the area of each detector corresponds to a cone base with 1 • apex angle from the origin.When choosing the highest LED NCC group, we biased slightly to the closer distances due to the main application of this model being at that distance.Also, when we obtained the representative angular intensity distribution, we also double checked how representative it is via calculating the NCC between it and the original LED distribution.Once the NCC is above 95%, we have confidence that the representative angular intensity distribution is satisfactory.

LED Modeling
For our simulation, we used a well-known Monte Carlo ray tracing software, ASAP Next Gen.Each run in this study will trace 20,000,000 rays.After ray-tracing, we dumped the distribution data into a text file and did further calculations and data plotting with in-house written MATLAB codes.Once we had the representative angular intensity distribution, we started to model the through-hole LED in Monte Carlo simulation software.The verification used in the simulation is a ring of circular detectors as shown in Figure 5, positioned on a circular path, centered at the origin point of the system.This is just like what is used in the measurement setup, and the area of each detector corresponds to a cone base with 1° apex angle from the origin.The modeling started from using the physical characteristics of the through-hole LED.The outer structure dimensions were roughly measured with a digital caliper, which has an accuracy of ±0.02 mm, a resolution of 0.01 mm, and a repeatability of 0.01 mm.For the elements encased in epoxy, a rough estimate was assumed.First, the epoxy itself had a refractive index of 1.4585 [20].For the reflective cup, we used an image processing software, ImageJ [21], to estimate the dimensions and position, noting that the direct measurements will be somewhat skewed due to the curvature and refractive index of the through-hole LED packaging.Because the through-hole LED we used is a white-light LED using the commonly found blue die plus yellow phosphor mix, we substituted the die plus phosphor with a circle-shaped extended incoherent Lambertian emitter, assuming that the light rays are thoroughly scattered in the yellow phosphor.
Compared to other methods such as grinding or cutting the LED in half [22], our method is simpler, cheaper, and non-invasive.In other words, the sample is not destroyed or altered during the process, which is very important to us since we had limited samples.The main disadvantage is that the dimensions taken are not as accurate, and to deal with that we used a top-down approach of regression analysis.
Since we already knew the representative angular intensity distribution for our through-hole LED, to battle the error, we invoked a regression analysis.The idea is simple, executed by continuously tweaking the model parameters, such as the refractive index, cup dimensions, cup position, and the eccentricity of the dome.This was done until an NCC above 95% was achieved, then we could confidently say that the model's structure and normalized angular intensity distribution satisfactorily represent this through-hole LED.
Finally, to make sure that the model closely resembles the actual LED we modeled it from, also to prove that the manufacturing tolerances were somewhat compensated via the database selection The modeling started from using the physical characteristics of the through-hole LED.The outer structure dimensions were roughly measured with a digital caliper, which has an accuracy of ±0.02 mm, a resolution of 0.01 mm, and a repeatability of 0.01 mm.For the elements encased in epoxy, a rough estimate was assumed.First, the epoxy itself had a refractive index of 1.4585 [20].For the reflective cup, we used an image processing software, ImageJ [21], to estimate the dimensions and position, noting that the direct measurements will be somewhat skewed due to the curvature and refractive index of the through-hole LED packaging.Because the through-hole LED we used is a white-light LED using the commonly found blue die plus yellow phosphor mix, we substituted the die plus phosphor with a circle-shaped extended incoherent Lambertian emitter, assuming that the light rays are thoroughly scattered in the yellow phosphor.
Compared to other methods such as grinding or cutting the LED in half [22], our method is simpler, cheaper, and non-invasive.In other words, the sample is not destroyed or altered during the process, which is very important to us since we had limited samples.The main disadvantage is that the dimensions taken are not as accurate, and to deal with that we used a top-down approach of regression analysis.
Since we already knew the representative angular intensity distribution for our through-hole LED, to battle the error, we invoked a regression analysis.The idea is simple, executed by continuously tweaking the model parameters, such as the refractive index, cup dimensions, cup position, and the eccentricity of the dome.This was done until an NCC above 95% was achieved, then we could confidently say that the model's structure and normalized angular intensity distribution satisfactorily represent this through-hole LED.
Finally, to make sure that the model closely resembles the actual LED we modeled it from, also to prove that the manufacturing tolerances were somewhat compensated via the database selection and averaging, we compared the finished model's normalized angular intensity distribution against all of the measured LEDs, as shown in Figure 23 in the discussion section.

Representative Angular Intensity Distribution
Before the modeling process began, we needed a baseline of comparison.So, five through-hole LEDs, which are provided by one of the contract manufacturers of LED freeway signs, were first measured with the measurement system.Then, the NCCs between all the normalized angular intensity distributions were calculated.The pair with the highest NCC was then averaged and used as the representative angular intensity distribution.Although only five LEDs were provided and measured, given more LEDs available it would be trivial to add more measurements to the database.
The NCCs between all the possible LED pairs are shown in Figure 6, where all the NCC values are above 98%.The error bar in the figure shows the standard deviation when averaged over seven measuring distances.These NCC results indicate the high similarity between the five LED samples, which validates choosing the representative angular intensity distribution from this database.As shown in Figure 7, the NCCs averaged over the LED pairs at seven measuring distances are also similar, emphasizing that our measurement system is accurate across the distances.Since we are mainly using the measurements to model a through-hole LED to be used in an optical element design close to the LED, we care mostly about the midfield region.Hence, we also made sure that the LED pairs at 10 mm have good correlation, which all the NCCs are over 98%.
LED pair LED 1 and LED 3 were chosen to be the representative angular intensity distribution due to their high NCC values with small standard deviation across all the distances, where all the NCC values were above 99% and the NCC did not vary much across the distances.The representative angular intensity distributions compared with the final simulation results at selected measuring distances are shown in Figure 21.and averaging, we compared the finished model's normalized angular intensity distribution against all of the measured LEDs, as shown in Figure 23 in the discussion section.

Representative Angular Intensity Distribution
Before the modeling process began, we needed a baseline of comparison.So, five through-hole LEDs, which are provided by one of the contract manufacturers of LED freeway signs, were first measured with the measurement system.Then, the NCCs between all the normalized angular intensity distributions were calculated.The pair with the highest NCC was then averaged and used as the representative angular intensity distribution.Although only five LEDs were provided and measured, given more LEDs available it would be trivial to add more measurements to the database.
The NCCs between all the possible LED pairs are shown in Figure 6, where all the NCC values are above 98%.The error bar in the figure shows the standard deviation when averaged over seven measuring distances.These NCC results indicate the high similarity between the five LED samples, which validates choosing the representative angular intensity distribution from this database.As shown in Figure 7, the NCCs averaged over the LED pairs at seven measuring distances are also similar, emphasizing that our measurement system is accurate across the distances.Since we are mainly using the measurements to model a through-hole LED to be used in an optical element design close to the LED, we care mostly about the midfield region.Hence, we also made sure that the LED pairs at 10 mm have good correlation, which all the NCCs are over 98%.
LED pair LED 1 and LED 3 were chosen to be the representative angular intensity distribution due to their high NCC values with small standard deviation across all the distances, where all the NCC values were above 99% and the NCC did not vary much across the distances.The representative angular intensity distributions compared with the final simulation results at selected measuring distances are shown in Figure 21.

Initial LED Model Dimensions
Before any model was made, we first defined the basic dimensions and positions of the sample through-hole LED, as shown in Figure 8.For the whole coordinate system later on in this article, we used the origin point specified at the center of the through-hole LED base (Figure 8a), so the "Height" in Table 1 is the distance between the point of interest and the base.As for the cup immersed in the dome package, the depth of it is fixed at 0.5 mm and the angle at the side is also fixed at 45° as shown in Figure 8b throughout the modeling process.The material properties used for this cup has a 90% reflectance and 10% absorption to mimic common metal-based reflectors.

Initial LED Model Dimensions
Before any model was made, we first defined the basic dimensions and positions of the sample through-hole LED, as shown in Figure 8.For the whole coordinate system later on in this article, we used the origin point specified at the center of the through-hole LED base (Figure 8a), so the "Height" in Table 1 is the distance between the point of interest and the base.As for the cup immersed in the dome package, the depth of it is fixed at 0.5 mm and the angle at the side is also fixed at 45 • as shown in Figure 8b throughout the modeling process.The material properties used for this cup has a 90% reflectance and 10% absorption to mimic common metal-based reflectors.

Initial LED Model Dimensions
Before any model was made, we first defined the basic dimensions and positions of the sample through-hole LED, as shown in Figure 8.For the whole coordinate system later on in this article, we used the origin point specified at the center of the through-hole LED base (Figure 8a), so the "Height" in Table 1 is the distance between the point of interest and the base.As for the cup immersed in the dome package, the depth of it is fixed at 0.5 mm and the angle at the side is also fixed at 45° as shown in Figure 8b throughout the modeling process.The material properties used for this cup has a 90% reflectance and 10% absorption to mimic common metal-based reflectors.From the digital caliper and estimates from the ImageJ software, rough outer dimensions are determined as shown in Table 1.Some of the measurements can be used confidently, mostly the flat surfaces, such as the lip height.Likewise, the total height from apex to base and the outer diameters (excluding the curved top portion) can also be repeatedly measured confidently.Our main points of interest, which are points that have the most error and are used in regression are listed below:

•
The start of curve towards the apex-hard to accurately measure physically or by software.

•
Height and diameter of the cup and accompanying emitting source-immersed in epoxy so there was no physical contact, and the refractive index difference and package curvature deforms the image to be used by software.

•
Refractive index of the packaging epoxy-without access to professional measuring equipment, we only used data from databases as the initial estimate.
The NCCs calculated between the representative angular intensity distribution and our initial model are shown in Figure 9.Although the NCC at 10 mm is above the 95% threshold, the average across all measuring distances is only 93.1 ± 1.5%, meaning that we needed to do some regression at the above-mentioned points of interest to obtain an accurate model.
From the digital caliper and estimates from the ImageJ software, rough outer dimensions are determined as shown in Table 1.Some of the measurements can be used confidently, mostly the flat surfaces, such as the lip height.Likewise, the total height from apex to base and the outer diameters (excluding the curved top portion) can also be repeatedly measured confidently.• The start of curve towards the apex-hard to accurately measure physically or by software.• Height and diameter of the cup and accompanying emitting source-immersed in epoxy so there was no physical contact, and the refractive index difference and package curvature deforms the image to be used by software.• Refractive index of the packaging epoxy-without access to professional measuring equipment, we only used data from databases as the initial estimate.The NCCs calculated between the representative angular intensity distribution and our initial model are shown in Figure 9.Although the NCC at 10 mm is above the 95% threshold, the average across all measuring distances is only 93.1 ± 1.5%, meaning that we needed to do some regression at the above-mentioned points of interest to obtain an accurate model.

Regression on Single Parameter
In this section we started to do some regression, which meant altering the values of different points of interest linearly and then calculating the NCC compared with the representative angular intensity distribution.Then, the curve of NCC values was observed to see if there were any trends, saturations, or peaks.When nothing was found, in other words there was only random noise and no significant change in the NCC values, we could safely assume that those points of interest did not influence the model much and could be left as is.
When a trend is found we should first make sure that the results physically make sense; for example, the obvious geometry of the outer shell should not be altered no matter how it effects the NCC.If the trend makes sense, we then expand in that direction hoping to find the optimal value.
When saturations or peaks are established, we then can believe that the value at that point best represents the original through-hole LED.One caveat is that for the first regression we are assuming that the points of interest are independent, which is true to some degree.Further in the modeling we started to consider if there are some interactions between different points of interest.

Eccentricity of the Dome
In our modeling software, we modeled the top of the LED as half of a spheroid, as shown in Figure 10.By defining three points in two-dimensional space-one as the center of the ellipse, the other two as the vortexes-then rotating the arc around the vertical axis, we got the half spheroid, which we henceforth refer to as the dome of the through-hole LED.The full equation for a spheroid is shown in Equation (2).For example, if a = c then the spheroid reduces to a common sphere.
where a is the equatorial radius of the spheroid also known as the semi-axis, and c is the distance from the pole on the symmetry axis to the center.
Crystals 2018, 8, x FOR PEER REVIEW 10 of 21 In this section we started to do some regression, which meant altering the values of different points of interest linearly and then calculating the NCC compared with the representative angular intensity distribution.Then, the curve of NCC values was observed to see if there were any trends, saturations, or peaks.When nothing was found, in other words there was only random noise and no significant change in the NCC values, we could safely assume that those points of interest did not influence the model much and could be left as is.
When a trend is found we should first make sure that the results physically make sense; for example, the obvious geometry of the outer shell should not be altered no matter how it effects the NCC.If the trend makes sense, we then expand in that direction hoping to find the optimal value.
When saturations or peaks are established, we then can believe that the value at that point best represents the original through-hole LED.One caveat is that for the first regression we are assuming that the points of interest are independent, which is true to some degree.Further in the modeling we started to consider if there are some interactions between different points of interest.

Eccentricity of the Dome
In our modeling software, we modeled the top of the LED as half of a spheroid, as shown in Figure 10.By defining three points in two-dimensional space-one as the center of the ellipse, the other two as the vortexes-then rotating the arc around the vertical axis, we got the half spheroid, which we henceforth refer to as the dome of the through-hole LED.The full equation for a spheroid is shown in Equation (2).For example, if a = c then the spheroid reduces to a common sphere.
where a is the equatorial radius of the spheroid also known as the semi-axis, and c is the distance from the pole on the symmetry axis to the center.Because the top dead center of the through-hole LED can be easily precisely measured, we considered it as a well-known dimension, as shown in Equation (3).So, for the regression we moved the co-vortex on the side of the through-hole LED and the center along the Z axis, thus effectively changing the eccentricity of the dome.As the initial co-vertex height was estimated to be 5 mm (Table 1), the values we went through in the first regression trial were 4.5-5.5 mm with 0.1 mm increments.
Co-vertex Height + Length of c = 7.2 mm, the apex height. (3) Figure 11 shows the NCC values calculated at all the distances that we have measured our representative angular intensity distribution, which are 10, 15, 20, 25, 35, 50, and 100 mm.The graph shows that there is a trend where, as the co-vortex lowers, the NCC values steadily increases, but we still see no signs of a peak or saturation.Also, the relationship between different measuring distances stay somewhat the same, which is a good sign that we have a stable model.Because the top dead center of the through-hole LED can be easily precisely measured, we considered it as a well-known dimension, as shown in Equation (3).So, for the regression we moved the co-vortex on the side of the through-hole LED and the center along the Z axis, thus effectively changing the eccentricity of the dome.As the initial co-vertex height was estimated to be 5 mm (Table 1), the values we went through in the first regression trial were 4.5-5.5 mm with 0.1 mm increments.
Co-vertex Height + Length of c = 7.2 mm, the apex height. (3) Figure 11 shows the NCC values calculated at all the distances that we have measured our representative angular intensity distribution, which are 10, 15, 20, 25, 35, 50, and 100 mm.The graph shows that there is a trend where, as the co-vortex lowers, the NCC values steadily increases, but we still see no signs of a peak or saturation.Also, the relationship between different measuring distances stay somewhat the same, which is a good sign that we have a stable model.To see the change in NCC by just tweaking the eccentricity of the dome, we calculated the NCC average and standard deviation across seven measuring distances for each co-vertex height.We found that the highest NCC, 96.65%, is still just barely above the goal of 95%, but with no sign of a peak or saturation.Also, the standard deviation between distances decreases as we come lower covortex height, meaning that we are closer to the real value.So, a second trial was done for the co-  To see the change in NCC by just tweaking the eccentricity of the dome, we calculated the NCC average and standard deviation across seven measuring distances for each co-vertex height.We found that the highest NCC, 96.65%, is still just barely above the goal of 95%, but with no sign of a peak or saturation.Also, the standard deviation between distances decreases as we come lower covortex height, meaning that we are closer to the real value.So, a second trial was done for the covortex height of 3.5-4.4mm with 0.1 mm increments.The results are shown in Figure 12, where for To see the change in NCC by just tweaking the eccentricity of the dome, we calculated the NCC average and standard deviation across seven measuring distances for each co-vertex height.We found that the highest NCC, 96.65%, is still just barely above the goal of 95%, but with no sign of a peak or saturation.Also, the standard deviation between distances decreases as we come lower co-vortex height, meaning that we are closer to the real value.So, a second trial was done for the co-vortex height of 3.5-4.4mm with 0.1 mm increments.The results are shown in Figure 12, where for continuity we also added the results from the first trial to see the whole picture.Again in Figure 12, there is still only a trend but no peak.While we could simply keep going, from the real through-hole LED geometry we can clearly see that the starting point of the curve is higher than 3.5 mm, which means there is a geometrical conflict.The results suggest that there is interaction between at least two points of interest, which calls for further analysis.

Refractive Index of the Packaging Epoxy
Without the full specification from the through-hole LED manufacturer, there is no straightforward way to measure the refractive index.So, before investing into complicated or costly refractive index measurement, we tested by regression to see if using the common value of 1.4585 for epoxy would suffice.The values of the refractive index used for this regression are from 1.4085 to 1.5085 with 0.01 increments.
The results were somewhat surprising: even though we varied the refractive index from 1.4085-1.5085, Figure 13 shows that the change in NCC is minute.After averaging the NCC values across all the distances in Figure 14, the variation is down to the fourth digit below zero.Such a small deviation can be assumed to be mostly caused by the randomness in the Monte Carlo ray tracing and rounding errors.LED geometry we can clearly see that the starting point of the curve is higher than 3.5 mm, which means there is a geometrical conflict.The results suggest that there is interaction between at least two points of interest, which calls for further analysis.

Refractive Index of the Packaging Epoxy
Without the full specification from the through-hole LED manufacturer, there is no straightforward way to measure the refractive index.So, before investing into complicated or costly refractive index measurement, we tested by regression to see if using the common value of 1.4585 for epoxy would suffice.The values of the refractive index used for this regression are from 1.4085 to 1.5085 with 0.01 increments.
The results were somewhat surprising: even though we varied the refractive index from 1.4085-1.5085, Figure 13 shows that the change in NCC is minute.After averaging the NCC values across all the distances in Figure 14, the variation is down to the fourth digit below zero.Such a small deviation can be assumed to be mostly caused by the randomness in the Monte Carlo ray tracing and rounding errors.
The average values of NCCs might seem small and below our 95% threshold, but we must remember at this state of the modeling only the value of one point of interest was changed.All the other points of interest were left untouched, which means if we can prove across this range of refractive index that we get the same NCC value, we do not need to worry about the low NCCs at this time.Thus, it is safe to use 1.4585 as the refractive index of epoxy for our through-hole LED model since the fluctuation in refractive index does not influence the calculated NCCs.

Source Position
In the modeling process, one of the other important dimensions that was non-trivial to measure was the emitting source, mainly because it was immersed in epoxy.This model uses an extended Lambertian emitting disk as the exit face of the phosphors, and the two main points of interest are: • The height of the source, which is defined at the surface of the extended Lambertian emitting disk (Figure 8) that substitutes the die and phosphors, situated at 0.5 mm above the cup base.• The radius of the emitting disk.Values used in the regression process for the source height are 2.5-5.5 mm, with 0.1 mm increments, where the source radius is kept at 1.0 mm.Resulting NCC plots for all measuring distances are shown in Figure 15.At the source height of 4.3 mm, just around where the NCCs between the distances have the smallest spread, is a position with good consistency and the NCC for the distance we care most, 10 mm, is above the 95% threshold.So, we chose the source height of 4.3 mm for the regression of source radius.The average values of NCCs might seem small and below our 95% threshold, but we must remember at this state of the modeling only the value of one point of interest was changed.All the other points of interest were left untouched, which means if we can prove across this range of refractive index that we get the same NCC value, we do not need to worry about the low NCCs at this time.Thus, it is safe to use 1.4585 as the refractive index of epoxy for our through-hole LED model since the fluctuation in refractive index does not influence the calculated NCCs.

Source Position
In the modeling process, one of the other important dimensions that was non-trivial to measure was the emitting source, mainly because it was immersed in epoxy.This model uses an extended Lambertian emitting disk as the exit face of the phosphors, and the two main points of interest are:

•
The height of the source, which is defined at the surface of the extended Lambertian emitting disk (Figure 8) that substitutes the die and phosphors, situated at 0.5 mm above the cup base.

•
The radius of the emitting disk.
Values used in the regression process for the source height are 2.5-5.5 mm, with 0.1 mm increments, where the source radius is kept at 1.0 mm.Resulting NCC plots for all measuring distances are shown in Figure 15.At the source height of 4.3 mm, just around where the NCCs between the distances have the smallest spread, is a position with good consistency and the NCC for the distance we care most, 10 mm, is above the 95% threshold.So, we chose the source height of 4.3 mm for the regression of source radius.

Source Dimension
In the first regression of source radius, the values used are 0.6-2.2mm with 0.2 mm increments, where the source height is kept at 4.3 mm.The calculated NCCs are plotted in Figure 16.We can see when the radius is below 1.0 mm the curves show saturation.To get a closer and more precise NCC, we did a second regression focused on the radius range of 0.6-1.2mm, as shown in Figure 17.Now we can clearly see that different distances show very different slope characteristics.For most of the distances except 10 mm, below the radius of 1.0 mm the slope changed to positive, which is not desired.However, the slope for 10 mm is still negative even though the slope is nearly non-existent.So, we chose the radius of 1.0 mm that has the smallest spread with the NCC still above the threshold for the final model.

Source Dimension
In the first regression of source radius, the values used are 0.6-2.2mm with 0.2 mm increments, where the source height is kept at 4.3 mm.The calculated NCCs are plotted in Figure 16.We can see when the radius is below 1.0 mm the curves show saturation.To get a closer and more precise NCC, we did a second regression focused on the radius range of 0.6-1.2mm, as shown in Figure 17.Now we can clearly see that different distances show very different slope characteristics.For most of the distances except 10 mm, below the radius of 1.0 mm the slope changed to positive, which is not desired.However, the slope for 10 mm is still negative even though the slope is nearly non-existent.So, we chose the radius of 1.0 mm that has the smallest spread with the NCC still above the threshold for the final model.

Two-Way Regression
In the second regression for the eccentricity of the dome in Section 3.1, we found that the eccentricity of the dome seemed to have an interaction with other points of interest.When considering the geometric-optical properties of the through-hole LED model, the main two factors that could interact with each other are the source height and the eccentricity of the dome, so they were tested in this regression run.

Two-Way Regression
In the second regression for the eccentricity of the dome in Section 3.1, we found that the eccentricity of the dome seemed to have an interaction with other points of interest.When considering the geometric-optical properties of the through-hole LED model, the main two factors that could interact with each other are the source height and the eccentricity of the dome, so they were tested in this regression run.

Two-Way Regression
In the second regression for the eccentricity of the dome in Section 3.1, we found that the eccentricity of the dome seemed to have an interaction with other points of interest.When considering the geometric-optical properties of the through-hole LED model, the main two factors that could interact with each other are the source height and the eccentricity of the dome, so they were tested in this regression run.
Values used in the two-way regression are 3.9-4.3mm with 0.1 mm increments for the source height, and 3.6-4.0mm with 0.1 mm increments for the co-vertex height.The values were then meshed into a matrix of 5 × 5, to a total of 25 combinations, and their NCCs were calculated.The graph of NCCs for the distance most important in this study, 10 mm, is shown in Figure 18, with the graph of the average NCCs over the distances in Figure 19.
Values used in the two-way regression are 3.9-4.3mm with 0.1 mm increments for the source height, and 3.6-4.0mm with 0.1 mm increments for the co-vertex height.The values were then meshed into a matrix of 5 × 5, to a total of 25 combinations, and their NCCs were calculated.The graph of NCCs for the distance most important in this study, 10 mm, is shown in Figure 18, with the graph of the average NCCs over the distances in Figure 19.From Figure 18, we found that the NCC seems higher around the top left-hand corner, which corresponds to a co-vortex height of 3.7 mm and source height of 4.3 mm, but this result disagrees with the results found in Figure 19, which is likely due to the averaging of different measuring distances.Noting that the difference is at the third digit below zero, which is considerably small, we decided to use the positions from Figure 18 in the final model.This is because the application for this through-hole LED model is geared towards the distances closer to the LED.Also, we conclude that the interaction between the height of the source and the eccentricity of the dome is small in affecting the calculated NCC.
Although we already concluded what positions to use due to the interactions between points of interest, one more regression for the dome eccentricity was performed to see the change in NCC with respect to the co-vertex height for all measuring distances.We can see from Figure 20 that the curve Values used in the two-way regression are 3.9-4.3mm with 0.1 mm increments for the source height, and 3.6-4.0mm with 0.1 mm increments for the co-vertex height.The values were then meshed into a matrix of 5 × 5, to a total of 25 combinations, and their NCCs were calculated.The graph of NCCs for the distance most important in this study, 10 mm, is shown in Figure 18, with the graph of the average NCCs over the distances in Figure 19.From Figure 18, we found that the NCC seems higher around the top left-hand corner, which corresponds to a co-vortex height of 3.7 mm and source height of 4.3 mm, but this result disagrees with the results found in Figure 19, which is likely due to the averaging of different measuring distances.Noting that the difference is at the third digit below zero, which is considerably small, we decided to use the positions from Figure 18 in the final model.This is because the application for this through-hole LED model is geared towards the distances closer to the LED.Also, we conclude that the interaction between the height of the source and the eccentricity of the dome is small in affecting the calculated NCC.
Although we already concluded what positions to use due to the interactions between points of interest, one more regression for the dome eccentricity was performed to see the change in NCC with respect to the co-vertex height for all measuring distances.We can see from Figure 20 that the curve From Figure 18, we found that the NCC seems higher around the top left-hand corner, which corresponds to a co-vortex height of 3.7 mm and source height of 4.3 mm, but this result disagrees with the results found in Figure 19, which is likely due to the averaging of different measuring distances.Noting that the difference is at the third digit below zero, which is considerably small, we decided to use the positions from Figure 18 in the final model.This is because the application for this through-hole LED model is geared towards the distances closer to the LED.Also, we conclude that the interaction between the height of the source and the eccentricity of the dome is small in affecting the calculated NCC.
Although we already concluded what positions to use due to the interactions between points of interest, one more regression for the dome eccentricity was performed to see the change in NCC with respect to the co-vertex height for all measuring distances.We can see from Figure 20 that the curve for the 10 mm distance has a nice peak around 3.7-3.9mm, while the curves for other distances are on the plateau at the same 3.7-3.9mm region.Combining with the average NCCs shown in Figure 19 with the source height at 4.3 mm, the final dimension used for the dome eccentricity is 3.7 mm for the co-vortex height.for the 10 mm distance has a nice peak around 3.7-3.9mm, while the curves for other distances are on the plateau at the same 3.7-3.9mm region.Combining with the average NCCs shown in Figure 19 with the source height at 4.3 mm, the final dimension used for the dome eccentricity is 3.7 mm for the co-vortex height.

Final LED Model
The final dimensions used for the through-hole LED model are listed in Table 2. Figure 21 shows the normalized angular intensity distributions from measurement and simulation at selected distances.The NCCs are shown in Figure 22, which are well above 98.8% for all seven measuring distances.

Final LED Model
The final dimensions used for the through-hole LED model are listed in Table 2. Figure 21 shows the normalized angular intensity distributions from measurement and simulation at selected distances.The NCCs are shown in Figure 22, which are well above 98.8% for all seven measuring distances.

Discussion
All the NCC values calculated with the representative angular intensity distribution have surpassed the threshold of 95%, meaning that the final through-hole LED model is sufficiently accurate to be used as the light source of optical designs further on.

Discussion
All the NCC values calculated with the representative angular intensity distribution have surpassed the threshold of 95%, meaning that the final through-hole LED model is sufficiently accurate to be used as the light source of optical designs further on.

Discussion
All the NCC values calculated with the representative angular intensity distribution have surpassed the threshold of 95%, meaning that the final through-hole LED model is sufficiently accurate to be used as the light source of optical designs further on.
The last test was done to calculate the NCC between the through-hole LED model and all the normalized angular intensity distribution of the five sample LEDs we measured.As we can see from Figure 23, even compared with the real measured LEDs we can still obtain NCC no lower than 97%.All these data prove that the final through-hole LED model indeed can represent a real through-hole LED.
from one LED may hit the optical surfaces of another LED.Nevertheless, non-sequential ray tracing can deal with this kind of simulation problems.
Since in real world scenarios, turnover time is critical, samples of the light source are often limited and unique, the method used in modeling should be easy to adapt to different styles of illuminators non-invasively.The modeling procedure in this study starts from measuring the angular intensity distributions of the light source at several distances, constructing the source model using the physical characteristics of the light source without cutting it open, and then optimizing the model in terms of the NCC between measurement and simulation to yield an equivalent source model.Although we used through-hole LEDs, all the essential modeling methods and flow can be easily adapted to suit different types of LEDs.In real world applications such as signs, the LED is operating in the far-field region, which is when the radiance distribution no longer varies with distance.As shown in Figure 24, the NCC between the normalized angular intensity distributions measured at 50 mm and 100 mm are as high as 99.9%, implying that the distance is already in the far-field region.

Conclusions
In this study, we used an improved modeling technique in the midfield region to establish the LED source model for the through-hole white-light LEDs.Using a custom measurement system, which included a 3D-printed LED holder, the normalized angular intensity distributions of five sample LEDs were recorded at 10, 15, 20, 25, 35, 50, and 100 mm.The pair with the highest normalized cross correlation (NCC) were then averaged and used as the representative angular intensity distribution in the simulation.The through-hole LED source was modeled in Monte Carlo simulation software and optimized by tweaking its physical parameters, including the eccentricity and refractive index of the packaging dome, and the position and radius of the Lambertian emitting disk.The In this study, we only modeled a single LED.In practical arrayed LED applications, one can simply duplicate the single LED model into an array to obtain the total contribution.When the LEDs are placed close to each other, there will be interactions between them.That is, the light rays emitted from one LED may hit the optical surfaces of another LED.Nevertheless, non-sequential ray tracing can deal with this kind of simulation problems.Since in real world scenarios, turnover time is critical, samples of the light source are often limited and unique, the method used in modeling should be easy to adapt to different styles of illuminators non-invasively.The modeling procedure in this study starts from measuring the angular intensity distributions of the light source at several distances, constructing the source model using the physical characteristics of the light source without cutting it open, and then optimizing the model in terms of the NCC between measurement and simulation to yield an equivalent source model.Although we used through-hole LEDs, all the essential modeling methods and flow can be easily adapted to suit different types of LEDs.

Conclusions
In this study, we used an improved modeling technique in the midfield region to establish the LED source model for the through-hole white-light LEDs.Using a custom measurement system, which included a 3D-printed LED holder, the normalized angular intensity distributions of five sample LEDs were recorded at 10, 15, 20, 25, 35, 50, and 100 mm.The pair with the highest normalized cross correlation (NCC) were then averaged and used as the representative angular intensity distribution in the simulation.The through-hole LED source was modeled in Monte Carlo simulation software and optimized by tweaking its physical parameters, including the eccentricity and refractive index of the packaging dome, and the position and radius of the Lambertian emitting disk.The optimized model has an NCC value larger than 98.8% between the model and the representative angular intensity distribution at all measuring distances.When comparing the model with the individual LED samples, the NCC values are all above 97%.The final through-hole LED model has been used in our optical element design process for aiding the legibility and visual comfort of LED traffic signs.

Figure 1 .
Figure 1.Photo of the through-hole LED sample.

Figure 1 .
Figure 1.Photo of the through-hole LED sample.

Figure 3 .
Figure 3. Photo of the measurement platform.Figure 3. Photo of the measurement platform.

Figure 3 .
Figure 3. Photo of the measurement platform.

Figure 5 .
Figure 5. Detector ring in the simulation.

Figure 5 .
Figure 5. Detector ring in the simulation.

Figure 6 .
Figure 6.Mean normalized cross correlation (NCC) of the same LED pair averaged over seven measuring distances.

Figure 6 .
Figure 6.Mean normalized cross correlation (NCC) of the same LED pair averaged over seven measuring distances.

Figure 7 .
Figure 7. Mean NCC at each measuring distance averaged over all LED pairs.

Figure 9 .
Figure 9. NCC of the initial LED model at each distance.

Figure 9 .
Figure 9. NCC of the initial LED model at each distance.

Figure 12 .
Figure 12.Average over distances for NCC of two eccentricity regression trials.

Figure 11 . 21 Figure 11 .
Figure 11.NCC of eccentricity regression in the first trial.

Figure 12 .
Figure 12.Average over distances for NCC of two eccentricity regression trials.

Figure 12 .
Figure 12.Average over distances for NCC of two eccentricity regression trials.

Figure 14 .
Figure 14.Average over distances for NCC of refractive index regression.

Figure 14 .
Figure 14.Average over distances for NCC of refractive index regression.

Figure 17 .
Figure 17.Close-up NCC of source radius regression.

Figure 17 .
Figure 17.Close-up NCC of source radius regression.

Figure 17 .
Figure 17.Close-up NCC of source radius regression.

Figure 18 .
Figure 18.NCC of two-way regression at 10 mm.

Figure 19 .
Figure 19.Average over distances for NCC of two-way regression.

Figure 18 .
Figure 18.NCC of two-way regression at 10 mm.

Figure 18 .
Figure 18.NCC of two-way regression at 10 mm.

Figure 19 .
Figure 19.Average over distances for NCC of two-way regression.

Figure 19 .
Figure 19.Average over distances for NCC of two-way regression.

Figure 21 .
Figure 21.Normalized angular intensity distribution at selected distances: (a) 10 mm; (b) 20 mm; (c) 35 mm; (d) 100 mm, where the red and blue curves are from measurement and simulation, respectively.

Figure 22 .
Figure 22.NCCs of final LED model at different distances.

Figure 22 .
Figure 22.NCCs of final LED model at different distances.

Figure 22 .
Figure 22.NCCs of final LED model at different distances.

Figure 23 .
Figure 23.Final LED model NCC for each individual LED sample at different distances.Figure 23.Final LED model NCC for each individual LED sample at different distances.

Figure 23 .
Figure 23.Final LED model NCC for each individual LED sample at different distances.Figure 23.Final LED model NCC for each individual LED sample at different distances.

Figure 24 .
Figure 24.Comparison of normalized angular intensity distributions measured at 50 mm and 100 mm.

Figure 24 .
Figure 24.Comparison of normalized angular intensity distributions measured at 50 mm and 100 mm.
is 1 mm wide.

Table 1 .
Initial LED parameters.Our main points of interest, which are points that have the most error and are used in regression are listed below:

Table 2 .
Final LED model parameters; see Figure8for legend.

Table 2 .
Final LED model parameters; see Figure8for legend.