Simulation of impulse response for indoor visible light communications using 3D CAD models
© Rodríguez et al.; licensee Springer. 2013
Received: 31 March 2012
Accepted: 27 November 2012
Published: 12 January 2013
Skip to main content
© Rodríguez et al.; licensee Springer. 2013
Received: 31 March 2012
Accepted: 27 November 2012
Published: 12 January 2013
In this article, a tool for simulating the channel impulse response for indoor visible light communications using 3D computer-aided design (CAD) models is presented. The simulation tool is based on a previous Monte Carlo ray-tracing algorithm for indoor infrared channel estimation, but including wavelength response evaluation. The 3D scene, or the simulation environment, can be defined using any CAD software in which the user specifies, in addition to the setting geometry, the reflection characteristics of the surface materials as well as the structures of the emitters and receivers involved in the simulation. Also, in an effort to improve the computational efficiency, two optimizations are proposed. The first one consists of dividing the setting into cubic regions of equal size, which offers a calculation improvement of approximately 50% compared to not dividing the 3D scene into sub-regions. The second one involves the parallelization of the simulation algorithm, which provides a computational speed-up proportional to the number of processors used.
Recently, there has been a growing interest in visible light communications (VLC) in some indoor application scenarios, video/audio transmission for in-home applications, secure network access, or sensor networking [1–8]. Furthermore, wireless optical communications present certain advantages over radiofrequency (RF) transmission that make them suitable in certain specific scenarios. Optical systems do not interfere with RF systems, thus avoiding electromagnetic compatibility restrictions. Moreover, there are no current legal restrictions involving bandwidth allocation and, since radiation is confined by walls, they produce intrinsically cellular networks, which are more secure against deliberate attempts to gain unauthorized access than those relying on radio systems. In this sense, the characterization of indoor VLC channels, their time dispersion, and wavelength response is essential to studying and analyzing the limits in terms of the design and performance offered by such links.
Simulating an indoor VLC channel can significantly benefit the design of high performance systems, but requires computationally efficient algorithms and models that accurately fit the characteristics of the channel elements. In order to evaluate the impulse response for indoor VLC channels, two simulation algorithms can be adapted: the Barry and the López–Hernández algorithms. While the Barry algorithm is deterministic and based on an iterative method , the López–Hernández algorithm (called the Monte Carlo ray-tracing algorithm) is based on ray-tracing techniques and Monte Carlo method , which exhibits a lower computational cost than the Barry algorithm, especially when a high temporal resolution, complex geometries, and a large number of reflections are considered. For this reason, in this article a tool for simulating the impulse response of indoor VLC channels using 3D computer-aided design (CAD) models is presented. The simulation tool is based on the Monte Carlo ray-tracing algorithm [10–12], and allows us to study the VLC signal propagation inside any simulation environment or 3D scene, regardless of its geometric shape, size (area), number of obstacles, etc. The tool features two fully differentiated parts. The first is charged with defining the 3D scene or the simulation environment, which the user can describe by means of any CAD software that is capable of generating or storing the scene in 3DS format. The geometry of the setting where the communications are being established, along with the different material types, emitters, and receivers that comprise the link or links involved in the simulation is specified in the 3D scene. The second element consists of implementing the propagation model. This refers to the mathematical models that characterize the effect of each of the elements present in the simulation environment (reflecting surfaces, emitters, and receivers), and to the simulation algorithm that, aided by these models, allows the channel response to be computed. The part of the tool that implements the propagation model and into which the 3D scene is input is programmed in C++. In addition, so as to improve the computational efficiency of the simulation tool, two optimizations are proposed. The first one consists of dividing the simulation environment into sub-cubes of equal size, so that when a ray is traced in these sub-regions, only those object faces or surfaces that are in the ray propagation path need to be considered. This first optimization allows us to reduce the execution time by approximately 50% compared to not dividing the 3D scene into sub-regions. The second one consists of parallelizing the simulation algorithm. For each wavelength, the parallelization method proposed involves the equal and static distribution of the rays for computation by different processors, i.e., following a uniform distribution. This optimization results in a calculation speed-up that is essentially proportional to the number of processors used, i.e., when 2, 4, 8, and 16 processors are used, the computational speed-up increased by 2, 4, 8, and 16 times, respectively, with respect to using a single processor.
This article is organized as follows. In Section 2, the signal propagation model in an indoor VLC channel is defined; i.e., the Monte Carlo ray-tracing algorithm and mathematical models used to characterize the elements of the visible light link are described. Section 3 describes the main features of the simulation tool and its computational complexity, which is compared with an alternate algorithm. The results are discussed in Section 4. Thus, several simulation results are reported to show the potential of the simulation tool and the effects on the computational speed-up due to both optimizations. Finally, Section 5 outlines the conclusions of this article.
where h(0)(t;E,R,λ) represents the line-of-sight (LOS) impulse response, h(k)(t;E,R,λ) is the impulse response of the light undergoing k reflections, i.e., the multiple-bounce impulse responses, λ is the wavelength, and t is the time.
where P i,n is the total reflected power reaching the receiver in the n th time interval due to the i th ray propagation.
The use of an algorithm based on the Monte Carlo method allows for the error in computing the impulse response to be estimated with just one simulation run, as long as the number of rays is large enough. Although different error estimates are obtained for several simulations, we can be confident that the standard deviation of the estimates decreases as the number of rays is increased. Moreover, the method allows for the accuracy of the results to be assessed. The partial results of one simulation can also be used to achieve a more accurate solution by selecting a suitable number of rays.
where N ΔT is the number of rays that contribute in ΔT and N f is the number of flights of rays along that interval time.
In the following sections, the elements that constitute the simulation tool are described. Moreover, an equation that describes the computational complexity of the simulation algorithm based on the number of rays, number of reflections, and geometric complexity of the simulation environment is presented.
One of the main features of this tool is that it allows us to study the VLC signal propagation inside any simulation environment, regardless of its geometric shape, size (area), number of obstacles in its interior, etc. In general, any CAD software capable of generating 3D vector-type graphics and storing them in a 3DS-format file can be used. The 3DS file format, currently one of the most complete and widely used, contains information on meshes, material attributes, bitmap references, textures, display configurations, camera positions, luminosity, and even data on object animations. The meshes comprise the elements or objects in the 3D scene, and consist of groups of triangles or faces. Each of these faces is defined by three vertices and has associated with it the properties of the material of which it is made, such as visibility, etc. These properties allow us to establish the reflective characteristics of the materials present in the simulation environment, that is, the way in which the incident rays are reflected. The simulation tool was developed in the C++ programming language and a lib3ds programming library was used to make it easier to work with the 3DS format.
In contrast to other methods [8, 9], the Monte Carlo ray-tracing algorithm allows for the evaluation of the impulse response for environments with complex geometries with no meaningful increase in computational cost, especially when a high temporal resolution, and a large number of reflections are considered. This can be explained by the number of elementary calculations that is performed: k N N F , where N is the number of rays for each wavelength, k is the number of reflections that are considered, and N F is the number of faces or triangles that define the geometry. An elementary calculation is defined as the calculation of power contribution and delay from a point source (emitter or reflection point of a ray) to the receiver, as in (5), and the assessment of the propagation of the new generated ray to determine a new point source. This computational cost can be compared with other deterministic algorithms, such as Barry’s algorithm , where a total of (N C ) k elementary calculations is performed, and N C is the number of elements into which the reflecting surfaces are divided. Therefore, the Monte Carlo ray-tracing algorithm requires a smaller amount of computational effort for a large number of reflections (k) and a large number of triangles or faces (N F ). We can also observe that the area of the triangle is not important, in contrast to Barry’s algorithm, where the number of reflecting elements N C depends upon the size of the surfaces. Moreover, Monte Carlo ray-tracing algorithms allow for the evaluation of the confidence levels of the simulation results. Despite being very accurate, deterministic methods do not allow for an easy evaluation of the error due to discretization. Also, they can compute the impulse response for just the lower-order reflections, allowing the simulation to be conducted in a reasonable amount of time since the run time is exponential in k. Thus, for example, to compute the k = 3 bounce impulse response with N C = 2,776 elements (an empty rectangular room of 7.5 × 5.5 × 3.5 m3 defined by six surfaces, N F = 12 triangles), the number of elementary calculations is roughly 2.1 × 1010 (5.9 × 1013 for k = 4). The ray-tracing algorithm is able to obtain a simulated impulse response for the same room with a relative error of less than 1% using N = 10,000,000 rays, which is equivalent to 3.6 × 108 elementary calculations (4.8 × 108 for k = 4). In short, for k = 3 reflections, the Monte Carlo ray-tracing algorithm improves the computational efficiency 58-fold in comparison to using Barry’s algorithm. For k = 4 reflections, the improvement is 1.23 × 105 fold.
In this section, we present several simulation results to show the potentiality of the simulation tool to approximately characterize the impulse response of indoor VLC channels. Moreover, the effects on the computational speed-up due to the two optimizations proposed for improving the computational efficiency are discussed.
P E (λ), W
Position (x, y, z), m
(−0.25, 0.14, 0.83)
Active area (A R ), cm2
Position (x, y, z), m
(−0.33, 0.24, 0.91)
Number of rays
ρ Blue ρ Green ρ Red
r d (∀ λ )
m (∀ λ )
0.25 0.43 0.73
White marble (2)
0.70 0.77 0.82
Aluminium metal (3)
0.45 0.49 0.52
Black paint (4)
0.03 0.04 0.04
As regards the computational complexity, since the number of rays considered in the simulation was N = 500,000, the number of triangles that define the 3D scene was N F = 416, and the number of reflections was k = 10, the number of elementary calculations per wavelength is 2.08 × 109. This computational cost can be compared to using Barry’s algorithm. If the total area of the reflecting surfaces (7.78 m2) is divided into N C = 778 elements, i.e., an element area of 100 cm2 is used, the number of elementary calculations is 8.1 × 1028. Furthermore, as discussed in Section 3.2, in the Monte Carlo ray-tracing algorithm the size of the reflecting surfaces is not important, in contrast to Barry’s algorithm, where the number of reflecting elements N C increases with the size of the surfaces, or total area. Thus, for example, if the area is 70 m2 (a hexagonal structure of 3.0 × 3.0 m2), i.e., N C = 7,000 elements, the number of operations increases to 2.8 × 1038.
In order to improve the computational efficiency of the simulation algorithm, we introduced two optimizations. The first one consists of dividing the 3D simulation environment into a set of cubic sub-regions of equal size. The number of divisions to be made at each edge c can be specified in the tool, thus generating a total of c3 grids. When tracing a ray, these grids allow for only those object faces and/or surfaces that are in the propagation path of the ray to be considered. This technique is equivalent to simplifying the ray propagation by considering only those surfaces that are actually involved in the propagation process, and is used for ray-tracing urban field prediction models . With this optimization, the computation time is reduced without affecting the accuracy of the results. The second optimization is the parallelization of the Monte Carlo method. The Monte Carlo method is a numerical statistical method based on the generation of a set of random numbers to compute a set of results associated with each. The final solution is obtained by combining each sub-result. The parallelization of the Monte Carlo method usually involves distributing the computation associated with each random number to the various processors used in the execution. One possibility is to distribute each computation statically, that is, dividing the computation equally among all the processors. If the computational effort associated with each random number varies too much, a static distribution could result in some processors completing their work well before others do. In these cases, methods for balancing the workload are used in an effort to make better use of the resources available. Since workload balancing methods introduce a certain additional load on the processors, these methods should not be used when a static workload distribution will yield a good use of resources. In the case at hand, it is reasonable to assume that a static distribution will yield a better result than a balanced distribution due to the negligible variability in the computational cost associated with each ray; that is, it is unlikely that any one processor will have to compute a large amount of high-cost rays while others compute low-cost rays. Although each ray undergoes a different number of reflections, when the number of rays is large, the average number of reflections experienced by rays assigned to each processor is very similar. Thus, for example, for the simulation environment shown in Figure 4 with 500,000 rays, unlimited reflections, assuming that the minimum power detected by the photodetector is 10–12 W, and statically distributing the rays among 16 processors, the average number of reflections per processor is 15.01 ± 0.02. When a smaller number of processors is used, the number of rays assigned to each processor is greater, resulting in a variation in the average number of reflections per processor of less than 0.02 (0.001 for two processors). That is why we propose the utilization of the static ray distribution parallelization method, where the rays are assigned to each processor with equal probability, i.e., following a uniform distribution. Specifically, for each emitter involved in the simulation, each processor will be tasked with simulating a subset of rays for each wavelength.
In this article, we presented the design and implementation of a simulation tool to estimate the impulse response of indoor VLC channels in time and wavelength using 3D CAD models. The indoor VLC channel simulation can significantly benefit the design of high performance VLC systems, but requires computationally efficient algorithms and models that accurately respond to the characteristics of the channel elements. In this sense, the simulation tool allows us to accurately define the simulation environment with 3D CAD models; furthermore, it is based on the Monte Carlo ray-tracing algorithm, which exhibits a lower computational cost than other algorithms, especially when a high temporal resolution, complex geometries, and a large number of reflections are considered. Therefore, one of the main features of the tool is that, for a given number of reflections and temporal resolution, it allows us to study the VLC signal propagation inside any simulation environment, regardless of its geometric shape, size (area), number of obstacles in its interior, etc., with a high computational efficiency. Finally, in order to improve its computational efficiency, two optimizations were introduced. The first consisted of dividing the simulation environment into sub-cubes of equal size so that when a ray is traced in these sub-regions, only those object faces or surfaces that are in the ray propagation path need to be considered. Defining the optimum number of divisions as the maximum possible value that does not saturate the node in terms of the amount of memory required, this first optimization yielded a 50.6% decrease in execution time compared to not dividing the 3D scene into sub-regions. The second optimization consisted of parallelizing the simulation algorithm based on an equal and static distribution of the rays generated at the emitter among the available processors, i.e., assigning the rays to each processor by means of a uniform distribution. This optimization resulted in a computational speed-up that is essentially proportional to the number of processors used. In short, when 2, 4, 8, and 16 processors are used, the speed-up factor increased by 2, 4, 8, and 16 times, respectively, with respect to using a single processor.
This study was funded in part by the Spanish Ministerio de Ciencia e Innovación (project TEC2009-14059-C03-02/01/03), Plan E (Spanish Economy and Employment Stimulation Plan), and the Government of the Canary Islands (project SolSubC200801000306).
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.