# MAC/PHY Comprehensive Visible Light Communication Networks Simulation
## 1 Introduction  
The development of the Internet of Things (IoT) and wireless sensor networks is currently producing a significant impact on many industries, enabling the integration of valuable real-time information into different kinds of systems. These systems are usually based on Radio Frequency (RF) technologies, and their massive integration is progressively saturating the radio spectrum in commercial bands. Furthermore, some of these industries, concretely those that have ElectroMagnetic Compatibility (EMC) restrictions such as biomedical or nuclear facilities, may have severe difficulties in integrating wireless IoT solutions due to their strict regulations. A strong candidate technology to provide a solution to both radio spectrum saturation and EMC constraints in some cases is Visible Light Communications (VLC). VLC is based on the use of Solid State Lighting (SSL) devices such as White Light Emitting Diode (WLED) lamps, and thanks to the moderate bandwidth of these commercial lighting lamps, this technology is currently capable of providing downlink speeds up to a few hundred Mbps [1] in indoor scenarios. VLC has experienced a steep growth since the first proofs of concept developed by [PERSON] et al. in the early 2000s [2], and there are currently two consolidated standards (IEEE 802.15.7r1 [3] and ITU G.991 [4]) and some task groups working on Optical Wireless Communication (OWC). Besides the insensitivity of OWC systems to RF interference, VLC is used as a dual system (illumination and communications). This leads to an important issue of this technology that sometimesis neglected, which is the physiological necessity to avoid flickering or any other perceivable effect on the illumination. This was analyzed in-depth during the definition of IEEE 802.15.7 standard, resulting in three main transmission modes which use On-Off Keying (OOK), Pulse Position Modulation (PPM), and Color Shift Keying (CSK). Furthermore, since VLC operates in a human-sensitive range of wavelengths, it is also necessary to carry out a multi-objective optimization when designing VLC facilities [5], since both data transmission coverage and lighting uniformity must be ensured. Furthermore, VLC has been traditionally advertised as an inherently secure technology. Although it is more technically-complicated to compromise an OWC link than an RF-based system, light is not completely confined within a room if it has any type of potential leak (windows, door locks, etc.) [6]. The research on VLC has been focused during the last years on demonstrating the limits of the technology in terms of achievable bandwidth and channel modeling [7; 8]. Nonetheless, the scientific community has not put sufficient effort into developing and simulating MAC-layer protocols taking into account the particularities of OWC links. Concretely, IEEE 802.15.7r1 MAC is essentially the same as IEEE 802.15.4 (used by ZigBee and Bluetooth), and it does not consider that user nodes may not have visibility among them, generating multiple collisions and hence, impairing the network performance. Moreover, research on VLC network performance is generally based on either pure MAC-layer simulation [9] or pure physical channel simulation [10]. It is straightforward to demonstrate that the conclusions extracted from these works are strongly biased and cannot be considered as accurate models of real-world deployments. Moreover, there are few contributions in the literature addressing the problem in a holistic manner [11]. Due to the relative novelty of VLC there are not many software libraries for traditional network simulation platforms (OMNET++, NS-2, OPNET, Prowler, etc.). In this work, a comprehensive VLC network simulator that considers not only the MAC-layer definition of IEEE 802.15.7r1 standard, but also an accurate and dynamic channel impulse response estimation between nodes, is presented.