# MAC/PHY Comprehensive Visible Light Communication Networks Simulation
## 5 Methodology
### Experimental Setup  
The experimental setup is comprised of different network topologies. Each network deployment is used for evaluating different situations that are likely to occur in OWC, such as the effect of multipath reflections in the CSMA/CA scheme, or the hidden node problem associated to the receivers' limited FOV. To validate the importance of considering a realistic channel model on the network evaluation, three different cases have been considered. In these scenarios, there is a VLC network composed of 1 coordinator node and 4 user nodes inside a 10 \(\times\) 10 \(\times\) 3 m\({}^{3}\) room. All the nodes have a receiver with a 1 cm\({}^{2}\) photodiode and FOV of 60\({}^{\circ}\) Full Width Half Maximum (FWHM). The coordinator is at the room's geometrical center (in the XY plane) and at the ceiling pointing downwards. The user nodes are set at 1 m height, and their transmitter and receiver are both pointing upwards. These nodes are located at the same radial distance regarding the coordinator's XY center. However, this baseline condition is slightly modified on each case under study. In the first case, all the nodes are concentrated in a  
Figure 7: Block diagram of the MAC layer sub-module. specific area of the room. This scenario forces a situation in which the user nodes may have sufficient reflected power from the ceiling to properly operate using the CSMA/CA mechanism. In the second case, they are uniformly distributed on a circumference, forming a square. In this case, depending on the radii the user nodes will be aware of other nodes. Finally, in the last case three nodes are closely located whilst the other one is at the opposite direction. This situation is proposed in order to see the impact of a single hidden node on the network's performance. Figure 8 depicts the node distribution of each case and a 3D representation of each one of them. As it was aforementioned, at short distances the reflection allows the correct execution of the MAC mechanisms. Nonetheless, as the nodes increase their distance, the path loss may become too high, lowering the received signal below the endpoint's sensitivity. Figure 9 shows the channel gain for the communications link between two nodes in these scenarios, using the parameters of Table 1.  
The number of rays used for the MMCRT-based simulation was chosen attending to empirical criteria. One of the strengths of the used ray tracing scheme is that a contribution to the impulse response is forced after each rebound, taking advantage of the underlying physical behavior of reflections (energy is scattered and some energy is directed towards the receiver). Hence, it seemed straightforward that obtaining a relatively accurate estimation of both channel gain and bandwidth could be feasible with a reduced number of rays. To check this assumption, some simulations using the same layout as in Figure 9 were performed. As it can be observed in Figure 10, neither the DC channel gain nor the bandwidth changed substantially compared to simulations using a higher number of rays (1000 and 5000). The estimated channel gain using 200 or 500 rays is practically indistinguishable from longer simulations. Nonetheless, bandwidth estimation is significantly different for the 200 rays case, whilst acceptable for the 500 rays calculation. Therefore, for the scenarios under consideration, carrying out the channel simulation using 500 rays is a trade-off between calculation speed and  
Figure 8: Graphical representation of the scenarios setup. accuracy. In addition, despite the slight variation of the bandwidth estimation with respect to more accurate simulations, the presented error is sufficiently small for moderate horizontal node separations, which are the ones at which the CSMA/CA mechanism can physically operate taking into account the sensitivity of the endpoints. Moreover, in order to properly characterize the network, both saturated and unsaturated traffic conditions have been tested.