# VLC Network Design for High Mobility Users in Urban Tunnels
## 3 Overview of IEEE 802.15.7
### IEEE 802.15.7 MAC Layer  
The MAC layer takes care of the logical decisions from different nodes. Some of the protocols that cover the IEEE 802.15.7 MAC layer are an association of a new user, AP incorporation, transmission schemes, synchronization, and some mobility mechanisms, among other procedures.  
In a star topology, the users are ruled by a centralized AP node, called Coordinator. The synchronization of the network nodes is possible by a superframe (SF) structure allowing communication with the network elements. The IEEE 802.15.7 superframe structure, which is shown in Figure 1, is divided into active and inactive periods. The nodes communicate during the active period and remain in sleep mode during the inactive period. The active interval is further divided into two parts, Contention Access Period (CAP) and Contention Free Period (CFP). The superframe begins when the coordinator transmits a beacon frame to synchronize the users. If a user loses this beacon frame, he can not perform any action until a new beacon is received. Furthermore, the node with a long unsynchronized time needs to join to new APs. The duration of the superframe is known as Beacon Interval (BI) which depends on the optical clock (OC) frequency, the number of slots per frame, the Beacon Order (BO), and the number of the optical clock in the aBaseSlotDuration usually equal to 60 OC [22]. Equation (1) defines the time duration for BI  
\[BI=aBSFD\times 2^{BO} \tag{1}\]  
with  
\[aBSFD=aNSFS\times aBSD \tag{2}\]  
where  
* \(aBSFD=aBaseSuperFrameDuration\)
* \(aNSFS=aNumSuperFrameSlot\)
* \(aBSD=aBaseSlotDuration\)  
Figure 1: Superframe structure in the IEEE 802.15.7 standard.  
One vital aspect to consider is the time to recover communication service when a handover fails determined by the following association protocol. The association protocol can be seen in Figure 2 First, the user scans the optical channel searching for the best AP available, sensing any beacon frame. When the user detects the first beacon, it starts a waiting period of \(2^{n}+1\) BI. Then, the user decides the best option by choosing the strongest Received Signal Strength (RSS). It transmits the Association Request frame using the standardized format. Next, the coordinator needs to send an ACK frame to inform the user that the petition is in progress. So, it does not try to ingress again for a _macResponseWaitTime_ waiting period until its petition has been resolved. Later, the coordinator starts the registration of the user with multiple entities of the Core Network. When the validation process has been completed, the coordinator informs the user with an Association Response.  
The handover procedure execution time can be delayed by the delivery of the request and other signaling messages. It depends on the channel access controls used. Moreover, the VLC transmission performs Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA). In this scheme, transmissions require a waiting period, known as Contention Window (CW), to allow multiple users to share the medium. The duration of CW is a random variable with a uniform distribution that depends on BackoffExponent (BE) and aUnitBackOffPeriod, as it can be seen in Equation (3). The parameter BE is related to the number of retransmissions, while \(aUnitBackOffPeriod\) is a base number of optical clocks. Before transmitting, the node senses whether the channel is idle or busy. When the channel is busy, the transmission is reprogrammed for a longer time. If the channel is free, the node transmits the frame and waits for an ACK to confirm the correct delivery. When it has failed, BE, and the number of backoffs (NB) increase. After several failed transmissions, the frame is discarded when NB is higher than a limit, and all the counters are reset. For a better understanding, Figure 3 shows a flowchart of this transmission scheme.  
\[CW=(2^{BE}-1)\cdot aUnitBackoffPeriod \tag{3}\]  
Figure 2: Diagram of the association process in the standard 802.15.7.